:root {
    --navy: #011b35; --blue: #1557f5; --blue-soft: #e8efff; --blue-mist: #f3f6fc;
    --slate: #475569; --muted: #6b7a90; --line: #e3e8f0; --bg: #f7f9fc; --white: #fff;
    --ok: #0f8a4b; --ok-soft: #e3f6ec; --warn: #a15c00; --warn-soft: #fff3df;
    font-family: "Google Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--navy); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.icon { width: 18px; height: 18px; flex: none; }

.shell { display: flex; flex: 1; background: linear-gradient(to right, var(--white) 248px, var(--bg) 248px); }
.side { width: 248px; flex: none; background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-size: 18px; font-weight: 600; line-height: 1.1; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 999px; color: var(--slate); font: inherit; font-size: 14px; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.nav:hover { background: var(--blue-mist); text-decoration: none; }
.nav.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.who { display: flex; gap: 10px; align-items: center; padding: 6px 10px 10px; font-size: 13px; }
.who small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }

.main { flex: 1; min-width: 0; padding: 32px 40px 48px; max-width: 1180px; }
.solo { flex: 1; padding: 48px 20px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.head h1 { margin: 2px 0 0; font-size: 28px; font-weight: 500; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); font-weight: 600; }
.lead { margin: 8px 0 0; color: var(--slate); max-width: 720px; line-height: 1.5; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin-bottom: 20px; }
.card h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.card.flush { padding: 0; overflow: hidden; }
.card .pad { padding: 20px 24px 8px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; color: var(--navy); }
.tile-link:hover { border-color: var(--blue); text-decoration: none; }
.tile .k { font-size: 13px; color: var(--muted); }
.tile .v { font-size: 26px; font-weight: 500; }
.tile .s { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2.wide-left { grid-template-columns: 1.5fr 1fr; }
.grid2 > .card { margin-bottom: 20px; }
.link-card { display: flex; gap: 14px; align-items: center; color: var(--navy); }
.link-card:hover { border-color: var(--blue); text-decoration: none; }
.link-card .icon { width: 26px; height: 26px; color: var(--blue); }
.link-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--blue-mist); }
td { padding: 14px 24px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.key { background: var(--blue-mist); padding: 4px 8px; border-radius: 6px; word-break: break-all; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--slate); cursor: pointer; }
.icon-btn:hover { background: var(--blue-soft); color: var(--blue); }
.icon-btn.done { color: var(--ok); }

.bars { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: 230px 1fr 110px; gap: 16px; align-items: center; }
.bar-label small { display: block; color: var(--muted); font-size: 12px; }
.bar { height: 12px; background: var(--blue-mist); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-val small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.donut { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 10px; }
.donut svg { width: 190px; height: 190px; }
.donut-k { font-size: 11px; fill: var(--muted); }
.donut-v { font-size: 17px; font-weight: 600; fill: var(--navy); }
.legend { list-style: none; padding: 0; margin: 0; width: 100%; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.legend b { margin-left: auto; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.limits { display: flex; gap: 40px; margin: 14px 0 6px; }
.limits .k { display: block; font-size: 13px; color: var(--muted); }
.limits .v { font-size: 22px; font-weight: 500; }
.limits .small-v { font-size: 15px; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 10px 20px; margin: 14px 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-open { background: var(--warn-soft); color: var(--warn); }
.pill-paid { background: var(--ok-soft); color: var(--ok); }
.pill-void { background: var(--line); color: var(--slate); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--blue); color: #fff; font: inherit; font-size: 14px; font-weight: 600; border: 0; cursor: pointer; }
.btn:hover { background: #0f46cc; text-decoration: none; }
.btn.ghost { background: var(--white); color: var(--blue); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--blue-mist); }
.paper { padding: 40px 44px; max-width: 860px; }

.login { max-width: 420px; margin: 0 auto; text-align: center; }
.login-logo { height: 56px; margin-bottom: 18px; }
.login h1 { font-size: 26px; font-weight: 500; margin: 0; }
.form { text-align: left; margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--slate); font-weight: 600; }
.form input { font: inherit; font-size: 15px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; }
.form input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.form .btn { justify-content: center; margin-top: 6px; }
.alert { background: #fdecec; color: #a3201b; padding: 10px 14px; border-radius: 10px; margin-top: 18px; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }

.policy { max-width: 860px; margin: 0 auto; }
.policy-logo img { height: 44px; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--slate); background: var(--white); border: 1px solid var(--line); }
.tab.on { background: var(--blue-soft); color: var(--blue); border-color: transparent; font-weight: 600; }
.tab:hover { text-decoration: none; border-color: var(--blue); }
.prose { padding: 32px 36px; line-height: 1.65; color: var(--slate); }
.prose h1 { color: var(--navy); font-weight: 500; margin: 4px 0 2px; }
.prose h2 { color: var(--navy); font-size: 17px; margin: 24px 0 6px; }
.prose ul { padding-left: 20px; }

.foot { border-top: 1px solid var(--line); background: var(--white); padding: 16px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--slate); }

@media (max-width: 1000px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid2, .grid2.wide-left { grid-template-columns: 1fr; }
    .bar-row { grid-template-columns: 1fr 90px; }
    .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
    .shell { flex-direction: column; }
    .side { width: auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
    .side nav { flex-direction: row; overflow-x: auto; }
    .nav span { white-space: nowrap; }
    .side-foot { display: none; }
    .main { padding: 24px 18px 40px; }
    .paper { padding: 22px 18px; }
    .tiles { grid-template-columns: 1fr; }
}
