/* =============================================
   RGEEB CarWash Monitor — Design System
   =============================================
   Premium dark theme with glassmorphism
   ============================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

/* ── CSS Variables ── */
:root {
    /* Backgrounds */
    --bg-deep: #060a13;
    --bg-primary: #0a0e17;
    --bg-surface: #111827;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(17, 24, 39, 0.9);
    --bg-input: rgba(17, 24, 39, 0.6);
    --bg-overlay: rgba(0, 0, 0, 0.6);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(0, 255, 128, 0.4);

    /* Accent Colors */
    --primary: #00ff80;
    --primary-dim: #00cc66;
    --primary-glow: rgba(0, 255, 128, 0.15);
    --accent: #00d4ff;
    --accent-dim: #00a3cc;
    --accent-glow: rgba(0, 212, 255, 0.15);
    --warning: #ffb800;
    --warning-glow: rgba(255, 184, 0, 0.15);
    --danger: #ff4757;
    --danger-glow: rgba(255, 71, 87, 0.15);

    /* Text */
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-bright: #ffffff;

    /* Status Colors */
    --status-online: #00ff80;
    --status-offline: #ff4757;
    --status-processing: #00d4ff;
    --status-warning: #ffb800;

    /* Spacing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 255, 128, 0.1);

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.35s ease;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary);
}

/* ── Layout ── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition-slow);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--bg-deep);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--primary-glow);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-glow);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item .icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-dim), var(--accent-dim));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--bg-deep);
}

.user-details {
    flex: 1;
}

.user-details .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-details .role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 16px;
}

.btn-logout:hover {
    color: var(--danger);
    background: var(--danger-glow);
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 13px;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -1px;
}

.stat-card .sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-card.accent-green .value { color: var(--primary); }
.stat-card.accent-blue .value { color: var(--accent); }
.stat-card.accent-amber .value { color: var(--warning); }
.stat-card.accent-red .value { color: var(--danger); }

/* ── Camera Grid ── */
.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.camera-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.camera-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 128, 0.08);
    transform: translateY(-2px);
}

.camera-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.camera-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview .placeholder {
    color: var(--text-muted);
    font-size: 40px;
}

.camera-preview .live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.camera-info {
    padding: 16px;
}

.camera-info .cam-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.camera-info .cam-location {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.camera-info .cam-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── Status Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge.online { background: rgba(0, 255, 128, 0.1); color: var(--status-online); }
.badge.online::before { background: var(--status-online); box-shadow: 0 0 8px var(--status-online); }
.badge.offline { background: rgba(255, 71, 87, 0.1); color: var(--status-offline); }
.badge.offline::before { background: var(--status-offline); }
.badge.processing { background: rgba(0, 212, 255, 0.1); color: var(--status-processing); }
.badge.processing::before { background: var(--status-processing); box-shadow: 0 0 8px var(--status-processing); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dim), var(--primary));
    color: var(--bg-deep);
}
.btn-primary:hover {
    box-shadow: 0 0 20px rgba(0, 255, 128, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger-glow);
    border: 1px solid var(--danger);
    color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon:hover {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
}

/* ── Forms ── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ── Tables ── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-subtle);
}

td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-subtle);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition-slow);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-bright);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
    max-width: 380px;
}

.toast.success {
    background: rgba(0, 255, 128, 0.15);
    border: 1px solid rgba(0, 255, 128, 0.3);
}

.toast.error {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.toast.info {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(0, 255, 128, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 400px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 12px;
}

.login-card .login-logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.login-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
    margin-top: 8px;
}

/* ── Camera Full View ── */
.camera-full-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.camera-feed-wrapper {
    position: relative;
    width: 100%;
    background: var(--bg-deep);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.camera-feed-wrapper canvas {
    width: 100%;
    display: block;
}

.camera-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── ROI Editor ── */
.roi-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.roi-toolbar .label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Vehicle List Panel ── */
.vehicle-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
}

.vehicle-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.vehicle-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.vehicle-item .v-id {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
}

.vehicle-item .v-class {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 60px;
}

.vehicle-item .v-plate {
    font-size: 12px;
    color: var(--accent);
    min-width: 80px;
    font-family: monospace;
}

.vehicle-item .v-status {
    font-size: 11px;
    margin-left: auto;
}

/* ── Empty States ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    max-width: 300px;
    margin: 0 auto;
}

/* ── Loading Spinner ── */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .camera-grid {
        grid-template-columns: 1fr;
    }
    .login-card {
        width: 95%;
        padding: 28px;
    }
}

/* ── Utility ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-green { color: var(--primary); }
.text-blue { color: var(--accent); }
.text-amber { color: var(--warning); }
.text-red { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.font-mono { font-family: monospace; }
.hidden { display: none !important; }

/* ── Language Toggle ── */
.lang-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--accent);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    min-width: 40px;
    text-align: center;
}

.lang-toggle:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

/* ── RTL Support ── */
body.rtl {
    font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    direction: rtl;
}

body.rtl .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border-subtle);
}

body.rtl .main-content {
    margin-left: 0;
    margin-right: 260px;
}

body.rtl .nav-item.active {
    border-left: none;
    border-right: 3px solid var(--primary);
}

body.rtl .modal-actions {
    justify-content: flex-start;
}

body.rtl th {
    text-align: right;
}

body.rtl .vehicle-item .v-status {
    margin-left: 0;
    margin-right: auto;
}

body.rtl .toast-container {
    right: auto;
    left: 20px;
}

body.rtl .camera-preview .live-badge {
    left: auto;
    right: 12px;
}

@media (max-width: 768px) {
    body.rtl .sidebar {
        transform: translateX(100%);
    }
    body.rtl .sidebar.open {
        transform: translateX(0);
    }
    body.rtl .main-content {
        margin-right: 0;
    }
}

/* ── Premium Footer ── */
.system-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    margin-top: 50px;
    background: rgba(10, 15, 30, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 12px 12px 0 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    height: 24px;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.1));
}

.footer-brand span {
    font-weight: 600;
    color: #e5e7eb;
    letter-spacing: 2px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.footer-copy {
    text-align: right;
    line-height: 1.6;
}

body.rtl .footer-copy {
    text-align: left;
}

@media (max-width: 768px) {
    .system-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }
    .footer-copy {
        text-align: center !important;
    }
}

/* ── Print Media (PDF Export) ── */
@media print {
    @page {
        size: landscape;
        margin: 10mm;
    }
    body {
        background: white !important;
        color: black !important;
    }
    .sidebar,
    .page-header .flex.gap-3,
    .card-header .search-container,
    .table-wrapper th:last-child,
    .table-wrapper td:last-child {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    .card {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    .stats-grid {
        display: flex !important;
        gap: 15px !important;
    }
    .stat-card {
        flex: 1;
        border: 1px solid #ddd !important;
    }
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #ddd;
    }
    .table-wrapper {
        overflow: visible !important;
    }
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }
    th, td {
        border: 1px solid #ddd !important;
        color: black !important;
    }
    .badge {
        border: 1px solid #ddd !important;
    }
}
.print-header {
    display: none;
}
