:root {
    color-scheme: light;
    --bg: #eef5ff;
    --bg-strong: #e0f2fe;
    --surface: #ffffff;
    --surface-tint: #f8fbff;
    --ink: #182033;
    --muted: #647084;
    --soft: #95a0b2;
    --line: #dde7f4;
    --line-strong: #cbd9ec;
    --blue: #0877ee;
    --blue-deep: #2557d6;
    --cyan: #08b6d9;
    --mint: #10b981;
    --mint-soft: #dcfce7;
    --lime: #b6f146;
    --yellow: #ffd166;
    --orange: #fb7b42;
    --rose: #f43f5e;
    --rose-soft: #ffe4e9;
    --violet: #7c3aed;
    --violet-soft: #f0e7ff;
    --shadow-sm: 0 8px 22px rgb(24 32 51 / 8%);
    --shadow-md: 0 18px 46px rgb(24 32 51 / 12%);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgb(8 119 238 / 10%) 0 18%, transparent 18% 100%),
        linear-gradient(225deg, rgb(255 209 102 / 22%) 0 24%, transparent 24% 100%),
        linear-gradient(180deg, #fef7ff 0, #eef8ff 360px, #f7fbff 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgb(24 32 51 / 4%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(24 32 51 / 4%) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgb(0 0 0 / 58%), transparent 72%);
    content: "";
}

body::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.account-list::-webkit-scrollbar,
.reminder-list::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.account-list::-webkit-scrollbar-track,
.reminder-list::-webkit-scrollbar-track {
    background: #e7eef9;
}

body::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.account-list::-webkit-scrollbar-thumb,
.reminder-list::-webkit-scrollbar-thumb {
    border: 2px solid #e7eef9;
    border-radius: 999px;
    background: #8aa4c4;
}

button {
    font: inherit;
}

.lucide {
    width: 1em;
    height: 1em;
    stroke-width: 2.4;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px clamp(18px, 3vw, 42px);
    border-bottom: 1px solid rgb(203 217 236 / 78%);
    background: rgb(255 255 255 / 84%);
    backdrop-filter: blur(18px);
}

.brand-block {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.brand-block > div {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
}

.brand-mark {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 62%);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blue), var(--cyan) 48%, var(--lime));
    box-shadow: 0 14px 30px rgb(8 119 238 / 24%);
}

.brand-mark::after {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 18px;
    height: 18px;
    border: 3px solid #ffffff;
    border-radius: 8px;
    background: var(--yellow);
    content: "";
}

.brand-mark svg {
    width: 25px;
    height: 25px;
    fill: #ffffff;
}

.brand-kicker {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid rgb(8 119 238 / 14%);
    border-radius: 999px;
    background: #edf7ff;
    color: var(--blue);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 1.48rem;
    font-weight: 950;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.brand-subtitle {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.system-status {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgb(203 217 236 / 88%);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    box-shadow: var(--shadow-sm);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.3;
    white-space: nowrap;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--soft);
}

.system-status.is-loading .status-dot {
    background: var(--blue);
    animation: pulse 1s ease-in-out infinite;
}

.system-status.is-success .status-dot {
    background: var(--mint);
}

.system-status.is-error .status-dot {
    background: var(--rose);
}

.app-nav {
    position: sticky;
    top: 92px;
    z-index: 19;
    display: flex;
    gap: 10px;
    padding: 12px clamp(18px, 3vw, 42px);
    overflow-x: auto;
    border-bottom: 1px solid rgb(203 217 236 / 72%);
    background: rgb(244 249 255 / 88%);
    backdrop-filter: blur(14px);
}

.nav-button {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #4d5b70;
    cursor: pointer;
    box-shadow: 0 8px 18px rgb(24 32 51 / 6%);
    font-size: 0.88rem;
    font-weight: 950;
    line-height: 1;
}

.nav-button span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: #edf4ff;
    color: var(--blue);
    font-size: 0.82rem;
    line-height: 1;
}

.nav-button svg {
    width: 14px;
    height: 14px;
}

.nav-button:hover,
.nav-button:focus-visible {
    border-color: rgb(8 119 238 / 34%);
    color: var(--blue);
    transform: translateY(-1px);
}

