@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ========================================================================== */
/* 1) Theme Tokens                                                            */
/* ========================================================================== */
:root {
    --primary: #0B1C2D;
    --accent: #C5A046;
    --background: #F5F3EF;
    --surface: #FFFFFF;
    --surface-alt: #EDE9E2;
    --text: #1F2A36;
    --text-muted: #6B7280;
    --border: #D6D1C8;
    --success: #2F6B4F;
    --warning: #C07A2B;
    --info: #2C5F8A;
    --danger: #9E2A2B;
    --accent-soft: #E8D8A6;

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --nav-deep: #08192B;
    --nav-deeper: #061120;
    --hero-mid: #153A59;
}

/* ========================================================================== */
/* 2) Global Foundation                                                       */
/* ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.6;
    letter-spacing: -0.005em;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    color: #fff;
    background: rgba(21, 58, 89, 0.72);
}

a,
button,
input,
textarea,
select,
[role="button"] {
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
.sidebar-options:focus-visible,
.dashboard-sc-link:focus-visible .dashboard-status-card,
.athena-quick-btn:focus-visible,
.athena-ask-button:focus-visible,
.athena-action-btn:focus-visible,
.athena-generate-report-btn:focus-visible,
.report-download-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.18), 0 0 0 6px rgba(44, 95, 138, 0.08);
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.main-content {
    margin-left: 270px;
    padding: 28px 34px;
    max-width: 1440px;
    animation: pageFadeIn 0.28s ease;
}

.dashboard-page {
    min-width: 0;
}

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

/* ========================================================================== */
/* 3) Sidebar                                                                 */
/* ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    width: 250px;
    height: 100vh;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    color: var(--surface);
    background: linear-gradient(180deg, var(--nav-deeper) 0%, var(--nav-deep) 100%);
    box-shadow: 1px 0 0 rgba(255,255,255,0.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px 18px;
}

.sidebar-brand-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
    mix-blend-mode: screen;
    opacity: 0.92;
}

.sidebar-brand-name {
    margin: 0;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.sidebar-brand-sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-divider {
    height: 1px;
    margin: 0 20px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}

.sidebar-nav-group-label {
    margin: 14px 8px 6px;
    color: rgba(232, 216, 166, 0.42);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-options {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    border-radius: 7px;
    padding: 9px 10px;
    color: rgba(232, 216, 166, 0.76);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-options:hover {
    background: rgba(197, 160, 70, 0.12);
    color: var(--accent-soft);
}

.sidebar-options:focus-visible {
    color: var(--accent-soft);
    background: rgba(197, 160, 70, 0.16);
}

.sidebar-options--active {
    box-shadow: inset 3px 0 0 var(--accent), 0 2px 8px rgba(197, 160, 70, 0.15);
    background: rgba(197, 160, 70, 0.22);
    color: #fdf5e0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.sidebar-footer {
    padding: 0 20px 20px;
}

.sidebar-footer-label {
    margin: 12px 0 3px;
    color: rgba(255, 255, 255, 0.26);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-footer-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
}

/* ========================================================================== */
/* 4) Dashboard Hub                                                           */
/* ========================================================================== */

