/* ============================================================================
   WooCommerce Analytics — Corporate/Enterprise Design System
   Professional Business Intelligence Interface (matching original)
   ============================================================================ */

/* ── CSS Variables ─────────────────────────────────────────────────── */

:root {
    /* Primary Palette — Professional Navy/Blue */
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --primary-glow: rgba(30, 64, 175, 0.12);

    /* Accent Colors */
    --success: #047857;
    --success-light: #059669;
    --warning: #d97706;
    --warning-light: #f59e0b;
    --danger: #dc2626;
    --info: #0e7490;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);

    /* Neutrals — Light Mode */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* 5-Level Shadow System — navy-tinted for light mode */
    --shadow-xs: 0 1px 2px rgba(30, 64, 175, 0.04);
    --shadow-sm: 0 1px 3px rgba(30, 64, 175, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(30, 64, 175, 0.08), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 24px rgba(30, 64, 175, 0.10), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 16px 40px rgba(30, 64, 175, 0.12), 0 8px 16px rgba(0, 0, 0, 0.05);

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --transition-fast: 120ms;
    --transition-base: 200ms;
    --transition-slow: 300ms;
    --transition: 200ms cubic-bezier(0.19, 1, 0.22, 1);
}


/* ── Dark Mode ────────────────────────────────────────────────────── */

body.dark-mode {
    --bg-main: #0b1220;
    --bg-card: #151c2f;
    --bg-hover: #1f2740;
    --text-primary: #f8fbff;
    --text-secondary: #c7d2f5;
    --text-muted: #94a3c8;
    --border: #222c46;
    --border-light: #1a2338;

    --gradient-hero: linear-gradient(130deg, #1b2750 0%, #0b1220 100%);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 12px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.4), 0 6px 12px rgba(0, 0, 0, 0.3);
}


/* ── Base ──────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4, h5 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}


/* ── Animations ───────────────────────────────────────────────────── */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}


/* ── Header ────────────────────────────────────────────────────────── */

.compact-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 1.5rem;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.header-row-1 {
    padding-top: 0.4rem;
    padding-bottom: 0.3rem;
    background: var(--gradient-hero);
    box-shadow: var(--shadow-lg);
}

.header-row-2 {
    padding-top: 0.2rem;
    padding-bottom: 0.4rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
body.dark-mode .header-row-2 {
    background: rgba(11, 18, 32, 0.75);
}

.header-logo {
    height: 22px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity var(--transition);
}

.header-logo:hover {
    opacity: 1;
}

.header-spacer {
    flex: 1;
}

.header-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    margin-left: auto;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    background: #ffffff;
    color: var(--primary-dark);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.header-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--primary-dark);
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 4px;
    overflow: hidden;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
}
.header-nav::-webkit-scrollbar { display: none; }

.nav-tab {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all var(--transition);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
}
.nav-tab:hover {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.9);
}
body.dark-mode .nav-tab {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}
body.dark-mode .nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.header-period {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.period-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.period-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
body.dark-mode .period-label {
    color: rgba(255, 255, 255, 0.7);
}

.year-dropdown, .month-dropdown {
    width: 72px !important;
    font-size: 13px !important;
}

.preset-group {
    display: flex;
    gap: 4px;
}

.preset-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    color: var(--primary-dark);
    cursor: pointer;
    transition: all var(--transition);
}
.preset-btn:hover { background: rgba(255, 255, 255, 0.9); color: var(--primary-dark); }
.preset-btn.active { background: var(--primary-dark); color: white; border-color: var(--primary-dark); }
body.dark-mode .preset-btn {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}
body.dark-mode .preset-btn:hover { background: rgba(255, 255, 255, 0.2); color: white; }
body.dark-mode .preset-btn.active { background: white; color: var(--primary-dark); border-color: white; }

.lang-toggle {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lang-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition);
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.15); color: white; }
.lang-btn.active { background: white; color: var(--primary-dark); }