.nav-button:focus-visible {
    outline: 3px solid rgb(8 119 238 / 18%);
    outline-offset: 2px;
}

.nav-button.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #ffffff;
    box-shadow: 0 14px 28px rgb(8 119 238 / 24%);
}

.nav-button.is-active span {
    background: rgb(255 255 255 / 22%);
    color: #ffffff;
}

.error-banner {
    width: min(calc(100% - 36px), 1640px);
    margin: 18px auto 0;
    padding: 14px 16px;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    background: #fff1f2;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.error-banner strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
}

.error-banner p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.dashboard {
    width: min(100%, 1660px);
    margin: 0 auto;
    padding: 26px clamp(18px, 3vw, 42px) 38px;
}

.dashboard,
.page-view,
.overview-board,
.overview-board > *,
.report-hero,
.report-hero > *,
.report-grid,
.summary-grid,
.summary-card,
.report-score-card,
.report-panel,
.panel {
    min-width: 0;
}

.page-view {
    display: none;
}

.page-view.is-active {
    display: block;
}

.overview-board,
.report-hero {
    display: grid;
    grid-template-columns: minmax(390px, 1.25fr) minmax(540px, 1.9fr);
    gap: 18px;
    margin-bottom: 18px;
}

.report-hero {
    grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
    align-items: stretch;
}

.overview-preview-grid,
.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    gap: 18px;
}

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

.net-worth-card,
.summary-card,
.panel,
.list-row,
.budget-item,
.goal-card,
.reminder-card,
.report-score-card,
.report-metric,
.report-bar-row {
    border-radius: 8px;
}

.net-worth-card {
    position: relative;
    min-height: 214px;
    overflow: hidden;
    padding: 24px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgb(24 32 51 / 16%) 0 50%, transparent 50% 100%),
        linear-gradient(135deg, #0d9488 0%, #0877ee 48%, #7c3aed 100%);
    box-shadow: var(--shadow-md);
}

.report-net-worth {
    min-height: 258px;
}

.net-worth-card::before {
    position: absolute;
    inset: auto 22px 22px auto;
    width: 190px;
    height: 16px;
    border-radius: 999px;
    background: rgb(255 255 255 / 26%);
    content: "";
}

.net-worth-card::after {
    position: absolute;
    right: 22px;
    bottom: 22px;
    width: 86px;
    height: 16px;
    border-radius: 999px;
    background: var(--lime);
    content: "";
}

.card-topline {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mood-chip {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid rgb(255 255 255 / 26%);
    border-radius: 999px;
    background: rgb(255 255 255 / 16%);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 950;
    white-space: nowrap;
}

.summary-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.net-worth-card .summary-label {
    color: rgb(255 255 255 / 78%);
}

.summary-label svg,
.section-kicker svg {
    width: 14px;
    height: 14px;
}

.net-worth-card strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 18px;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 950;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.net-worth-card p {
    position: relative;
    z-index: 1;
    max-width: 470px;
    margin: 16px 0 0;
    color: rgb(255 255 255 / 82%);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
}

.report-hero-metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.report-hero-metrics span {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 4px 8px;
    min-width: 0;
    align-items: center;
    padding: 11px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 8px;
    background: rgb(255 255 255 / 14%);
    color: rgb(255 255 255 / 72%);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
}

.report-hero-metrics svg {
    grid-row: span 2;
    width: 24px;
    height: 24px;
    padding: 5px;
    border-radius: 8px;
    background: rgb(255 255 255 / 18%);
    color: #ffffff;
}

.report-hero-metrics b {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 950;
    overflow-wrap: normal;
    text-transform: none;
}

.report-score-card {
    display: grid;
    align-content: space-between;
    gap: 18px;
    min-height: 258px;
    padding: 22px;
    border: 1px solid rgb(221 231 244 / 92%);
    background:
        linear-gradient(135deg, #fff9e8 0, #ffffff 46%, #eef7ff 100%),
        #ffffff;
    box-shadow: var(--shadow-sm);
}

.report-score-wide {
    min-height: 300px;
}

.report-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.report-score-card .mood-chip {
    border-color: rgb(8 119 238 / 16%);
    background: #edf7ff;
    color: var(--blue);
}

.score-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.score-row strong {
    color: var(--ink);
    font-size: 5rem;
    font-weight: 950;
    line-height: 0.95;
}

.score-row span {
    max-width: 150px;
    color: var(--blue);
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.2;
    text-align: right;
}

.score-meter {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #dce8f6;
}

.score-meter span {
    display: block;
    width: var(--score, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rose), var(--yellow), var(--mint), var(--blue));
}

.report-score-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.45;
}

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

