/* ============================================================
   Public Overview Dashboard CSS
   Works with public_dashboard_common.css
============================================================ */


/* ============================================================
   Overview Page Theme Variables
============================================================ */

.public-dashboard-page.overview-dashboard-page {
    --overview-primary: #00c7c7;
    --overview-primary-dark: #00a6a6;
    --overview-accent: #e2b12c;
    --overview-blue: #0081c6;

    --overview-text-main: #ffffff;
    --overview-text-muted: #aab8d3;
    --overview-card-bg: rgba(255, 255, 255, 0.055);
    --overview-card-border: rgba(255, 255, 255, 0.10);
    --overview-card-hover: rgba(255, 255, 255, 0.075);

    --overview-shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.12);
    --overview-shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.16);
}

[data-theme="light"] .public-dashboard-page.overview-dashboard-page {
    --overview-text-main: #071b33;
    --overview-text-muted: #4f6690;
    --overview-card-bg: #ffffff;
    --overview-card-border: rgba(15, 39, 71, 0.10);
    --overview-card-hover: rgba(248, 250, 252, 0.96);

    --overview-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.055);
    --overview-shadow-strong: 0 16px 38px rgba(15, 23, 42, 0.08);
}


/* ============================================================
   Overview Hero
   Kept for future use if enabled again
============================================================ */

.overview-dashboard-page .overview-hero-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(0, 199, 199, 0.18);
    background:
        radial-gradient(circle at top left, rgba(0, 199, 199, 0.16), transparent 34%),
        radial-gradient(circle at top right, rgba(226, 177, 44, 0.10), transparent 30%),
        var(--overview-card-bg);
    box-shadow:
        var(--overview-shadow-strong),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .overview-dashboard-page .overview-hero-card {
    background:
        radial-gradient(circle at top left, rgba(0, 199, 199, 0.14), transparent 34%),
        radial-gradient(circle at top right, rgba(226, 177, 44, 0.12), transparent 30%),
        #ffffff;
    border: 1px solid rgba(15, 39, 71, 0.10);
    box-shadow:
        var(--overview-shadow-strong),
        0 4px 12px rgba(15, 23, 42, 0.04);
}

.overview-dashboard-page .overview-hero-card::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(0, 199, 199, 0.10);
    pointer-events: none;
}