.theme-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.theme-btn:hover { background: rgba(255, 255, 255, 0.2); color: white; }


/* ── Hero Section ──────────────────────────────────────────────────── */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f8fafc 0%, #eff6ff 30%, #dbeafe 50%, #f8fafc 100%);
    padding: 90px 24px 48px;
    transition: background var(--transition);
}

body.dark-mode .hero-section {
    background: var(--gradient-hero);
}

.hero-content {
    max-width: 1000px;
    text-align: center;
}

.hero-brand-block { margin-bottom: 40px; }

.hero-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--primary);
}

.hero-brand {
    font-size: 44px;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 8px;
    letter-spacing: -1px;
}

.hero-tagline {
    font-size: 20px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}


/* Architecture Diagram */

.arch-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 48px 0;
    flex-wrap: wrap;
}

.arch-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    min-width: 180px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease;
}
.arch-box:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.arch-icon {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.arch-label {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.arch-items {
    list-style: none;
    padding: 0;
    margin: 0;
}
.arch-items li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 2px 0;
}

.arch-arrow-container {
    display: flex;
    align-items: center;
}

.arch-arrow {
    font-size: 24px;
    color: var(--primary);
}


/* Narrative Cards */

.hero-narrative { margin: 40px 0; }

.narrative-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: left;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease;
}
.narrative-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.narrative-problem { border-top: 3px solid var(--primary); }
.narrative-solution { border-top: 3px solid var(--info); }
.narrative-result { border-top: 3px solid var(--success); }

.narrative-icon {
    font-size: 24px;
    margin-bottom: 12px;
}
.narrative-problem .narrative-icon { color: var(--primary); }
.narrative-solution .narrative-icon { color: var(--info); }
.narrative-result .narrative-icon { color: var(--success); }

.narrative-title {
    font-size: 18px;
    margin: 0 0 8px;
}

.narrative-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}


/* Tech Stack */

.hero-tech-stack {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.tech-badge {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    transition: all var(--transition);
    box-shadow: var(--shadow-xs);
}
.tech-badge:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/* Hero CTA Block */

.hero-cta-block {
    margin: 48px auto 0;
    max-width: 480px;
    padding: 36px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease;
}

.hero-cta-block:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

.hero-cta-headline {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px;
    line-height: 1.3;
}

.hero-cta-button {
    display: inline-block;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform var(--transition-base) var(--ease-out-expo),
                box-shadow var(--transition-base) var(--ease-out-expo);
    box-shadow: var(--shadow-md);
}

.hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #ffffff;
    text-decoration: none;
}


/* Scroll Indicator */

.scroll-indicator {
    margin-top: 48px;
    opacity: 0.6;
}

.scroll-text {
    font-size: 13px;
    color: var(--text-muted);
    margin: 8px 0 0;
}

.scroll-bounce {
    font-size: 20px;
    color: var(--primary);
    animation: bounce 2s infinite;
}


/* ── Dashboard Content ─────────────────────────────────────────────── */

.dashboard-content {
    max-width: none;
    margin: 0;
    padding: 40px 32px 24px;
}


/* ── Sections ──────────────────────────────────────────────────────── */

.dashboard-section {
    margin-bottom: 48px;
    scroll-margin-top: 90px;
    animation: fadeInUp 0.4s ease;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(239, 246, 255, 0.5) 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    scroll-margin-top: 100px;
}
.section-header:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(3px);
    border-left-color: var(--primary-light);
}

.section-header i {
    font-size: 20px;
    color: var(--primary);
}

.section-header h3 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}


/* ── KPI Cards ─────────────────────────────────────────────────────── */

.cards-row {
    margin-bottom: 16px;
}

.kpi-card {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease;
}

.card-label {
    color: var(--text-muted);
}

.card-value {
    color: var(--text-primary);
}

/* Top gradient accent bar */
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: height var(--transition);
}