.summary-card,
.panel {
    border: 1px solid rgb(221 231 244 / 92%);
    background: rgb(255 255 255 / 92%);
    box-shadow: var(--shadow-sm);
}

.summary-card {
    position: relative;
    container-type: inline-size;
    min-height: 214px;
    overflow: hidden;
    padding: 18px;
}

.summary-card::after {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 78px;
    height: 10px;
    border-radius: 999px;
    opacity: 0.85;
    content: "";
}

.summary-icon {
    display: grid;
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 950;
}

.summary-positive {
    background:
        linear-gradient(135deg, #ecfdf5 0, #ffffff 66%),
        #ffffff;
}

.summary-positive .summary-icon,
.summary-positive::after {
    background: linear-gradient(135deg, var(--mint), var(--lime));
}

.summary-debt {
    background:
        linear-gradient(135deg, #fff1f2 0, #ffffff 66%),
        #ffffff;
}

.summary-debt .summary-icon,
.summary-debt::after {
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.summary-count {
    background:
        linear-gradient(135deg, #f4f1ff 0, #ffffff 66%),
        #ffffff;
}

.summary-count .summary-icon,
.summary-count::after {
    background: linear-gradient(135deg, var(--violet), var(--blue));
}

.summary-card strong {
    display: block;
    margin-top: 14px;
    color: var(--ink);
    font-size: 1.76rem;
    font-weight: 950;
    line-height: 1.06;
    overflow-wrap: normal;
    word-break: normal;
}

.panel {
    min-width: 0;
    padding: 20px;
    border-radius: 16px;
}

.report-panel {
    min-height: 290px;
    background:
        linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(255 255 255 / 86%)),
        #ffffff;
}

.report-cashflow-panel {
    min-height: 300px;
}

.cashflow-chart {
    display: grid;
    gap: 14px;
}

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

.cashflow-filter-chip {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #dde7f4;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.cashflow-filter-chip.is-income {
    border-color: #b8f2cd;
    background: linear-gradient(135deg, #f0fff6, #ffffff);
}

.cashflow-filter-chip.is-expense,
.cashflow-filter-chip.is-negative {
    border-color: #ffc7cf;
    background: linear-gradient(135deg, #fff2f4, #ffffff);
}

.cashflow-filter-chip.is-positive {
    border-color: #b9dafd;
    background: linear-gradient(135deg, #edf7ff, #ffffff);
}

.cashflow-filter-head {
    display: grid;
    gap: 5px;
}

.cashflow-filter-head span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.cashflow-filter-head .report-metric-marker {
    width: 26px;
    height: 26px;
}

.cashflow-filter-head .report-metric-marker svg {
    width: 14px;
    height: 14px;
}

.cashflow-filter-head strong {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.cashflow-filter-chip small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
}

.monthly-cashflow-plot {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.monthly-cashflow-chart {
    position: relative;
    display: grid;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    min-height: 210px;
    padding: 18px 12px 12px;
    border: 1px solid #dde7f4;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgb(8 119 238 / 3%), transparent 38%),
        linear-gradient(#edf4ff 1px, transparent 1px),
        #ffffff;
    background-size: 100% 100%, 100% 38px, auto;
    overflow: hidden;
}

.monthly-cashflow-group {
    display: grid;
    min-width: 0;
    gap: 7px;
    align-items: end;
}

.monthly-cashflow-bars {
    display: grid;
    grid-template-columns: repeat(2, minmax(16px, 1fr));
    align-items: end;
    gap: 5px;
    height: 118px;
}

.monthly-cashflow-bar {
    align-self: end;
    width: 100%;
    height: var(--height, 0%);
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 8px 8px 3px 3px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 42%);
}

.monthly-cashflow-bar.is-income {
    background: linear-gradient(180deg, var(--lime), var(--mint));
}

.monthly-cashflow-bar.is-expense {
    background: linear-gradient(180deg, var(--orange), var(--rose));
}

.monthly-cashflow-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.monthly-cashflow-net {
    display: block;
    color: var(--ink);
    min-height: 15px;
    overflow: hidden;
    font-size: 0.7rem;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-cashflow-net.is-positive {
    color: #059669;
}

.monthly-cashflow-net.is-negative {
    color: #e44755;
}

.monthly-cashflow-net.is-empty {
    visibility: hidden;
}

.monthly-cashflow-values {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
}

.monthly-cashflow-values span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-cashflow-values .is-income {
    color: #059669;
}

.monthly-cashflow-values .is-expense {
    color: #e44755;
}

.monthly-actual-line {
    position: absolute;
    inset: 18px 12px 70px;
    width: calc(100% - 24px);
    height: calc(100% - 88px);
    overflow: visible;
    pointer-events: none;
}

.monthly-actual-line polyline {
    fill: none;
    stroke: var(--blue);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.15;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 4px 7px rgb(8 119 238 / 22%));
    pointer-events: none;
}

.monthly-actual-line circle {
    fill: var(--blue);
    stroke: #ffffff;
    stroke-width: 0.7;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.cashflow-chart-legend {
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
}

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

.cashflow-chart-legend span::before {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    content: "";
}

.cashflow-chart-legend .is-income::before {
    background: var(--mint);
}

.cashflow-chart-legend .is-expense::before {
    background: var(--rose);
}

.cashflow-chart-legend .is-actual::before {
    background: var(--blue);
}

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

.cashflow-bar-card,
.cashflow-net-card {
    position: relative;
    display: grid;
    gap: 10px;
    overflow: hidden;
    padding: 14px;
    border: 1px solid #dde7f4;
    border-radius: 8px;
    background: #ffffff;
}

.cashflow-bar-card::before,
.cashflow-net-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--blue);
    content: "";
}

.cashflow-bar-card.is-income::before,
.cashflow-net-card.is-positive::before {
    background: var(--mint);
}

.cashflow-bar-card.is-expense::before,
.cashflow-net-card.is-negative::before {
    background: var(--rose);
}

.cashflow-bar-head {
    display: grid;
    gap: 6px;
}

.cashflow-bar-head span,
.cashflow-net-card span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
}

.cashflow-bar-head .report-metric-marker,
.cashflow-net-card .report-metric-marker {
    width: 28px;
    height: 28px;
}

.cashflow-bar-head .report-metric-marker svg,
.cashflow-net-card .report-metric-marker svg {
    width: 15px;
    height: 15px;
}

.cashflow-bar-head strong,
.cashflow-net-card strong {
    color: var(--ink);
    font-size: 1.34rem;
    font-weight: 950;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.cashflow-bar-track {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4edf8;
}

.cashflow-bar-fill {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    min-width: 10px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.cashflow-bar-card.is-income .cashflow-bar-fill {
    background: linear-gradient(90deg, var(--mint), var(--lime));
}

.cashflow-bar-card.is-expense .cashflow-bar-fill {
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

.cashflow-bar-card small,
.cashflow-net-card small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.cashflow-net-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.cashflow-net-card span,
.cashflow-net-card small {
    grid-column: 1;
}

.cashflow-net-card strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    text-align: right;
}

.report-metric-list {
    display: grid;
    gap: 10px;
}

.report-metric,
.report-bar-row {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border: 1px solid #dde7f4;
    background: #ffffff;
}

.report-metric::before,
.report-bar-row::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--blue);
    content: "";
}

.report-metric {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-metric-content {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 3px;
}

.report-metric-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.report-metric-value {
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.report-metric-detail {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.35;
}

.report-metric-marker {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #dff0ff, #ffffff);
    color: var(--blue);
}

.report-metric-marker svg {
    width: 21px;
    height: 21px;
}

.report-metric.is-positive::before,
.report-bar-row.is-positive::before {
    background: var(--mint);
}

.report-metric.is-negative::before,
.report-bar-row.is-negative::before {
    background: var(--rose);
}

.report-metric.is-warning::before,
.report-bar-row.is-warning::before {
    background: var(--yellow);
}

.report-metric.is-saving::before,
.report-bar-row.is-saving::before {
    background: var(--violet);
}

.report-metric.is-positive .report-metric-marker {
    background: linear-gradient(135deg, #dcfce7, #ffffff);
    color: var(--mint);
}

.report-metric.is-negative .report-metric-marker {
    background: linear-gradient(135deg, #ffe4e9, #ffffff);
    color: var(--rose);
}

.report-metric.is-warning .report-metric-marker {
    background: linear-gradient(135deg, #fff2bd, #ffffff);
    color: #d97706;
}

.report-metric.is-saving .report-metric-marker {
    background: linear-gradient(135deg, #f0e7ff, #ffffff);
    color: var(--violet);
}

.report-bar-row {
    display: grid;
    gap: 10px;
}

.report-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.report-bar-label {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.report-bar-label .report-metric-marker {
    width: 28px;
    height: 28px;
}

.report-bar-label .report-metric-marker svg {
    width: 15px;
    height: 15px;
}

.report-bar-head strong {
    color: var(--ink);
    text-align: right;
    white-space: nowrap;
}

.report-bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4edf8;
}

.report-bar-track span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.report-bar-row.is-positive .report-bar-track span {
    background: linear-gradient(90deg, var(--mint), var(--lime));
}

.report-bar-row.is-negative .report-bar-track span {
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

.report-bar-row.is-saving .report-bar-track span {
    background: linear-gradient(90deg, var(--violet), var(--blue));
}

[data-overview-target] {
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

[data-overview-target]:hover,
[data-overview-target]:focus-visible {
    border-color: rgb(8 119 238 / 42%);
    box-shadow: 0 14px 32px rgb(8 119 238 / 14%);
    transform: translateY(-1px);
}

[data-overview-target]:focus-visible {
    outline: 3px solid rgb(8 119 238 / 18%);
    outline-offset: 2px;
}

.is-focus-highlight {
    outline: 3px solid rgb(8 119 238 / 32%);
    outline-offset: 3px;
    animation: focusFlash 1.8s ease;
}

.full-page-panel {
    min-height: calc(100vh - 232px);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.section-title h2 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 1.24rem;
    font-weight: 950;
    line-height: 1.18;
}

.history-filter-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 10px;
    border: 1px solid #c8ddf7;
    border-radius: 999px;
    background: #edf7ff;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 950;
}

.history-filter-notice[hidden] {
    display: none;
}

.history-filter-notice button {
    min-height: 26px;
    padding: 3px 9px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 950;
}

.history-filter-notice button:hover,
.history-filter-notice button:focus-visible {
    color: var(--blue);
}

.history-summary-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #d7e6f8;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fcff 0%, #ffffff 58%, #fff8ec 100%);
}

.history-summary-panel[hidden] {
    display: none;
}

.history-summary-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.history-summary-head > div {
    display: grid;
    gap: 3px;
}

.history-summary-head span,
.history-detail-heading span {
    color: var(--soft);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.history-summary-head strong {
    color: var(--ink);
    font-size: 1.7rem;
    font-weight: 950;
    line-height: 1.05;
}

.history-summary-head small,
.history-detail-heading small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.history-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.history-category-card {
    display: grid;
    gap: 8px;
    min-height: 104px;
    padding: 13px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 10px 22px rgb(24 32 51 / 5%);
}

.history-category-card:hover,
.history-category-card:focus-visible,
.history-category-card.is-active {
    border-color: #8cc8ff;
    background: #f5fbff;
    outline: none;
}

.history-category-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.history-category-head strong {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 950;
    line-height: 1.2;
}

.history-category-head small {
    flex: 0 0 auto;
    color: var(--soft);
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.history-category-value {
    color: var(--blue);
    font-size: 1.08rem;
    font-weight: 950;
}

.history-category-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eef9;
}

.history-category-progress::before {
    display: block;
    width: var(--progress);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mint), var(--blue));
    content: "";
}

.history-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 2px;
}

.history-detail-heading[hidden] {
    display: none;
}

.section-kicker {
    color: #69768b;
}

.list-stack {
    display: grid;
    gap: 10px;
}

.account-list {
    max-height: 690px;
    overflow-y: auto;
    padding-right: 4px;
}

.account-list-page {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #d8e4f3;
    background: #ffffff;
    color: var(--muted);
    font-size: 0.88rem;
}

.list-row.is-positive {
    border-color: #b8f2cd;
    background: linear-gradient(135deg, #effdf5, #ffffff);
}

.list-row.is-negative {
    border-color: #ffc7cf;
    background: linear-gradient(135deg, #fff2f4, #ffffff);
}

.row-title {
    min-width: 0;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.row-meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.row-value {
    color: var(--ink);
    font-weight: 950;
    text-align: right;
    white-space: nowrap;
}

.list-row.is-positive .row-value,
.amount-positive {
    color: #059669;
}

.list-row.is-negative .row-value,
.amount-negative {
    color: #e44755;
}

.tabs {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 16px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #eef6ff;
}

.tab-button {
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 950;
}

.tab-button:hover,
.tab-button:focus-visible {
    color: var(--ink);
}

.tab-button:focus-visible {
    outline: 3px solid rgb(8 119 238 / 22%);
    outline-offset: 2px;
}

.tab-button.is-active {
    background: #ffffff;
    color: var(--blue);
    box-shadow: 0 8px 18px rgb(8 119 238 / 12%);
}

.tab-content.hidden {
    display: none;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-size: 0.9rem;
}

.history-table,
.savings-table {
    table-layout: fixed;
}

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
    width: 88px;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3) {
    width: 96px;
}

.history-table th:nth-child(4),
.history-table td:nth-child(4) {
    width: 156px;
}

.history-table td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.savings-table {
    min-width: 740px;
}

.savings-table th:nth-child(1),
.savings-table td:nth-child(1) {
    width: 37%;
}

.savings-table th:nth-child(2),
.savings-table td:nth-child(2) {
    width: 21%;
}

.savings-table th:nth-child(3),
.savings-table td:nth-child(3),
.savings-table th:nth-child(4),
.savings-table td:nth-child(4) {
    width: 13%;
}

.savings-table th:nth-child(5),
.savings-table td:nth-child(5) {
    width: 16%;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--soft);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

td {
    border-top: 1px solid #e5edf8;
    border-bottom: 1px solid #e5edf8;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
}

td:first-child {
    border-left: 1px solid #e5edf8;
    border-radius: 8px 0 0 8px;
}

td:last-child {
    border-right: 1px solid #e5edf8;
    border-radius: 0 8px 8px 0;
}

tbody tr:hover td {
    border-color: #b8d8ff;
    background: #f7fbff;
}

.align-right {
    text-align: right;
}

.amount-positive,
.amount-negative {
    font-weight: 950;
    white-space: nowrap;
}

.transaction-pill {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--violet-soft);
    color: var(--violet);
    font-size: 0.75rem;
    font-weight: 950;
    text-transform: lowercase;
    white-space: nowrap;
}

.transaction-pill.is-expense {
    background: var(--rose-soft);
    color: #e44755;
}

.transaction-pill.is-income {
    background: var(--mint-soft);
    color: #059669;
}

.budget-grid {
    display: grid;
    gap: 12px;
}

.budget-grid-page {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.budget-item {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #b9dafd;
    background:
        linear-gradient(135deg, #eef7ff, #ffffff 64%),
        #ffffff;
}

.budget-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--ink);
    font-size: 0.96rem;
    font-weight: 950;
}

.budget-heading span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.budget-percent {
    flex: 0 0 auto;
    color: var(--blue);
}

.progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #d9eaff;
}

.progress-bar {
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--cyan), var(--lime));
}

.budget-item.is-warning {
    border-color: #ffe29b;
    background: linear-gradient(135deg, #fff8dc, #ffffff 64%);
}

.budget-item.is-warning .progress-bar {
    background: linear-gradient(90deg, var(--yellow), var(--orange));
}

.budget-item.is-danger {
    border-color: #ffc3cc;
    background: linear-gradient(135deg, #fff0f3, #ffffff 64%);
}

.budget-item.is-danger .progress-bar {
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

.budget-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 850;
}

.goal-grid {
    display: grid;
    gap: 14px;
}

.goal-grid-page {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.goal-card {
    display: grid;
    gap: 14px;
    padding: 17px;
    border: 1px solid #cdd7ff;
    background:
        linear-gradient(135deg, #f5f3ff, #ffffff 58%),
        #ffffff;
    box-shadow: 0 10px 24px rgb(124 58 237 / 8%);
}

.goal-card.is-complete {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #ecfdf5, #ffffff 58%);
}

.goal-card.is-urgent {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed, #ffffff 58%);
}

.goal-head,
.goal-amount-row,
.goal-meta,
.goal-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.goal-title {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.goal-title h3 {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.goal-title .report-metric-marker {
    flex: 0 0 auto;
    background: linear-gradient(135deg, #f0e7ff, #ffffff);
    color: var(--violet);
}

.goal-date {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eaf4ff;
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 950;
    white-space: nowrap;
}

.goal-card.is-urgent .goal-date {
    background: #fff0c7;
    color: #c2410c;
}

.goal-amount-row strong {
    color: var(--ink);
    font-size: 1.28rem;
    font-weight: 950;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.goal-amount-row span,
.goal-meta,
.goal-detail {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.goal-progress .progress-bar {
    background: linear-gradient(90deg, var(--violet), var(--blue), var(--cyan));
}

.goal-meta span:first-child {
    color: var(--violet);
    font-weight: 950;
}

.goal-detail {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.goal-detail span {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef6ff;
    color: #4d5b70;
}

.reminder-list {
    display: grid;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.reminder-list-page {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.reminder-list-compact {
    max-height: 382px;
}

.reminder-card {
    display: grid;
    gap: 10px;
    padding: 15px;
    border: 1px solid #d5c9ff;
    background:
        linear-gradient(135deg, #f7f2ff, #ffffff 66%),
        #ffffff;
}

.reminder-card:nth-child(3n + 2) {
    border-color: #bcebd8;
    background: linear-gradient(135deg, #edfff6, #ffffff 66%);
}

.reminder-card:nth-child(3n + 3) {
    border-color: #ffe0a6;
    background: linear-gradient(135deg, #fff8e6, #ffffff 66%);
}

.reminder-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.reminder-head h3 {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 950;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.reminder-date {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dff0ff;
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 950;
    white-space: nowrap;
}

.reminder-content {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.5;
}

.reminder-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reminder-amount,
.reminder-status {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #fff0c7;
    color: #b45309;
    font-size: 0.72rem;
    font-weight: 950;
}

.empty-state,
.empty-cell {
    margin: 0;
    color: var(--soft);
    font-size: 0.88rem;
    font-weight: 800;
}

.empty-cell {
    padding: 28px 8px;
    text-align: center;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.85);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes focusFlash {
    0% {
        box-shadow: 0 0 0 0 rgb(8 119 238 / 32%);
    }

    45% {
        box-shadow: 0 0 0 12px rgb(8 119 238 / 0%);
    }

    100% {
        box-shadow: var(--shadow-sm);
    }
}

/* CSS chia cột cho màn hình Desktop/Tablet */
.report-hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Cột trái nhỏ, cột phải to */
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .report-hero-grid {
        grid-template-columns: 1fr; /* Mobile thì xếp dọc lại */
    }
    .simple-finance-board {
        grid-template-columns: 1fr !important; /* Biến thành 1 cột xếp dọc trên điện thoại */
    }
}
.asset-split-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #0f766e;
}
.asset-split-box.locked {
    border-left-color: #64748b;
}

@media (max-width: 1280px) {
    .overview-board,
    .overview-preview-grid,
    .report-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 860px) {
    .app-header,
    .brand-block {
        align-items: flex-start;
    }

    .app-header {
        flex-direction: column;
        min-height: 132px;
        align-items: stretch;
    }

    .brand-block {
        width: 100%;
        max-width: 100%;
    }

    .brand-block > div {
        max-width: calc(100% - 62px);
    }

    .brand {
        font-size: 1.22rem;
    }

    .system-status {
        white-space: normal;
    }

    .app-nav {
        top: 132px;
    }

    .summary-grid,
    .overview-preview-grid,
    .report-grid,
    .cashflow-filter-row,
    .cashflow-chart-bars,
    .account-list-page,
    .budget-grid-page,
    .goal-grid-page,
    .reminder-list-page {
        grid-template-columns: 1fr;
    }

    .overview-board,
    .report-hero {
        display: block;
    }

    .overview-board > * + *,
    .report-hero > * + * {
        margin-top: 14px;
    }

    .account-list,
    .reminder-list {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    .panel,
    .summary-card,
    .net-worth-card {
        padding: 16px;
    }

    .summary-card,
    .net-worth-card {
        min-height: 178px;
    }

    .net-worth-card strong {
        font-size: 2.28rem;
    }

    .net-worth-card,
    .summary-card,
    .panel,
    .report-score-card {
        width: 100%;
        max-width: 100%;
    }

    .net-worth-card p {
        max-width: 100%;
    }

    .net-worth-card::before {
        width: 46%;
    }

    .net-worth-card::after {
        width: 22%;
    }

    .summary-card strong {
        font-size: 1.82rem;
    }

    .tabs {
        max-width: 100%;
        overflow-x: auto;
    }

    .tab-button {
        flex: 0 0 auto;
    }

    .history-table,
    .savings-table {
        min-width: 650px;
    }

    .history-summary-head,
    .history-detail-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .monthly-cashflow-chart {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 7px;
        min-height: 190px;
        padding: 14px 8px 10px;
        background-size: 100% 100%, 100% 34px, auto;
    }

    .monthly-cashflow-group {
        gap: 5px;
    }

    .monthly-cashflow-bars {
        grid-template-columns: repeat(2, minmax(10px, 1fr));
        gap: 3px;
        height: 96px;
    }

    .monthly-cashflow-label {
        font-size: 0.62rem;
    }

    .monthly-cashflow-net {
        min-height: 14px;
        font-size: 0.62rem;
    }

    .monthly-actual-line {
        inset: 14px 8px 58px;
        width: calc(100% - 16px);
        height: calc(100% - 72px);
    }
}

@media (max-width: 560px) {
    .dashboard {
        padding-right: 14px;
        padding-left: 14px;
    }

    .app-header,
    .app-nav {
        padding-right: 14px;
        padding-left: 14px;
    }

    .brand-block {
        gap: 10px;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
    }

    .net-worth-card strong {
        font-size: 1.9rem;
    }

    .report-hero-metrics {
        grid-template-columns: 1fr;
    }

    .score-row strong {
        font-size: 3.1rem;
    }

    .history-category-list {
        grid-template-columns: 1fr;
    }

    .report-cashflow-panel {
        overflow: hidden;
    }

    .cashflow-chart-legend {
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .monthly-cashflow-chart {
        gap: 6px;
        min-height: 178px;
        padding: 12px 7px 10px;
        background-size: 100% 100%, 100% 32px, auto;
    }

    .monthly-cashflow-bars {
        grid-template-columns: repeat(2, minmax(7px, 1fr));
        gap: 2px;
        height: 88px;
    }

    .monthly-cashflow-bar {
        border-radius: 6px 6px 3px 3px;
    }

    .monthly-cashflow-label,
    .monthly-cashflow-net {
        font-size: 0.58rem;
    }

    .monthly-cashflow-net {
        min-height: 13px;
    }

    .monthly-actual-line {
        inset: 12px 7px 54px;
        width: calc(100% - 14px);
        height: calc(100% - 66px);
    }
}

/* Tạo thanh cuộn mượt mà cho hộp Báo động thanh khoản */
.smart-alert-feed {
    max-height: 350px; /* Giới hạn chiều cao */
    overflow-y: auto;  /* Tự động hiện thanh cuộn nếu dài quá */
    padding-right: 8px; /* Cắt lề tí cho khỏi dính chữ vào thanh cuộn */
}

/* Trang trí thanh cuộn cho nó 'Gen Z', tàng hình đi một tí cho đẹp */
.smart-alert-feed::-webkit-scrollbar {
    width: 6px;
}
.smart-alert-feed::-webkit-scrollbar-track {
    background: transparent;
}
.smart-alert-feed::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}