.overview-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.overview-eyebrow {
    margin: 0 0 8px;
    color: var(--overview-primary);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.overview-hero-content h1 {
    margin: 0 0 10px;
    color: var(--overview-text-main);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.overview-subtitle {
    max-width: 880px;
    margin: 0;
    color: var(--overview-text-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.overview-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.overview-control,
.overview-btn {
    min-height: 42px;
    border-radius: 999px;
    padding: 0 16px;
    font-size: 0.84rem;
    font-weight: 800;
    outline: none;
}

.overview-control {
    min-width: 180px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.06);
    color: var(--overview-text-main);
}

[data-theme="light"] .overview-control {
    background: #ffffff;
    border-color: rgba(15, 39, 71, 0.16);
    color: #071b33;
}

.overview-btn {
    border: 1px solid rgba(0, 199, 199, 0.36);
    background: var(--overview-primary);
    color: #001f33;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 199, 199, 0.18);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.overview-btn:hover {
    transform: translateY(-1px);
    background: #09d4d4;
    box-shadow: 0 14px 30px rgba(0, 199, 199, 0.24);
}

.overview-btn.secondary {
    background: transparent;
    color: var(--overview-text-main);
    border-color: rgba(148, 163, 184, 0.26);
    box-shadow: none;
}

[data-theme="light"] .overview-btn.secondary {
    color: #0f2747;
    background: #ffffff;
}


/* ============================================================
   KPI Grid
============================================================ */

.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.overview-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 148px;
    border: 1px solid var(--overview-card-border);
    background:
        radial-gradient(circle at top right, rgba(0, 199, 199, 0.12), transparent 32%),
        var(--overview-card-bg);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.overview-kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 199, 199, 0.34);
    background:
        radial-gradient(circle at top right, rgba(0, 199, 199, 0.18), transparent 34%),
        var(--overview-card-hover);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .overview-kpi-card {
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.045),
        0 14px 32px rgba(15, 23, 42, 0.055);
}

[data-theme="light"] .overview-kpi-card:hover {
    box-shadow:
        0 12px 24px rgba(15, 23, 42, 0.08),
        0 22px 48px rgba(15, 23, 42, 0.10);
}

.overview-kpi-label {
    display: block;
    color: var(--overview-text-muted);
    font-size: 0.83rem;
    font-weight: 500;
    margin-bottom: 14px;
}

.overview-kpi-value {
    display: block;
    color: var(--overview-text-main);
    font-size: clamp(1.5rem, 1.8vw, 1.85rem);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.overview-kpi-meta {
    display: block;
    color: var(--overview-text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}


/* ============================================================
   Main Grid + Cards
============================================================ */

.overview-main-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.overview-card {
    border: 1px solid var(--overview-card-border);
    background: var(--overview-card-bg);
    box-shadow:
        var(--overview-shadow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .overview-card {
    background: #ffffff;
    border: 1px solid rgba(15, 39, 71, 0.10);
    box-shadow:
        var(--overview-shadow-soft),
        0 18px 44px rgba(15, 23, 42, 0.055);
}

.overview-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.overview-card-header h2 {
    margin: 0 0 6px;
    color: var(--overview-text-main);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.25;
}

.overview-card-header p {
    margin: 0;
    color: var(--overview-text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.overview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 900;
    border: 1px solid transparent;
}

.overview-badge.info {
    color: #001f33;
    background: rgba(0, 199, 199, 0.92);
    border-color: rgba(0, 199, 199, 0.34);
}

.overview-badge.warning {
    color: #5f4100;
    background: rgba(226, 177, 44, 0.22);
    border-color: rgba(226, 177, 44, 0.36);
}

[data-theme="dark"] .overview-badge.warning {
    color: #f6d36b;
}


/* ============================================================
   Debt Hero
============================================================ */

.overview-debt-hero {
    background:
        radial-gradient(circle at top left, rgba(0, 199, 199, 0.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(226, 177, 44, 0.10), transparent 30%),
        var(--overview-card-bg);
}

[data-theme="light"] .overview-debt-hero {
    background:
        radial-gradient(circle at top left, rgba(0, 199, 199, 0.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(226, 177, 44, 0.11), transparent 30%),
        #ffffff;
}

.overview-debt-total {
    margin-bottom: 20px;
    color: var(--overview-text-main);
    font-size: clamp(2.3rem, 4vw, 3.85rem);
    font-weight: 950;
    letter-spacing: -0.055em;
    line-height: 1;
}

.overview-debt-subline {
    margin-bottom: 18px;
    color: var(--overview-text-main);
    font-size: 0.96rem;
    font-weight: 850;
    line-height: 1.45;
}

.overview-split-bar {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    margin-bottom: 18px;
}

.overview-split-bar span {
    display: block;
    height: 100%;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: auto;
    min-width: 0;
    transition: width 0.35s ease, flex-basis 0.35s ease;
}

.overview-split-bar .domestic {
    background: var(--overview-primary);
}

.overview-split-bar .external {
    background: var(--overview-accent);
}

.overview-split-bar .soe {
    background: var(--overview-blue);
    box-shadow: -1px 0 0 rgba(255, 255, 255, 0.55);
}


.overview-debt-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.overview-debt-mini-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-debt-mini {
    min-width: 0;
    padding: 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .overview-debt-mini {
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(15, 39, 71, 0.08);
}

.overview-mini-label {
    margin-bottom: 8px;
    color: var(--overview-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.35;
}

.overview-mini-value {
    color: var(--overview-text-main);
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.overview-mini-value span {
    display: inline-flex;
    margin-left: 4px;
    color: var(--overview-primary);
    font-size: 0.78rem;
    font-weight: 900;
}


/* ============================================================
   Gauge
============================================================ */

.overview-gauge-wrap {
    position: relative;
    width: min(260px, 100%);
    height: 180px;
    margin: 0 auto 18px;
}

.overview-gauge-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.overview-gauge-center {
    position: absolute;
    left: 50%;
    top: 62%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.overview-gauge-center strong {
    display: block;
    color: var(--overview-text-main);
    font-size: 1.7rem;
    font-weight: 950;
    line-height: 1;
}

.overview-gauge-center span {
    display: block;
    margin-top: 6px;
    color: var(--overview-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.overview-risk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.overview-risk-grid div {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .overview-risk-grid div {
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(15, 39, 71, 0.08);
}

.overview-risk-grid span {
    display: block;
    color: var(--overview-text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    margin-bottom: 5px;
}

.overview-risk-grid strong {
    color: var(--overview-text-main);
    font-size: 0.94rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}


/* ============================================================
   Visual Grid + Charts
============================================================ */

.overview-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.overview-visual-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.overview-chart-row {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.overview-chart-box {
    position: relative;
    min-height: 260px;
}

.overview-chart-box.small {
    min-height: 260px;
}

.overview-chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}

.overview-center-total {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 112px;
    height: 112px;
    border-radius: 999px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    background: rgba(5, 12, 28, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    padding: 10px;
    box-sizing: border-box;
}

.overview-center-total-wide {
    width: 132px;
    height: 132px;
}

[data-theme="light"] .overview-center-total {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(15, 39, 71, 0.08);
}

.overview-center-total strong {
    color: var(--overview-text-main);
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1.16;
    letter-spacing: -0.03em;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.overview-center-total span {
    margin-top: 4px;
    color: var(--overview-text-muted);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.overview-rank-list {
    display: grid;
    gap: 8px;
}

.overview-rank-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .overview-rank-item {
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(15, 39, 71, 0.08);
}

.overview-rank-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--overview-primary);
}

.overview-rank-name {
    min-width: 0;
    color: var(--overview-text-main);
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-rank-value {
    color: var(--overview-text-muted);
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}


/* ============================================================
   Custom Chart Hover Tooltip
============================================================ */

.overview-chart-tooltip {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 25;

    min-width: 190px;
    max-width: 260px;

    padding: 12px 14px;
    border-radius: 14px;

    background: rgba(5, 12, 28, 0.94);
    border: 1px solid rgba(226, 177, 44, 0.22);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);

    color: #ffffff;
    pointer-events: none;

    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease,
        transform 0.15s ease;
}

.overview-chart-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.overview-chart-tooltip-title {
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.25;
}

.overview-chart-tooltip-value {
    display: block;
    color: #e2b12c;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.35;
}

[data-theme="light"] .overview-chart-tooltip {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(15, 39, 71, 0.14);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    color: #071b33;
}

[data-theme="light"] .overview-chart-tooltip-title {
    color: #071b33;
}

[data-theme="light"] .overview-chart-tooltip-value {
    color: #8a6200;
}


/* ============================================================
   Message Strip
   Kept for future use if insight cards are enabled again
============================================================ */

.overview-message-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.overview-message-strip.compact {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}

.overview-message-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 18px;
    background: var(--overview-card-bg);
    border: 1px solid var(--overview-card-border);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.overview-message-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 199, 199, 0.28);
    background: var(--overview-card-hover);
}

.overview-message-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 199, 199, 0.15);
    color: var(--overview-primary);
    border: 1px solid rgba(0, 199, 199, 0.24);
    font-size: 0.86rem;
    font-weight: 950;
}

.overview-message-card strong {
    display: block;
    color: var(--overview-text-main);
    font-size: 0.9rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.overview-message-card span {
    display: block;
    color: var(--overview-text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}


/* ============================================================
   Drawer
============================================================ */

.overview-drawer {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: min(420px, calc(100vw - 48px));
    padding: 18px;
    border-radius: 20px;

    background:
        radial-gradient(circle at top left, rgba(0, 199, 199, 0.10), transparent 35%),
        rgba(5, 12, 28, 0.96);
    border: 1px solid rgba(0, 199, 199, 0.18);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);

    z-index: 13000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.98);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.overview-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

[data-theme="light"] .overview-drawer {
    background: #ffffff;
    border: 1px solid rgba(15, 39, 71, 0.12);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.overview-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.overview-drawer-head h3 {
    margin: 0;
    color: var(--overview-text-main);
    font-size: 1rem;
    font-weight: 900;
}

.overview-close-drawer {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: transparent;
    color: var(--overview-text-main);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

.overview-drawer p {
    margin: 0;
    color: var(--overview-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}


/* ============================================================
   Debt Sustainability Analysis + Debt Path
============================================================ */

.overview-sustainability-section .overview-card-body {
    display: grid;
    gap: 26px;
}

.overview-debt-path-block,
.overview-dsa-block {
    min-width: 0;
}

.overview-dsa-block {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .overview-dsa-block {
    border-top-color: rgba(15, 39, 71, 0.10);
}

.overview-subsection-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.overview-subsection-heading h3 {
    margin: 0;
    color: var(--overview-text-main);
    font-size: 1rem;
    font-weight: 900;
}

.overview-subsection-heading p {
    margin: 5px 0 0;
    color: var(--overview-text-muted);
    font-size: 0.80rem;
    line-height: 1.5;
}

.overview-debt-path-chart {
    position: relative;
    width: 100%;
    height: 380px;
    min-height: 380px;
    padding: 14px 12px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

[data-theme="light"] .overview-debt-path-chart {
    background: rgba(248, 250, 252, 0.88);
    border-color: rgba(15, 39, 71, 0.08);
}

.overview-debt-path-chart canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.overview-dsa-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .overview-dsa-table-wrap {
    border-color: rgba(15, 39, 71, 0.08);
}

.overview-dsa-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.025);
    color: var(--overview-text-main);
    font-size: 0.79rem;
}

[data-theme="light"] .overview-dsa-table {
    background: rgba(255, 255, 255, 0.88);
}

.overview-dsa-table th,
.overview-dsa-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
    white-space: nowrap;
}

[data-theme="light"] .overview-dsa-table th,
[data-theme="light"] .overview-dsa-table td {
    border-bottom-color: rgba(15, 39, 71, 0.07);
}

.overview-dsa-table th {
    color: var(--overview-text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    background: rgba(255, 255, 255, 0.045);
}

[data-theme="light"] .overview-dsa-table th {
    background: rgba(241, 245, 249, 0.95);
}

.overview-dsa-table th:first-child,
.overview-dsa-table td:first-child {
    text-align: left;
}

.overview-dsa-table tbody tr:last-child td {
    border-bottom: 0;
}

.overview-dsa-table tbody tr:hover {
    background: rgba(35, 229, 219, 0.045);
}

[data-theme="light"] .overview-dsa-table tbody tr:hover {
    background: rgba(15, 118, 110, 0.045);
}

.overview-dsa-ratio-name {
    min-width: 260px;
    font-weight: 800;
    white-space: normal !important;
    line-height: 1.4;
}

.overview-dsa-threshold {
    color: #23e5db;
    font-weight: 900;
}

[data-theme="light"] .overview-dsa-threshold {
    color: #0f766e;
}

/* ============================================================
   Responsive
============================================================ */

@media (max-width: 1180px) {
    .overview-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-main-grid {
        grid-template-columns: 1fr;
    }

    .overview-visual-grid {
        grid-template-columns: 1fr;
    }

    .overview-message-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .overview-debt-mini-grid-three {
        grid-template-columns: 1fr;
    }

    .overview-chart-row {
        grid-template-columns: 1fr;
    }

    .overview-chart-box {
        min-height: 280px;
    }
}

@media (max-width: 820px) {
    .overview-hero-content {
        grid-template-columns: 1fr;
    }

    .overview-controls {
        justify-content: flex-start;
    }

    .overview-center-total {
        width: 104px;
        height: 104px;
    }

    .overview-center-total-wide {
        width: 122px;
        height: 122px;
    }
}

@media (max-width: 640px) {
    .overview-dashboard-page .overview-hero-card {
        padding: 22px;
    }

    .overview-kpi-grid {
        grid-template-columns: 1fr;
    }

    .overview-debt-mini-grid {
        grid-template-columns: 1fr;
    }

    .overview-risk-grid {
        grid-template-columns: 1fr;
    }

    .overview-message-strip {
        grid-template-columns: 1fr;
    }

    .overview-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .overview-control,
    .overview-btn {
        width: 100%;
    }

    .overview-chart-tooltip {
        left: 8px;
        top: 8px;
        min-width: 170px;
        max-width: calc(100% - 16px);
    }

    .overview-drawer {
        right: 14px;
        bottom: 14px;
        width: calc(100vw - 28px);
    }
}


/* ============================================================
   Reduced Motion
============================================================ */

@media (prefers-reduced-motion: reduce) {
    .overview-dashboard-page *,
    .overview-dashboard-page *::before,
    .overview-dashboard-page *::after {
        transition: none !important;
        animation: none !important;
    }
}



@media (max-width: 920px) {
    .overview-debt-path-chart {
        height: 330px;
        min-height: 330px;
    }

    .overview-dsa-ratio-name {
        min-width: 220px;
    }
}

@media (max-width: 640px) {
    .overview-debt-path-chart {
        height: 300px;
        min-height: 300px;
        padding: 10px 8px 6px;
    }

    .overview-dsa-table {
        font-size: 0.74rem;
    }

    .overview-dsa-table th,
    .overview-dsa-table td {
        padding: 10px 8px;
    }
}

/* ============================================================
   Overview Chart Controls + DSA Charts
============================================================ */

.overview-chart-card-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin: 12px 0 14px;
    flex-wrap: wrap;
}

.overview-chart-tab-switcher,
.overview-chart-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.overview-chart-tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #dbe8ff;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    padding: 7px 12px;
}

.overview-chart-tab-btn:hover {
    background: rgba(35, 229, 219, 0.12);
    color: #23e5db;
    border-color: rgba(35, 229, 219, 0.35);
}

.overview-chart-tab-btn.active {
    background: #23e5db;
    color: #06122b;
    border-color: #00a6a6;
}

.overview-small-download-btn {
    border: 1px solid rgba(35, 229, 219, 0.35);
    background: rgba(35, 229, 219, 0.08);
    color: #dbe8ff;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
    padding: 7px 11px;
}

.overview-small-download-btn:hover {
    background: rgba(35, 229, 219, 0.16);
    color: #23e5db;
}

[data-theme="light"] .overview-chart-tab-btn {
    border-color: rgba(15, 39, 71, 0.14);
    background: rgba(15, 39, 71, 0.04);
    color: #334155;
}

[data-theme="light"] .overview-chart-tab-btn.active {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

[data-theme="light"] .overview-small-download-btn {
    border-color: rgba(15, 118, 110, 0.30);
    background: rgba(15, 118, 110, 0.06);
    color: #334155;
}

[data-theme="light"] .overview-small-download-btn:hover {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.overview-indicator-panel {
    display: none;
}

.overview-indicator-panel.active {
    display: block;
}

.overview-dsa-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.overview-dsa-chart-card {
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .overview-dsa-chart-card {
    background: rgba(248, 250, 252, 0.88);
    border-color: rgba(15, 39, 71, 0.08);
}

.overview-dsa-chart-card h4 {
    margin: 0 0 10px;
    color: var(--overview-text-main);
    font-size: 0.92rem;
    font-weight: 900;
}

.overview-dsa-chart-wrap {
    position: relative;
    width: 100%;
    height: 350px;
    min-height: 350px;
}

.overview-dsa-chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 920px) {
    .overview-dsa-chart-grid {
        grid-template-columns: 1fr;
    }

    .overview-dsa-chart-wrap {
        height: 330px;
        min-height: 330px;
    }
}

@media (max-width: 640px) {
    .overview-chart-card-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .overview-chart-tab-switcher,
    .overview-chart-actions {
        flex-direction: column;
    }

    .overview-chart-tab-btn,
    .overview-small-download-btn {
        width: 100%;
    }

    .overview-dsa-chart-wrap {
        height: 300px;
        min-height: 300px;
    }
}

/* ============================================================
   Top Debt Row - Compact Doughnuts
============================================================ */

.overview-main-grid .overview-debt-hero .overview-chart-row,
.overview-main-grid .overview-creditor-card .overview-chart-row {
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.overview-main-grid .overview-debt-hero .overview-chart-box,
.overview-main-grid .overview-creditor-card .overview-chart-box {
    width: 185px;
    height: 185px;
    min-height: 185px;
    justify-self: center;
}

.overview-main-grid .overview-debt-hero .overview-rank-name,
.overview-main-grid .overview-creditor-card .overview-rank-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
}

.overview-main-grid .overview-debt-hero .overview-rank-item,
.overview-main-grid .overview-creditor-card .overview-rank-item {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px 9px;
}


/* ============================================================
   Debt Path Controls - One Row
============================================================ */

.overview-debt-path-block .overview-chart-card-controls {
    flex-wrap: nowrap;
    width: 100%;
}

.overview-debt-path-block .overview-chart-tab-switcher,
.overview-debt-path-block .overview-chart-actions {
    flex-wrap: nowrap;
}

.overview-debt-path-block .overview-chart-actions {
    margin-left: auto;
    justify-content: flex-end;
}

.overview-debt-path-block .overview-chart-tab-btn,
.overview-debt-path-block .overview-small-download-btn {
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .overview-main-grid .overview-debt-hero .overview-chart-row,
    .overview-main-grid .overview-creditor-card .overview-chart-row {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .overview-main-grid .overview-debt-hero .overview-chart-box,
    .overview-main-grid .overview-creditor-card .overview-chart-box {
        width: 220px;
        height: 220px;
        min-height: 220px;
    }
}

@media (max-width: 640px) {
    .overview-debt-path-block .overview-chart-card-controls {
        flex-wrap: wrap;
    }

    .overview-debt-path-block .overview-chart-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
}


/* ============================================================
   Debt Overview - Two Column Layout
============================================================ */

.overview-main-grid-debt-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
}

.overview-debt-left-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    min-width: 0;
}

.overview-debt-left-stack > .overview-card,
.overview-debt-path-card {
    min-width: 0;
}

.overview-debt-path-card {
    height: 100%;
}

@media (max-width: 1180px) {
    .overview-main-grid-debt-layout {
        grid-template-columns: 1fr;
    }

    .overview-debt-left-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .overview-debt-left-stack {
        grid-template-columns: 1fr;
    }
}


/* Pie card header actions */
.overview-card-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.overview-card-header-actions .overview-badge,
.overview-card-header-actions .overview-small-download-btn {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .overview-card-header-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}


/* Latest year metadata under debt card descriptions */
.overview-card-latest-year {
    margin-top: 5px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--overview-text-muted);
}

.overview-card-latest-year span {
    color: var(--overview-text-main);
    font-weight: 850;
}



/* ============================================================
   Debt overview final visual refinements
============================================================ */

/* Keep Latest year as subtle supporting information */
.overview-card-latest-year {
    font-weight: 400;
}

.overview-card-latest-year span {
    font-weight: 400;
    color: var(--overview-text-muted);
}

/* On desktop, let Debt Path use the full height beside both pie cards */
@media (min-width: 1181px) {
    .overview-debt-path-card .overview-card-body {
        display: flex;
        flex-direction: column;
        height: 100%;
        box-sizing: border-box;
    }

    .overview-debt-path-card .overview-debt-path-block {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
    }

    .overview-debt-path-card #debt-path-chart-view.active {
        display: flex;
        flex: 1;
        min-height: 0;
    }

    .overview-debt-path-card .overview-debt-path-chart {
        flex: 1;
        height: auto;
        min-height: 0;
    }
}


/* ============================================================
   Compact Debt Overview Final Layout
============================================================ */

@media (min-width: 1181px) {

    /* Do not force the right card to match the full left stack height */
    .overview-main-grid-debt-layout {
        align-items: start;
    }

    .overview-debt-path-card {
        height: auto;
    }

    .overview-debt-path-card .overview-card-body {
        display: block;
        height: auto;
    }

    .overview-debt-path-card .overview-debt-path-block {
        display: block;
    }

    .overview-debt-path-card #debt-path-chart-view.active {
        display: block;
    }

    .overview-debt-path-card .overview-debt-path-chart {
        height: 380px;
        min-height: 380px;
    }

    /* Smaller doughnuts so the two left cards remain compact */
    .overview-main-grid .overview-debt-hero .overview-chart-row,
    .overview-main-grid .overview-creditor-card .overview-chart-row {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 12px;
    }

    .overview-main-grid .overview-debt-hero .overview-chart-box,
    .overview-main-grid .overview-creditor-card .overview-chart-box {
        width: 150px;
        height: 150px;
        min-height: 150px;
    }

    .overview-debt-left-stack {
        gap: 16px;
    }
}

/* ============================================================
   Debt pies - final compact desktop sizing
============================================================ */

@media (min-width: 1181px) {
    .overview-main-grid .overview-debt-hero .overview-chart-row,
    .overview-main-grid .overview-creditor-card .overview-chart-row {
        grid-template-columns: 125px minmax(0, 1fr);
        gap: 10px;
    }

    .overview-main-grid .overview-debt-hero .overview-chart-box,
    .overview-main-grid .overview-creditor-card .overview-chart-box {
        width: 125px;
        height: 125px;
        min-height: 125px;
    }

    .overview-main-grid .overview-debt-hero .overview-rank-list,
    .overview-main-grid .overview-creditor-card .overview-rank-list {
        gap: 5px;
    }

    .overview-main-grid .overview-debt-hero .overview-rank-item,
    .overview-main-grid .overview-creditor-card .overview-rank-item {
        grid-template-columns: 8px minmax(0, 1fr) auto;
        gap: 6px;
        padding: 6px 8px;
        border-radius: 11px;
    }

    .overview-main-grid .overview-debt-hero .overview-rank-dot,
    .overview-main-grid .overview-creditor-card .overview-rank-dot {
        width: 8px;
        height: 8px;
    }

    .overview-main-grid .overview-debt-hero .overview-rank-name,
    .overview-main-grid .overview-creditor-card .overview-rank-name {
        font-size: 0.72rem;
        line-height: 1.15;
    }

    .overview-main-grid .overview-debt-hero .overview-rank-value,
    .overview-main-grid .overview-creditor-card .overview-rank-value {
        font-size: 0.70rem;
    }
}


/* ============================================================
   Shared Debt Composition Card
============================================================ */

@media (min-width: 1181px) {
    /* Give the two-composition card enough width */
    .overview-main-grid-debt-layout {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: stretch;
    }

    .overview-debt-composition-card,
    .overview-debt-path-card {
        height: 100%;
        min-width: 0;
    }

    .overview-debt-composition-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        height: 100%;
        min-width: 0;
    }

    .overview-debt-composition-panel {
        min-width: 0;
        display: flex;
        flex-direction: column;
        padding: 0 18px;
    }

    .overview-debt-composition-panel:first-child {
        padding-left: 0;
    }

    .overview-debt-composition-panel:last-child {
        padding-right: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.09);
    }

    [data-theme="light"] .overview-debt-composition-panel:last-child {
        border-left-color: rgba(15, 39, 71, 0.10);
    }

    .overview-debt-composition-panel .overview-card-header {
        margin-bottom: 12px;
        gap: 10px;
    }

    .overview-debt-composition-panel .overview-card-header h2 {
        font-size: 0.98rem;
    }

    .overview-debt-composition-panel .overview-card-header p {
        font-size: 0.70rem;
        line-height: 1.30;
    }

    .overview-debt-composition-panel .overview-card-latest-year {
        margin-top: 4px;
        font-size: 0.72rem;
    }

    /* Compact but still readable visual + legend */
    .overview-debt-composition-card .overview-chart-row {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 9px;
        margin-top: auto;
        margin-bottom: auto;
    }

    .overview-debt-composition-card .overview-chart-box {
        width: 112px;
        height: 112px;
        min-height: 112px;
        justify-self: center;
    }

    .overview-debt-composition-card .overview-rank-list {
        gap: 4px;
    }

    .overview-debt-composition-card .overview-rank-item {
        grid-template-columns: 7px minmax(0, 1fr) auto;
        gap: 5px;
        padding: 5px 6px;
        border-radius: 9px;
    }

    .overview-debt-composition-card .overview-rank-dot {
        width: 7px;
        height: 7px;
    }

    .overview-debt-composition-card .overview-rank-name {
        font-size: 0.67rem;
        line-height: 1.15;
    }

    .overview-debt-composition-card .overview-rank-value {
        font-size: 0.67rem;
    }

    .overview-debt-composition-card .overview-small-download-btn {
        padding: 6px 8px;
        font-size: 0.69rem;
    }
}

@media (max-width: 1180px) {
    .overview-debt-composition-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 760px) {
    .overview-debt-composition-grid {
        grid-template-columns: 1fr;
    }

    .overview-debt-composition-panel + .overview-debt-composition-panel {
        padding-top: 20px;
        margin-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
    }
}


/* ============================================================
   Shared Debt Composition Card - Top / Bottom Layout
============================================================ */

@media (min-width: 1181px) {
    .overview-main-grid-debt-layout {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        align-items: stretch;
    }

    .overview-debt-composition-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, minmax(0, 1fr));
        height: 100%;
    }

    .overview-debt-composition-panel {
        padding: 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .overview-debt-composition-panel:first-child {
        padding-bottom: 16px;
    }

    .overview-debt-composition-panel:last-child {
        padding-top: 16px;
        padding-right: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
    }

    [data-theme="light"] .overview-debt-composition-panel:last-child {
        border-left: 0;
        border-top-color: rgba(15, 39, 71, 0.10);
    }

    .overview-debt-composition-panel .overview-card-header {
        margin-bottom: 10px;
    }

    .overview-debt-composition-card .overview-chart-row {
        grid-template-columns: 125px minmax(0, 1fr);
        gap: 12px;
        margin: 0;
        align-items: center;
    }

    .overview-debt-composition-card .overview-chart-box {
        width: 125px;
        height: 125px;
        min-height: 125px;
    }

    .overview-debt-composition-card .overview-rank-list {
        gap: 5px;
    }

    .overview-debt-composition-card .overview-rank-item {
        padding: 6px 8px;
    }

    .overview-debt-composition-card .overview-rank-name,
    .overview-debt-composition-card .overview-rank-value {
        font-size: 0.72rem;
    }
}


/* Remove legacy Debt Hero decorative gradients inside shared composition card */
.overview-debt-composition-card .overview-debt-hero,
[data-theme="light"] .overview-debt-composition-card .overview-debt-hero {
    background: transparent;
}


/* ============================================================
   OVERVIEW DASHBOARD — COMPACT 100% ZOOM LAYOUT
   Final page-specific override
============================================================ */

@media (min-width: 1181px) {

    /* --------------------------------------------------------
       1. KPI CARDS
       Reduce oversized cards while keeping 5 across
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-kpi-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-kpi-card {
        min-height: 118px !important;
        padding: 15px 16px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-kpi-meta {
        font-size: 0.74rem !important;
        line-height: 1.3 !important;
    }


    /* --------------------------------------------------------
       2. MAIN DASHBOARD SPACING
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-visual-grid {
        gap: 14px !important;
        margin-bottom: 16px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-left-stack {
        gap: 14px !important;
    }


    /* --------------------------------------------------------
       3. OVERVIEW CARDS
       Shared common CSS is now 16px; make this explicit here
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-card-header {
        gap: 10px !important;
        margin-bottom: 12px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-card-header h2 {
        margin-bottom: 4px !important;
        font-size: 0.96rem !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-card-header p {
        font-size: 0.76rem !important;
        line-height: 1.4 !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-card-latest-year {
        margin-top: 4px !important;
        font-size: 0.70rem !important;
    }


    /* --------------------------------------------------------
       4. BADGES / SMALL ACTION BUTTONS
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-badge {
        min-height: 24px !important;
        padding: 0 9px !important;
        font-size: 0.66rem !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-small-download-btn {
        padding: 5px 8px !important;
        font-size: 0.68rem !important;
    }


    /* --------------------------------------------------------
       5. DEBT COMPOSITION CARD
       Keep top/bottom arrangement but make it compact
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-main-grid-debt-layout {
        grid-template-columns:
            minmax(0, 0.88fr)
            minmax(0, 1.12fr) !important;

        gap: 14px !important;
        align-items: stretch !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-panel:first-child {
        padding-bottom: 12px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-panel:last-child {
        padding-top: 12px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-panel
    .overview-card-header {
        margin-bottom: 8px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-card
    .overview-chart-row {
        grid-template-columns:
            110px minmax(0, 1fr) !important;

        gap: 10px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-card
    .overview-chart-box {
        width: 110px !important;
        height: 110px !important;
        min-height: 110px !important;
    }


    /* --------------------------------------------------------
       6. COMPOSITION LEGENDS
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-card
    .overview-rank-list {
        gap: 4px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-card
    .overview-rank-item {
        grid-template-columns:
            7px minmax(0, 1fr) auto !important;

        gap: 5px !important;
        padding: 5px 7px !important;
        border-radius: 9px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-card
    .overview-rank-dot {
        width: 7px !important;
        height: 7px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-card
    .overview-rank-name {
        font-size: 0.68rem !important;
        line-height: 1.15 !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-composition-card
    .overview-rank-value {
        font-size: 0.68rem !important;
    }


    /* --------------------------------------------------------
       7. DEBT PATH CONTROLS
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-path-block
    .overview-chart-card-controls {
        margin: 8px 0 10px !important;
        gap: 5px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-chart-tab-btn {
        padding: 6px 10px !important;
        font-size: 0.72rem !important;
    }


    /* --------------------------------------------------------
       8. DEBT PATH CHART
       Current 380px is unnecessarily tall at 100% zoom
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-debt-path-card
    .overview-debt-path-chart {
        height: 330px !important;
        min-height: 330px !important;
        padding: 10px 10px 6px !important;
    }


    /* --------------------------------------------------------
       9. DSA SECTION
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-sustainability-section
    .overview-card-body {
        gap: 18px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-block {
        padding-top: 18px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-subsection-heading {
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-subsection-heading h3 {
        font-size: 0.92rem !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-subsection-heading p {
        font-size: 0.74rem !important;
    }


    /* --------------------------------------------------------
       10. DSA CHARTS
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-chart-grid {
        gap: 12px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-chart-card {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-chart-card h4 {
        margin-bottom: 8px !important;
        font-size: 0.84rem !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-chart-wrap {
        height: 300px !important;
        min-height: 300px !important;
    }


    /* --------------------------------------------------------
       11. DSA TABLE
    -------------------------------------------------------- */

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-table {
        font-size: 0.74rem !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-table th,
    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-table td {
        padding: 9px 8px !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-table th {
        font-size: 0.68rem !important;
    }

    .public-dashboard-page.overview-dashboard-page
    .overview-dsa-ratio-name {
        min-width: 230px !important;
    }
}



/* ============================================================
   OVERVIEW KPI CARDS — EVEN + COMPACT
============================================================ */

.overview-dashboard-page .overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.overview-dashboard-page .overview-kpi-card {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 125px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    box-sizing: border-box;
}


/* ============================================================
   OVERVIEW KPI CARDS — EVEN DISTRIBUTION
============================================================ */

/* DESKTOP — 5 cards in one equal row */
@media (min-width: 1181px) {

    .overview-dashboard-page .overview-kpi-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 14px;
        align-items: stretch;
    }

    .overview-dashboard-page .overview-kpi-card {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 125px;

        display: flex;
        flex-direction: column;
        justify-content: space-between;

        box-sizing: border-box;
    }
}


/* TABLET — 2 cards per row */
@media (min-width: 641px) and (max-width: 1180px) {

    .overview-dashboard-page .overview-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}


/* MOBILE — 1 card per row */
@media (max-width: 640px) {

    .overview-dashboard-page .overview-kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .overview-dashboard-page .overview-kpi-card {
        min-height: 110px;
    }
}

/* ============================================================
   OVERVIEW STORY SECTIONS
============================================================ */

.overview-story-section {
    margin-bottom: 28px;
}

.overview-story-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 8px 0 16px;
}

.overview-story-heading h2 {
    margin: 4px 0 0;
    color: var(--overview-text-main);
    font-size: 1.3rem;
    font-weight: 950;
    letter-spacing: -0.025em;
}

.overview-story-kicker {
    color: var(--overview-primary);
    font-size: 0.73rem;
    font-weight: 950;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}


/* ============================================================
   MACRO STORY
============================================================ */

.overview-macro-story-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.overview-story-chart-card {
    min-width: 0;
}

.overview-story-chart-card-wide {
    grid-column: span 1;
}

.overview-story-chart-box {
    position: relative;
    height: 330px;
    min-height: 330px;
}

.overview-story-chart-box-tall {
    height: 360px;
    min-height: 360px;
}

.overview-story-chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}


/* ============================================================
   TAX KPI SNAPSHOT
============================================================ */

.overview-tax-kpi-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.overview-tax-kpi-card {
    min-height: 126px;
    cursor: default;
}

.overview-tax-kpi-card:hover {
    transform: translateY(-2px);
}

.overview-tax-kpi-card
.overview-kpi-label {
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.overview-tax-kpi-card
.overview-kpi-value {
    font-size:
        clamp(
            1.9rem,
            2.5vw,
            2.5rem
        );
}


/* ============================================================
   EXCISE DUTY VISUAL
============================================================ */

.overview-excise-card {
    padding-bottom: 20px;
}

.overview-excise-list {
    display: grid;
    gap: 11px;
}

.overview-excise-row {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.1fr)
        minmax(280px, 1fr);
    gap: 24px;
    align-items: center;

    padding: 14px 16px;

    border-radius: 14px;

    background:
        rgba(
            255,
            255,
            255,
            0.035
        );

    border:
        1px solid
        rgba(
            148,
            163,
            184,
            0.12
        );
}

[data-theme="light"]
.overview-excise-row {
    background:
        rgba(
            248,
            250,
            252,
            0.92
        );

    border-color:
        rgba(
            15,
            39,
            71,
            0.08
        );
}

.overview-excise-product {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.overview-excise-product strong {
    color:
        var(
            --overview-text-main
        );

    font-size: 0.91rem;
    font-weight: 900;
    line-height: 1.3;
}

.overview-excise-product span {
    color:
        var(
            --overview-text-muted
        );

    font-size: 0.78rem;
    font-weight: 650;
}

.overview-excise-visual {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        62px;
    gap: 14px;
    align-items: center;
}

/* ============================================================
   Excise Duty Rate Progress Bar
============================================================ */

.overview-excise-track {
    width: 100%;
    min-width: 0;
}

.overview-excise-progress {
    display: block;

    width: 100%;
    height: 12px;

    appearance: none;
    -webkit-appearance: none;

    overflow: hidden;

    border: 0;
    border-radius: 999px;

    background: rgba(148, 163, 184, 0.17);
}


/* Chrome / Edge / Safari */

.overview-excise-progress::-webkit-progress-bar {
    background: rgba(148, 163, 184, 0.17);
    border-radius: 999px;
}

.overview-excise-progress::-webkit-progress-value {
    background: linear-gradient(
        90deg,
        var(--overview-primary),
        var(--overview-accent)
    );

    border-radius: 999px;
}


/* Firefox */

.overview-excise-progress::-moz-progress-bar {
    background: linear-gradient(
        90deg,
        var(--overview-primary),
        var(--overview-accent)
    );

    border-radius: 999px;
}


.overview-excise-rate {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 0 10px;

    border-radius: 999px;

    color:
        var(
            --overview-text-main
        );

    background:
        rgba(
            226,
            177,
            44,
            0.14
        );

    border:
        1px solid
        rgba(
            226,
            177,
            44,
            0.30
        );

    font-size: 0.9rem;
    font-weight: 950;
}


/* ============================================================
   RESPONSIVE STORY LAYOUT
============================================================ */

@media (max-width: 1100px) {

    .overview-tax-kpi-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}

@media (max-width: 820px) {

    .overview-macro-story-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .overview-tax-kpi-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .overview-excise-row {
        grid-template-columns:
            minmax(0, 1fr);
        gap: 12px;
    }

}

@media (max-width: 520px) {

    .overview-tax-kpi-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .overview-excise-visual {
        grid-template-columns:
            minmax(0, 1fr)
            58px;
    }

}



/* ============================================================
   FINAL OVERVIEW MACRO STORY LAYOUT
============================================================ */

.overview-macro-story-grid {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.overview-story-chart-card-wide {
    grid-column: span 1;
}

.overview-story-chart-card {
    min-width: 0;
    height: 100%;
}

.overview-story-chart-box,
.overview-story-chart-box-tall {
    height: 315px;
    min-height: 315px;
}


/*
 * Three columns need slightly more compact
 * chart titles/descriptions.
 */
.overview-story-chart-card
.overview-card-header {
    min-height: 72px;
    margin-bottom: 10px;
}

.overview-story-chart-card
.overview-card-header h2 {
    font-size: 1rem;
}

.overview-story-chart-card
.overview-card-header p {
    font-size: 0.80rem;
}


@media (max-width: 1280px) {

    .overview-macro-story-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 820px) {

    .overview-macro-story-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

}


/* Statutory tax-rate classification inside each tax KPI card */

.overview-tax-name {
    margin-bottom: 8px;
}

.overview-tax-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;

    padding: 4px 8px;
    border-radius: 999px;

    color: var(--overview-primary);

    background:
        rgba(0, 199, 199, 0.08);

    border:
        1px solid
        rgba(0, 199, 199, 0.18);

    font-size: 0.67rem;
    font-weight: 850;
    line-height: 1.15;
}


/* Overview KPI cards are display-only for now. */
.overview-kpi-card,
.overview-tax-kpi-card {
    cursor: default;
}


/* ============================================================
   FINAL OVERVIEW STORY CARD SPACING
============================================================ */

.overview-story-chart-card {
    display: flex;
    flex-direction: column;
}

.overview-story-chart-card .overview-card-header {
    margin-bottom: 8px;   /* smaller gap under title/subtitle */
}

.overview-story-chart-card .overview-card-header p {
    margin-bottom: 0;
}

.overview-story-chart-box {
    min-height: 260px;
    margin-top: 0;
    padding-top: 0;
}

.overview-story-chart-box canvas {
    margin-top: 0;
}

/* If the GDP card is taller, keep it compact too */
.overview-story-chart-box-tall {
    min-height: 260px;
    padding-top: 0;
}


/* ============================================================
   FINAL MACRO STORY CARD VERTICAL SPACING
============================================================ */

.overview-story-chart-card .overview-card-header {
    min-height: 0 !important;
    margin-bottom: 2px !important;
}

.overview-story-chart-card .overview-card-header h2 {
    margin-bottom: 4px;
}

.overview-story-chart-card .overview-card-header p {
    margin-top: 0;
    margin-bottom: 0;
}

.overview-story-chart-box,
.overview-story-chart-box-tall {
    margin-top: 0 !important;
    padding-top: 0 !important;

    height: 300px;
    min-height: 300px;
}

/* ============================================================
   OVERVIEW MACRO STORY — SECOND ROW
============================================================ */

.overview-macro-story-grid-secondary {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    margin-top: 18px;
}

@media (max-width: 980px) {
    .overview-macro-story-grid-secondary {
        grid-template-columns:
            minmax(0, 1fr);
    }
}


/* ============================================================
   OVERVIEW MACRO STORY — SECOND ROW
============================================================ */

.overview-macro-story-grid-secondary {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    margin-top: 18px;
}

@media (max-width: 980px) {
    .overview-macro-story-grid-secondary {
        grid-template-columns:
            minmax(0, 1fr);
    }
}


/* ============================================================
   OVERVIEW EXCISE DUTY — TWO-COLUMN SOLID ORANGE VISUAL
============================================================ */

.overview-excise-list {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.overview-excise-row {
    grid-template-columns:
        minmax(0, 1fr);
    gap: 12px;
    align-content: start;
}

.overview-excise-progress::-webkit-progress-value {
    background: #d98b2b;
}

.overview-excise-progress::-moz-progress-bar {
    background: #d98b2b;
}

@media (max-width: 820px) {
    .overview-excise-list {
        grid-template-columns:
            minmax(0, 1fr);
    }
}


/* ============================================================
   FINAL OVERVIEW EXCISE LAYOUT
   Desktop: 3 columns
   Medium:  2 columns
   Mobile:  1 column
============================================================ */

.overview-excise-list {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.overview-excise-row {
    min-width: 0;
    grid-template-columns:
        minmax(0, 1fr);
    gap: 12px;
}

/* Percentage progress bars: one solid orange tone */
.overview-excise-progress::-webkit-progress-value {
    background: #d98b2b;
}

.overview-excise-progress::-moz-progress-bar {
    background: #d98b2b;
}

/* FRW/litre specific-rate presentation */
.overview-excise-specific-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    min-height: 44px;
    padding: 9px 12px;

    border-radius: 12px;

    background:
        rgba(217, 139, 43, 0.11);

    border:
        1px solid
        rgba(217, 139, 43, 0.28);
}

.overview-excise-specific-value span {
    color:
        var(--overview-text-muted);

    font-size: 0.76rem;
    font-weight: 700;
}

.overview-excise-specific-value strong {
    color:
        var(--overview-text-main);

    font-size: 0.92rem;
    font-weight: 950;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .overview-excise-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .overview-excise-list {
        grid-template-columns:
            minmax(0, 1fr);
    }
}


/* Premium and Gas oil grouped specific excise rates */
.overview-excise-specific-group {
    display: grid;
    gap: 8px;
}


/* ============================================================
   FINAL COMPACT EXCISE DUTY CARDS
============================================================ */

.overview-excise-row {
    padding: 10px 12px;
    gap: 8px;
    border-radius: 12px;
}

.overview-excise-product {
    gap: 2px;
}

.overview-excise-product strong {
    font-size: 0.86rem;
    line-height: 1.22;
}

.overview-excise-product span {
    font-size: 0.72rem;
    line-height: 1.2;
}

.overview-excise-visual {
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 9px;
}

.overview-excise-progress {
    height: 9px;
}

.overview-excise-rate {
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.82rem;
}

.overview-excise-specific-group {
    gap: 6px;
}

.overview-excise-specific-value {
    min-height: 34px;
    padding: 6px 9px;
    gap: 8px;
    border-radius: 9px;
}

.overview-excise-specific-value span {
    font-size: 0.70rem;
    line-height: 1.2;
}

.overview-excise-specific-value strong {
    font-size: 0.80rem;
}

/* ============================================================
   EXCISE DUTY — FIVE CARD DESKTOP ROW
============================================================ */

/*
 * Wide desktop:
 * show all five excise-duty cards on one row.
 */
@media (min-width: 1500px) {

    .overview-excise-list {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
        gap: 12px;
    }

    .overview-excise-row {
        min-width: 0;
        padding: 12px 14px;
    }

    .overview-excise-product strong {
        font-size: 0.84rem;
        line-height: 1.22;
    }

    .overview-excise-visual {
        grid-template-columns:
            minmax(0, 1fr)
            auto;
        gap: 8px;
    }

    .overview-excise-rate {
        white-space: nowrap;
    }
}


/*
 * Standard desktop / smaller laptop:
 * three columns prevents excessively narrow cards.
 */
@media (min-width: 1101px) and (max-width: 1499px) {

    .overview-excise-list {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}


/*
 * Tablet:
 * two columns.
 */
@media (min-width: 821px) and (max-width: 1100px) {

    .overview-excise-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/*
 * Mobile:
 * one card per row.
 */
@media (max-width: 820px) {

    .overview-excise-list {
        grid-template-columns:
            minmax(0, 1fr);
    }
}

/* END EXCISE DUTY — FIVE CARD DESKTOP ROW */

/* ============================================================
   EXCISE DUTY — FINAL COMPACT LEFT-ALIGNED LAYOUT
============================================================ */


/*
 * Cards remain compact instead of being unnecessarily
 * stretched vertically.
 */
.overview-excise-list {
    align-items: start;
}


/*
 * Compact card structure.
 */
.overview-excise-row {
    display: flex;
    flex-direction: column;

    height: auto !important;
    min-height: 0 !important;

    gap: 0 !important;

    padding-top: 10px;
    padding-bottom: 10px;
}


/* ------------------------------------------------------------
   PRODUCT HEADINGS
------------------------------------------------------------ */

/*
 * All product names are LEFT aligned.
 *
 * 34px is just enough for two-line product names and keeps
 * Beer/Cigarettes close to their bars without the previous
 * large empty area.
 */
.overview-excise-product {
    display: flex;
    flex-direction: column;

    align-items: flex-start !important;
    justify-content: flex-start !important;

    width: 100%;

    min-height: 34px !important;

    margin: 0 0 2px !important;

    text-align: left !important;
}


.overview-excise-product strong {
    display: block;

    width: 100%;

    margin: 0 !important;

    text-align: left !important;

    font-size: 0.84rem;
    line-height: 1.20;
}


/*
 * If a base/subtitle exists in the future,
 * it remains left aligned.
 */
.overview-excise-product span {
    width: 100%;
    text-align: left !important;
}


/* ------------------------------------------------------------
   BAR + RATE
------------------------------------------------------------ */

/*
 * Remove the previous large vertical separation.
 * The bar now starts almost immediately after the title area.
 */
.overview-excise-visual {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        auto !important;

    width: 100%;
    min-width: 0;

    gap: 8px !important;

    align-items: center;

    margin-top: 2px !important;
}


.overview-excise-track {
    display: block !important;

    width: 100% !important;
    min-width: 0;
}


.overview-excise-progress {
    display: block !important;

    width: 100% !important;
    height: 9px !important;
}


/*
 * Percentage badges.
 */
.overview-excise-rate {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 30px;

    padding: 0 9px;

    white-space: nowrap;

    font-size: 0.82rem;
    line-height: 1;
}


/* ------------------------------------------------------------
   CIGARETTES:
   bar | [36%] + [RWF 230/pack]
------------------------------------------------------------ */

.overview-excise-visual-compound {
    grid-template-columns:
        minmax(42px, 1fr)
        auto !important;

    gap: 7px !important;
}


.overview-excise-compound-rates {
    display: flex;

    align-items: center;
    justify-content: flex-start;

    gap: 4px;

    white-space: nowrap;
}


/*
 * '+' remains plain text between the two badges.
 */
.overview-excise-plus {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 0 1px;

    color: var(--overview-text-main);

    font-size: 0.82rem;
    font-weight: 900;

    line-height: 1;
}


/*
 * Second badge: RWF 230/pack.
 */
.overview-excise-specific-badge {
    padding-left: 8px;
    padding-right: 8px;

    font-size: 0.76rem;
}


/* END EXCISE DUTY — FINAL COMPACT LEFT-ALIGNED LAYOUT */

/* ============================================================
   EXCISE DUTY — SINGLE-LINE PRODUCT HEADINGS
============================================================ */

/*
 * Product names now occupy only one compact line.
 * This also reduces the gap before the bar/rate row.
 */
.overview-excise-product {
    min-height: 20px !important;
    margin: 0 0 3px !important;
}


/*
 * Keep every product heading on one line.
 */
.overview-excise-product strong {
    width: 100%;

    font-size: 0.76rem !important;
    line-height: 1.10 !important;
    letter-spacing: -0.01em;

    white-space: nowrap !important;

    text-align: left !important;
}


/*
 * Keep the bar very close to the heading.
 */
.overview-excise-visual {
    margin-top: 2px !important;
}


/*
 * On very wide screens we can retain slightly more
 * heading size while still fitting all five cards.
 */
@media (min-width: 1800px) {

    .overview-excise-product strong {
        font-size: 0.78rem !important;
    }

}


/*
 * On narrower screens where the dashboard changes
 * away from the five-card row, allow a little more room.
 */
@media (max-width: 1200px) {

    .overview-excise-product strong {
        font-size: 0.78rem !important;
    }

}

/* END EXCISE DUTY — SINGLE-LINE PRODUCT HEADINGS */

/* ============================================================
   PAYE FEATURED KPI CARD
============================================================ */

/*
 * PAYE spans the complete four-column KPI row.
 */
.overview-paye-card {
    grid-column: 1 / -1;

    display: grid;

    grid-template-columns:
        minmax(230px, 0.8fr)
        minmax(0, 2.2fr);

    gap: 28px;

    align-items: center;

    min-height: 138px;

    cursor: default;
}


/* ------------------------------------------------------------
   PAYE summary
------------------------------------------------------------ */

.overview-paye-summary {
    min-width: 0;
}


/*
 * PAYE label follows the same visual language
 * as VAT / CIT / WHT / CGT.
 */
.overview-paye-summary .overview-kpi-label {
    margin-bottom: 6px;
}


/*
 * Main progressive-rate headline.
 */
.overview-paye-rate-flow {
    display: block;

    margin-bottom: 7px;

    color: var(--overview-text-main);

    font-size: clamp(
        1.45rem,
        2vw,
        2rem
    );

    font-weight: 950;

    line-height: 1;

    letter-spacing: -0.035em;

    white-space: nowrap;
}


.overview-paye-summary .overview-tax-name {
    margin-bottom: 8px;
}


/* ------------------------------------------------------------
   Four PAYE brackets
------------------------------------------------------------ */

.overview-paye-brackets {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;

    min-width: 0;
}


.overview-paye-bracket {
    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 76px;

    padding: 10px 12px;

    border-radius: 14px;

    text-align: center;

    background:
        rgba(0, 199, 199, 0.055);

    border:
        1px solid
        rgba(0, 199, 199, 0.16);
}


[data-theme="light"]
.overview-paye-bracket {
    background:
        rgba(0, 199, 199, 0.045);

    border-color:
        rgba(0, 166, 166, 0.17);
}


/*
 * Rate is the dominant element.
 */
.overview-paye-bracket-rate {
    display: block;

    margin-bottom: 5px;

    color: var(--overview-text-main);

    font-size: 1.12rem;

    font-weight: 950;

    line-height: 1;
}


/*
 * Income threshold remains secondary.
 */
.overview-paye-bracket-range {
    display: block;

    color: var(--overview-text-muted);

    font-size: 0.72rem;

    font-weight: 750;

    line-height: 1.25;

    white-space: nowrap;
}


/*
 * Slight PAYE distinction without introducing
 * another unrelated dashboard colour.
 */
.overview-paye-type {
    color: var(--overview-primary);
}


/* ------------------------------------------------------------
   Responsive
------------------------------------------------------------ */

@media (max-width: 1100px) {

    .overview-paye-card {
        grid-column: 1 / -1;

        grid-template-columns:
            minmax(0, 1fr);

        gap: 16px;
    }

    .overview-paye-brackets {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 520px) {

    .overview-paye-rate-flow {
        font-size: 1.35rem;
        white-space: normal;
    }

    .overview-paye-brackets {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .overview-paye-bracket {
        align-items: flex-start;
        text-align: left;
    }

    .overview-paye-bracket-range {
        white-space: normal;
    }

}

/* END PAYE FEATURED KPI CARD */

/* ============================================================
   TAX KPI — FIVE CARDS ONE ROW
============================================================ */

/*
 * VAT | CIT | WHT | CGT | PAYE
 */
.overview-tax-kpi-grid {
    grid-template-columns:
        repeat(5, minmax(0, 1fr)) !important;

    gap: 14px;
    align-items: stretch;
}


/*
 * Keep all five cards the same height.
 */
.overview-tax-kpi-card,
.overview-paye-card {
    min-width: 0;
    min-height: 150px;
    height: 100%;
}


/* ============================================================
   COMPACT PAYE CARD
============================================================ */

/*
 * PAYE is now a normal fifth card,
 * not a full-width second row.
 */
.overview-paye-card {
    grid-column: auto !important;

    display: flex !important;
    flex-direction: column;

    gap: 7px !important;

    align-items: stretch !important;

    padding: 18px 20px;
}


/*
 * PAYE summary fills the normal card width.
 */
.overview-paye-summary {
    width: 100%;
    min-width: 0;
}


/*
 * PAYE heading.
 */
.overview-paye-summary .overview-kpi-label {
    margin-bottom: 7px;
}


/*
 * Progressive rates remain catchy,
 * but smaller so they fit the fifth card.
 */
.overview-paye-rate-flow {
    margin: 0 0 7px;

    font-size: clamp(
        1.15rem,
        1.35vw,
        1.45rem
    ) !important;

    line-height: 1;

    letter-spacing: -0.025em;

    white-space: nowrap;
}


/*
 * Pay As You Earn
 */
.overview-paye-summary .overview-tax-name {
    margin-bottom: 6px;

    font-size: 0.78rem;
}


/*
 * Smaller classification badge.
 */
.overview-paye-type {
    padding: 3px 7px;

    font-size: 0.61rem;
}


/* ============================================================
   PAYE BRACKETS
============================================================ */

/*
 * Four brackets in one horizontal strip
 * inside the PAYE card.
 */
.overview-paye-brackets {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    gap: 4px !important;

    width: 100%;
    min-width: 0;

    margin-top: auto;
}


/*
 * Very compact bracket boxes.
 */
.overview-paye-bracket {
    min-width: 0 !important;
    min-height: 48px !important;

    padding: 6px 3px !important;

    border-radius: 9px !important;
}


/*
 * Rate.
 */
.overview-paye-bracket-rate {
    margin-bottom: 3px !important;

    font-size: 0.80rem !important;

    line-height: 1;
}


/*
 * Monthly income range.
 */
.overview-paye-bracket-range {
    font-size: 0.50rem !important;

    font-weight: 750;

    line-height: 1.12 !important;

    white-space: normal !important;

    overflow-wrap: normal;
}


/* ============================================================
   WIDE DESKTOP
============================================================ */

@media (min-width: 1500px) {

    .overview-tax-kpi-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr)) !important;
    }

}


/* ============================================================
   MEDIUM SCREENS
============================================================ */

@media (min-width: 1101px) and (max-width: 1499px) {

    .overview-tax-kpi-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr)) !important;

        gap: 10px;
    }

    .overview-tax-kpi-card,
    .overview-paye-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .overview-paye-rate-flow {
        font-size: 1.05rem !important;
    }

}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1100px) {

    .overview-tax-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }

    .overview-paye-card {
        grid-column: auto !important;
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 520px) {

    .overview-tax-kpi-grid {
        grid-template-columns:
            minmax(0, 1fr) !important;
    }

    .overview-paye-brackets {
        grid-template-columns:
            repeat(4, minmax(0, 1fr)) !important;
    }

}

/* END TAX KPI — FIVE CARDS ONE ROW */

/* ============================================================
   TAX KPI — FINAL COMPACT ONE-ROW FIX
============================================================ */

/*
 * Desktop: keep all 5 cards on one row,
 * but make the whole section more compact.
 */
@media (min-width: 1101px) {

    .overview-tax-kpi-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr)) !important;
        gap: 10px !important;
        align-items: stretch;
    }

    .overview-tax-kpi-card,
    .overview-paye-card {
        min-width: 0;
        min-height: 136px !important;
        height: 100%;
        padding: 16px 18px !important;
    }

    .overview-tax-kpi-card .overview-kpi-label,
    .overview-paye-summary .overview-kpi-label {
        margin-bottom: 6px !important;
        font-size: 0.80rem !important;
        line-height: 1.1;
    }

    .overview-tax-kpi-card .overview-kpi-value {
        font-size: clamp(
            1.75rem,
            1.9vw,
            2.2rem
        ) !important;
        line-height: 0.96 !important;
        margin-bottom: 6px !important;
    }

    .overview-tax-name,
    .overview-paye-summary .overview-tax-name {
        font-size: 0.76rem !important;
        line-height: 1.18;
        margin-bottom: 8px !important;
    }

    .overview-tax-type,
    .overview-paye-type {
        padding: 3px 7px !important;
        font-size: 0.58rem !important;
        line-height: 1.1;
    }

    /* --------------------------------------------------------
       PAYE card
    -------------------------------------------------------- */

    .overview-paye-card {
        grid-column: auto !important;

        display: flex !important;
        flex-direction: column;

        gap: 6px !important;
        align-items: stretch !important;

        overflow: hidden;
    }

    .overview-paye-summary {
        width: 100%;
        min-width: 0;
    }

    .overview-paye-rate-flow {
        margin: 0 0 6px !important;

        font-size: 0.96rem !important;
        font-weight: 950;
        line-height: 1 !important;
        letter-spacing: -0.03em;

        white-space: nowrap;
    }

    .overview-paye-brackets {
        display: grid !important;
        grid-template-columns:
            repeat(4, minmax(0, 1fr)) !important;

        gap: 4px !important;
        width: 100%;
        min-width: 0;

        margin-top: auto;
    }

    .overview-paye-bracket {
        min-width: 0 !important;
        min-height: 46px !important;

        padding: 4px 3px !important;

        border-radius: 8px !important;
    }

    .overview-paye-bracket-rate {
        margin-bottom: 2px !important;
        font-size: 0.72rem !important;
        line-height: 1 !important;
    }

    .overview-paye-bracket-range {
        font-size: 0.44rem !important;
        font-weight: 780;
        line-height: 1.08 !important;

        white-space: normal !important;
        overflow-wrap: anywhere;
    }
}


/*
 * Smaller desktop / laptop:
 * tighten a little more to prevent overlap.
 */
@media (min-width: 1101px) and (max-width: 1450px) {

    .overview-tax-kpi-grid {
        gap: 8px !important;
    }

    .overview-tax-kpi-card,
    .overview-paye-card {
        padding: 14px 15px !important;
        min-height: 132px !important;
    }

    .overview-tax-kpi-card .overview-kpi-value {
        font-size: 1.95rem !important;
    }

    .overview-paye-rate-flow {
        font-size: 0.88rem !important;
    }

    .overview-paye-bracket-rate {
        font-size: 0.68rem !important;
    }

    .overview-paye-bracket-range {
        font-size: 0.41rem !important;
    }
}

/* END TAX KPI — FINAL COMPACT ONE-ROW FIX */

/* BEGIN OVERVIEW MACRO KPI FOUR-CARD GRID */

/*
 * The complete selector is required to override the older
 * five-column rule, which also uses !important.
 */
.public-dashboard-page.overview-dashboard-page
.overview-kpi-grid {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    width: 100% !important;
    max-width: none !important;

    gap: 14px !important;
    align-items: stretch;
}

.public-dashboard-page.overview-dashboard-page
.overview-kpi-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    height: 100%;
}

/* Tablet: two equal columns. */
@media (min-width: 641px) and (max-width: 1180px) {

    .public-dashboard-page.overview-dashboard-page
    .overview-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobile: one column. */
@media (max-width: 640px) {

    .public-dashboard-page.overview-dashboard-page
    .overview-kpi-grid {
        grid-template-columns:
            minmax(0, 1fr) !important;
    }
}

/* END OVERVIEW MACRO KPI FOUR-CARD GRID */