.kpi-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}
.kpi-card:hover::before {
    height: 5px;
}

/* Staggered animation delays */
.row .col-3:nth-child(1) .kpi-card { animation-delay: 0.03s; }
.row .col-3:nth-child(2) .kpi-card { animation-delay: 0.06s; }
.row .col-3:nth-child(3) .kpi-card { animation-delay: 0.09s; }
.row .col-3:nth-child(4) .kpi-card { animation-delay: 0.12s; }

.card-icon {
    margin-bottom: 8px;
    font-size: 1.5rem;
    opacity: 0.7;
    transition: transform var(--transition);
}
.kpi-card:hover .card-icon { transform: scale(1.05); }

.card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 4px;
}

.card-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    font-variant-numeric: tabular-nums;
}


/* ── Chart Containers ──────────────────────────────────────────────── */

.js-plotly-plot {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease;
}
.js-plotly-plot:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: rgba(30, 64, 175, 0.2);
}


/* ── Dark Mode Glassmorphism ──────────────────────────────────────── */

body.dark-mode .hero-cta-block {
    background: linear-gradient(140deg, rgba(23, 32, 55, 0.94), rgba(10, 16, 30, 0.96));
    border-color: rgba(148, 163, 200, 0.14);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(14px);
}

body.dark-mode .hero-cta-block:hover {
    border-color: rgba(125, 211, 252, 0.5);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

body.dark-mode .hero-cta-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

body.dark-mode .section-header,
body.dark-mode .js-plotly-plot,
body.dark-mode .kpi-card,
body.dark-mode .narrative-card,
body.dark-mode .arch-box {
    background: linear-gradient(140deg, rgba(23, 32, 55, 0.94), rgba(10, 16, 30, 0.96));
    border-color: rgba(148, 163, 200, 0.14);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(14px);
}

body.dark-mode .kpi-card:hover,
body.dark-mode .js-plotly-plot:hover,
body.dark-mode .narrative-card:hover,
body.dark-mode .arch-box:hover {
    border-color: rgba(125, 211, 252, 0.5);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

body.dark-mode .section-header:hover {
    border-color: rgba(148, 163, 200, 0.14);
    border-left-color: rgba(125, 211, 252, 0.8);
}

body.dark-mode .kpi-card::before {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}


/* ── Dash Dropdowns ────────────────────────────────────────────────── */

.Select-control {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius-sm) !important;
}
.Select-value-label {
    color: var(--text-primary) !important;
}
.Select-menu-outer {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
}

/* Dash Bootstrap switch */
.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}


/* ── CTA Section ──────────────────────────────────────────────────── */

.cta-section {
    background: var(--gradient-hero);
    padding: 80px 24px;
    text-align: center;
    margin-top: 64px;
}

.cta-content {
    max-width: 640px;
    margin: 0 auto;
}

.cta-headline {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
    line-height: 1.3;
}

.cta-subtext {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 32px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 14px 36px;
    background: #ffffff;
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform var(--transition-base) var(--ease-out-expo),
                box-shadow var(--transition-base) var(--ease-out-expo);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-dark);
    text-decoration: none;
}

/* ── FAQ Section ──────────────────────────────────────────────────── */

.faq-section {
    padding: 64px 24px;
    background: var(--bg-main);
}

.faq-content {
    max-width: 720px;
    margin: 0 auto;
}

.faq-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 32px;
}

.faq-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.faq-accordion .accordion-button {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    padding: 18px 0;
    box-shadow: none;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
}