/* Page header: identity left, window picker right */
.dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.dash-header-brand {
    margin: 0 0 5px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dash-header-title {
    margin: 0;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.dashboard-header-controls {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

#dashboard-window-dropdown {
    min-width: 180px;
}

.dashboard-control-label {
    margin: 0;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-last-updated {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    opacity: 0.65;
}

/* Compact KPI strip — 7 tiles in one row */
.dashboard-kpi-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-kpi-tile {
    border: 1px solid var(--border);
    border-top: 2px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    padding: 12px 14px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    animation: kpiSlideUp 0.32s ease both;
}

.dashboard-kpi-tile:hover {
    border-color: rgba(197, 160, 70, 0.45);
    box-shadow: 0 4px 16px rgba(11, 28, 45, 0.07), inset 0 1px 2px rgba(0,0,0,0.02);
    transform: translateY(-2px) scale(1.02);
}

/* Staggered entrance per tile */
.dashboard-kpi-strip .dashboard-kpi-tile:nth-child(1) { animation-delay: 0ms; }
.dashboard-kpi-strip .dashboard-kpi-tile:nth-child(2) { animation-delay: 50ms; }
.dashboard-kpi-strip .dashboard-kpi-tile:nth-child(3) { animation-delay: 100ms; }
.dashboard-kpi-strip .dashboard-kpi-tile:nth-child(4) { animation-delay: 150ms; }
.dashboard-kpi-strip .dashboard-kpi-tile:nth-child(5) { animation-delay: 200ms; }
.dashboard-kpi-strip .dashboard-kpi-tile:nth-child(6) { animation-delay: 250ms; }
.dashboard-kpi-strip .dashboard-kpi-tile:nth-child(7) { animation-delay: 300ms; }

.dashboard-kpi-label {
    margin: 0 0 4px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.dashboard-kpi-value {
    margin: 0 0 2px;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: clamp(16px, 1.4vw, 21px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.dashboard-kpi-value--positive { color: var(--success); }
.dashboard-kpi-value--negative { color: var(--danger); }
.dashboard-kpi-value--neutral  { color: var(--primary); }

/* Tone top-border per tile */
.dashboard-kpi-tile--positive { border-top-color: var(--success); }
.dashboard-kpi-tile--negative { border-top-color: var(--danger); }
.dashboard-kpi-tile--neutral  { border-top-color: var(--border); }

.dashboard-kpi-sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.3;
}

/* Section status row — 4 equal columns */
.dashboard-status-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-sc-link {
    display: block;
    text-decoration: none;
}

.dashboard-status-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 20px;
    min-height: 168px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    cursor: pointer;
}

.dashboard-status-card:hover {
    border-color: rgba(197, 160, 70, 0.5);
    box-shadow: 0 6px 24px rgba(11, 28, 45, 0.09), inset 0 1px 2px rgba(0,0,0,0.02);
    transform: translateY(-3px);
}

.dashboard-status-card--warn {
    border-color: rgba(192, 122, 43, 0.35);
    background: #fffcf7;
}

/* Card header: icon + section name */
.dashboard-sc-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-sc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-alt);
}

.dashboard-sc-icon-glyph {
    font-size: 15px;
    line-height: 1;
    color: var(--primary);
}

.dashboard-sc-name {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Card metric block */
.dashboard-sc-metric {
    flex: 1;
}

.dashboard-sc-value {
    margin: 0 0 3px;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.dashboard-sc-label {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
}

/* Card footer: status badge + arrow */
.dashboard-sc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.dashboard-sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 3px 9px;
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.dashboard-sc-badge--good {
    background: rgba(47, 107, 79, 0.1);
    color: var(--success);
}

.dashboard-sc-badge--warn {
    background: rgba(192, 122, 43, 0.12);
    color: var(--warning);
    animation: badgeBreathe 2.4s ease-in-out infinite;
}

.dashboard-sc-badge-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.dashboard-sc-arrow {
    color: var(--text-muted);
    font-size: 17px;
    opacity: 0.35;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.dashboard-status-card:hover .dashboard-sc-arrow {
    opacity: 0.8;
    transform: translateX(3px);
}

/* Signals section below the status row */
.dashboard-signals-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 14px 16px;
    overflow: hidden;
}

.dashboard-signals-label {
    margin: 0 0 12px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-signal-feed {
    display: flex;
    flex-direction: column;
}

.dashboard-signal-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 7px 8px 7px 12px;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    margin-left: -12px;
    border-radius: 0 4px 4px 0;
    transition: background 0.15s ease;
}

.dashboard-signal-item:hover {
    background: rgba(197, 160, 70, 0.04);
}

.dashboard-signal-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dashboard-signal-tag {
    flex-shrink: 0;
    width: 46px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.dashboard-signal-item--warn    { border-left-color: var(--warning); }
.dashboard-signal-item--good    { border-left-color: var(--success); }
.dashboard-signal-item--neutral { border-left-color: var(--border); }

.dashboard-signal-tag--warn    { color: var(--warning); }
.dashboard-signal-tag--good    { color: var(--success); }
.dashboard-signal-tag--neutral { color: var(--info); }

.dashboard-signal-title {
    flex-shrink: 0;
    min-width: 130px;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
}

.dashboard-signal-detail {
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.4;
}

/* Dashboard keyframes */
@keyframes kpiSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes badgeBreathe {
    0%, 100% { opacity: 0.75; }
    50%       { opacity: 1; }
}

@keyframes loadingBreath {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.65; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .dashboard-kpi-tile,
    .dashboard-status-card,
    .dashboard-sc-badge--warn {
        animation: none;
        transition: none;
    }
    .dashboard-kpi-tile:hover,
    .dashboard-status-card:hover {
        transform: none;
    }
}

/* ========================================================================== */
/* 5) Shared Cards / KPI                                                      */
/* ========================================================================== */
.kpi-card {
    margin-right: 20px;
    border-radius: 9px;
    background: var(--surface);
    padding: 18px 20px;
    box-shadow: none;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.kpi-grid .kpi-card {
    margin-right: 0;
    border: 1px solid var(--border);
}

.kpi-value {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(18px, 1.45vw, 23px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
    font-variant-numeric: tabular-nums;
}

.kpi-positive {
    color: var(--success);
}

.kpi-negative {
    color: var(--danger);
}

.page-summary {
    margin-top: 8px;
    color: var(--info);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

/* Inner page hero headers (Overview / Operations / Clients) */
.page-hero {
    margin-bottom: 28px;
}

.page-eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-title {
    margin: 0 0 8px;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: clamp(23px, 2.5vw, 34px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.page-subtitle {
    max-width: 680px;
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.58;
}

.page-chart-area {
    margin-top: 6px;
}

/* ========================================================================== */
/* 6) Overview + Clients Pages                                                */
/* ========================================================================== */
/* overview and clients inherit shared Athena parchment and typography */

/* Shared controls bar used by Overview, Operations, Clients, Oracle */
.page-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 12px 20px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 13px 15px;
}

.page-control-label {
    display: block;
    margin: 0 0 5px;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Keep per-page aliases for backwards compat on selectors that may exist */
.overview-controls, .clients-controls { display: contents; }

.overview-control-item label,
.clients-control-item label {
    display: block;
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.overview-kpi-title,
.clients-kpi-title {
    margin: 0 0 4px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.overview-chart-grid,
.clients-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 12px;
}

.overview-chart-card,
.clients-chart-card {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 14px 14px 4px;
    box-shadow: 0 2px 12px rgba(11, 28, 45, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.18s ease;
}

.overview-chart-card:hover,
.clients-chart-card:hover {
    border-color: rgba(197, 160, 70, 0.45);
}

.overview-chart-title,
.clients-chart-title {
    margin: 0;
    color: var(--primary);
    font-size: 16px;
}

.overview-chart-subtitle,
.clients-chart-subtitle {
    margin: 4px 0 10px;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.overview-graph,
.clients-graph {
    min-height: 260px;
}

/* ========================================================================== */
/* 7) Operations Page                                                         */
/* ========================================================================== */
/* operations inherits global Athena parchment and typography foundation */

.ops-controls { display: contents; }

.ops-controls-header,
.ops-section-title,
.ops-section-subtitle { display: none; }

.ops-control-item label {
    display: block;
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ops-kpi-title {
    margin: 0 0 4px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ops-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 12px;
}

.ops-chart-card {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 14px 14px 4px;
    box-shadow: 0 2px 12px rgba(11, 28, 45, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.18s ease;
}

.ops-chart-card:hover {
    border-color: rgba(197, 160, 70, 0.45);
}

.ops-chart-title {
    margin: 0;
    color: var(--primary);
    font-size: 16px;
}

.ops-chart-subtitle {
    margin: 4px 0 10px;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.ops-graph {
    min-height: 260px;
}

/* ========================================================================== */
/* 8) Oracle Page                                                             */
/* ========================================================================== */
/* oracle has no background override so the base parchment remains visible */

.oracle-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
    border: 1px solid rgba(197, 160, 70, 0.20);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--primary) 0%, var(--hero-mid) 58%, #1f4a6d 100%);
    padding: 24px 26px;
    color: var(--surface);
    box-shadow: 0 4px 24px rgba(11, 28, 45, 0.14);
    animation: oracleFadeIn 0.5s ease;
}

.oracle-hero-copy {
    max-width: 780px;
}

.oracle-eyebrow {
    margin: 0;
    color: rgba(232, 216, 166, 0.95);
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.oracle-title {
    margin: 8px 0;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.oracle-subtitle {
    max-width: 760px;
    margin: 0;
    color: rgba(220, 233, 246, 0.95);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.58;
}

.oracle-pill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.oracle-pill {
    border: 1px solid rgba(232, 216, 166, 0.66);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    padding: 7px 13px;
    color: #f8eecf;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.oracle-pill:hover {
    border-color: rgba(232, 216, 166, 0.9);
    background: rgba(255, 255, 255, 0.14);
}

.oracle-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 14px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 15px 16px;
    box-shadow: none;
}

.oracle-controls-header,
.oracle-section-title,
.oracle-section-subtitle { display: none; }

.oracle-controls label {
    display: block;
    margin: 0 0 6px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* oracle controls sit directly on the card surface without per-item chrome */

.oracle-control-item-wide {
    grid-column: 1 / -1;
}

/* Oracle chart cards */
.oracle-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 12px;
}

.oracle-chart-card {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 14px 14px 4px;
    box-shadow: 0 2px 12px rgba(11, 28, 45, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.18s ease;
}

.oracle-chart-card:hover {
    border-color: rgba(197, 160, 70, 0.38);
}

.oracle-chart-card-emphasis {
    border-color: rgba(197, 160, 70, 0.38);
}

.oracle-card-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.oracle-chart-title {
    margin: 0;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.oracle-chart-subtitle {
    margin: 3px 0 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 12.5px;
    line-height: 1.45;
}

.oracle-graph {
    margin: 0;
    border: 0;
    box-shadow: none;
    padding: 0;
    animation: oracleFadeInUp 0.45s ease;
    min-height: 260px;
}

/* Dash loading — breathing pulse */
._dash-loading {
    opacity: 0.45;
    animation: loadingBreath 1.4s ease-in-out infinite;
}

.oracle-graph-emphasis {
    border-radius: 12px;
}

/* Oracle KPI cards */
.oracle-kpi-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.oracle-kpi-card {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    padding: 12px 13px 10px;
    transition: border-color 0.15s ease;
}

.oracle-kpi-card:hover {
    z-index: 35;
    border-color: var(--accent);
}

.oracle-kpi-card::after {
    content: none;
}

.oracle-kpi-header {
    display: flex;
    align-items: center;
    gap: 5px;
}

.oracle-kpi-card h4 {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.oracle-kpi-icon {
    flex-shrink: 0;
    opacity: 0.65;
    font-size: 15px;
    line-height: 1;
}

.oracle-kpi-card p,
.oracle-kpi-value {
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(16px, 1.1vw, 20px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#forecast-coverage-kpi,
#runway-months-kpi,
#scenario-assumption-kpi,
#breach-risk-kpi {
    font-size: clamp(13px, 0.95vw, 16px);
    font-weight: 600;
}

#risk-score-kpi {
    font-size: clamp(13px, 0.9vw, 16px);
    line-height: 1.2;
}

/* KPI info tooltip */
.oracle-kpi-help {
    position: relative;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

.oracle-kpi-help-icon {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(31, 42, 54, 0.30);
    border-radius: 50%;
    color: rgba(31, 42, 54, 0.62);
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    cursor: help;
    user-select: none;
}

.oracle-kpi-help-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1200;
    width: 240px;
    border-radius: 8px;
    background: rgba(11, 28, 45, 0.96);
    padding: 8px 10px;
    color: #f4f7fb;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 12px 24px rgba(11, 28, 45, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    pointer-events: none;
}

.oracle-kpi-help:hover .oracle-kpi-help-tooltip,
.oracle-kpi-help:focus-within .oracle-kpi-help-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Chart info tooltip */
.oracle-chart-help {
    position: relative;
    z-index: 40;
    display: inline-flex;
    align-items: center;
}

.oracle-chart-help-icon {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(31, 42, 54, 0.25);
    border-radius: 50%;
    color: rgba(31, 42, 54, 0.55);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    cursor: help;
    user-select: none;
}

.oracle-chart-help-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1200;
    width: 260px;
    border-radius: 8px;
    background: rgba(11, 28, 45, 0.96);
    padding: 9px 11px;
    color: #f4f7fb;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    box-shadow: 0 12px 24px rgba(11, 28, 45, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    pointer-events: none;
}

.oracle-chart-help:hover .oracle-chart-help-tooltip,
.oracle-chart-help:focus-within .oracle-chart-help-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ========================================================================== */
/* 9) Controls: Dash Dropdown + Slider                                        */
/* ========================================================================== */
.Select-control,
.Select.is-open > .Select-control,
.Select.is-focused > .Select-control,
.Select.has-value > .Select-control,
.oracle-dropdown .Select-control,
.oracle-controls .Select-control {
    border-color: var(--border) !important;
    background: var(--surface) !important;
    background-color: var(--surface) !important;
    background-image: none !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

.Select-control:hover,
.Select-control:focus,
.is-focused .Select-control {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(197, 160, 70, 0.2) !important;
}

.Select-placeholder,
.Select-value,
.Select-value-label,
.Select-arrow,
.Select-arrow-zone,
.Select-input > input,
.oracle-dropdown .Select-placeholder,
.oracle-dropdown .Select-value,
.oracle-dropdown .Select-value-label,
.oracle-dropdown .Select-input > input {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
}

.Select-control .Select-input,
.Select-control .Select-input > input,
.Select-control .Select-value,
.Select-control .Select-value-label {
    background: transparent !important;
    background-color: transparent !important;
}

.Select-menu-outer,
.Select-menu,
.Select-option,
.VirtualizedSelectOption,
.oracle-dropdown .Select-menu-outer,
.oracle-dropdown .Select-menu,
.oracle-dropdown .Select-option,
.oracle-dropdown .VirtualizedSelectOption {
    border-color: var(--border) !important;
    background: var(--surface) !important;
    background-color: var(--surface) !important;
    color: var(--text) !important;
}

.Select-option.is-focused,
.VirtualizedSelectFocusedOption,
.oracle-dropdown .Select-option.is-focused,
.oracle-dropdown .VirtualizedSelectFocusedOption {
    background: rgba(197, 160, 70, 0.14) !important;
    color: var(--primary) !important;
}

.rc-slider-track {
    background: var(--accent) !important;
}

.rc-slider-rail {
    background: rgba(31, 42, 54, 0.12) !important;
}

.rc-slider-handle {
    border-color: var(--accent) !important;
    background: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(197, 160, 70, 0.20) !important;
}

.rc-slider-dot {
    border-color: rgba(31, 42, 54, 0.22) !important;
    background-color: #ffffff !important;
}

.rc-slider-dot-active {
    border-color: var(--accent) !important;
}

.rc-slider-mark-text,
.rc-slider-mark-text-active {
    color: var(--text-muted) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    opacity: 0.85 !important;
}

.rc-slider-tooltip-inner {
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: 0 8px 18px rgba(31, 42, 54, 0.20) !important;
}

.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow,
.rc-slider-tooltip-placement-topLeft .rc-slider-tooltip-arrow,
.rc-slider-tooltip-placement-topRight .rc-slider-tooltip-arrow {
    border-top-color: var(--surface) !important;
}

/* ========================================================================== */
/* 10) Motion + Utility                                                       */
/* ========================================================================== */
@keyframes oracleFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(31, 42, 54, 0.22); }
::-webkit-scrollbar-thumb:hover { background: rgba(31, 42, 54, 0.34); }

/* ========================================================================== */
/* 11) Responsive                                                             */
/* ========================================================================== */
@media (max-width: 1280px) {
    .oracle-kpi-grid { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}

@media (max-width: 1024px) {
    .main-content { padding: 22px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .dashboard-kpi-strip { grid-template-columns: repeat(4, 1fr); }
    .dashboard-status-row { grid-template-columns: repeat(2, 1fr); }
    .overview-controls { grid-template-columns: 1fr; }
    .clients-controls { grid-template-columns: 1fr; }
    .overview-chart-grid { grid-template-columns: 1fr; }
    .clients-chart-grid { grid-template-columns: 1fr; }
    .ops-controls { grid-template-columns: 1fr; }
    .ops-chart-grid { grid-template-columns: 1fr; }
    .oracle-controls { grid-template-columns: 1fr; }
    .oracle-chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .dashboard-header-controls {
        width: 100%;
        justify-content: space-between;
    }

    #dashboard-window-dropdown {
        width: min(300px, 100%) !important;
    }

    .dashboard-status-row { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        max-height: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 6px 18px rgba(6, 17, 32, 0.28);
    }

    .sidebar-brand {
        padding: 12px 14px 10px;
    }

    .sidebar-brand-sub,
    .sidebar-nav-group-label,
    .sidebar-footer,
    .sidebar-nav .sidebar-divider {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 10px 10px;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar-options {
        margin-bottom: 0;
        border: 1px solid rgba(232, 216, 166, 0.2);
        border-radius: 999px;
        padding: 9px 12px;
        min-height: 40px;
        font-size: 13px;
        line-height: 1;
    }

    .sidebar-options--active {
        box-shadow: none;
        border-color: rgba(197, 160, 70, 0.85);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .dashboard-header {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .dash-header-brand {
        font-size: 9px;
    }

    .dash-header-title {
        font-size: clamp(24px, 7vw, 30px);
    }

    .dashboard-header-controls {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .dashboard-control-label {
        font-size: 10px;
    }

    #dashboard-window-dropdown {
        width: 100% !important;
        min-width: 0;
    }

    .dashboard-kpi-strip {
        grid-auto-columns: minmax(170px, 74%);
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 6px;
        scroll-padding-left: 4px;
        scroll-snap-type: x proximity;
    }

    .dashboard-kpi-tile {
        scroll-snap-align: start;
    }

    .dashboard-status-card {
        gap: 14px;
        min-height: 0;
        padding: 16px;
    }

    .dashboard-sc-value {
        font-size: clamp(24px, 9vw, 31px);
    }

    .dashboard-signal-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        margin-left: 0;
        padding: 9px 2px 9px 10px;
    }

    .dashboard-signal-tag {
        width: auto;
    }

    .dashboard-signal-title {
        min-width: 0;
    }

    .athena-panel { padding: 20px; }
    .oracle-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
    .oracle-pill-row { justify-content: flex-start; }
    .oracle-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .oracle-kpi-card { padding: 11px 12px 9px; }
}

@media (max-width: 520px) {
    .main-content {
        padding: 14px 12px 16px;
    }

    .dashboard-kpi-strip {
        grid-auto-columns: minmax(158px, 82%);
    }

    .dashboard-signals-section {
        padding: 12px;
    }

    .athena-quick-row {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .dashboard-kpi-tile:hover,
    .dashboard-status-card:hover,
    .athena-quick-btn:hover,
    .athena-ask-button:hover,
    .report-download-btn:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ========================================================================== */
/* Athena Guardian Panel                                                      */
/* ========================================================================== */

.athena-panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 280px at 0% 0%, rgba(21, 58, 89, 0.08), transparent 50%),
        radial-gradient(900px 240px at 100% 0%, rgba(197, 160, 70, 0.11), transparent 45%),
        var(--surface);
    border: 1px solid rgba(11, 28, 45, 0.12);
    border-radius: 16px;
    padding: 26px;
    margin-top: 24px;
    box-shadow: 0 16px 36px rgba(11, 28, 45, 0.08), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.athena-panel::after {
    content: "";
    position: absolute;
    top: -36px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 160, 70, 0.2) 0%, rgba(197, 160, 70, 0.02) 70%);
    pointer-events: none;
}

.athena-panel-header {
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.athena-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hero-mid);
    background: rgba(44, 95, 138, 0.12);
    border: 1px solid rgba(44, 95, 138, 0.2);
}

.athena-panel-title {
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 5px;
    letter-spacing: -0.02em;
}

.athena-panel-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 760px;
}

.athena-capability-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
}

.athena-capability-item {
    position: relative;
    padding-left: 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.athena-capability-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hero-mid);
}

.athena-quick-row {
    display: grid;
    grid-template-columns: 140px repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
}

.athena-quick-label {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.athena-quick-btn {
    border: 1px solid rgba(11, 28, 45, 0.18);
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.athena-quick-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 7px 16px rgba(11, 28, 45, 0.12);
}

.athena-input-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 18px;
}

.athena-input {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 11px 14px;
    line-height: 1.45;
    box-sizing: border-box;
    border: 1px solid rgba(11, 28, 45, 0.17);
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--text);
    background: rgba(255, 255, 255, 0.85);
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.athena-input::placeholder {
    color: #7a8491;
}

.athena-input--multiline {
    resize: vertical;
    min-height: 72px;
    max-height: 190px;
}

.athena-input:focus {
    border-color: var(--info);
    box-shadow: 0 0 0 4px rgba(44, 95, 138, 0.12);
}

.athena-ask-button {
    padding: 12px 18px;
    min-height: 48px;
    align-self: stretch;
    background: linear-gradient(145deg, #0b1c2d 0%, #153a59 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    min-width: 162px;
    box-shadow: 0 10px 20px rgba(11, 28, 45, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.athena-ask-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(11, 28, 45, 0.26);
}

.athena-loading {
    min-height: 110px;
}

.athena-feedback {
    min-height: 20px;
    margin: -4px 0 2px;
    font-size: 0.83rem;
    font-weight: 600;
    line-height: 1.35;
}

.athena-feedback--muted { color: transparent; }
.athena-feedback--info { color: var(--info); }
.athena-feedback--success { color: var(--success); }
.athena-feedback--error { color: var(--danger); }

.athena-ask-button:disabled,
.athena-generate-report-btn:disabled,
.athena-action-btn:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.athena-response-panel { display: flex; flex-direction: column; gap: 16px; }

.athena-brief-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.athena-answer-card {
    border-radius: 12px;
    border: 1px solid rgba(21, 58, 89, 0.2);
    background: linear-gradient(180deg, rgba(21, 58, 89, 0.06), rgba(21, 58, 89, 0.02));
    padding: 14px 16px;
}

.athena-answer-label {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hero-mid);
}

.athena-answer {
    font-size: 0.96rem;
    color: var(--text);
    line-height: 1.62;
    margin: 0;
}

.athena-brief-question {
    margin: 0 0 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(11, 28, 45, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.athena-brief-question-label {
    color: var(--primary);
    font-weight: 700;
}

.athena-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.athena-section-card {
    border: 1px solid rgba(11, 28, 45, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px 13px;
}

.athena-empty {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
}

.athena-error {
    color: var(--danger);
    font-size: 0.88rem;
    margin: 0;
}

.athena-section-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 8px; }
.athena-list { margin: 0; padding-left: 18px; }
.athena-list-item { font-size: 0.88rem; color: var(--text); margin-bottom: 4px; line-height: 1.5; }

.athena-brief-rec-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.athena-brief-rec-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(11, 28, 45, 0.1);
}

.athena-brief-rec-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.athena-brief-rec-text {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
}

.athena-action-btn {
    border: 1px solid rgba(21, 58, 89, 0.24);
    background: rgba(21, 58, 89, 0.08);
    color: var(--primary);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
}

.athena-action-btn:hover {
    background: rgba(21, 58, 89, 0.14);
}

.athena-report-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.athena-generate-report-btn {
    border: 1px solid rgba(11, 28, 45, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 243, 239, 0.95));
    color: var(--primary);
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.athena-generate-report-btn:hover {
    box-shadow: 0 8px 16px rgba(11, 28, 45, 0.12);
}

.athena-ask-button:active,
.athena-quick-btn:active,
.athena-action-btn:active,
.athena-generate-report-btn:active,
.report-download-btn:active {
    transform: translateY(1px);
}

.athena-generate-report-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.athena-highlights .athena-section-title { color: var(--success); }
.athena-risk-flags .athena-section-title { color: var(--danger); }
.athena-recommendations .athena-section-title { color: var(--info); }
.athena-followups .athena-section-title { color: var(--accent); }

@media (max-width: 900px) {
    .athena-grid { grid-template-columns: 1fr; }
    .athena-quick-row { grid-template-columns: 1fr; }
    .athena-brief-rec-item { flex-direction: column; align-items: stretch; }
    .athena-action-btn { width: 100%; }
}

@media (max-width: 760px) {
    .athena-panel { padding: 20px; }
    .athena-input-row { flex-direction: column; }
    .athena-ask-button { width: 100%; min-width: 0; }
}

/* ========================================================================== */
/* CFO Quarterly Briefing Report                                              */
/* ========================================================================== */
.report-document {
    background: var(--surface);
    border: 1px solid rgba(11, 28, 45, 0.16);
    border-radius: 14px;
    padding: 36px 42px 30px;
    box-shadow:
        0 24px 60px rgba(11, 28, 45, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
    background-image:
        linear-gradient(180deg, rgba(245, 243, 239, 0.5), rgba(255, 255, 255, 1) 120px),
        radial-gradient(900px 240px at 100% 0%, rgba(197, 160, 70, 0.08), transparent 55%);
    color: var(--text);
    position: relative;
}

.report-document::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--hero-mid) 50%, var(--accent) 100%);
    border-radius: 14px 14px 0 0;
}

.report-header { margin-bottom: 18px; }

.report-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}

.report-eyebrow {
    display: block;
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 6px;
}

.report-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.015em;
    margin: 0 0 4px;
    line-height: 1.15;
}

.report-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 640px;
}

.report-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.report-classification {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--danger);
    padding: 4px 10px;
    border: 1px solid rgba(158, 42, 43, 0.35);
    border-radius: 4px;
    background: rgba(158, 42, 43, 0.06);
}

.report-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 9px 16px;
    background: linear-gradient(145deg, #0b1c2d 0%, #153a59 100%);
    color: #fff;
    border: 1px solid rgba(11, 28, 45, 0.4);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(11, 28, 45, 0.18);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.report-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(11, 28, 45, 0.24);
}

.report-download-icon {
    font-size: 14px;
    line-height: 1;
    color: var(--accent);
}

.report-gold-rule {
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, rgba(197, 160, 70, 0.3) 70%, transparent 100%);
    border-radius: 2px;
    margin: 6px 0 14px;
}

.report-gold-rule--thin {
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.report-meta-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(245, 243, 239, 0.6);
}

.report-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.report-meta-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.report-meta-value {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.35;
}

.report-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(11, 28, 45, 0.08);
}

.report-section:first-of-type { border-top: none; padding-top: 0; }

.report-section-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 14px;
    position: relative;
    padding-left: 12px;
}

.report-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.report-inquiry {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0 0 8px;
    padding: 8px 12px;
    background: rgba(11, 28, 45, 0.04);
    border-left: 3px solid var(--hero-mid);
    border-radius: 0 6px 6px 0;
}

.report-inquiry-label { font-style: normal; font-weight: 700; color: var(--primary); }

.report-summary-text {
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--text);
    margin: 6px 0 0;
    text-align: justify;
}

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.report-kpi-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 8px;
    padding: 12px 14px;
    min-height: 90px;
    box-shadow: 0 2px 6px rgba(11, 28, 45, 0.04);
}

.report-kpi-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 6px;
}

.report-kpi-value {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.report-kpi-value--positive { color: var(--success); }
.report-kpi-value--negative { color: var(--danger); }

.report-kpi-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin: 6px 0 0;
}

.report-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.report-half {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 8px 4px;
}

.report-sub-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 4px 8px 4px;
}

.report-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 60px 12px;
    margin: 0;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.report-th {
    background: var(--primary);
    color: var(--accent);
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px;
}

.report-th--right, .report-td--right { text-align: right; }

.report-td {
    padding: 9px 14px;
    border-top: 1px solid var(--border);
    color: var(--text);
}

.report-table tr:nth-child(even) .report-td { background: rgba(245, 243, 239, 0.5); }

.report-brief-body {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.report-brief-block {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(11, 28, 45, 0.08);
}

.report-brief-block:last-child {
    border-bottom: none;
}

.report-brief-title {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.report-brief-title--good { color: var(--success); }
.report-brief-title--danger { color: var(--danger); }
.report-brief-title--info { color: var(--info); }
.report-brief-title--gold { color: var(--accent); }

.report-brief-list { margin: 0; padding-left: 18px; }

.report-brief-li {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 5px;
}

.report-footer { margin-top: 26px; }

.report-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding-top: 10px;
}

.report-end {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--text-muted);
}

.report-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    max-width: 640px;
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .report-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .report-document { padding: 24px 22px; }
    .report-header-row { flex-direction: column; align-items: flex-start; }
    .report-header-actions { flex-direction: row; align-items: center; }
    .report-meta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-two-col { grid-template-columns: 1fr; }
}

@media print {
    body { background: #fff; }
    .sidebar, .athena-panel-header, .athena-quick-row, .athena-input-row,
    .report-download-btn { display: none !important; }
    .report-document { box-shadow: none; border: none; padding: 0; }
}
