/* MaintForge — App-specific custom CSS (beyond Tailwind)
   For styles that can't be expressed with Tailwind utilities. */

/* Sidebar navigation */
.sidebar-link.active {
    background: rgba(26, 58, 107, 0.08);
    color: var(--primary);
    font-weight: 600;
}
.sidebar-link.active i {
    color: var(--primary);
}

/* Tables */
.table-mf th {
    background: var(--primary-dark);
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.table-mf td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}
.table-mf tr:hover td {
    background: var(--bg-alt);
}

/* KPI trend arrows */
.trend-up { color: var(--accent); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--text-light); }

/* Status dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.operational { background: var(--accent); }
.status-dot.degraded { background: var(--orange); }
.status-dot.out-of-service { background: var(--red); }

/* === Upgrade banner (plan feature gate fallback, Sprint 2) === */
.upgrade-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(237, 174, 73, 0.06);
    border: 2px dashed rgba(237, 174, 73, 0.4);
    border-radius: 12px;
    margin: 1rem 0;
}
.upgrade-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(237, 174, 73, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.upgrade-banner-icon [data-lucide] { width: 20px; height: 20px; }
.upgrade-banner-body { flex: 1; }
.upgrade-banner-title {
    font-weight: 600;
    color: var(--text);
    margin: 0;
    font-size: 0.95rem;
}
.upgrade-banner-desc {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}
.upgrade-banner-cta { white-space: nowrap; flex-shrink: 0; }
.upgrade-banner-compact {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
}
.upgrade-banner-compact .upgrade-banner-icon {
    width: 28px;
    height: 28px;
}
.upgrade-banner-compact .upgrade-banner-icon [data-lucide] { width: 14px; height: 14px; }
@media (max-width: 640px) {
    .upgrade-banner { flex-direction: column; align-items: stretch; text-align: center; }
    .upgrade-banner-icon { margin: 0 auto; }
}

/* === Dashboard split — MARATHON_GO_ONBOARDING_UI_SPLIT Sprint 2 Slice 1
   Soft-tinted backgrounds and colored icons for KPI cards. Tokens via
   variables.css (zero hex hardcoded). === */

.kpi-icon-wrap {
    width: 2.5rem; height: 2.5rem;
    border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
}
.kpi-icon-wrap-go      { background: rgb(var(--color-go-primary) / 0.10); }
.kpi-icon-wrap-go [data-lucide]      { color: rgb(var(--color-go-primary)); }
.kpi-icon-wrap-accent  { background: rgba(237, 174, 73, 0.12); }
.kpi-icon-wrap-accent [data-lucide]  { color: var(--accent); }
.kpi-icon-wrap-danger  { background: rgba(231, 76, 60, 0.10); }
.kpi-icon-wrap-danger [data-lucide]  { color: var(--red); }

/* === Segment change form — Sprint 2 Slice 2 === */
.segment-change-danger-box {
    background: rgba(231, 76, 60, 0.04);
    border: 2px solid rgba(231, 76, 60, 0.30);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
}
.danger-confirm-input {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.9rem;
    border: 1px solid rgba(231, 76, 60, 0.40);
}
.danger-confirm-input:focus {
    outline: 2px solid rgba(231, 76, 60, 0.40);
    outline-offset: 1px;
}

/* === Onboarding wizard — Sprint 2 Slice 3 === */
.onboarding-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, transform 0.2s;
}
.onboarding-dot-active {
    background: var(--accent);
    transform: scale(1.5);
}
.onboarding-dot-done {
    background: var(--accent);
    opacity: 0.6;
}
.onboarding-link-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
}
.onboarding-link-card:hover {
    border-color: var(--accent);
    background: var(--bg-alt);
}
.onboarding-link-card [data-lucide] { color: var(--accent); flex-shrink: 0; }

/* Dark mode overrides */
[data-theme="dark"] .card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .sidebar-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    /* Sidebar collapse on tablet */
    .app-sidebar {
        position: fixed; left: -280px; z-index: 50;
        transition: left 0.3s ease;
        height: 100vh; width: 280px;
    }
    .app-sidebar.open { left: 0; }
    .app-content { margin-left: 0; }
    .sidebar-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.4);
        z-index: 40; display: none;
    }
    .sidebar-overlay.active { display: block; }
}

@media (max-width: 768px) {
    /* Stack cards on mobile */
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }

    /* Tables horizontal scroll */
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