.faq-accordion .accordion-body {
    padding: 0 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Dark mode overrides */
body.dark-mode .cta-section {
    background: var(--gradient-hero);
}

body.dark-mode .faq-accordion .accordion-button {
    color: var(--text-primary);
    background: transparent;
}

body.dark-mode .faq-accordion .accordion-button:not(.collapsed) {
    color: var(--primary-light);
}

body.dark-mode .faq-accordion .accordion-item {
    border-color: var(--border);
    background: transparent;
}

body.dark-mode .faq-accordion .accordion-body {
    color: var(--text-secondary);
}

body.dark-mode .faq-accordion .accordion-collapse {
    background: transparent;
}

/* ── Footer ────────────────────────────────────────────────────────── */

.dashboard-footer {
    padding: 0;
    margin-top: 48px;
    border-top: 1px solid var(--border);
}

.footer-disclaimer {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 16px 24px 0;
    margin: 0;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 32px;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-logo {
    height: 28px;
    width: auto;
    filter: brightness(0);
    opacity: 0.7;
    transition: opacity var(--transition);
}

.footer-logo:hover {
    opacity: 1;
}

body.dark-mode .footer-logo {
    filter: brightness(0) invert(1);
}

.footer-company {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-sep {
    margin: 0 2px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}


/* ── Data Table ────────────────────────────────────────────────────── */

#overall-table .table {
    font-size: 13px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border-color: var(--border);
    margin-bottom: 0;
}

#overall-table .table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 14px;
    border-color: var(--primary-dark);
    white-space: nowrap;
}

#overall-table .table td {
    padding: 8px 14px;
    border-color: var(--border);
    color: var(--text-primary);
    background: var(--bg-card);
}

#overall-table .table-striped > tbody > tr:nth-of-type(odd) > td {
    background: rgba(30, 64, 175, 0.05) !important;
    --bs-table-striped-bg: transparent !important;
}

#overall-table .table-hover > tbody > tr:hover > td {
    background: var(--primary-glow);
}

/* Dark mode table overrides */
body.dark-mode #overall-table .table-dark th {
    background: #1a2548;
    border-color: #222c46;
}

body.dark-mode #overall-table .table-dark td {
    background: #151c2f;
    border-color: #222c46;
    color: #f8fbff;
}

body.dark-mode #overall-table .table-dark.table-striped > tbody > tr:nth-of-type(odd) > td {
    background: #182238 !important;
    --bs-table-striped-bg: transparent !important;
}

body.dark-mode #overall-table .table-dark.table-hover > tbody > tr:hover > td {
    background: rgba(30, 64, 175, 0.2);
}


/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .preset-group { display: none; }
}

@media (max-width: 992px) {
    /* Hide nav and period dropdowns, show only presets */
    .header-nav { display: none; }
    .period-group { display: none; }
    .header-period { flex: 1; justify-content: center; }
    .preset-group { display: flex; }
}

@media (max-width: 768px) {
    .hero-brand { font-size: 32px; }
    .hero-tagline { font-size: 16px; }
    .arch-diagram { flex-direction: column; }
    .arch-arrow-container { transform: rotate(90deg); }
    .dashboard-content { padding: 16px; }
    .hero-cta-block { margin: 36px auto 0; padding: 28px 24px; }
    .hero-cta-headline { font-size: 18px; }
    /* Footer stacks on mobile */
    .footer-row { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
    .footer-left { flex-direction: column; align-items: center; gap: 12px; }
    .footer-right { gap: 16px; }
    /* Disable hover transforms on touch */
    .kpi-card:hover,
    .js-plotly-plot:hover,
    .narrative-card:hover,
    .arch-box:hover,
    .hero-cta-block:hover { transform: none; }
}

@media (max-width: 576px) {
    .header-row { gap: 8px; padding: 0 8px; }
    .header-row-1 { padding-top: 0.3rem; padding-bottom: 0.2rem; }
    .header-logo { height: 18px; }
    .header-cta-btn { font-size: 12px; padding: 4px 12px; }
    .hero-section { padding: 90px 16px 32px; min-height: auto; }
    .hero-brand { font-size: 26px; }
    .hero-cta-block { padding: 24px 20px; }
    .hero-cta-button { padding: 10px 24px; font-size: 14px; }
    .card-value { font-size: 20px; }
}
