/* DEFAULT = DARK MODE */
 :root {
     --bg-main: #0B0F19;
     --bg-card: #131B2E;
     --bg-input: #1E293B;
     --text-main: #F8FAFC;
     --text-muted: #94A3B8;
     --accent-neon: #00F5D4;
     --accent-glow: rgba(0, 245, 212, 0.15);
     --border-color: #334155;
     --error-red: #F43F5E;
     --header-gradient-start: #FFFFFF;
     --header-gradient-end: #94A3B8;
     --shadow-color: rgba(0,0,0,0.25);
}
/* LIGHT MODE */
 body[data-theme="light"] {
     --bg-main: #F1F5F9;
     --bg-card: #FFFFFF;
     --bg-input: #E2E8F0;
     --text-main: #0F172A;
     --text-muted: #475569;
     --accent-neon: #0284C7;
     --accent-glow: rgba(2, 132, 199, 0.15);
     --border-color: #CBD5E1;
     --error-red: #DC2626;
     --header-gradient-start: #0F172A;
     --header-gradient-end: #475569;
     --shadow-color: rgba(15, 23, 42, 0.08);
}
 .cookie-banner {
     position: fixed;
     bottom: 20px;
     left: 20px;
     right: 20px;
     background: var(--bg-card);
     border: 1px solid var(--border-color);
     border-radius: 14px;
     padding: 18px 22px;
     z-index: 9999;
     box-shadow: 0 10px 35px var(--shadow-color);
     backdrop-filter: blur(12px);
}
 .cookie-content {
     display: flex;
     justify-content: space-between;
     align-items: center;
     gap: 20px;
     flex-wrap: wrap;
     color: var(--text-muted);
     font-size: 13px;
     line-height: 1.5;
}
 .cookie-actions {
     display: flex;
     gap: 10px;
}
 .cookie-btn {
     padding: 10px 16px;
     border-radius: 8px;
     border: 1px solid var(--border-color);
     cursor: pointer;
     font-size: 13px;
     font-weight: 600;
     transition: all 0.2s ease;
}
 .cookie-btn.accept {
     background: linear-gradient( 135deg, var(--accent-neon), #00BBF9 );
     color: #041018;
     border: none;
}
 .cookie-btn.reject {
     background: transparent;
     color: var(--text-muted);
}
 .cookie-btn:hover {
     transform: translateY(-1px);
}
 body {
     background-color: var(--bg-main);
     color: var(--text-main);
     font-family: 'Inter', sans-serif;
     margin: 0;
     padding: 30px 20px;
     -webkit-font-smoothing: antialiased;
}
 .theme-toggle {
     background: var(--bg-card);
     color: var(--text-main);
     border: 1px solid var(--border-color);
     padding: 10px 14px;
     border-radius: 8px;
     cursor: pointer;
     font-size: 13px;
     font-weight: 600;
     transition: all 0.2s ease;
     height: auto;
     letter-spacing: normal;
     text-transform: none;
}
 .theme-toggle:hover {
     border-color: var(--accent-neon);
     box-shadow: 0 0 10px var(--accent-glow);
     transform: translateY(-1px);
}
 .container {
     max-width: 1440px;
     margin: 0 auto;
}
/* ========================================= FOOTER LEGAL LINKS ========================================= */
 .footer-links {
     margin-top: 40px;
     padding: 20px 0 10px 0;
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 10px;
     flex-wrap: wrap;
     opacity: 0.72;
}
 .footer-link {
     color: var(--text-muted);
     text-decoration: none;
     font-size: 12px;
     font-weight: 500;
     transition: color 0.2s ease, opacity 0.2s ease;
     letter-spacing: 0.2px;
}
 .footer-link:hover {
     color: var(--text-main);
     opacity: 1;
}
 .footer-divider {
     color: var(--text-muted);
     font-size: 11px;
}
/* ========================================= VIEW TABS ========================================= */
/* =========================================
    COHESIVE SEGMENTED TAB SWITCHER
========================================= */

.view-tabs {
    display: inline-flex;       /* Keeps the tab bar from stretching across the entire screen */
    background: var(--bg-card); /* Uses your existing dark/light card background as a track */
    border: 1px solid var(--border-color);
    border-radius: 12px;        /* Creates a unified outer boundary */
    padding: 4px;               /* Inner padding pushes tabs slightly away from the container edge */
    gap: 4px;                   /* Clean, uniform spatial gap between the options inside the pill */
    margin-top: 25px;
    margin-bottom: 0px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); /* Adds deep inner dimension to the track */
}

/* Light mode override for the container track */
body[data-theme="light"] .view-tabs {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tab-btn {
    padding: 9px 18px;          /* Adjusted slightly to account for the container's inner padding */
    background: transparent;     /* UNSELECTED TABS: Completely blend into the container background */
    color: var(--text-muted);
    border: none;                /* Remove individual button borders to stop them looking isolated */
    border-radius: 8px;         /* Rounded corners inside the main container */
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    height: auto;
    text-transform: none;
    box-shadow: none;            /* Remove floating button shadows when unselected */
    
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

/* Hovering over unselected states */
.tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-input); /* Gives an elegant, subtle indicator before clicking */
}

