/* ============================================
   theme.css — Premium Visual Redesign V3
   CSS Custom Properties, Reset, Background & Animations
   ============================================ */

:root {
    --primary: #1e5257;
    --primary-light: #266a70;
    --primary-dark: #153d41;
    --primary-deeper: #0e2a2d;
    --primary-abyss: #091c1f;
    --accent: #f18715;
    --accent-glow: rgba(241, 135, 21, 0.15);
    --accent-soft: rgba(241, 135, 21, 0.08);
    --white: #ffffff;
    --text: #f2f4f6;
    --text-secondary: #a8bfc2;
    --text-muted: #5e7d80;
    --glass: rgba(22, 62, 66, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.15);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.35), 0 8px 24px rgba(0,0,0,0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overflow-x: hidden; max-width: 100vw; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-abyss);
    color: var(--text);
    min-height: 100vh;
}

/* ===== LAYERED GRADIENT BACKGROUND ===== */
.bg-layer {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 70% 10%, rgba(30, 82, 87, 0.5), transparent),
        radial-gradient(ellipse 60% 50% at 10% 80%, rgba(30, 82, 87, 0.35), transparent),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(38, 106, 112, 0.15), transparent),
        linear-gradient(180deg, #0b1e20 0%, #091c1f 40%, #071517 100%);
}

/* Subtle noise for depth */
.bg-noise {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(241, 135, 21, 0.6); }
    50% { opacity: 0.3; box-shadow: 0 0 4px rgba(241, 135, 21, 0.2); }
}

/* Scrollbar hiding (used on nav-row etc.) */
.nav-row::-webkit-scrollbar { display: none; }

.hidden { display: none; }

/* ===== PRINT STYLES ===== */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .sidebar, .hamburger, #sidebar-overlay, #year-bar, #live-strip,
    .export-btn, #share-banner, .chart-grid, .chart-card, #vehicleFilterBar { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 12px !important; }
    .kpi-card {
        background: #f8f8f8 !important; border: 1px solid #ddd !important;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .kpi-card .label { color: #666 !important; }
    .kpi-card .value { color: #000 !important; font-size: 24px !important; }
    .kpi-card .sub { color: #666 !important; }
    .table-card { background: #fff !important; border: 1px solid #ddd !important; }
    table { border: none !important; }
    th { color: #666 !important; border-bottom: 2px solid #ddd !important; }
    td { border-bottom: 1px solid #eee !important; }
    tr:hover td { background: none !important; }
    h2 { font-size: 18px !important; }
}
