/* SupraPay merchant cabinet: the public site's black and white, calmer.
   No JavaScript: menus and filters are links and <details>. */

@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url('/static/onest-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url('/static/onest-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --side: #0e0e0f;
  --panel: #131314;
  --panel-2: #19191b;
  --panel-3: #222224;
  --line: rgba(240, 240, 237, 0.08);
  --line-2: rgba(240, 240, 237, 0.15);
  --text: #f0f0ed;
  --muted: #9b9b98;
  --faint: #6e6e6b;
  --accent: #f0f0ed;
  --on-accent: #0b0b0c;
  --ok: #86d9ab;
  --warn: #e9c46a;
  --bad: #f09090;
  --info: #9fc3f0;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', ui-monospace, monospace;
  --r: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--text); }
.mono, code { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.break { word-break: break-all; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100dvh; }
.main { flex: 1; min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 44px) 80px; }
.side { width: 248px; flex: 0 0 248px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--side); border-right: 1px solid var(--line); padding: 22px 14px; }
.brand { display: block; padding: 4px 10px 20px; margin-bottom: 10px; border-bottom: 1px solid var(--line); text-decoration: none; }
.brand img { height: 32px; width: auto; display: block; }
.brand span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { margin: 16px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--on-accent); background: var(--accent); }
.nav .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.nav a.on .dot { background: var(--on-accent); }
.side-foot { border-top: 1px solid var(--line); padding: 14px 8px 0; display: flex; flex-direction: column; gap: 10px; }
.who { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.who b { color: var(--text); font-weight: 600; display: block; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.langs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 9px; }
.langs a { padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
.langs a.on { background: var(--text); color: var(--bg); }

.mbar { display: none; }
@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .mbar { display: block; position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 12, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .mbar summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
  .mbar summary::-webkit-details-marker { display: none; }
  .mbar summary img { height: 26px; width: auto; }
  .mbar .burger { margin-left: auto; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 9px; font-size: 13px; }
  .mbar .nav { padding: 0 12px 12px; }
  .mbar .nav a { padding: 11px 12px; font-size: 15px; }
  .mbar .side-foot { padding: 12px 16px 16px; }
  .page { padding: 22px 14px 72px; }
}

/* ---------- page head ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.head h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin: 0; line-height: 1.2; }
.head p { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 8px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 13.5px; max-width: 72ch; }
section { margin-top: 26px; }
.head + section { margin-top: 0; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.panel + .panel, .cols + .panel, .panel + .cols { margin-top: 16px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.cols > .panel + .panel { margin-top: 0; }
@media (max-width: 900px) { .panel { padding: 16px; } }

.note { padding: 12px 14px; border-radius: 11px; font-size: 13.5px; background: var(--panel-2); border: 1px solid var(--line); }
.note.warn { background: rgba(233, 196, 106, 0.08); border-color: rgba(233, 196, 106, 0.25); }
.note.bad { background: rgba(240, 144, 144, 0.08); border-color: rgba(240, 144, 144, 0.28); }
.note.ok { background: rgba(134, 217, 171, 0.07); border-color: rgba(134, 217, 171, 0.25); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--panel-3); color: var(--muted); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: rgba(134, 217, 171, 0.1); }
.pill.warn { color: var(--warn); background: rgba(233, 196, 106, 0.1); }
.pill.bad { color: var(--bad); background: rgba(240, 144, 144, 0.1); }
.pill.info { color: var(--info); background: rgba(159, 195, 240, 0.1); }

/* ---------- numbers ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kpi { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .v { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- tables ---------- */
.tscroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--faint); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(240, 240, 237, 0.02); }
td.r, th.r { text-align: right; }
td .muted { font-size: 12px; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
tr.rowlink { position: relative; }
tr.rowlink a.stretch { text-decoration: none; }
tr.rowlink a.stretch::after { content: ''; position: absolute; inset: 0; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row .grow { flex: 1 1 220px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.field > small { color: var(--faint); font-size: 12px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 90px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
input.mono { font-family: var(--mono); font-size: 13px; }
input.num { font-family: var(--sans); font-variant-numeric: tabular-nums; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--text); margin: 0; padding: 0; }
.totp input { width: 132px; letter-spacing: 0.14em; font-family: var(--mono); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: rgba(240, 240, 237, 0.3); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { background: #ffffff; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(240, 144, 144, 0.4); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--line-2); }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
form.inline { display: inline; }
details.more > summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '▸ '; font-size: 11px; }
details.more[open] > summary::before { content: '▾ '; }
details.more > div { margin-top: 12px; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters a { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; text-decoration: none; }
.filters a:hover { color: var(--text); }
.filters a.on { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 600; }

/* ---------- checklist ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 30px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; padding-top: 2px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; background: var(--panel-3); color: var(--muted); }
.step.done .step-n { background: rgba(134, 217, 171, 0.14); color: var(--ok); }
.step.next .step-n { background: var(--accent); color: var(--on-accent); }
.step-title { font-weight: 600; }
.step.done .step-title { color: var(--muted); }
.step-help { color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .step { grid-template-columns: 30px 1fr; } .step .btn { grid-column: 2; justify-self: start; } }

.kv { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; min-width: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }

.secret { font-family: var(--mono); font-size: 13px; word-break: break-all; user-select: all; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.secret.hot { border-color: rgba(233, 196, 106, 0.5); }
.reveal-item + .reveal-item { margin-top: 16px; }
.reveal-item > span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
pre.payload { margin: 8px 0 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }

.empty { text-align: center; padding: 34px 16px; }
.empty b { display: block; font-size: 15px; margin-bottom: 4px; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 48ch; }

/* ---------- sign-in pages ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.gate-box { width: 100%; max-width: 400px; }
.gate-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.gate-top img { height: 34px; width: auto; }
.gate .panel { padding: 28px; }
.gate h1 { font-size: 22px; font-weight: 650; margin: 0 0 4px; letter-spacing: -0.01em; }
.gate .qr { display: block; margin: 14px auto; width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; }

/* ---------- docs ---------- */
.doc { max-width: 860px; }
.doc h1 { font-size: 28px; margin: 0 0 12px; letter-spacing: -0.02em; }
.doc h2 { font-size: 20px; margin: 34px 0 10px; }
.doc h3 { font-size: 16px; margin: 24px 0 8px; }
.doc p, .doc li { color: #d6d6d2; }
.doc pre { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font: 12.5px/1.6 var(--mono); }
.doc pre code { background: none; border: none; padding: 0; }
.doc table { margin: 10px 0 18px; }
.doc table th { color: var(--muted); }
