/* ──────────────────────────────────────────────────────────────────────────
   LedgerIQ Overview — solid-colour build, May 2026 (rev 3)
   Owns every Overview pixel. IQ Suite editorial palette.
   Solid colours only — NO gradients anywhere.
   Fraunces serif, DM Sans, JetBrains Mono.
   ────────────────────────────────────────────────────────────────────────── */

:root {
    --liqo-bg:           #faf8f5;
    --liqo-paper:        #ffffff;
    --liqo-paper-soft:   #fbfaf6;
    --liqo-ink:          #1c1917;
    --liqo-ink-2:        #44403c;
    --liqo-ink-3:        #57534e;
    --liqo-ink-4:        #a8a29e;
    --liqo-rule:         #e7e5e0;
    --liqo-rule-strong:  #d4d0c8;

    --liqo-night:        #131a2e;

    --liqo-teal:         #4a9080;
    --liqo-teal-deep:    #2f6b5e;
    --liqo-teal-bright:  #6fb8a6;
    --liqo-teal-soft:    rgba(74, 144, 128, 0.10);
    --liqo-teal-line:    rgba(74, 144, 128, 0.22);

    --liqo-profit:       #047857;
    --liqo-profit-soft:  rgba(4, 120, 87, 0.10);
    --liqo-loss:         #be123c;
    --liqo-loss-soft:    rgba(190, 18, 60, 0.10);
    --liqo-warn:         #ca8a04;
    --liqo-warn-soft:    rgba(202, 138, 4, 0.10);
    --liqo-info:         #1e40af;
    --liqo-info-soft:    rgba(30, 64, 175, 0.10);

    /* Multi-hue palette for the colour-coded expense bars */
    --liqo-c1:           #4a9080;
    --liqo-c2:           #2f6b5e;
    --liqo-c3:           #1e40af;
    --liqo-c4:           #ca8a04;
    --liqo-c5:           #be123c;

    --liqo-font-display: 'Fraunces', Georgia, serif;
    --liqo-font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
    --liqo-font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    --liqo-r-pill:       999px;
    --liqo-r-card:       12px;
    --liqo-r-tight:      6px;
    --liqo-r-micro:      2px;

    --liqo-pad-x:        clamp(20px, 2.6vw, 36px);
    --liqo-band-gap:     clamp(20px, 2.4vw, 32px);
}

#overviewDashboard.liqo-root {
    background: var(--liqo-bg);
    color: var(--liqo-ink);
    font-family: var(--liqo-font-body);
    font-size: 14px;
    line-height: 1.5;
    padding: 24px var(--liqo-pad-x) 96px;
    display: flex;
    flex-direction: column;
    gap: var(--liqo-band-gap);
}

#overviewDashboard.liqo-root *,
#overviewDashboard.liqo-root *::before,
#overviewDashboard.liqo-root *::after {
    box-sizing: border-box;
}

/* ── Entrance — staggered fade-up ──────────────────────────────────── */

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

#overviewDashboard.liqo-root > section {
    animation: liqoFadeUp 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
#overviewDashboard.liqo-root > section:nth-child(1) { animation-delay: 0.00s; }
#overviewDashboard.liqo-root > section:nth-child(2) { animation-delay: 0.06s; }
#overviewDashboard.liqo-root > section:nth-child(3) { animation-delay: 0.12s; }
#overviewDashboard.liqo-root > section:nth-child(4) { animation-delay: 0.18s; }
#overviewDashboard.liqo-root > section:nth-child(5) { animation-delay: 0.24s; }

@keyframes liqoPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* ── Type helpers ───────────────────────────────────────────────────── */

.liqo-eyebrow {
    font-family: var(--liqo-font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--liqo-ink-3);
    font-weight: 500;
}

.liqo-num {
    font-family: var(--liqo-font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
    white-space: nowrap;
}

.liqo-headline {
    font-family: var(--liqo-font-display);
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--liqo-ink);
    line-height: 1.05;
}

