/* 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); }

/* 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; }
}
