/*
 * VentureScope — Design System
 * Clean light theme, professional analytics aesthetic
 *
 * Typography: Inter (Google Fonts)
 * Color System: Neutral light palette with blue accent
 */

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

/* ── CSS Custom Properties (Design Tokens) ─────────────── */
:root {
    /* Backgrounds */
    --bg-primary: #f8f9fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fb;
    --bg-input: #f4f5f7;
    --bg-overlay: rgba(255, 255, 255, 0.85);

    /* Borders */
    --border: #e2e5ea;
    --border-light: #d0d5dc;
    --border-focus: #2563eb;

    /* Text */
    --text-primary: #1a1d23;
    --text-secondary: #5a6170;
    --text-muted: #8b919e;
    --text-disabled: #b0b5be;

    /* Accents */
    --accent-blue: #2563eb;
    --accent-blue-dim: rgba(37, 99, 235, 0.08);
    --accent-purple: #7c3aed;
    --accent-purple-dim: rgba(124, 58, 237, 0.08);
    --accent-cyan: #0891b2;
    --accent-green: #059669;
    --accent-green-dim: rgba(5, 150, 105, 0.08);
    --accent-red: #dc2626;
    --accent-red-dim: rgba(220, 38, 38, 0.08);
    --accent-amber: #d97706;
    --accent-amber-dim: rgba(217, 119, 6, 0.08);
    --accent-pink: #db2777;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Layout */
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --topbar-height: 56px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Custom Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ── Layout Structure ──────────────────────────────────── */
#app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Sidebar ───────────────────────────────────────────── */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-normal);
    overflow: hidden;
}

.sidebar-brand {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    height: 72px;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-blue);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.sidebar-brand-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.sidebar-brand-tagline {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) var(--space-sm);
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: var(--space-md) var(--space-md) var(--space-sm);
    margin-top: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px var(--space-md);
    margin: 2px 0;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

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

.nav-item.active {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent-blue);
    border-radius: var(--radius-full);
}

.nav-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Main Content Area ─────────────────────────────────── */
#main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Top Bar ───────────────────────────────────────────── */
#topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    gap: var(--space-lg);
}

.topbar-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.topbar-search input {
    width: 100%;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 var(--space-md) 0 36px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

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

.topbar-search input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.topbar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.topbar-filters {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.topbar-year-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Page Container ────────────────────────────────────── */
#page-content {
    flex: 1;
    padding: var(--space-xl);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.page-header {
    margin-bottom: var(--space-xl);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: var(--space-xs);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── KPI Cards ─────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    cursor: default;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

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

.kpi-card:nth-child(1)::before { background: var(--accent-blue); }
.kpi-card:nth-child(2)::before { background: var(--accent-purple); }
.kpi-card:nth-child(3)::before { background: var(--accent-green); }
.kpi-card:nth-child(4)::before { background: var(--accent-amber); }

.kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: var(--space-sm);
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    letter-spacing: -1px;
    line-height: 1.2;
}

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: var(--space-sm);
}

.kpi-change.positive {
    color: var(--accent-green);
    background: var(--accent-green-dim);
}

.kpi-change.negative {
    color: var(--accent-red);
    background: var(--accent-red-dim);
}

/* ── Chart Containers ──────────────────────────────────── */
.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.chart-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.chart-full {
    margin-bottom: var(--space-md);
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color var(--transition-normal);
    box-shadow: var(--shadow-card);
}

.chart-container:hover {
    border-color: var(--border-light);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-controls {
    display: flex;
    gap: var(--space-sm);
}

/* ── Buttons & Controls ────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-active, .btn.active {
    background: var(--accent-blue-dim);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* ── Filter Panel ──────────────────────────────────────── */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-card);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    align-items: end;
}

.filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: var(--space-xs);
}

/* ── Dash Component Overrides ──────────────────────────── */

/* Dropdowns */
.Select-control,
.dash-dropdown .Select-control {
    background-color: var(--bg-input) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    min-height: 36px !important;
}

.Select-menu-outer,
.dash-dropdown .Select-menu-outer {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-xl) !important;
}

.Select-option,
.dash-dropdown .Select-option {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
}

.Select-option:hover,
.Select-option.is-focused,
.dash-dropdown .Select-option:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.Select-value-label,
.Select-placeholder,
.Select--single > .Select-control .Select-value .Select-value-label {
    color: var(--text-primary) !important;
}

.Select-placeholder {
    color: var(--text-muted) !important;
}

.Select-arrow-zone .Select-arrow {
    border-top-color: var(--text-muted) !important;
}

.Select-input > input {
    color: var(--text-primary) !important;
}

/* RangeSlider */
.rc-slider-track {
    background-color: var(--accent-blue) !important;
}

.rc-slider-handle {
    border-color: var(--accent-blue) !important;
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    opacity: 1 !important;
}

.rc-slider-rail {
    background-color: var(--border) !important;
}

.rc-slider-mark-text {
    color: var(--text-muted) !important;
    font-size: 11px !important;
}

.rc-slider-dot {
    border-color: var(--border) !important;
    background-color: var(--bg-secondary) !important;
}

/* DataTable */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner {
    border-radius: var(--radius-lg) !important;
    overflow: hidden !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.dash-header {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 12px 16px !important;
}

.dash-cell {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border) !important;
    font-size: 13px !important;
    padding: 10px 16px !important;
}

.dash-cell:hover,
tr:hover .dash-cell {
    background-color: var(--bg-tertiary) !important;
}

.dash-table-container .previous-next-container {
    color: var(--text-secondary) !important;
}

.dash-table-container .previous-next-container button {
    color: var(--text-secondary) !important;
}