/* ACTIVE TAB STATUS: Transforms into a crisp, floating modern tab layer */
.tab-btn.active {
    background: linear-gradient(
        135deg,
        var(--accent-neon) 0%,
        #00BBF9 100%
    );
    color: #041018 !important;   /* High contrast text against your bright neon colors */
    border: none;
    
    /* Adds the dimensional lift making it look physically selected */
    box-shadow:
        0 0 12px var(--accent-glow),
        0 4px 10px var(--shadow-color);
}

/* Light mode refinement for active tab text visibility */
body[data-theme="light"] .tab-btn.active {
    color: #FFFFFF !important;   /* Smooth white text for light mode blue states */
}

/* Micro-interaction on click */
.tab-btn:active {
    transform: scale(0.98);      /* Tactile mechanical press feedback */
}

 .system-notice {
     margin-bottom: 24px;
     padding: 14px 18px;
     background: rgba(255,255,255,0.03);
     border: 1px solid var(--border-color);
     border-left: 3px solid var(--accent-neon);
     border-radius: 12px;
     display: flex;
     align-items: center;
     gap: 14px;
     color: var(--text-muted);
     font-size: 13px;
     line-height: 1.6;
     backdrop-filter: blur(12px);
     box-shadow: 0 6px 18px rgba(0,0,0,0.12);
     position: relative;
     transition: opacity 0.2s ease, transform 0.2s ease;
     display: none;
}
/* Elegant circular info icon */
 .notice-icon {
     width: 26px;
     height: 26px;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     background: rgba(0, 245, 212, 0.12);
     border: 1px solid rgba(0, 245, 212, 0.35);
     color: var(--accent-neon);
     font-size: 13px;
     font-weight: 700;
     flex-shrink: 0;
     box-shadow: 0 0 12px rgba(0,245,212,0.12), inset 0 0 8px rgba(255,255,255,0.03);
}
 .notice-text {
     flex: 1;
}
/* Close button */
 .notice-close {
     background: transparent;
     border: none;
     color: var(--text-muted);
     font-size: 14px;
     cursor: pointer;
     padding: 4px 6px;
     border-radius: 6px;
     transition: all 0.2s ease;
     height: auto;
     min-width: auto;
     box-shadow: none;
}
 .notice-close:hover {
     background: rgba(255,255,255,0.05);
     color: var(--text-main);
     transform: none;
     box-shadow: none;
}
/* Light mode refinement */
 body[data-theme="light"] .system-notice {
     background: rgba(15, 23, 42, 0.03);
     box-shadow: 0 4px 14px rgba(15,23,42,0.06);
}
 body[data-theme="light"] .notice-icon {
     background: rgba(2, 132, 199, 0.08);
     border: 1px solid rgba(2, 132, 199, 0.22);
     box-shadow: 0 0 10px rgba(2,132,199,0.08), inset 0 0 6px rgba(255,255,255,0.4);
}
 body[data-theme="light"] .notice-close:hover {
     background: rgba(15,23,42,0.05);
}
/* Executive Header Structure */
 header {
     margin-bottom: 40px;
     border-bottom: 1px solid var(--border-color);
     padding-bottom: 20px;
     display: flex;
     justify-content: space-between;
     align-items: center;
}
 .brand h1 {
     margin: 0;
     font-size: 26px;
     font-weight: 700;
     letter-spacing: -0.5px;
     background: linear-gradient( 135deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100% );
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
}
 .brand p {
     margin: 4px 0 0 0;
     font-size: 13px;
     color: var(--text-muted);
     font-weight: 400;
}
 .year-badge {
     background: var(--bg-card);
     border: 1px solid var(--border-color);
     padding: 6px 14px;
     border-radius: 20px;
     font-size: 12px;
     font-weight: 600;
     color: var(--accent-neon);
     box-shadow: 0 0 15px var(--accent-glow);
}
/* Control Center Styling */
.control-panel {
    background-color: var(--bg-card);
    padding: 28px;                  /* Increased slightly for better layout breathing room */
    border-radius: 16px;            /* Softer, more modern curvature matching elite dashboards */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;                      /* Balanced gap layout spacing */
    align-items: flex-end;
    
    /* PANEL BORDER SYSTEM */
    border: 1px solid var(--border-color);
    position: relative;             /* Sets anchor context for potential inner alignment tags */
    
    /* 3D FLOATING PANEL DEPTH */
    box-shadow:
        0 20px 40px -15px var(--shadow-color),              /* Main deep floor shadow drop */
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,          /* Subtle glassmorphism highlight rim */
        0 1px 0 0 rgba(255, 255, 255, 0.05) inset;          /* Top ridge edge reflection highlight */

    /* HIGH-PERFORMANCE BACKDROP BLUR EFFECT */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* SUBTLE GLOW HOVER INTERACTION */
.control-panel:hover {
    border-color: rgba(0, 245, 212, 0.35); /* Subtle fading leak of your neon accent color into the border */
    box-shadow:
        0 25px 50px -12px var(--shadow-color),
        0 0 20px -5px var(--accent-glow);  /* Soft structural under-glow on panel hover */
}

/* Light mode adjustments for clean crispness */
body[data-theme="light"] .control-panel {
    border: 1px solid var(--border-color);
    box-shadow:
        0 15px 35px var(--shadow-color),
        0 1px 3px rgba(0, 0, 0, 0.02);
}

body[data-theme="light"] .control-panel:hover {
    border-color: var(--accent-neon);
    box-shadow:
        0 20px 40px var(--shadow-color),
        0 0 15px var(--accent-glow);
}

.disclaimer {
    font-size: 11px;
    color: var(--text-muted);
}

.form-group {
     display: flex;
     flex-direction: column;
     gap: 8px;
}

label {
     font-size: 11px;
     text-transform: uppercase;
     color: var(--text-muted);
     font-weight: 600;
     letter-spacing: 0.75px;
}
 select {
     background-color: var(--bg-input);
     color: var(--text-main);
     border: 1px solid var(--border-color);
     padding: 12px 16px;
     border-radius: 8px;
     font-size: 14px;
     font-family: inherit;
     outline: none;
     transition: all 0.2s ease;
     cursor: pointer;
     border-right: 16px solid transparent
}
 select:focus {
     border-color: var(--accent-neon);
     box-shadow: 0 0 10px var(--accent-glow);
}
 select:disabled {
     opacity: 0.4;
     cursor: not-allowed;
}
 button {
     background: linear-gradient(135deg, var(--accent-neon) 0%, #00BBF9 100%);
     color: #010610;
     border: none;
     padding: 14px 28px;
     font-size: 14px;
     font-weight: 600;
     border-radius: 8px;
     cursor: pointer;
     transition: all 0.2s ease;
     text-transform: uppercase;
     letter-spacing: 0.5px;
     height: 46px;
}
 button:hover {
     transform: translateY(-1px);
     box-shadow: 0 5px 15px rgba(0, 245, 212, 0.4);
}
 button:active {
     transform: translateY(0);
}
/* Interactive Loader Elements */
 #loader {
     display: none;
     text-align: center;
     color: var(--accent-neon);
     font-weight: 500;
     margin: 60px 0;
     font-size: 14px;
     letter-spacing: 2px;
     animation: pulse 1.5s infinite ease-in-out;
}
 @keyframes pulse {
     0% {
         opacity: 0.5;
    }
     50% {
         opacity: 1;
    }
     100% {
         opacity: 0.5;
    }
}
/* Data Visualization Canvas */
 #chart-area {
     background-color: var(--bg-card);
     border-radius: 12px;
     padding: 24px;
     min-height: 400px;
     border: 1px solid var(--border-color);
     box-shadow: 0 10px 30px var(--shadow-color);
     display: flex;
     align-items: center;
     justify-content: center;
}
 .empty-placeholder {
     color: var(--text-muted);
     font-size: 14px;
     text-align: center;
     font-weight: 300;
}
 * {
     transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
 
/* Contextual additions specifically optimized for legal document scannability */
.legal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-top: 20px;
    box-shadow: 0 20px 40px -15px var(--shadow-color);
    line-height: 1.7;
}
.legal-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 32px;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}
.legal-content h2:first-of-type {
    margin-top: 0;
}
.legal-content p, .legal-content ul {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}
.legal-content ul {
    padding-left: 20px;
}
.legal-content li {
    margin-bottom: 8px;
}
.last-updated {
    font-size: 12px;
    color: var(--accent-neon);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* =========================================
   THEMED PLATFORM NAVIGATION SYSTEM
   ========================================= */
.platform-nav {
    display: flex;
    gap: 8px;
    background-color: var(--bg-card); /* Flips cleanly between dark deep blue and white */
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-tab {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted); /* Shifts elegantly from muted grey to darker navy text */
    background-color: transparent;
    transition: all 0.2s ease;
}

/* Hover effect for unselected tabs */
.nav-tab:hover {
    color: var(--text-main);
    background-color: var(--bg-input);
}

/* THEMED ACTIVE NAVIGATION TABS */
.nav-tab.active-nav {
    background: linear-gradient(135deg, var(--accent-neon) 0%, #00BBF9 100%);
    color: #041018 !important; /* Forces premium contrast against the neon banner backgrounds */
    font-weight: 600;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* Light mode adjustments for text alignment clarity */
body[data-theme="light"] .nav-tab.active-nav {
    color: #FFFFFF !important; /* Ensures crisp text visibility on light mode blue gradients */
}
