:root {
    --cf-navy: #102a43;
    --cf-navy-deep: #081826;
    --cf-orange: #f28d1d;
    --cf-orange-dark: #d97a14;
    --cf-gold: #fed60a;
    --cf-bg: #eef2f6;
    --cf-card: #ffffff;
    --cf-line: #e2e8f0;
    --cf-ink: #102a43;
    --cf-muted: #64748b;
    --cf-success: #0e9f6e;
    --cf-danger: #dc3545;
    --cf-radius: 14px;
    --cf-shadow: 0 8px 30px rgba(15, 35, 55, .08);
    --cf-shadow-sm: 0 2px 10px rgba(15, 35, 55, .06);
    --font-display: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
    font-family: var(--font-body);
    color: var(--cf-ink);
    background: var(--cf-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .brand, .kpi-value, .big-money { font-family: var(--font-display); }
h1 { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
a { color: var(--cf-navy); }
a:hover { color: var(--cf-orange-dark); }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
    background: var(--cf-card);
    border-bottom: 1px solid var(--cf-line);
    box-shadow: var(--cf-shadow-sm);
    position: relative;
    z-index: 20;
}
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand {
    display: flex; align-items: center; gap: .65rem;
    font-weight: 700; font-size: 1.25rem; color: var(--cf-navy) !important;
    text-decoration: none; white-space: nowrap;
}
.brand-mark {
    width: 38px; height: 38px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--cf-gold);
    background: linear-gradient(140deg, var(--cf-navy) 0%, var(--cf-navy-deep) 100%);
    box-shadow: 0 6px 16px rgba(16, 42, 67, .25);
    font-size: 1rem;
}
.brand-mark-lg { width: 52px; height: 52px; font-size: 1.3rem; border-radius: 15px; }
.topbar-links { display: flex; gap: .35rem; align-items: center; }
.topbar-links a {
    color: var(--cf-navy); text-decoration: none; font-size: .88rem; font-weight: 500;
    padding: .5rem .8rem; border-radius: 9px; transition: background .15s, color .15s;
}
.topbar-links a:hover { background: rgba(242, 141, 29, .09); color: var(--cf-orange-dark); }
.topbar-links i { margin-right: .35rem; color: var(--cf-orange); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.user-chip { display: flex; align-items: center; gap: .55rem; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(16, 42, 67, .08); color: var(--cf-navy);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .82rem;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: .82rem; font-weight: 600; }
.user-meta small { color: var(--cf-muted); font-size: .72rem; }

/* ── Layout helpers ──────────────────────────────────────────────────────── */
.page-pad { padding-top: 2rem; padding-bottom: 3rem; }
.messages-wrap { padding-top: 1rem; }
.page-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 1.5rem; margin-bottom: 1.4rem; flex-wrap: wrap;
}
.page-head h1 { margin: 0 0 .2rem; }
.page-head p { margin: 0; }
.page-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.eyebrow {
    text-transform: uppercase; letter-spacing: .14em; font-size: .68rem;
    font-weight: 700; color: var(--cf-orange-dark); display: block; margin-bottom: .25rem;
}
.muted { color: var(--cf-muted); }
.small { font-size: .82rem; }
.text-accent { color: var(--cf-orange-dark); }

.card {
    background: var(--cf-card); border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius); box-shadow: var(--cf-shadow-sm);
}
.card-header {
    background: transparent; border-bottom: 1px solid var(--cf-line);
    font-weight: 600; padding: .9rem 1.1rem; font-family: var(--font-display); font-size: .92rem;
}
.card-body { padding: 1.1rem; }
.form-card { max-width: 680px; }

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

@media (max-width: 992px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .topbar-links { display: none; }
}