/* Solid-colour emphasis (no gradient text) */
.liqo-headline em {
    font-style: italic;
    font-weight: 500;
    color: var(--liqo-teal-deep);
}

.liqo-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 14px;
}

.liqo-section-head h2 {
    margin: 0;
    font-family: var(--liqo-font-display);
    font-weight: 500;
    font-size: clamp(20px, 1.7vw, 24px);
    letter-spacing: -0.01em;
    color: var(--liqo-ink);
}

/* ── BAND 1 · Hero with solid dark band ─────────────────────────────── */

.liqo-hero {
    background: var(--liqo-night);
    border: 1px solid var(--liqo-night);
    border-radius: var(--liqo-r-card);
    overflow: hidden;
    position: relative;
    color: #fff;
}

.liqo-hero-band {
    background: var(--liqo-night);
    padding: 22px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    color: #fff;
    border-bottom: 4px solid var(--liqo-teal);
    position: relative;
}

.liqo-hero-band-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.liqo-hero-band-eyebrow {
    font-family: var(--liqo-font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--liqo-teal-bright);
    font-weight: 500;
}

.liqo-hero-band-name {
    font-family: var(--liqo-font-display);
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.liqo-hero-band-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.liqo-hero-band-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--liqo-r-pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.liqo-hero-band-pill[data-tone="health-strong"]   { color: #6fb8a6; border-color: rgba(111, 184, 166, 0.35); background: rgba(111, 184, 166, 0.10); }
.liqo-hero-band-pill[data-tone="health-stable"]   { color: #fcd34d; border-color: rgba(252, 211, 77, 0.32); background: rgba(252, 211, 77, 0.08); }
.liqo-hero-band-pill[data-tone="health-watch"]    { color: #fb923c; border-color: rgba(251, 146, 60, 0.32); background: rgba(251, 146, 60, 0.08); }
.liqo-hero-band-pill[data-tone="health-critical"] { color: #f87171; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.10); }

.liqo-hero-band-pill::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

/* Hero body — dark navy continuation of the band */

.liqo-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 32px;
    padding: 36px 40px 32px;
    background: var(--liqo-night);
    color: #fff;
}

.liqo-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

#overviewDashboard.liqo-root .liqo-hero-headline {
    font-size: clamp(34px, 3.4vw, 50px);
    line-height: 1.04;
    color: #fff !important;
}

#overviewDashboard.liqo-root .liqo-hero-headline em {
    color: var(--liqo-teal-bright) !important;
}

#overviewDashboard.liqo-root .liqo-hero-narrative {
    font-family: var(--liqo-font-display);
    font-size: clamp(15px, 1.05vw, 18px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78) !important;
    line-height: 1.55;
    font-style: italic;
    max-width: 56ch;
}

/* Bold colour-blocked KPI tiles (no gradients) */

.liqo-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 6px;
}

.liqo-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 18px 0;
    border-radius: var(--liqo-r-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    min-width: 0;
    position: relative;
    overflow: hidden;
    border-top-width: 4px;
    border-top-color: var(--tile-bar, var(--liqo-teal));
}

.liqo-hero-stat[data-tile="revenue"]          { --tile-bar: var(--liqo-teal); }
.liqo-hero-stat[data-tile="profit"]           { --tile-bar: var(--liqo-profit); }
.liqo-hero-stat[data-tile="loss"]             { --tile-bar: var(--liqo-loss); }
.liqo-hero-stat[data-tile="health-strong"]    { --tile-bar: var(--liqo-profit); }
.liqo-hero-stat[data-tile="health-stable"]    { --tile-bar: var(--liqo-warn); }
.liqo-hero-stat[data-tile="health-watch"]     { --tile-bar: var(--liqo-warn); }
.liqo-hero-stat[data-tile="health-critical"]  { --tile-bar: var(--liqo-loss); }

