/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --ink: #0F1A2B;          /* navy foundation */
  --ink-2: #17253B;        /* raised navy */
  --ink-3: #22344F;        /* navy rules / borders on dark */
  --paper: #F4F6F9;        /* cool content background */
  --white: #FFFFFF;
  --line: #DCE2EA;         /* borders on light */
  --text: #16202E;
  --muted: #5A6A80;
  --on-dark: #E7ECF3;
  --on-dark-muted: #9AA9BD;
  --copper: #B8743A;       /* single accent: PCB copper */
  --copper-hi: #D8955A;    /* copper on dark backgrounds */
  --copper-soft: #F6ECE2;
  --ok: #1E7F55;  --ok-soft: #E4F3EC;
  --warn: #9A6412; --warn-soft: #FBF1DE;
  --bad: #B3362E;  --bad-soft: #FAE6E4;
  --info: #2D5B8C; --info-soft: #E6EEF7;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;

  --r-sm: 6px; --r: 10px; --r-lg: 16px;
  --wrap: 1240px;
  --shadow: 0 1px 2px rgba(15, 26, 43, .06), 0 4px 16px rgba(15, 26, 43, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--paper); }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 2.6vw, 2.1rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Buttons, badges, alerts
   ========================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--copper); color: var(--white); }
.btn-primary:hover { background: #A5652F; }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { background: var(--white); border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: #B9C3D0; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(15, 26, 43, .05); }
.btn-danger { background: var(--white); color: var(--bad); border-color: #E8C3BF; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 15px; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.link { color: var(--copper); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--copper); font-weight: 600; cursor: pointer; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #EDF1F5; color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-copper { background: var(--copper-soft); color: #8A5427; }

.alert { padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid; font-size: 14px; margin-bottom: 16px; }
.alert-ok { background: var(--ok-soft); border-color: #BFE0CF; color: #145C3D; }
.alert-bad { background: var(--bad-soft); border-color: #EFC6C2; color: #8C2923; }
.alert-warn { background: var(--warn-soft); border-color: #EFD9AE; color: #74490B; }
.alert ul { margin: 0; padding-left: 18px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field, .field + .grid-2, .grid-2 + .field, .grid-2 + .grid-2 { margin-top: 14px; }
label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--text); font: 15px/1.4 var(--font); }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px rgba(184, 116, 58, .18); }
.input.is-invalid { border-color: var(--bad); }
.error { color: var(--bad); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--copper); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: 600 12px var(--font); color: var(--muted); cursor: pointer; padding: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ==========================================================================
   Panels & tables
   ========================================================================== */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-flush .panel-head { padding: 16px 20px 0; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-hi { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.stat-hi .stat-label { color: var(--on-dark-muted); }
.stat-hi .stat-value { color: var(--white); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #F9FAFC; white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid #EDF1F5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a.rowlink { font-weight: 600; text-decoration: none; }
.table a.rowlink:hover { color: var(--copper); }
.amount-credit { color: var(--ok); }
.amount-debit { color: var(--bad); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.filters .field { gap: 4px; }
.filters .field + .field { margin-top: 0; }
.filters .input { min-height: 36px; padding: 6px 10px; font-size: 14px; }

.pagination { display: flex; gap: 6px; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 4px; }
.pagination a, .pagination span.cur { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--line); text-decoration: none; background: var(--white); }
.pagination span.cur { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pagination .off { opacity: .45; pointer-events: none; }

dl.meta { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; word-break: break-word; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--text); border-bottom-color: var(--copper); }

dialog.modal { border: 0; border-radius: var(--r-lg); padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(15, 26, 43, .3); }
dialog.modal::backdrop { background: rgba(15, 26, 43, .55); }
.modal-body { padding: 22px; }
.modal-body h3 { margin-top: 0; }

/* ==========================================================================
   Storefront shell
   ========================================================================== */
.announce { background: var(--copper); color: var(--white); font-size: 13px; text-align: center; padding: 7px 16px; }
.site-header { background: var(--ink); color: var(--on-dark); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--ink-3); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); font-family: var(--font-display); font-weight: 600; font-size: 19px; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.brand-mark { width: 30px; height: 30px; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { color: var(--on-dark-muted); text-decoration: none; font-weight: 500; font-size: 14.5px; padding: 8px 10px; border-radius: var(--r-sm); }
.main-nav a:hover, .main-nav a.on { color: var(--white); background: var(--ink-2); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-tools .btn-ghost { color: var(--on-dark); }
.header-tools .btn-ghost:hover { background: var(--ink-2); }
.wallet-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--ink-3); border-radius: 999px; color: var(--white); text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.wallet-pill span { color: var(--on-dark-muted); font-size: 12px; }
.wallet-pill:hover { border-color: var(--copper-hi); }
.menu-btn { display: none; background: none; border: 1px solid var(--ink-3); color: var(--white); border-radius: var(--r-sm); height: 38px; padding: 0 12px; font: 600 14px var(--font); cursor: pointer; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--ink); flex-direction: column; padding: 8px 12px 16px; border-bottom: 1px solid var(--ink-3); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; font-size: 16px; }
  .header-tools .hide-sm { display: none; }
  .site-header .wrap { gap: 12px; }
}

.site-footer { background: var(--ink); color: var(--on-dark-muted); margin-top: 72px; padding: 48px 0 28px; font-size: 14px; }
.site-footer h4 { color: var(--white); font-size: 14px; margin-bottom: 12px; font-family: var(--font); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-base { border-top: 1px solid var(--ink-3); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.page { padding: 36px 0 20px; }
.page-head { margin-bottom: 24px; }
.page-head p { color: var(--muted); margin: 0; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { position: relative; background: var(--ink); color: var(--on-dark); overflow: hidden; }
.hero-traces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-traces path { fill: none; stroke: var(--copper-hi); stroke-width: 1.4; opacity: .38; }
.hero-traces circle { fill: var(--ink); stroke: var(--copper-hi); stroke-width: 1.4; opacity: .55; }
.hero-traces .live { stroke-dasharray: 6 900; stroke-dashoffset: 0; opacity: .9; stroke-width: 2; animation: pulse-trace 7s linear infinite; }
@keyframes pulse-trace { to { stroke-dashoffset: -906; } }
@media (prefers-reduced-motion: reduce) { .hero-traces .live { animation: none; opacity: 0; } }
.hero .wrap { position: relative; padding-top: 88px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 600; color: var(--white); max-width: 15ch; letter-spacing: -.02em; line-height: 1.02; margin-bottom: 20px; }
.hero-sub { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--on-dark-muted); max-width: 52ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-actions .btn-outline { background: transparent; color: var(--white); border-color: var(--ink-3); }
.hero-actions .btn-outline:hover { border-color: var(--copper-hi); }
.hero-actions .all { color: var(--on-dark-muted); font-weight: 600; text-decoration: none; margin-left: 8px; }
.hero-actions .all:hover { color: var(--white); }

.connectors { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 64px; border: 1px solid var(--ink-3); border-radius: var(--r-lg); overflow: hidden; }
.connector { position: relative; display: block; padding: 28px 28px 26px 30px; text-decoration: none; color: var(--on-dark); background: var(--ink-2); transition: background .2s; }
.connector + .connector { border-left: 1px solid var(--ink-3); }
.connector:hover { background: #1C2D47; }
.connector::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; background: var(--copper-hi); border-radius: 0 3px 3px 0; }
.connector h2 { color: var(--white); font-size: 1.6rem; margin-bottom: 6px; }
.connector p { color: var(--on-dark-muted); margin: 0 0 16px; max-width: 42ch; }
.connector .pins { display: flex; flex-wrap: wrap; gap: 6px; }
.connector .pins span { font-size: 12.5px; padding: 3px 9px; border: 1px solid var(--ink-3); border-radius: 999px; color: var(--on-dark); }
.connector .go { position: absolute; right: 24px; top: 26px; color: var(--copper-hi); font-weight: 600; font-size: 14px; }
@media (max-width: 760px) { .connectors { grid-template-columns: 1fr; } .connector + .connector { border-left: 0; border-top: 1px solid var(--ink-3); } .hero .wrap { padding-top: 56px; } }

.section { padding: 64px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.7rem; margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.reasons { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.reason { padding: 22px 22px 6px 0; }
.reason + .reason { padding-left: 22px; border-left: 1px solid var(--line); }
.reason h3 { font-size: 1.05rem; margin-bottom: 6px; }
.reason p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .reasons { grid-template-columns: 1fr 1fr; } .reason:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 560px) { .reasons { grid-template-columns: 1fr; } .reason + .reason { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

.band { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
.band h2 { font-size: 1.6rem; }
.band p { color: var(--muted); margin: 0; }
.band .row { justify-content: flex-end; }
.band-dark { background: var(--ink-2); border-color: var(--ink-2); color: var(--on-dark); }
.band-dark h2 { color: var(--white); }
.band-dark p { color: var(--on-dark-muted); }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 24px; } .band .row { justify-content: flex-start; } }

.soon { max-width: 620px; padding: 72px 0 24px; }
.soon .badge { margin-bottom: 14px; }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: start center; padding: 56px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 620px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card > p.muted { margin-bottom: 22px; }
.auth-foot { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
.captcha { margin-top: 16px; }

/* ==========================================================================
   Account area
   ========================================================================== */
.account { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding-top: 32px; padding-bottom: 32px; align-items: start; }
.side-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav button { display: block; text-align: left; padding: 9px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--muted); font: 500 14.5px var(--font); background: none; border: 0; cursor: pointer; width: 100%; }
.side-nav a:hover, .side-nav button:hover { background: var(--white); color: var(--text); }
.side-nav a.on { background: var(--white); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--copper); }
.side-nav hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
@media (max-width: 860px) {
  .account { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .side-nav a, .side-nav button { white-space: nowrap; width: auto; }
  .side-nav hr { display: none; }
}
.balance-card { background: var(--ink); color: var(--on-dark); border-radius: var(--r-lg); padding: 24px; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 18px; }
.balance-card .big { font-family: var(--font-display); font-size: 2.4rem; color: var(--white); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.balance-card .lbl { font-size: 13px; color: var(--on-dark-muted); }
.balance-card .val { font-size: 1.2rem; color: var(--white); font-variant-numeric: tabular-nums; margin-top: 4px; }
.balance-card > div + div { border-left: 1px solid var(--ink-3); padding-left: 18px; }
@media (max-width: 760px) { .balance-card { grid-template-columns: 1fr 1fr; } .balance-card > div:first-child { grid-column: 1 / -1; } .balance-card > div + div { border-left: 0; padding-left: 0; } }

.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; background: var(--paper); border: 1px dashed var(--line); padding: 14px; border-radius: var(--r-sm); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.qr { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; width: 220px; }

/* ==========================================================================
   Admin shell
   ========================================================================== */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: var(--on-dark); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { padding: 4px 10px 18px; font-size: 17px; }
.admin-side nav { display: flex; flex-direction: column; gap: 1px; }
.admin-side .grp { font-size: 12px; color: var(--on-dark-muted); padding: 16px 10px 6px; }
.admin-side a { display: block; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--on-dark-muted); font-size: 14px; font-weight: 500; }
.admin-side a:hover { background: var(--ink-2); color: var(--white); }
.admin-side a.on { background: var(--ink-2); color: var(--white); box-shadow: inset 3px 0 0 var(--copper-hi); }
.admin-main { min-width: 0; }
.admin-top { height: 60px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; gap: 12px; position: sticky; top: 0; z-index: 30; }
.admin-top .crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-top .crumbs a { text-decoration: none; }
.admin-top .crumbs a:hover { color: var(--text); }
.admin-body { padding: 24px; max-width: 1400px; }
.admin-body h1 { font-size: 1.6rem; }
.admin-menu-btn { display: none; }
@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 26, 43, .45); }
  .admin-menu-btn { display: inline-flex; }
  .admin-body { padding: 16px; }
}

.chart { width: 100%; height: 180px; }
.chart rect { fill: #CFD8E4; }
.chart rect.hi { fill: var(--copper); }
.chart text { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.perm-group { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.perm-group h3 { font-size: 14px; margin-bottom: 10px; text-transform: capitalize; }
.perm-group .check { font-size: 13.5px; }
.perm-group .check + .check { margin-top: 6px; }
pre.json { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; overflow-x: auto; font-size: 12.5px; margin: 0; white-space: pre-wrap; word-break: break-word; }

.error-page { text-align: center; padding: 96px 20px; }
.error-page .code { font-family: var(--font-display); font-size: 5rem; font-weight: 600; color: var(--copper); line-height: 1; }

/* Layout guards: let grid/flex children shrink so wide tables scroll inside their panel instead of the page */
.account > div, .admin-main, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.btn { white-space: nowrap; }
@media (max-width: 600px) {
  .hero-traces { opacity: .35; }
  .hero-traces circle { display: none; }
  .brand { font-size: 17px; }
}
@media (min-width: 961px) { .admin { background: linear-gradient(to right, var(--ink) 240px, var(--paper) 240px); } }
.admin-side a.brand { color: var(--white); padding: 4px 10px 18px; font-size: 17px; }
.admin-side a.brand:hover { background: none; }
.grid-2 > .field + .field, .grid-3 > .field + .field, .grid-4 > .field + .field { margin-top: 0; }
.grid-2 > .field, .grid-3 > .field { justify-content: flex-start; }