/* Tabs */
.tab-container .tab {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    border-bottom: 2px solid transparent !important;
    transition: all var(--transition-fast) !important;
}

.tab-container .tab:hover {
    color: var(--text-primary) !important;
}

.tab-container .tab--selected {
    color: var(--accent-blue) !important;
    border-bottom-color: var(--accent-blue) !important;
}

/* ── Data Table Row Styles ─────────────────────────────── */
.table-status-active {
    color: var(--accent-green);
}

.table-status-exited {
    color: var(--accent-blue);
}

.table-status-closed {
    color: var(--accent-red);
}

/* ── Insight Cards ─────────────────────────────────────── */
.insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    transition: all var(--transition-normal);
    border-left: 3px solid var(--accent-blue);
    box-shadow: var(--shadow-card);
}

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

.insight-card:nth-child(even) {
    border-left-color: var(--accent-purple);
}

.insight-card:nth-child(even):hover {
    border-left-color: var(--accent-blue);
}

.insight-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.insight-body {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.insight-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    margin-top: var(--space-sm);
    margin-right: var(--space-xs);
}

.insight-tag-blue {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

.insight-tag-purple {
    background: var(--accent-purple-dim);
    color: var(--accent-purple);
}

.insight-tag-green {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

/* ── Badge ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.badge-blue { background: var(--accent-blue-dim); color: var(--accent-blue); }
.badge-green { background: var(--accent-green-dim); color: var(--accent-green); }
.badge-red { background: var(--accent-red-dim); color: var(--accent-red); }
.badge-amber { background: var(--accent-amber-dim); color: var(--accent-amber); }
.badge-purple { background: var(--accent-purple-dim); color: var(--accent-purple); }

/* ── Explorer Layout ───────────────────────────────────── */
.explorer-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--space-md);
}

.explorer-filters {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    height: fit-content;
    position: sticky;
    top: calc(var(--topbar-height) + var(--space-xl));
    box-shadow: var(--shadow-card);
}

.explorer-results {
    min-width: 0;
}

.explorer-results-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.explorer-results-count strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* ── Comparison Layout ─────────────────────────────────── */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.compare-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
}

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide {
    animation: slideInLeft 0.3s ease-out forwards;
}

/* Staggered card animations */
.kpi-card:nth-child(1) { animation: fadeIn 0.4s ease-out 0.0s both; }
.kpi-card:nth-child(2) { animation: fadeIn 0.4s ease-out 0.08s both; }
.kpi-card:nth-child(3) { animation: fadeIn 0.4s ease-out 0.16s both; }
.kpi-card:nth-child(4) { animation: fadeIn 0.4s ease-out 0.24s both; }

.chart-container {
    animation: fadeIn 0.5s ease-out 0.2s both;
}

/* ── Loading State ─────────────────────────────────────── */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-muted);
}

._dash-loading {
    color: var(--accent-blue) !important;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .chart-row {
        grid-template-columns: 1fr;
    }
    .chart-row-3 {
        grid-template-columns: 1fr;
    }
    .explorer-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #sidebar {
        width: var(--sidebar-collapsed);
    }
    .sidebar-brand-text,
    .sidebar-brand-tagline,
    .nav-label,
    .sidebar-section-label {
        display: none;
    }
    #main-content {
        margin-left: var(--sidebar-collapsed);
    }
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    #page-content {
        padding: var(--space-md);
    }
}

/* ── Utility Classes ───────────────────────────────────── */
.text-blue { color: var(--accent-blue); }
.text-purple { color: var(--accent-purple); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-amber { color: var(--accent-amber); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.gap-md { gap: var(--space-md); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Enhanced Interactions ─────────────────────────────── */

/* Chart container hover with lift effect */
.chart-container:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    transition: all var(--transition-normal);
}

/* KPI card hover lift */
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Chart header flex-wrap for encoding labels */
.chart-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Insight card enhanced hover */
.insight-card {
    transition: all var(--transition-normal);
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Insight tag amber */
.insight-tag-amber {
    background: var(--accent-amber-dim);
    color: var(--accent-amber);
}

/* Plotly chart hover cursor */
.js-plotly-plot .plotly .main-svg {
    cursor: crosshair;
}

/* Smooth highlight transitions for the global interaction layer
   (assets/interactions.js) — hover dim/undim animates at ~350ms */
.js-plotly-plot .slice path,
.js-plotly-plot .point path,
.js-plotly-plot .points path,
.js-plotly-plot .trace.bars .point path,
.js-plotly-plot .scatterlayer .trace {
    transition: opacity 0.35s ease, fill-opacity 0.35s ease;
}

/* Legend items are interactive: hover = highlight series, click = toggle */
.js-plotly-plot .legend .traces {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.js-plotly-plot .legend .traces:hover {
    opacity: 0.75;
}

.js-plotly-plot .slice {
    cursor: pointer;
}

/* Dash loading spinner enhancement */
._dash-loading-callback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-blue));
    background-size: 200% 100%;
    animation: loadingBar 1.5s ease-in-out infinite;
    z-index: 999;
}

@keyframes loadingBar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Improve dropdown menu z-index for chart overlaps */
.dash-dropdown {
    z-index: 10;
}

/* Page transition animation */
#page-content > div {
    animation: fadeIn 0.3s ease-out both;
}

/* Table pagination styling */
.dash-table-container .previous-next-container {
    padding: 12px 16px;
}

.dash-table-container .previous-next-container button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 12px;
    transition: all var(--transition-fast);
}

.dash-table-container .previous-next-container button:hover {
    background: var(--border);
    color: var(--text-primary);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* RangeSlider tooltip styling */
.rc-slider-tooltip-inner {
    background-color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    min-height: auto !important;
}