/* On the dark hero, use brighter tone variants for readable contrast */
.liqo-hero-stat[data-tile="loss"]             .liqo-stat-value { color: #f87171; }
.liqo-hero-stat[data-tile="profit"]           .liqo-stat-value { color: var(--liqo-teal-bright); }
.liqo-hero-stat[data-tile="health-critical"]  .liqo-stat-value { color: #f87171; }
.liqo-hero-stat[data-tile="health-watch"]     .liqo-stat-value { color: #fbbf24; }
.liqo-hero-stat[data-tile="health-stable"]    .liqo-stat-value { color: #fcd34d; }
.liqo-hero-stat[data-tile="health-strong"]    .liqo-stat-value { color: var(--liqo-teal-bright); }

/* Likewise the delta arrows use the brighter variants on dark */
.liqo-hero-stat .liqo-stat-delta[data-dir="up"]   { color: var(--liqo-teal-bright); }
.liqo-hero-stat .liqo-stat-delta[data-dir="down"] { color: #f87171; }
.liqo-hero-stat .liqo-stat-delta[data-dir="warn"] { color: #fbbf24; }

.liqo-hero-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.07);
}

.liqo-hero-stat .liqo-stat-label {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.liqo-hero-stat .liqo-stat-value {
    font-family: var(--liqo-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 600;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.liqo-hero-stat .liqo-stat-value-secondary {
    font-size: 0.42em;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0;
    margin-left: 6px;
}

.liqo-hero-stat .liqo-stat-delta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--liqo-font-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

.liqo-hero-stat .liqo-stat-delta::before {
    content: '';
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.liqo-hero-stat .liqo-stat-delta[data-dir="up"]   { color: var(--liqo-profit); }
.liqo-hero-stat .liqo-stat-delta[data-dir="up"]::before { border-bottom: 6px solid currentColor; }
.liqo-hero-stat .liqo-stat-delta[data-dir="down"] { color: var(--liqo-loss); }
.liqo-hero-stat .liqo-stat-delta[data-dir="down"]::before { border-top: 6px solid currentColor; }
.liqo-hero-stat .liqo-stat-delta[data-dir="warn"] { color: var(--liqo-warn); }
.liqo-hero-stat .liqo-stat-delta[data-dir="warn"]::before { display: none; }

.liqo-hero-stat-spark {
    height: 36px;
    margin: 6px -18px 0;
}

.liqo-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

/* Hero buttons live on dark — light outline + solid teal CTA */
.liqo-hero-actions .liqo-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--liqo-font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.02em;
    padding: 10px 16px;
    border-radius: var(--liqo-r-micro);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.liqo-hero-actions .liqo-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.liqo-hero-actions .liqo-btn--primary {
    background: var(--liqo-teal);
    color: #fff;
    border-color: var(--liqo-teal);
}
.liqo-hero-actions .liqo-btn--primary:hover { background: var(--liqo-teal-bright); border-color: var(--liqo-teal-bright); color: var(--liqo-night); }

/* Default light-surface buttons (used elsewhere) */
.liqo-btn {
    appearance: none;
    border: 1px solid var(--liqo-rule-strong);
    background: var(--liqo-paper);
    color: var(--liqo-ink);
    font-family: var(--liqo-font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.02em;
    padding: 10px 16px;
    border-radius: var(--liqo-r-micro);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.liqo-btn:hover {
    background: var(--liqo-paper-soft);
    border-color: var(--liqo-ink-4);
}

.liqo-btn--primary {
    background: var(--liqo-ink);
    color: var(--liqo-paper);
    border-color: var(--liqo-ink);
}
.liqo-btn--primary:hover { background: var(--liqo-ink-2); border-color: var(--liqo-ink-2); }

.liqo-btn--brand {
    background: var(--liqo-teal-deep);
    color: var(--liqo-paper);
    border-color: var(--liqo-teal-deep);
}
.liqo-btn--brand:hover { background: var(--liqo-teal); border-color: var(--liqo-teal); }

/* Hero chart panel — lives on dark navy, transparent border */

.liqo-hero-chart {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--liqo-r-card);
    padding: 18px 18px 6px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.liqo-hero-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 4px 4px 8px;
}

.liqo-hero-chart-title {
    font-family: var(--liqo-font-display);
    font-weight: 500;
    font-size: 17px;
    color: #fff;
}

.liqo-hero-chart-legend {
    display: flex;
    gap: 14px;
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.liqo-hero-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.liqo-hero-chart-legend i {
    width: 12px; height: 2px;
    border-radius: 2px;
    display: inline-block;
}

.liqo-hero-chart-mount {
    flex: 1;
    min-height: 360px;
    margin-top: -4px;
}

.liqo-hero-chart-foot {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    margin-top: 4px;
    padding: 12px 6px 4px;
    gap: 10px;
    font-family: var(--liqo-font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.04em;
}

.liqo-hero-chart-foot .ft-cell { display: flex; flex-direction: column; gap: 2px; }
.liqo-hero-chart-foot .ft-cell .ft-label { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.liqo-hero-chart-foot .ft-cell .ft-value { color: #fff; font-weight: 500; }

/* Apex chart re-skin specifically inside the dark hero chart panel */
.liqo-hero-chart .apexcharts-xaxis-label,
.liqo-hero-chart .apexcharts-yaxis-label {
    fill: rgba(255, 255, 255, 0.55) !important;
}
.liqo-hero-chart .apexcharts-gridline {
    stroke: rgba(255, 255, 255, 0.08) !important;
}

/* Hero chart tooltip — dark to match the dark panel.
   ApexCharts renders tooltip at body level, so target via the cssClass set in JS. */
#overviewDashboard.liqo-root .apexcharts-tooltip.liqo-tooltip-dark,
#overviewDashboard.liqo-root .apexcharts-tooltip.liqo-tooltip-dark * {
    color: #fff !important;
}
#overviewDashboard.liqo-root .apexcharts-tooltip.liqo-tooltip-dark {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
    border-radius: 6px !important;
}
#overviewDashboard.liqo-root .apexcharts-tooltip.liqo-tooltip-dark .apexcharts-tooltip-title {
    background: rgba(255, 255, 255, 0.06) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    font-family: var(--liqo-font-mono) !important;
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
    padding: 8px 12px !important;
}
#overviewDashboard.liqo-root .apexcharts-tooltip.liqo-tooltip-dark .apexcharts-tooltip-series-group {
    padding: 4px 12px !important;
    background: transparent !important;
}
#overviewDashboard.liqo-root .apexcharts-tooltip.liqo-tooltip-dark .apexcharts-tooltip-text {
    font-family: var(--liqo-font-body) !important;
    font-size: 12px !important;
}
#overviewDashboard.liqo-root .apexcharts-tooltip.liqo-tooltip-dark .apexcharts-tooltip-text-y-value {
    font-family: var(--liqo-font-mono) !important;
    font-weight: 600 !important;
    margin-left: 6px;
}

/* The same darkening for the x-axis crosshair tooltip */
.apexcharts-xaxistooltip {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    color: #fff !important;
    font-family: var(--liqo-font-mono) !important;
    font-size: 10px !important;
}
.apexcharts-xaxistooltip-bottom::before,
.apexcharts-xaxistooltip-bottom::after {
    border-bottom-color: rgba(15, 23, 42, 0.96) !important;
}

/* ── BAND 2 · Dimensions strip with tinted backgrounds ───────────────── */

.liqo-dimensions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.liqo-dim {
    background: var(--liqo-paper);
    border: 1px solid var(--liqo-rule);
    border-radius: var(--liqo-r-card);
    padding: 18px 20px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
    min-width: 0;
    overflow: hidden;
    position: relative;
    border-top-width: 4px;
    border-top-color: var(--liqo-ink-4);
}

.liqo-dim:hover {
    border-color: var(--liqo-rule-strong);
    transform: translateY(-2px);
}

.liqo-dim[data-light="green"] { border-top-color: var(--liqo-profit); }
.liqo-dim[data-light="amber"] { border-top-color: var(--liqo-warn); }
.liqo-dim[data-light="red"]   { border-top-color: var(--liqo-loss); }

/* The value itself carries tone — the dimension card stays clean */
.liqo-dim[data-light="red"]   .liqo-dim-value { color: var(--liqo-loss); }
.liqo-dim[data-light="amber"] .liqo-dim-value { color: var(--liqo-warn); }
.liqo-dim[data-light="green"] .liqo-dim-value { color: var(--liqo-profit); }

.liqo-dim-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
}

.liqo-dim-label {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--liqo-ink-3);
}

.liqo-dim-light {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--liqo-ink-4);
}

.liqo-dim-light[data-light="green"] { background: var(--liqo-profit); }
.liqo-dim-light[data-light="amber"] { background: var(--liqo-warn); }
.liqo-dim-light[data-light="red"]   { background: var(--liqo-loss); }
.liqo-dim-light[data-light="muted"] { background: var(--liqo-ink-4); }

.liqo-dim-value {
    font-family: var(--liqo-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(26px, 2.4vw, 36px);
    font-weight: 600;
    color: var(--liqo-ink);
    margin-top: 2px;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.liqo-dim-verdict {
    font-size: 12px;
    color: var(--liqo-ink-3);
    line-height: 1.35;
    margin-bottom: 6px;
}

.liqo-dim-spark {
    height: 56px;
    margin: 0 -20px -8px -20px;
    overflow: hidden;
}

/* ── BAND 3 · Money + Cash ───────────────────────────────────────────── */

.liqo-money-row {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 16px;
}

.liqo-money-card {
    background: var(--liqo-paper);
    border: 1px solid var(--liqo-rule);
    border-radius: var(--liqo-r-card);
    padding: 24px 26px;
    min-width: 0;
}

.liqo-money-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.liqo-money-row-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--liqo-rule);
}

.liqo-money-row-item:last-child { border-bottom: 0; }

.liqo-money-rank {
    font-family: var(--liqo-font-display);
    font-size: 22px;
    color: var(--liqo-ink-4);
    font-style: italic;
    line-height: 1;
}

.liqo-money-name {
    font-family: var(--liqo-font-display);
    font-size: 15px;
    color: var(--liqo-ink);
    font-weight: 500;
}

.liqo-money-pct {
    font-family: var(--liqo-font-mono);
    font-size: 11px;
    color: var(--liqo-ink-3);
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
}

.liqo-money-val {
    font-family: var(--liqo-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 16px;
    font-weight: 600;
    color: var(--liqo-ink);
    text-align: right;
    white-space: nowrap;
}

/* Solid colour bars — multi-hue per rank */
.liqo-money-bar {
    grid-column: 2 / 4;
    height: 6px;
    background: var(--liqo-rule);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
}

.liqo-money-bar-fill {
    height: 100%;
    background: var(--bar-color, var(--liqo-teal));
    border-radius: 3px;
    animation: liqoBarGrow 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    transform-origin: left center;
}

.liqo-money-bar-fill { background: var(--liqo-teal); }

@keyframes liqoBarGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Cash card */

.liqo-cash-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.liqo-cash-headline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--liqo-rule);
}

.liqo-cash-headline .liqo-num {
    font-size: clamp(28px, 2.4vw, 36px);
    font-weight: 600;
    color: var(--liqo-ink);
    line-height: 1;
    letter-spacing: -0.02em;
}

.liqo-cash-headline .liqo-cash-sublabel {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    color: var(--liqo-ink-3);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.liqo-cash-runway {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    align-items: center;
    padding: 8px 0;
}

.liqo-cash-runway-gauge {
    width: 130px;
    height: 130px;
    position: relative;
}

.liqo-cash-runway-gauge.is-critical .gauge-mount {
    animation: liqoPulse 2s ease-in-out infinite;
}

.liqo-cash-runway-gauge .gauge-mount { width: 100%; height: 100%; }

.liqo-cash-runway-stats { display: flex; flex-direction: column; gap: 8px; }

.liqo-cash-stat { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }

.liqo-cash-stat-label {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    color: var(--liqo-ink-3);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.liqo-cash-stat-value {
    font-family: var(--liqo-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 16px;
    font-weight: 600;
    color: var(--liqo-ink);
    white-space: nowrap;
}

.liqo-cash-stat-value[data-tone="loss"]   { color: var(--liqo-loss); }
.liqo-cash-stat-value[data-tone="profit"] { color: var(--liqo-profit); }

.liqo-empty {
    color: var(--liqo-ink-3);
    font-size: 12px;
    font-style: italic;
    padding: 10px 0;
}

/* ── BAND 4 · Insights ─────────────────────────────────────────────── */

.liqo-insights-card {
    background: var(--liqo-paper);
    border: 1px solid var(--liqo-rule);
    border-radius: var(--liqo-r-card);
    padding: 28px 30px;
}

.liqo-insights-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--liqo-rule);
    padding-bottom: 20px;
    margin-bottom: 22px;
}

.liqo-insights-head h2 {
    margin: 0;
    font-family: var(--liqo-font-display);
    font-weight: 500;
    font-size: clamp(24px, 2vw, 30px);
    letter-spacing: -0.01em;
}

.liqo-insights-sub {
    font-size: 13px;
    color: var(--liqo-ink-3);
    margin-top: 4px;
}

.liqo-insights-score {
    display: flex;
    align-items: center;
    gap: 14px;
}

.liqo-insights-score-text { text-align: right; }

.liqo-insights-score-num {
    font-family: var(--liqo-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 32px;
    font-weight: 600;
    color: var(--liqo-ink);
    line-height: 1;
    letter-spacing: -0.02em;
}

.liqo-insights-score-label {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--liqo-ink-3);
    margin-top: 4px;
}

.liqo-insights-ring { width: 72px; height: 72px; }

.liqo-insights-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.liqo-chip {
    appearance: none;
    background: var(--liqo-paper);
    border: 1px solid var(--liqo-rule-strong);
    color: var(--liqo-ink-3);
    font-family: var(--liqo-font-body);
    font-size: 12px;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: var(--liqo-r-pill);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.liqo-chip[aria-pressed="true"] {
    background: var(--liqo-ink);
    border-color: var(--liqo-ink);
    color: var(--liqo-paper);
}

.liqo-chip:hover { border-color: var(--liqo-ink-4); color: var(--liqo-ink); }
.liqo-chip[aria-pressed="true"]:hover { background: var(--liqo-ink-2); border-color: var(--liqo-ink-2); color: var(--liqo-paper); }

.liqo-chip-count {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    background: var(--liqo-rule);
    color: var(--liqo-ink-3);
    padding: 1px 6px;
    border-radius: var(--liqo-r-pill);
    min-width: 18px;
    text-align: center;
}

.liqo-chip[aria-pressed="true"] .liqo-chip-count {
    background: rgba(255, 255, 255, 0.18);
    color: var(--liqo-paper);
}

.liqo-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 14px;
}

/* Solid-tinted insight cards */
.liqo-insight {
    background: var(--liqo-paper);
    border: 1px solid var(--liqo-rule);
    border-radius: var(--liqo-r-card);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left-width: 4px;
    transition: transform 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.liqo-insight:hover {
    transform: translateY(-2px);
    border-color: var(--liqo-rule-strong);
}

.liqo-insight[data-cat="opportunity"] { border-left-color: var(--liqo-teal-deep); }
.liqo-insight[data-cat="risk"]        { border-left-color: var(--liqo-loss); }
.liqo-insight[data-cat="action"]      { border-left-color: var(--liqo-info); }
.liqo-insight[data-cat="anomaly"]     { border-left-color: var(--liqo-warn); }

/* Coloured eyebrow keeps the category readable without a wash on the card */
.liqo-insight[data-cat="opportunity"] .liqo-insight-cat { color: var(--liqo-teal-deep); }
.liqo-insight[data-cat="risk"]        .liqo-insight-cat { color: var(--liqo-loss); }
.liqo-insight[data-cat="action"]      .liqo-insight-cat { color: var(--liqo-info); }
.liqo-insight[data-cat="anomaly"]     .liqo-insight-cat { color: var(--liqo-warn); }

.liqo-insight-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.liqo-insight-cat {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--liqo-ink-3);
}

.liqo-insight-priority {
    font-family: var(--liqo-font-mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: var(--liqo-r-pill);
    font-weight: 600;
}

.liqo-insight-priority[data-p="critical"] { background: var(--liqo-loss);   color: #fff; }
.liqo-insight-priority[data-p="high"]     { background: var(--liqo-warn);   color: #fff; }
.liqo-insight-priority[data-p="medium"]   { background: var(--liqo-info);   color: #fff; }
.liqo-insight-priority[data-p="low"]      { background: var(--liqo-ink-4);  color: #fff; }

.liqo-insight-title {
    font-family: var(--liqo-font-display);
    font-size: 19px;
    font-weight: 500;
    color: var(--liqo-ink);
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.005em;
}

.liqo-insight-body {
    font-size: 13px;
    color: var(--liqo-ink-2);
    line-height: 1.55;
    margin: 0;
}

.liqo-insight-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--liqo-font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--liqo-teal-deep);
    background: transparent;
    border: 0;
    padding: 4px 0 0;
    cursor: pointer;
    align-self: flex-start;
    margin-top: auto;
    transition: gap 0.15s ease;
    letter-spacing: 0.02em;
}

.liqo-insight-cta:hover { gap: 10px; }
.liqo-insight-cta svg { width: 14px; height: 14px; }

/* ── BAND 5 · Composition + coverage ─────────────────────────────── */

.liqo-coverage-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr) minmax(0, 1.4fr);
    gap: 16px;
}

.liqo-coverage-card {
    background: var(--liqo-paper);
    border: 1px solid var(--liqo-rule);
    border-radius: var(--liqo-r-card);
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.liqo-composition-mount { min-height: 280px; }

.liqo-composition-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--liqo-rule);
    padding-top: 14px;
    margin-top: -4px;
}

.liqo-composition-legend-item {
    display: grid;
    grid-template-columns: 12px 1fr auto auto;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.liqo-composition-legend-item i {
    width: 12px; height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.liqo-composition-legend-item .name {
    color: var(--liqo-ink-2);
    font-family: var(--liqo-font-display);
    font-weight: 500;
}

.liqo-composition-legend-item .count {
    font-family: var(--liqo-font-mono);
    color: var(--liqo-ink-3);
    font-variant-numeric: tabular-nums;
    font-size: 11px;
}

.liqo-composition-legend-item .total {
    font-family: var(--liqo-font-mono);
    color: var(--liqo-ink);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

.liqo-coverage-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.liqo-coverage-radial { width: 160px; height: 160px; }

.liqo-coverage-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    border-top: 1px solid var(--liqo-rule);
    padding-top: 14px;
}

.liqo-data-cell { display: flex; flex-direction: column; gap: 2px; }

.liqo-data-cell .liqo-data-label {
    font-family: var(--liqo-font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--liqo-ink-3);
}

.liqo-data-cell .liqo-data-value {
    font-family: var(--liqo-font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--liqo-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.liqo-data-cell .liqo-data-sub {
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    color: var(--liqo-ink-4);
    font-variant-numeric: tabular-nums;
}

.liqo-actions-grid { display: flex; flex-direction: column; gap: 12px; }

.liqo-action-step {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--liqo-paper-soft);
    border: 1px solid var(--liqo-rule);
    border-radius: var(--liqo-r-card);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.liqo-action-step:hover {
    border-color: var(--liqo-teal-line);
    background: var(--liqo-teal-soft);
    transform: translateX(2px);
}

.liqo-action-num {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--liqo-paper);
    border: 1px solid var(--liqo-rule-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--liqo-font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--liqo-ink);
}

.liqo-action-step:nth-of-type(1) .liqo-action-num { background: var(--liqo-teal); color: #fff; border-color: var(--liqo-teal); }
.liqo-action-step:nth-of-type(2) .liqo-action-num { background: var(--liqo-warn); color: #fff; border-color: var(--liqo-warn); }
.liqo-action-step:nth-of-type(3) .liqo-action-num { background: var(--liqo-info); color: #fff; border-color: var(--liqo-info); }

.liqo-action-body { display: flex; flex-direction: column; gap: 4px; }

.liqo-action-title {
    font-family: var(--liqo-font-display);
    font-size: 15px;
    font-weight: 500;
    color: var(--liqo-ink);
}

.liqo-action-desc {
    font-size: 12px;
    color: var(--liqo-ink-3);
    line-height: 1.45;
}

.liqo-action-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-family: var(--liqo-font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--liqo-ink-3);
}

/* ── Empty / loading ───────────────────────────────────────────── */

.liqo-loading {
    min-height: 60vh;
    display: grid;
    place-items: center;
    color: var(--liqo-ink-3);
    font-family: var(--liqo-font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.liqo-error {
    border: 1px solid var(--liqo-loss-soft);
    background: var(--liqo-loss-soft);
    color: var(--liqo-loss);
    border-radius: var(--liqo-r-card);
    padding: 18px 22px;
    font-size: 13px;
}

/* ── Apex chart re-skin ───────────────────────────────────────── */

#overviewDashboard.liqo-root .apexcharts-tooltip {
    border: 1px solid var(--liqo-rule-strong) !important;
    border-radius: var(--liqo-r-tight) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
    background: var(--liqo-paper) !important;
}

#overviewDashboard.liqo-root .apexcharts-tooltip-title {
    background: var(--liqo-paper-soft) !important;
    border-bottom: 1px solid var(--liqo-rule) !important;
    font-family: var(--liqo-font-mono) !important;
    font-size: 10px !important;
    letter-spacing: 0.1em;
    color: var(--liqo-ink) !important;
}

#overviewDashboard.liqo-root .apexcharts-xaxis-label,
#overviewDashboard.liqo-root .apexcharts-yaxis-label {
    fill: var(--liqo-ink-3);
    font-family: var(--liqo-font-mono) !important;
    font-size: 10px !important;
}

#overviewDashboard.liqo-root .apexcharts-legend-text {
    color: var(--liqo-ink-3) !important;
    font-family: var(--liqo-font-body) !important;
    font-size: 11px !important;
}

#overviewDashboard.liqo-root .apexcharts-gridline { stroke: var(--liqo-rule); }
#overviewDashboard.liqo-root .apexcharts-radialbar-track .apexcharts-radial-track-element { stroke: var(--liqo-rule) !important; }

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

@media (max-width: 1240px) {
    .liqo-coverage-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .liqo-coverage-row > .liqo-coverage-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
    .liqo-hero-body { grid-template-columns: 1fr; padding: 28px 28px 24px; }
    .liqo-hero-chart-mount { min-height: 280px; }
}

@media (max-width: 880px) {
    .liqo-money-row { grid-template-columns: 1fr; }
    .liqo-dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .liqo-coverage-row { grid-template-columns: 1fr; }
    .liqo-coverage-row > .liqo-coverage-card:last-child { grid-column: auto; }
    .liqo-hero-band { padding: 18px 22px; }
    .liqo-cash-runway { grid-template-columns: 110px 1fr; }
    .liqo-cash-runway-gauge { width: 110px; height: 110px; }
}

@media (max-width: 600px) {
    #overviewDashboard.liqo-root { padding: 18px 14px 64px; }
    .liqo-hero-body { padding: 22px 18px; }
    .liqo-hero-stats { grid-template-columns: 1fr; gap: 10px; }
    .liqo-dimensions { grid-template-columns: 1fr; }
}