/* ── KPI cards ───────────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .9rem; margin-bottom: 1.2rem;
}
.kpi {
    background: var(--cf-card); border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius); padding: 1rem 1.1rem;
    box-shadow: var(--cf-shadow-sm);
}
.kpi .kpi-label {
    display: flex; align-items: center; gap: .45rem;
    font-size: .74rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--cf-muted); margin-bottom: .45rem;
}
.kpi .kpi-label i { color: var(--cf-orange); }
.kpi-value { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.kpi-sub { font-size: .76rem; color: var(--cf-muted); margin-top: .2rem; }
.kpi-primary {
    background: linear-gradient(140deg, var(--cf-navy) 0%, var(--cf-navy-deep) 100%);
    color: #fff; border: 0; box-shadow: 0 12px 28px rgba(8, 24, 38, .25);
}
.kpi-primary .kpi-label, .kpi-primary .kpi-sub { color: rgba(255, 255, 255, .68); }
.kpi-primary .kpi-label i { color: var(--cf-gold); }
.kpi-primary .kpi-value { color: #fff; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table { font-size: .86rem; }
.table thead th {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--cf-muted); font-weight: 600; border-bottom-color: var(--cf-line);
    background: #f8fafc; white-space: nowrap;
}
.table td { vertical-align: middle; border-color: #eef2f6; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-scroll { max-height: 420px; overflow: auto; }
.table-scroll thead { position: sticky; top: 0; z-index: 1; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.money-positive { color: var(--cf-success); }
.money-negative { color: var(--cf-danger); }

/* ── Badges and pills ────────────────────────────────────────────────────── */
.badge { font-weight: 600; letter-spacing: .01em; }
.badge-soft {
    display: inline-flex; align-items: center; gap: .35rem;
    border-radius: 999px; padding: .28rem .65rem; font-size: .72rem;
    font-weight: 600; border: 1px solid transparent;
}
.badge-success { background: #e8f8f2; color: #087a54; border-color: #bdeedb; }
.badge-warning { background: #fff7e2; color: #8a6100; border-color: #f7e3a8; }
.badge-danger { background: #fdecef; color: #a51c30; border-color: #f8c6ce; }
.badge-secondary { background: #eef2f6; color: #475569; border-color: #dbe3ec; }
.badge-dark { background: #e7edf4; color: var(--cf-navy); border-color: #d4dfeb; }
.live-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .74rem; color: #0a6b4c; background: #e9f8f1;
    border: 1px solid #c5eddd; border-radius: 999px;
    padding: .35rem .7rem; font-weight: 600;
}
.live-pill i { font-size: .5rem; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-label { font-size: .8rem; font-weight: 600; color: var(--cf-navy); }
.form-control, .form-select {
    border-color: #d7e0ea; border-radius: 9px; font-size: .88rem; padding: .55rem .75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--cf-orange); box-shadow: 0 0 0 .2rem rgba(242, 141, 29, .14);
}
.form-text { font-size: .75rem; color: var(--cf-muted); }
.field-error { color: var(--cf-danger); font-size: .78rem; margin-top: .25rem; }
.btn { border-radius: 9px; font-weight: 600; font-size: .85rem; }
.btn-primary { background: var(--cf-orange); border-color: var(--cf-orange); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--cf-orange-dark); border-color: var(--cf-orange-dark); color: #fff; }
.btn-dark { background: var(--cf-navy); border-color: var(--cf-navy); }
.btn-dark:hover { background: var(--cf-navy-deep); border-color: var(--cf-navy-deep); }
.btn-outline-primary { color: var(--cf-navy); border-color: #c9d5e2; }
.btn-outline-primary:hover { background: var(--cf-navy); border-color: var(--cf-navy); }
.btn-outline-secondary { color: var(--cf-navy); border-color: #cbd5e1; }
.btn-outline-secondary:hover { background: #eef2f6; color: var(--cf-navy); }
.btn-outline-light { color: var(--cf-navy); border-color: #d7e0ea; }
.btn-outline-light:hover { background: #f1f5f9; color: var(--cf-navy); }
.btn-icon { padding: .35rem .55rem; line-height: 1; }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-bg {
    background:
        radial-gradient(1000px 500px at 10% -10%, rgba(242, 141, 29, .18), transparent 60%),
        radial-gradient(900px 600px at 110% 110%, rgba(16, 42, 67, .18), transparent 55%),
        #f5f7fa;
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
}
.auth-shell { width: 100%; max-width: 430px; }
.auth-card {
    background: var(--cf-card); border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 24px 60px rgba(16, 42, 67, .18);
    padding: 2rem;
}
.auth-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.6rem; }
.auth-brand h1 { font-size: 1.35rem; margin: 0; }
.auth-brand p { margin: 0; color: var(--cf-muted); font-size: .8rem; }
.auth-card h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.auth-card > .muted { margin-bottom: 1.4rem; font-size: .85rem; }
.auth-foot { text-align: center; color: var(--cf-muted); font-size: .74rem; margin: 1.4rem 0 0; }

/* ── Console ─────────────────────────────────────────────────────────────── */
[v-cloak] { display: none; }
.console-tabs-wrap {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--cf-line);
    position: sticky; top: 0; z-index: 15;
    backdrop-filter: blur(8px);
}
.console-tabs {
    display: flex; align-items: center; gap: .15rem;
    overflow-x: auto; padding-top: .35rem; padding-bottom: .35rem;
    scrollbar-width: thin;
}
.console-tab {
    border: 0; background: transparent; color: var(--cf-muted);
    font-size: .82rem; font-weight: 600; padding: .55rem .75rem;
    border-radius: 8px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: .4rem; position: relative;
}
.console-tab:hover { background: #f1f5f9; color: var(--cf-navy); }
.console-tab.active { color: var(--cf-navy); background: rgba(242, 141, 29, .1); }
.console-tab.active::after {
    content: ""; position: absolute; left: .7rem; right: .7rem; bottom: -.35rem;
    height: 2px; border-radius: 2px; background: var(--cf-orange);
}
.console-tab i { color: var(--cf-orange); font-size: .85rem; }
.console-refresh { display: flex; align-items: center; padding-left: .5rem; }
.console-main { padding-top: 1.5rem; padding-bottom: 3.5rem; min-height: 70vh; }
.loading-panel {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 45vh; color: var(--cf-muted); gap: .8rem;
}
.loading-panel .spinner-border { color: var(--cf-orange); }
.card-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: .5rem;
}
.card-top .card-title { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.card-top i { color: var(--cf-orange); margin-right: .35rem; }
.section-toolbar {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
    justify-content: space-between; margin-bottom: 1rem;
}
.section-toolbar .btn { font-size: .82rem; }
.toolbar-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.empty-state { color: var(--cf-muted); text-align: center; padding: 1.5rem !important; font-size: .85rem; }
.empty-state i { display: block; font-size: 1.4rem; margin-bottom: .5rem; opacity: .5; }
.empty-panel {
    background: var(--cf-card); border: 1px dashed #cbd5e1; border-radius: var(--cf-radius);
    padding: 3rem 1.5rem; text-align: center; color: var(--cf-muted);
}
.empty-panel i { font-size: 2rem; color: var(--cf-orange); margin-bottom: 1rem; }
.empty-panel h1 { color: var(--cf-navy); font-size: 1.5rem; }
.empty-panel .btn { margin-top: .8rem; }
.selectable-row { cursor: pointer; }
.selectable-row.selected { background: rgba(242, 141, 29, .09) !important; }
.inline-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .form-group { min-width: 160px; flex: 1; }
.inline-form label { display: block; }
.big-money { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; }
.money-sub { color: var(--cf-muted); font-size: .8rem; }
.stat-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: .7rem; margin: 1rem 0;
}
.stat { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 11px; padding: .7rem .8rem; }
.stat .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cf-muted); font-weight: 600; }
.stat .value { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-top: .15rem; }
.callout { border-radius: 11px; padding: .8rem 1rem; font-size: .84rem; border: 1px solid transparent; }
.callout-warning { background: #fff8e6; border-color: #f8e3a3; color: #7a5500; }
.callout-info { background: #eef6ff; border-color: #cfe3fb; color: #214a75; }
.callout-danger { background: #fdeef1; border-color: #f6c9d2; color: #8f1c2c; }
.callout-success { background: #eaf9f2; border-color: #c2ecd9; color: #0a6b4c; }
.vault-card, .account-card {
    border: 1px solid var(--cf-line); border-radius: 12px; padding: .9rem 1rem;
    background: var(--cf-card); cursor: pointer;
    transition: border-color .15s, box-shadow .15s; height: 100%;
}
.vault-card:hover, .account-card:hover { border-color: #f3c98d; box-shadow: var(--cf-shadow-sm); }
.vault-card.active, .account-card.active { border-color: var(--cf-orange); box-shadow: 0 0 0 3px rgba(242, 141, 29, .12); }
.vault-card .name, .account-card .name { font-weight: 600; font-size: .9rem; }
.vault-card .balance, .account-card .balance {
    font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-top: .25rem;
}
.pill-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.console-main .card + .card, .console-main .card + .grid-2, .console-main .grid-2 + .card { margin-top: 1rem; }
.console-main .grid-2 + .grid-2 { margin-top: 1rem; }
.console-main section > .card:first-of-type { margin-top: 0; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-mask {
    position: fixed; inset: 0; background: rgba(8, 24, 38, .55);
    z-index: 1050; display: flex; align-items: flex-start; justify-content: center;
    padding: 3rem 1rem; overflow-y: auto; backdrop-filter: blur(2px);
}
.modal-panel {
    background: var(--cf-card); border-radius: 16px; width: 100%; max-width: 560px;
    box-shadow: 0 30px 80px rgba(8, 24, 38, .35);
    border: 1px solid rgba(255, 255, 255, .2); animation: modal-in .16s ease-out;
}
@keyframes modal-in { from { transform: translateY(8px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
    padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--cf-line);
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.modal-head h2 { margin: 0; font-size: 1.05rem; }
.modal-head p { margin: .2rem 0 0; font-size: .8rem; color: var(--cf-muted); }
.modal-body { padding: 1.2rem 1.3rem; }
.modal-foot {
    padding: .9rem 1.3rem; border-top: 1px solid var(--cf-line);
    display: flex; justify-content: flex-end; gap: .6rem; background: #fbfcfe;
    border-radius: 0 0 16px 16px;
}
.modal-close {
    border: 0; background: #f1f5f9; color: var(--cf-muted);
    width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto;
}
.modal-close:hover { background: #e2e8f0; color: var(--cf-navy); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast-box {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1200;
    min-width: 280px; max-width: 420px;
}
.toast-item {
    background: var(--cf-navy); color: #fff; border-radius: 12px;
    box-shadow: 0 16px 40px rgba(8, 24, 38, .3); padding: .85rem 1rem;
    display: flex; gap: .65rem; align-items: flex-start; font-size: .86rem;
    border-left: 4px solid var(--cf-success); animation: modal-in .18s ease-out;
}
.toast-item.is-danger { border-left-color: #ff6b81; }
.toast-item i { margin-top: .15rem; color: var(--cf-gold); }
.toast-item.is-danger i { color: #ff8a9a; }

/* ── Roles ───────────────────────────────────────────────────────────────── */
.role-options { display: flex; flex-direction: column; gap: .6rem; }
.role-option {
    display: flex; align-items: center; gap: .7rem; padding: .75rem .9rem;
    border: 1px solid var(--cf-line); border-radius: 10px; cursor: pointer;
    font-weight: 600; font-size: .88rem; background: #fbfcfe;
}
.role-option:hover { border-color: #f3c98d; }
.role-option input { width: 1.05rem; height: 1.05rem; accent-color: var(--cf-orange); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d5e2; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 768px) {
    .console-tabs { padding-left: .75rem; padding-right: .75rem; }
    .console-main { padding-left: .9rem; padding-right: .9rem; }
    .page-head { align-items: flex-start; }
    .brand span:last-child { display: none; }
    .user-meta { display: none; }
    h1 { font-size: 1.4rem; }
    .big-money { font-size: 1.6rem; }
}

/* ── allauth extras ──────────────────────────────────────────────────────── */
.form-check .form-check-input { margin-top: .2rem; }
.auth-card .form-check-label { color: var(--cf-muted); }
.auth-divider {
    display: flex; align-items: center; gap: .8rem;
    margin: 1.25rem 0; color: var(--cf-muted); font-size: .78rem;
}
.auth-divider::before, .auth-divider::after {
    content: ""; height: 1px; background: var(--cf-line); flex: 1;
}
.auth-card .btn .fa-brands, .auth-card .btn .fa-solid { margin-right: .3rem; }


/* ── Live waiting badge ─────────────────────────────────────────────────── */
.badge-waiting {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #fff7e2; color: #8a6100;
    border: 1px solid #f7e3a8; border-radius: 999px;
    padding: .28rem .7rem; font-size: .72rem; font-weight: 700;
    vertical-align: middle; white-space: nowrap;
}
.pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--cf-orange);
    box-shadow: 0 0 0 0 rgba(242, 141, 29, .6);
    animation: cf-pulse 1.7s ease-out infinite;
}
@keyframes cf-pulse {
    0% { box-shadow: 0 0 0 0 rgba(242, 141, 29, .55); }
    70% { box-shadow: 0 0 0 6px rgba(242, 141, 29, 0); }
    100% { box-shadow: 0 0 0 0 rgba(242, 141, 29, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .pulse-dot { animation: none; }
}

/* ── Report chart ───────────────────────────────────────────────────────── */
/* Categorical slots 1 (blue) and 2 (aqua) from the validated reference
   palette. Validated on the white card surface with the dataviz script:
   CVD adjacent ΔE 73.6 (PASS); aqua contrast 2.82:1 (WARN) -> relief is
   provided by the legend values, endpoint labels and the table twin. */
.report-chart {
    --chart-paid: #2a78d6;
    --chart-withdrawn: #1baf7a;
    --chart-grid: #e1e0d9;
    --chart-baseline: #c3c2b7;
    --chart-ink: #0b0b0b;
    --chart-muted: #52514e;
    --chart-surface: #ffffff;
}

.report-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.1rem .75rem;
}
.report-chart-head h2 { color: var(--chart-ink); }
.report-chart-head p { color: var(--chart-muted); }

.chart-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .8rem;
    color: var(--chart-muted);
    font-size: .78rem;
    padding-top: .2rem;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
}
.line-key {
    display: inline-block;
    width: 18px;
    height: 0;
    flex: 0 0 18px;
    border-top: 2px solid var(--chart-paid);
    vertical-align: middle;
}
.line-key.inflow { border-top-color: var(--chart-paid); }
.line-key.outflow {
    border-top-color: var(--chart-withdrawn);
    border-top-style: dashed;
}

.chart-latest {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .8rem;
    color: var(--chart-muted);
    margin-bottom: .35rem;
}
.chart-latest-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--chart-muted);
}
.chart-latest-item strong {
    color: var(--chart-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.chart-scroll { overflow-x: auto; overflow-y: hidden; }
.chart-stage { position: relative; min-width: 680px; }
.chart-svg {
    display: block;
    width: 100%;
    min-width: 680px;
    height: auto;
    aspect-ratio: 900 / 300;
    overflow: visible;
}
.chart-grid {
    stroke: var(--chart-grid);
    stroke-width: 1;
    shape-rendering: crispEdges;
}
.chart-baseline {
    stroke: var(--chart-baseline);
    stroke-width: 1;
    shape-rendering: crispEdges;
}
.chart-axis-text {
    fill: var(--chart-muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.chart-series {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chart-series-inflow { stroke: var(--chart-paid); }
.chart-series-outflow {
    stroke: var(--chart-withdrawn);
    stroke-dasharray: 6 4;
}
.chart-dot {
    stroke: var(--chart-surface);
    stroke-width: 2;
}
.chart-dot.inflow { fill: var(--chart-paid); }
.chart-dot.outflow { fill: var(--chart-withdrawn); }
.chart-crosshair {
    stroke: var(--chart-baseline);
    stroke-width: 1;
    pointer-events: none;
}
.chart-overlay {
    pointer-events: all;
    cursor: crosshair;
    touch-action: pan-y;
}

.chart-tooltip {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    min-width: 220px;
    max-width: 280px;
    padding: .65rem .8rem;
    background: var(--chart-surface);
    border: 1px solid var(--cf-line);
    border-radius: 10px;
    box-shadow: var(--cf-shadow);
    pointer-events: none;
}
.chart-tooltip-date {
    font-size: .75rem;
    font-weight: 700;
    color: var(--chart-ink);
    margin-bottom: .35rem;
    font-variant-numeric: tabular-nums;
}
.chart-tooltip-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    color: var(--chart-muted);
    margin-top: .2rem;
}
.chart-tooltip-label { min-width: 0; }
.chart-tooltip-value {
    margin-left: auto;
    color: var(--chart-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.chart-empty {
    border: 1px dashed var(--cf-line);
    border-radius: 10px;
    margin-bottom: .75rem;
    color: var(--chart-muted);
}
.chart-table {
    margin-top: .55rem;
    border-top: 1px solid var(--cf-line);
    padding-top: .6rem;
}
.chart-table summary {
    cursor: pointer;
    color: var(--chart-muted);
    font-size: .78rem;
    font-weight: 600;
    width: fit-content;
}
.chart-table summary:focus-visible {
    outline: 2px solid var(--cf-orange);
    outline-offset: 3px;
    border-radius: 4px;
}
.chart-table .table { margin-top: .5rem; }
.chart-table .table td { font-variant-numeric: tabular-nums; }


/* ── Pagination ─────────────────────────────────────────────────────────── */
.cf-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .7rem 1.1rem;
    border-top: 1px solid var(--cf-line);
    background: #fbfcfe;
    font-size: .8rem;
    color: var(--cf-muted);
}
.cf-pagination-info { font-variant-numeric: tabular-nums; }
.cf-pagination-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.cf-page-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 .55rem;
    border: 1px solid var(--cf-line);
    background: var(--cf-card);
    border-radius: 7px;
    color: var(--cf-navy);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
    transition: background .15s, border-color .15s, color .15s;
}
.cf-page-btn:hover:not(:disabled) { background: #f1f5f9; border-color: #cbd5e1; }
.cf-page-btn.active {
    background: var(--cf-orange);
    border-color: var(--cf-orange);
    color: #fff;
}
.cf-page-btn:disabled { opacity: .4; cursor: default; }
.cf-page-btn:focus-visible {
    outline: 2px solid var(--cf-orange);
    outline-offset: 2px;
}
