:root {
    --bg: #eef1f3;
    --panel: #ffffff;
    --ink: #122027;
    --muted: #66757c;
    --line: #e1e8eb;
    --brand: #0d5c63;
    --brand-2: #147780;
    --brand-soft: #e6f3f4;
    --gold: #c4a35a;
    --danger: #c0352b;
    --danger-soft: #fdecea;
    --success: #0f7a4a;
    --success-soft: #e7f7ee;
    --warning: #9a6700;
    --sidebar: #0a242b;
    --sidebar-2: #0d3038;
    --sidebar-ink: #d5e4e7;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand); }

.guest {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 80% 10%, rgba(196, 163, 90, 0.16), transparent 26%),
        linear-gradient(145deg, #071c22 0%, #0d5c63 58%, #0a3a40 100%);
}

.guest-stack {
    width: min(920px, 100%);
    display: grid;
    gap: 14px;
    justify-items: center;
}

.powered-by {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.powered-by a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.powered-by a:hover {
    border-bottom-color: currentColor;
}

.powered-by--guest {
    color: rgba(237, 245, 246, 0.72);
}

.powered-by--guest a:hover {
    color: #edf5f6;
}

.powered-by--sidebar {
    color: rgba(237, 245, 246, 0.55);
    text-align: center;
    margin-bottom: 10px;
}

.powered-by--sidebar a:hover {
    color: #edf5f6;
}

.sidebar-foot {
    margin-top: auto;
}

.login-shell {
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.login-brand {
    padding: 42px 36px;
    color: #edf5f6;
    background:
        radial-gradient(circle at top left, rgba(196, 163, 90, 0.22), transparent 36%),
        linear-gradient(180deg, #0b3a42, #0a242b);
}

.login-brand h2 { margin: 18px 0 8px; font-size: 30px; letter-spacing: -0.04em; }
.login-brand p { margin: 0; color: #b7cbd0; max-width: 32ch; }
.login-card { padding: 42px 36px; }

.logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--gold);
    color: #1b1406;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.brand-logo--login {
    height: 48px;
    width: auto;
    max-width: 220px;
    /* Logo file is black; invert for dark login panel */
    filter: brightness(0) invert(1);
}

.brand-logo--card {
    height: 36px;
    width: auto;
    max-width: 160px;
}

.brand-logo--sidebar {
    height: 32px;
    width: auto;
    max-width: 160px;
    /* Logo file is black; invert for dark sidebar */
    filter: brightness(0) invert(1);
}

.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.brand-lockup small { display: block; color: #93aeb4; font-size: 12px; }

.brand-lockup--login-card {
    display: none;
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 232px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
    color: var(--sidebar-ink);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar a { color: inherit; }
.nav { display: grid; gap: 2px; }
.nav a, .nav span {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 550;
}
.nav svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: 0.88; }
.nav a:hover, .nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.nav a.active { box-shadow: inset 3px 0 0 var(--gold); }
.nav .soon { opacity: 0.38; cursor: default; }

.main {
    padding: 18px 22px 32px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 13px; max-width: 72ch; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}
.user-chip strong, .user-chip span { display: block; }
.user-chip strong { font-size: 13px; }
.user-chip span { color: var(--muted); font-size: 11.5px; }
.user-chip .avatar { width: 32px; height: 32px; font-size: 11px; }

.panel, .data-card, .form-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards:has(> .panel.stat),
.cards.four:has(> .panel.stat) {
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.cards > .panel.stat,
.cards.four > .panel.stat {
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    background: #fbfcfd;
}
.cards > .panel.stat:last-child,
.cards.four > .panel.stat:last-child { border-right: 0; }
.stat { padding: 12px 14px; }
.stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat strong { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .hint { margin: 4px 0 0; font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 > .form-card { max-width: none; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stack-gap { display: grid; gap: 12px; margin-top: 12px; }

.data-card { overflow: hidden; }
.data-card__head, .form-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}
.data-card__head h2, .form-card__head h2 { margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.data-card__head p, .form-card__head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 14px;
    background: #f7f9fa;
    border-bottom: 1px solid var(--line);
}
.filters input[type="text"] { min-width: 200px; flex: 1; }
.filters input[type="date"] { width: auto; min-width: 138px; }
.filters select { min-width: 132px; width: auto; }
.filters--inline {
    padding: 0;
    background: transparent;
    border: 0;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}
.filters--inline input[type="date"],
.filters--inline select {
    min-width: 0;
    width: auto;
}

.page-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
    box-shadow: var(--shadow);
}
.page-tabs a {
    padding: 9px 11px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex: 0 0 auto;
}
.page-tabs a:hover { color: var(--ink); }
.page-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

.report-sheet { margin-top: 0; max-width: none; }
.report-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 14px;
}
.report-toolbar .filters--inline { margin-left: auto; }

.kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: #fbfcfd;
}
.kpi-strip--2 { grid-template-columns: repeat(2, 1fr); }
.kpi-strip--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-strip--4 { grid-template-columns: repeat(4, 1fr); }
.kpi-strip--6 { grid-template-columns: repeat(6, 1fr); }
.kpi {
    padding: 10px 14px;
    border-right: 1px solid var(--line);
    min-width: 0;
}
.kpi:last-child { border-right: 0; }
.kpi span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.kpi strong {
    display: block;
    margin-top: 3px;
    font-size: 17px;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.kpi .hint {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
.money.is-neg, .kpi strong.is-neg, strong.is-neg { color: #b91c1c; }
.money.is-pos, .kpi strong.is-pos, strong.is-pos { color: #166534; }
.cell-notes {
    max-width: 280px;
    white-space: normal;
    color: var(--muted);
    font-size: 13px;
}
.doc-kpis {
    margin: 0 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.page-back { margin: -2px 0 10px; font-size: 13px; }
.mini-list { display: grid; gap: 0; }
.mini-list > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}
.mini-list > div:last-child { border-bottom: 0; }
.mini-list strong { font-size: 16px; font-variant-numeric: tabular-nums; }

.report-catalog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}
.report-catalog a {
    display: block;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
}
.report-catalog a:nth-child(2n) { border-right: 0; }
.report-catalog a:hover { background: #f8fafb; }
.report-catalog strong {
    display: block;
    font-size: 13.5px;
    letter-spacing: -0.02em;
}
.report-catalog span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12.5px;
}

.badge.type-asset { background: #e0f2fe; color: #0369a1; }
.badge.type-liability { background: #faeeda; color: #92400e; }
.badge.type-equity { background: #ede9fe; color: #6d28d9; }
.badge.type-income { background: #dcfce7; color: #166534; }
.badge.type-expense { background: #fee2e2; color: #b91c1c; }
.badge.type-cash { background: #dcfce7; color: #166534; }
.badge.type-card { background: #dbeafe; color: #1d4ed8; }
.badge.type-bank { background: #e0f2fe; color: #0369a1; }
.badge.type-mfs { background: #faeeda; color: #92400e; }
.badge.type-gateway { background: #ede9fe; color: #6d28d9; }
.badge.type-courier { background: #e5e7eb; color: #374151; }

.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7b8b91;
    background: #fbfcfd;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f4;
    vertical-align: middle;
    color: #314047;
}
.data-table tbody tr:hover td { background: #f7fbfb; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table th:first-child, .data-table td:first-child { padding-left: 14px; }
.data-table th.col-money, .data-table td.col-money { text-align: right; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.money.muted { color: var(--muted); font-weight: 650; }
.amount-lg {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0 0 6px;
    font-variant-numeric: tabular-nums;
}
.badge.warn { background: #fff6e5; color: var(--warning); }
.data-table .col-actions { width: 1%; text-align: right; }

.person { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}
.avatar.t0 { background: #dbeafe; color: #1d4ed8; }
.avatar.t1 { background: #dcfce7; color: #166534; }
.avatar.t2 { background: #faeeda; color: #92400e; }
.avatar.t3 { background: #ede9fe; color: #6d28d9; }
.avatar.t4 { background: #e6f3f4; color: #0d5c63; }
.person-name { display: block; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.person-sub, .cell-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.cell-main { font-weight: 550; color: var(--ink); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    background: var(--brand-soft);
    color: var(--brand);
    white-space: nowrap;
}
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.off { background: var(--danger-soft); color: var(--danger); }
.badge.role-super-admin { background: #111827; color: #f8fafc; }
.badge.role-admin { background: #dbeafe; color: #1d4ed8; }
.badge.role-management { background: #ede9fe; color: #6d28d9; }
.badge.role-accounts { background: #e0f2fe; color: #0369a1; }
.badge.role-branch-manager { background: #faeeda; color: #92400e; }
.badge.role-cashier { background: #dcfce7; color: #166534; }
.badge.role-auditor { background: #e5e7eb; color: #374151; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.row-actions { display: inline-flex; justify-content: flex-end; gap: 6px; }
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: #3d4f56;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
.icon-btn:hover { background: #f4f7f8; color: var(--ink); text-decoration: none; }
.icon-btn.danger { color: var(--danger); border-color: #f3c5c1; }
.icon-btn.danger:hover { background: var(--danger-soft); }

.empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
}
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

.data-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12.5px;
}

.form-card { padding: 0; max-width: 760px; }
.form-card.sale-sheet { max-width: none; }
.form-card .form-body,
.data-card > .form-body,
.settings-sheet .form-body {
    padding: 16px 18px;
}
.form-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.settings-page { max-width: 880px; display: grid; gap: 12px; }
.settings-page .form-card { max-width: none; }
.settings-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.settings-sheet { max-width: 980px; }
.settings-section {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.settings-section--flush { padding-bottom: 0; }
.settings-section__label strong {
    display: block;
    font-size: 13.5px;
    letter-spacing: -0.02em;
}
.settings-section__label span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}
.settings-section__body .field:last-child { margin-bottom: 0; }
.settings-section__body--flush { margin: 0 -16px 0 0; }
.settings-numbers td { vertical-align: top; }
.settings-numbers input {
    min-width: 0;
    width: 100%;
    padding: 7px 9px;
}
.settings-numbers td:nth-child(2) { width: 120px; }
.settings-numbers td:nth-child(3),
.settings-numbers td:nth-child(4) { width: 96px; }
.settings-numbers td:nth-child(5) { width: 140px; white-space: nowrap; }
.hint { color: var(--muted); font-size: 12.5px; }
.number-row + .number-row { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.number-row__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.preview-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.code-chip {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 6px;
    background: #eef3f4;
    color: #3d4f56;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
input:disabled {
    background: #f4f7f8;
    color: #5b6c72;
    cursor: not-allowed;
}

label { display: block; font-size: 12.5px; font-weight: 650; margin-bottom: 5px; color: #41545b; }
input[type="text"], input[type="email"], input[type="password"], input[type="time"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    border: 1px solid #d5dee2;
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: #7cb8bd;
    box-shadow: 0 0 0 3px rgba(13, 92, 99, 0.12);
}
.field { margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 550; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 8px 13px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
}
.btn:hover { background: var(--brand-2); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-light:hover { background: #f6f8f9; color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-full { width: 100%; }
.logout .btn { width: 100%; }

.flash {
    padding: 9px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13.5px;
    font-weight: 550;
}
.flash.success { background: var(--success-soft); color: var(--success); }
.flash.warning { background: #fff6e5; color: var(--warning); }
.flash.error, .error { color: var(--danger); }
.error { font-size: 13px; margin: 6px 0 0; font-weight: 550; }

.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pagination a, .pagination span {
    display: inline-flex;
    min-width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-weight: 650;
}
.pagination .active span { background: var(--brand); color: #fff; border-color: var(--brand); }

.lines-table .col-qty { width: 90px; }
.lines-table input { min-width: 0; }
.pay-grid { display: grid; gap: 10px; }
.pay-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafb;
}
.pay-row strong { display: block; }
.denom-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.denom-row {
    display: grid;
    grid-template-columns: 88px minmax(80px, 1fr) 110px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafb;
}
.denom-row label { margin: 0; font-weight: 650; }
.closing-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.badge.type-due { background: #fff6e5; color: var(--warning); }
.badge.type-pending { background: #dbeafe; color: #1d4ed8; }
.badge.type-none { background: #e5e7eb; color: #374151; }

.suggest { position: relative; }
.suggest-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.suggest-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.suggest-item strong { display: block; }
.suggest-item:hover,
.suggest-item.is-active { background: var(--brand-soft); }
.suggest-empty {
    margin: 0;
    padding: 10px 12px;
    color: var(--muted);
}

.charts-hub .charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}
.charts-hub .charts-grid--focus {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.chart-view {
    border-top: 1px solid var(--line);
}
.chart-view__lead {
    padding: 14px 16px 4px;
    background: linear-gradient(180deg, #f7fbfb 0%, #fff 100%);
    border-bottom: 1px solid var(--line);
}
.chart-view__lead h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: -0.02em;
}
.chart-view__lead p {
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: 12.5px;
    max-width: 62ch;
}
.chart-panel {
    padding: 14px 16px 16px;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    min-width: 0;
    background: #fff;
}
.chart-panel:nth-child(2n) { border-right: 0; }
.chart-panel--wide {
    grid-column: 1 / -1;
    border-right: 0;
}
.charts-grid--focus .chart-panel:first-child { border-right: 1px solid var(--line); }
.charts-grid--focus .chart-panel--wide { border-right: 0; }
.chart-panel header h3 {
    margin: 0;
    font-size: 14px;
    letter-spacing: -0.02em;
}
.chart-panel header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12.5px;
}
.chart-frame {
    position: relative;
    height: 240px;
    margin-top: 12px;
}
.chart-frame--tall { height: 300px; }
.chart-frame--focus { height: 280px; }
.chart-frame--hero { height: 340px; }
.chart-empty {
    margin: 0;
    padding: 48px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 980px) {
    .login-shell, .app, .cards, .cards.four, .grid-2, .grid-3, .denom-grid, .closing-totals, .kpi-strip, .kpi-strip--2, .kpi-strip--3, .kpi-strip--4, .kpi-strip--6, .report-catalog, .charts-hub .charts-grid, .charts-hub .charts-grid--focus { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .brand-lockup--login-card { display: flex; }
    .sidebar { gap: 12px; }
    .nav { display: flex; flex-wrap: wrap; }
    .report-catalog a,
    .report-catalog a:nth-child(2n),
    .chart-panel,
    .chart-panel:nth-child(2n) { border-right: 0; }
    .chart-panel--wide { grid-column: auto; }
    .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
    .kpi:last-child { border-bottom: 0; }
    .filters--inline { justify-content: flex-start; width: 100%; }
    .app { grid-template-columns: 1fr; }
    .settings-section { grid-template-columns: 1fr; gap: 8px; }
    .settings-section__body--flush { margin-right: -16px; margin-left: -16px; }
}

@media print {
    .sidebar,
    .logout,
    .page-tabs,
    .no-print,
    .flash,
    .pagination { display: none !important; }
    .app { display: block; background: #fff; }
    .main { padding: 0; }
    .topbar { border: 0; padding: 0 0 12px; }
    .data-card, .report-sheet { box-shadow: none; border: 0; }
    .filters { display: none !important; }
}
