/* OTA PG dashboards (merchant and admin): Gabarito type (as on the home page),
   a light sidebar,
   neutral greys and small corners, so pages about money read like a statement.
   Base colour tokens come from console.css; the extra ones here are for
   charts, payment methods and the test-mode marker. */
@font-face {
  font-family: "Gabarito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/static/fonts/gabarito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Gabarito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/static/fonts/gabarito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --chart-accent: #2741d6; --chart-muted: #7f8898; --grid: #e6e9ee;
  /* payment methods: validated for colour-blind separation in both themes */
  --m-fpx: #2741d6; --m-qr: #d6336c; --m-card: #c27c0e;
  --hover: color-mix(in srgb, var(--text) 5%, transparent);
  --test: #d97706; --side-w: 248px;
  --shadow-card: 0 1px 2px rgb(16 24 40 / .04);
}
body.portal { --bg: #f7f8fa; --line: #e3e6eb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --chart-accent: #6f86f5; --chart-muted: #737c8f; --grid: #262c37; --test: #f59e0b; --m-fpx: #6f86f5; --m-qr: #d9608c; --m-card: #b98a28; --shadow-card: none; }
  :root:not([data-theme="light"]) body.portal { --bg: #0f1218; --line: #2a303c; }
}
:root[data-theme="dark"] { --chart-accent: #6f86f5; --chart-muted: #737c8f; --grid: #262c37; --test: #f59e0b; --m-fpx: #6f86f5; --m-qr: #d9608c; --m-card: #b98a28; --shadow-card: none; }
:root[data-theme="dark"] body.portal { --bg: #0f1218; --line: #2a303c; }

/* Gabarito's lowercase is smaller than Inter's; match Inter's x-height so the
   dashboards keep their reading size at every font-size below. */
body.portal { min-height: 100vh; font-family: "Gabarito", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; font-size-adjust: .53; }
body.portal h1 { font-weight: 600; letter-spacing: -.018em; }
body.portal h2 { font-weight: 600; }
/* buttons, tags and fields: squarer and lighter than the staff pages' defaults */
body.portal .btn { font-weight: 600; border-radius: 6px; border-width: 1px; }
body.portal .btn.ghost { font-weight: 500; }
body.portal .pill { border-radius: 4px; font-weight: 500; }
body.portal input[type=text], body.portal input[type=number], body.portal input[type=url], body.portal select { border-radius: 6px; }
.boot { padding: 40px 16px; text-align: center; color: var(--muted); }
.dim { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
input[type=email], input[type=password], input[type=date], input[type=search], textarea {
  width: 100%; padding: 9px 10px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
}
input[type=date] { min-width: 0; }
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.wide { width: 100%; margin-top: 6px; padding: 11px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.link-btn { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px 6px; cursor: pointer; border-radius: 6px; }
.link-btn:hover { color: var(--text); }
.link-btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-btn { font: inherit; font-size: 18px; line-height: 1; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }

/* ---- sign in ---- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 28px 24px; display: grid; gap: 4px; }
.auth-card h1 { font-size: 21px; margin-top: 18px; }
.auth-card .sub { margin: 4px 0 14px; }
.auth-card label { margin-top: 10px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; color: var(--text); text-decoration: none; }
.auth-brand img { border-radius: 6px; object-fit: contain; background: #fff; }
.auth-foot { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.auth-card form, .si-google { display: grid; gap: 4px; }
.auth-card .msg:empty, .si-status:empty { display: none; }
.auth-card .msg { margin: 8px 0 0; }
.si-status { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.si-row { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.si-row .link-btn:first-child { padding-left: 0; }
.link-btn:disabled { cursor: default; opacity: .75; }
.link-btn:disabled:hover { color: var(--muted); }
/* One input for the whole code: pasting works and screen readers hear one field. */
input.otp {
  width: 100%; padding: 12px 10px; font: 600 26px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .45em; text-indent: .45em; text-align: center; font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
}
input.otp::placeholder { color: var(--muted); opacity: .55; }
input.otp:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-card .check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; cursor: pointer; }
.auth-card .check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
/* The trap field: off-screen for people, present for bots that fill every input. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px;
  background: #fff; color: #1f1f1f; border: 1px solid #c7c7c7; font-weight: 600; }
.btn.google:hover { background: #f7f8f8; }
.btn.google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.confirm-modal { width: min(440px, calc(100vw - 24px)); }
.confirm-modal .form { display: grid; gap: 4px; margin-top: 6px; }
.confirm-modal .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.confirm-modal .acts .link-btn { margin-left: auto; }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.app.is-test { border-top: 3px solid var(--test); }
.content { min-width: 0; }
.testbar { background: color-mix(in srgb, var(--test) 14%, var(--panel)); color: var(--text); font-size: 13px; padding: 6px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.mtop { display: none; grid-column: 1 / -1; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; background: var(--panel); color: var(--text); border-right: 1px solid var(--line); padding: 16px 10px; }
.app.is-test .side { height: calc(100vh - 3px); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.side-brand b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.side-brand .dim { font-size: 12px; color: var(--muted); }
.logo { flex: none; width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.side-nav { display: grid; gap: 2px; }
.side-nav .group { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: color-mix(in srgb, var(--muted) 80%, var(--panel)); padding: 16px 12px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 7px 12px; border-radius: 6px; color: color-mix(in srgb, var(--text) 78%, var(--panel)); text-decoration: none; font-size: 14px; font-weight: 500; }
.side-nav a:hover { background: var(--hover); color: var(--text); }
.side-nav a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-nav .ic { width: 18px; text-align: center; opacity: .75; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side-foot .who b { display: block; }
.side-foot .who span { color: var(--muted); overflow-wrap: anywhere; }
.side-foot .link-btn { color: var(--muted); }
.side-foot .link-btn:hover { color: var(--text); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; }
.mode { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line); }
.mode.test { color: color-mix(in srgb, var(--test) 70%, var(--text)); background: color-mix(in srgb, var(--test) 16%, var(--panel)); border-color: color-mix(in srgb, var(--test) 45%, var(--panel)); }
.mode.live { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 40%, var(--panel)); }
.main { padding: 24px 28px 64px; min-width: 0; outline: none; }
.scrim { display: none; }

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .mtop { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .mtop-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; height: 100vh; width: min(280px, 86vw); transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { transform: none; box-shadow: 0 0 40px rgb(0 0 0 / .25); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / .4); }
  .main { padding: 18px 16px 56px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
/* On a phone, tables keep the columns that answer "what, how much, which order". */
@media (max-width: 640px) {
  .narrow-txn tr > :nth-child(4), .narrow-txn tr > :nth-child(6), .narrow-txn tr > :nth-child(7) { display: none; }
  .narrow-bal tr > :nth-child(2), .narrow-bal tr > :nth-child(4), .narrow-bal tr > :nth-child(5) { display: none; }
  .narrow-links tr > :nth-child(1), .narrow-links tr > :nth-child(5), .narrow-links tr > :nth-child(6) { display: none; }
  .narrow-txn tr.attempts > td { display: table-cell; }
  .narrow-admin tr > :nth-child(n+5) { display: none; }
  table.data td, table.data th { padding-left: 10px; padding-right: 10px; }
  table.data td.nowrap { white-space: normal; min-width: 92px; }
  .table-wrap { margin: 0 -20px; }
}

/* ---- page parts ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.page-head .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.back { display: inline-block; font-size: 14px; margin-bottom: 10px; text-decoration: none; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 1100px) { .cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cols-2 { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; min-width: 0; box-shadow: var(--shadow-card); }
.card h2 { font-size: 14.5px; margin: 0 0 2px; }
.card .card-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; min-width: 0; box-shadow: var(--shadow-card); }
.tile .label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tile .value { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tile .value.hero { font-size: 30px; }
@media (max-width: 480px) { .tile .value { font-size: 20px; } .tile .value.hero { font-size: 22px; } }
.tile .spark { position: absolute; right: 14px; top: 16px; width: 84px; height: 28px; }
.tile .spark polyline { fill: none; stroke: var(--chart-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tile .spark circle { fill: var(--chart-accent); stroke: var(--panel); stroke-width: 2; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 4px; margin-right: 6px; }
.delta.up { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.delta.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.delta.flat { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.tile .note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.seg button { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 5px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg .count { font-weight: 500; color: var(--muted); margin-left: 4px; }

/* toolbar + filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 10px; }
.toolbar .field { display: grid; gap: 4px; }
.toolbar .field label { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar select, .toolbar input { padding: 7px 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 4px 3px 10px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.chip button { font: inherit; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 6px; border-radius: 4px; }
.chip button:hover { color: var(--text); }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -20px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 60%, var(--panel)); text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
table.data th:first-child, table.data td:first-child { padding-left: 20px; }
table.data th:last-child, table.data td:last-child { padding-right: 20px; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover > td { background: var(--hover); }
table.data tr.click:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.data td.th-check, table.data th.th-check { width: 36px; }
table.data th.num { text-align: right; }
.sub-line { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.tries { display: block; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; margin-top: 2px; }
.tries:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
tr.attempts td { background: var(--bg); padding-top: 4px; padding-bottom: 10px; }
.atl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.atl li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .btns { display: flex; gap: 6px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }

.amt-in { color: var(--ok); }
.amt-out { color: var(--text); }
.pill.neutral { color: var(--muted); }
.pill.info { border-color: var(--accent); color: var(--accent); }
.hook { font-size: 12.5px; white-space: nowrap; }
.hook.ok { color: var(--ok); } .hook.bad { color: var(--bad); } .hook.warn { color: var(--warn); }

/* key-value */
.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; min-width: 0; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; } .kv dt { border-bottom: 0; padding-bottom: 0; } }
.copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy code { overflow-wrap: anywhere; }
.copy button { flex: none; font: inherit; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.copy button:hover { color: var(--text); border-color: var(--muted); }
.copy button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hero-amt { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.hero-amt .big { font-size: 30px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.breakdown { width: 100%; border-collapse: collapse; font-size: 14px; }
.breakdown td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown tr.total td { font-weight: 600; border-bottom: 0; }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.timeline li { position: relative; padding: 0 0 12px 20px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 2px var(--panel); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.ok::before { background: var(--ok); } .timeline li.bad::before { background: var(--bad); } .timeline li.warn::before { background: var(--warn); }
.timeline time { display: block; font-size: 12px; color: var(--muted); }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.form-grid .full { grid-column: 1 / -1; }
.field-note { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 0; }
.checks label span { font-size: 12.5px; color: var(--muted); display: block; font-weight: 400; }
.checks input { margin-top: 3px; }
fieldset.plain { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
fieldset.plain legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 4px; }
.result-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); display: grid; gap: 8px; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; padding: 10px; border-radius: 6px; background: var(--panel); border: 1px dashed var(--warn); overflow-wrap: anywhere; }
pre.code { margin: 0; padding: 12px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; font-size: 12.5px; line-height: 1.55; }
pre.code .ln { color: var(--muted); user-select: none; display: inline-block; width: 2.5em; }
.json-more { font: inherit; font-size: 12.5px; color: var(--accent); background: none; border: 0; padding: 6px 0 0; cursor: pointer; }

/* charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis-text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--chart-accent); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { fill: color-mix(in srgb, var(--chart-accent) 80%, var(--text)); }
.chart .hit:focus { outline: none; }
.chart .peak { fill: var(--text); font-size: 11.5px; font-weight: 600; }
.chart-table summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-top: 8px; }
.chart-table table { margin-top: 6px; font-size: 13px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 10px; border-radius: 0 4px 4px 0; position: relative; }
.hbar .track::before { content: ""; position: absolute; inset: 4px 0; background: var(--grid); }
.hbar .fill { position: relative; height: 10px; border-radius: 0 4px 4px 0; background: var(--chart-accent); min-width: 2px; }
.hbar .val { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.hbar .val span { font-weight: 400; color: var(--muted); }
@media (max-width: 480px) { .hbar { grid-template-columns: 1fr auto; } .hbar .track { grid-column: 1 / -1; grid-row: 2; } }

.tip { position: fixed; z-index: 60; pointer-events: none; max-width: 260px; padding: 8px 10px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 12.5px; line-height: 1.4; box-shadow: 0 6px 20px rgb(0 0 0 / .2); }
.tip b { display: block; }

/* branding editor */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .brand-grid { grid-template-columns: 1fr; } }
.preview { position: sticky; top: 16px; }
.preview-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.swatches label { display: grid; gap: 4px; margin: 0; }
.swatches input[type=color] { width: 100%; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); cursor: pointer; }
.method-list { display: grid; gap: 6px; }
.method-list label { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.method-list label.off { opacity: .6; }
.method-list img { width: 28px; height: 20px; object-fit: contain; }
.method-list .soon { margin-left: auto; font-size: 12px; color: var(--muted); }

/* modal + toast */
.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.modal::backdrop { background: rgb(0 0 0 / .5); }
.modal-head { position: sticky; top: 0; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; margin: 0; font-size: 17px; }
.modal-body { padding: 18px; display: grid; gap: 12px; }
.modal-body .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgb(0 0 0 / .25); max-width: calc(100vw - 32px); }
.banner { padding: 10px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; margin-bottom: 16px; }
.banner.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.banner.info { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.stack { display: grid; gap: 16px; }
.muted-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* ---- Home: getting started, balance, payment mix ---- */
.onboard { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 20px; align-items: center; }
@media (max-width: 860px) { .onboard { grid-template-columns: 1fr; } }
.onboard h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.onboard .progress { height: 10px; border-radius: 999px; background: var(--grid); overflow: hidden; margin: 12px 0 6px; }
.onboard .progress span { display: block; height: 100%; border-radius: 999px; background: var(--chart-accent); transition: width .6s ease; }
.onboard ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.onboard li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--bg); font-weight: 600; font-size: 14px; }
.onboard li a:hover { border-color: var(--accent); }
.onboard li i { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px dashed var(--muted); display: grid; place-items: center; font-style: normal; font-size: 13px; }
.onboard li.done a { color: var(--muted); }
.onboard li.done i { border: 0; background: var(--ok); color: #fff; }
.onboard li.done span { text-decoration: line-through; text-decoration-thickness: 1px; }

.bal-hero { position: relative; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px; padding: 22px 24px; border-radius: 6px; color: var(--text); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
@media (max-width: 860px) { .bal-hero { grid-template-columns: 1fr; } }
.bal-hero small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.bal-hero b { display: block; font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.bal-hero .bh-col b { font-size: 24px; }
.bal-hero span { font-size: 13px; color: var(--muted); }
.bal-hero a { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.bal-hero .pipe { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.bal-hero .pipe i { flex: 1; height: 1px; background: var(--line); }
.bal-hero .pipe em { font-style: normal; padding: 3px 10px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); }
.bal-hero .pipe em.now { background: color-mix(in srgb, var(--accent) 9%, var(--panel)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--panel)); }

.mixbar { display: flex; gap: 2px; height: 28px; border-radius: 4px; overflow: hidden; margin: 6px 0 12px; }
.mixbar span { display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; min-width: 0; }
.mixbar .fpx { background: var(--m-fpx); } .mixbar .dnqr { background: var(--m-qr); } .mixbar .card { background: var(--m-card); }
.mixbar .other { background: var(--chart-muted); }
.mixlegend { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.mixlegend li { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.mixlegend i { width: 12px; height: 12px; border-radius: 3px; }
.mixlegend b { font-variant-numeric: tabular-nums; }
.mixlegend span.dim { font-size: 13px; }
.sec-title { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* method marks in tables */
.mcell { display: inline-flex; align-items: center; gap: 8px; }
.mcell img { width: 30px; height: 20px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px 3px; border: 1px solid var(--line); flex: none; }
.pill::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.empty-art { display: block; margin: 0 auto 10px; }
@media (max-width: 860px) {
  .onboard li.done { display: none; }
}

/* ---- Pay buttons ---- */
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pb-card { display: flex; flex-direction: column; gap: 6px; }
.pb-card.paused { opacity: .75; }
.pb-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pb-top .mono { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-card h3 { margin: 6px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.pb-price { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.pb-stage { display: grid; place-items: center; padding: 18px; margin: 6px 0; border-radius: 6px; background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 10px, color-mix(in srgb, var(--bg) 70%, var(--line)) 10px, color-mix(in srgb, var(--bg) 70%, var(--line)) 20px); border: 1px solid var(--line); }
.pb-stage.big { padding: 28px; }
.pb-preview { display: inline-block; padding: 12px 24px; color: #fff; font: 600 16px system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 6px 16px -8px rgb(0 0 0 / .4); }
.pb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 0; }
.pb-stats div { padding: 8px 10px; border-radius: 6px; background: var(--bg); }
.pb-stats dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.pb-stats dd { margin: 0; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.pb-last { margin: 2px 0 6px; font-size: 13px; }
.pb-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.pb-empty { display: grid; gap: 18px; justify-items: start; }
.pb-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; width: 100%; }
.pb-ways div { padding: 16px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.pb-ways b { display: block; font-size: 16px; margin-bottom: 4px; }
.pb-ways span { color: var(--muted); font-size: 14px; }
.pb-slug { display: flex; align-items: center; gap: 4px; }
.pb-slug input { flex: 1; }
.pb-code { white-space: pre-wrap; word-break: break-all; font-size: 12px; max-height: 160px; }
.pb-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }
.pb-steps b { color: var(--text); }
.pb-qr { background: #fff; border-radius: 6px; padding: 8px; border: 1px solid var(--line); }

/* ---- account activation ------------------------------------------------------------ */
input[type=tel] { width: 100%; padding: 9px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input:disabled, select:disabled, textarea:disabled { opacity: .75; cursor: not-allowed; }
.opt { font-weight: 400; color: var(--muted); }
.pre { white-space: pre-line; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-left: auto; box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }

.activate-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.activate-banner.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 6%, var(--panel)); }
.activate-banner b { font-size: 16px; }
.activate-banner p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* where the application is: four stops, the current one lit */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.journey li { position: relative; display: grid; gap: 8px; align-content: start; min-width: 0; }
/* the track: from this stop's circle to the next one's */
.journey li::after { content: ""; position: absolute; left: 36px; right: -4px; top: 13px; height: 2px; border-radius: 2px; background: var(--line); }
.journey li:last-child::after { display: none; }
.journey li.done::after { background: var(--ok); }
.journey li.now::after { background: linear-gradient(90deg, var(--accent), var(--line)); }
.journey i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: 13px;
  background: var(--panel); border: 2px solid var(--line); color: var(--muted); }
.journey li.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.journey li.now i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.journey li.bad i { background: var(--bad); border-color: var(--bad); color: #fff; }
.journey b { display: block; font-size: 14px; }
.journey span { display: block; font-size: 12.5px; color: var(--muted); }
.journey li.now b { color: var(--accent); }
@media (max-width: 760px) {
  .journey { grid-template-columns: 1fr; gap: 0; }
  .journey li { grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 14px; }
  .journey li::after { left: 13px; right: auto; top: 32px; bottom: 2px; width: 2px; height: auto; }
  .journey li.now::after { background: linear-gradient(180deg, var(--accent), var(--line)); }
}

/* the form's own step bar */
.ob { display: grid; gap: 16px; }
.ob-steps { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-card); position: sticky; top: 8px; z-index: 5; }
.ob-steps button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ob-steps button:hover { background: var(--hover); }
.ob-steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ob-steps button.on { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ob-steps i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: 12.5px; border: 2px solid var(--line); color: var(--muted); }
.ob-steps button.on i { border-color: var(--accent); color: var(--accent); }
.ob-steps button.done i { border-color: var(--ok); background: var(--ok); color: #fff; }
.ob-steps span { display: grid; font-weight: 600; font-size: 14px; line-height: 1.25; min-width: 0; }
.ob-steps small { font-weight: 500; font-size: 12px; color: var(--muted); }
.ob-steps button.done small { color: var(--ok); }
@media (max-width: 760px) {
  .ob-steps { grid-template-columns: repeat(4, auto); overflow-x: auto; }
  .ob-steps span small { display: none; }
  .ob-steps button { padding: 8px; }
  .ob-steps button:not(.on) span { display: none; }
}
.ob-intro { margin: 0; color: var(--muted); max-width: 75ch; }
.ob-grid { align-items: start; }
.ob-grid .wide { grid-column: span 2; }
@media (max-width: 640px) { .ob-grid .wide { grid-column: 1 / -1; } }
.ob-grid > div.needs label::after { content: " •"; color: var(--warn); }
[data-field].flash { animation: obFlash 1.6s ease; border-radius: 6px; }
@keyframes obFlash { 0%, 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); } 100% { box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { [data-field].flash { animation: none; outline: 3px solid var(--accent); } }
.ob-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; cursor: pointer; }
.ob-check input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.ob-radio { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ob-radio legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; width: 100%; }
.ob-radio label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; margin: 0; cursor: pointer; }
.ob-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ob-channel { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); cursor: pointer; margin: 0; }
.ob-channel:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.ob-channel input { margin-top: 3px; }
.ob-channel span { display: grid; }
.ob-channel small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.person .card-head h2 { font-size: 16px; }
.person-sum { padding: 10px 0; border-bottom: 1px solid var(--line); }
.person-sum:last-child { border-bottom: 0; }

/* document drop zones: dashed until a file is in, then solid */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.doc-slot { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1.5px dashed var(--line); border-radius: 8px; background: var(--bg); transition: border-color .15s, background .15s; min-width: 0; }
.doc-slot.need { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.doc-slot.has { border-style: solid; border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.doc-slot.over { border-color: var(--accent); border-style: solid; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.doc-slot.busy { opacity: .7; pointer-events: none; }
.doc-slot .field-note { margin: 0; }
.doc-slot .msg:empty { display: none; }
.doc-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.doc-head b { font-size: 14px; }
.tag { flex: none; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.warn { border-color: var(--warn); color: var(--warn); }
.tag.ok { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.doc-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-files li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.doc-thumb { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--hover); }
.doc-thumb.pdf { display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; background: #c2410c; }
.doc-name { flex: 1; min-width: 0; font-size: 13.5px; }
.doc-name a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.doc-drop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }

.need-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.need-list li .link-btn { text-align: left; color: var(--text); font-size: 13.5px; padding: 3px 6px 3px 22px; position: relative; }
.need-list li .link-btn::before { content: ""; position: absolute; left: 6px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; border: 2px solid var(--warn); }
.need-list li .link-btn:hover { color: var(--accent); text-decoration: underline; }
.need-list .sec-title { margin-top: 10px; }
.need-list.compact { padding: 14px 16px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 6%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); }
.need-list.compact .sec-title { margin-top: 0; }
.ob-foot { display: grid; gap: 12px; }
.ob-foot .acts, .ob-declare .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ob-declare { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }

.payout-now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.bank-ic { width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); font-size: 18px; }

/* admin: application review */
.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .app-layout { grid-template-columns: 1fr; } .app-layout > aside { order: -1; } }
.next-step { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.acts.wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.plain-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.plain-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.plain-list li .btn { margin-left: auto; }
.page-head h1 .pill { vertical-align: middle; font-size: 12.5px; }
.settle-sum { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .settle-sum { grid-template-columns: 1fr; } }
.settle-to { padding: 18px 20px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 5%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); color: var(--text); display: grid; gap: 2px; }
.settle-to small { color: var(--muted); font-size: 13px; }
.settle-to b { font-size: 16px; }
.settle-to .amt { font-size: 30px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.settle-to .field-note { color: var(--muted); }
.settle-to .field-note b { font-size: inherit; }

/* ---- invoices ---------------------------------------------------------------------- */
.late { color: var(--bad); font-weight: 600; }
.inv-empty { display: grid; gap: 12px; justify-items: start; padding: 18px 4px; }
.inv-empty b { font-size: 17px; }
.inv-empty ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); max-width: 70ch; }
.inv-empty ol b { font-size: inherit; color: var(--text); }
.inv-drop { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 3%, var(--panel)); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.inv-drop:hover, .inv-drop:focus-visible, .inv-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); outline: none; }
.inv-drop.busy { opacity: .7; pointer-events: none; }
.inv-drop .drop-ic { width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; font-size: 28px; background: var(--accent); color: var(--on-accent); }
.inv-drop .drop-title { font-size: 18px; font-weight: 600; }
.map-grid { display: grid; gap: 10px; }
.map-row { display: grid; grid-template-columns: minmax(150px, 210px) minmax(180px, 280px) 1fr; gap: 6px 14px; align-items: center; padding: 8px 10px; border-radius: 6px; }
.map-row:nth-child(odd) { background: var(--bg); }
.map-row label { margin: 0; }
.map-row.needs label::after { content: " •"; color: var(--warn); }
.map-row.needs select { border-color: var(--warn); }
.map-sample { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.map-due { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.map-due label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.map-due input { width: auto; }
@media (max-width: 760px) { .map-row { grid-template-columns: 1fr; } .map-due { grid-column: 1; } }
.sum-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.sum-chip { font: inherit; font-size: 13.5px; padding: 6px 12px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
button.sum-chip { cursor: pointer; }
.sum-chip.ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.sum-chip.bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--panel)); }
.sum-chip.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.sum-chip.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
table.inv-check tr.row-bad td { background: color-mix(in srgb, var(--bad) 5%, transparent); }
table.inv-check tr.row-dim td { color: var(--muted); }
.row-msgs { list-style: none; margin: 0; padding: 0; font-size: 12.5px; display: grid; gap: 2px; }
.row-msgs.bad { color: var(--bad); }
.row-msgs.warn { color: var(--warn); margin-top: 3px; }
.ok-tick { color: var(--ok); font-weight: 600; font-size: 13px; }
.send-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .send-grid { grid-template-columns: 1fr; } }
.send-grid .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.rem { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-weight: 500; font-size: 13.5px; margin: 0; cursor: pointer; }
.rem:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
input[type=datetime-local] { padding: 7px 9px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.mail-wrap { min-width: 0; }
.mail-preview { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: 8px; background: #f3f4f7; }

/* ---- issues ---------------------------------------------------------------------------- */
.composer { display: grid; gap: 8px; }
.composer label { margin: 0; }
.composer-files { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.composer-files .field-note { margin: 0; }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.att-list li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 13px; max-width: 100%; }
.att-list li.busy { opacity: .7; }
.att-list a, .att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.att-list .link-btn { padding: 0 4px; }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.thread .msg { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--panel); display: grid; gap: 8px; }
.thread .msg.from-staff { border-left: 3px solid var(--accent); }
.thread .msg.internal { background: color-mix(in srgb, var(--warn) 6%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); border-left: 3px solid var(--warn); }
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13.5px; }
.msg-head time { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.thread-event { text-align: center; font-size: 12.5px; color: var(--muted); }
.thread-event span { display: inline-block; padding: 2px 10px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); }
.issue-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); text-decoration: none; font-size: 13.5px; }
.issue-order:hover { border-color: var(--accent); }
.issue-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .issue-layout { grid-template-columns: 1fr; } }
.issue-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.issue-banner a { font-weight: 600; }
.reply-acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: flex-end; }
.reply-acts .ob-check { margin-right: auto; }
.card.internal-mode { background: color-mix(in srgb, var(--warn) 6%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
/* ---- WhatsApp assistant -------------------------------------------------------------------- */
.wa-examples { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.wa-code { font: 600 26px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 14px; border-radius: 8px; border: 1px dashed var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); user-select: all; }
.meter { height: 8px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--chart-accent); }
/* ---- two-step sign-in ---------------------------------------------------------------------- */
.tfa-setup { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 4px 0 6px; }
.tfa-setup img { flex: none; width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 6px; background: #fff; image-rendering: pixelated; }
.tfa-setup > div { flex: 1 1 160px; min-width: 0; }
.tfa-key { display: block; font: 600 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; overflow-wrap: anywhere; padding: 8px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); user-select: all; }
.tfa-codes { list-style: none; margin: 8px 0; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line);
  font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; user-select: all; }

/* Merchant agreements (agreement.js): the frozen document as a page, the
   signatory's page (sign.js) and the agreement card in the application. */
.agr-doc { max-width: 760px; font-size: 15px; line-height: 1.6; }
.agr-doc .agr-title { font-size: 24px; line-height: 1.2; margin: 0 0 4px; }
.agr-doc .agr-meta { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.agr-doc h2 { font-size: 17px; margin: 26px 0 8px; }
.agr-doc p { margin: 8px 0; }
.agr-cl { display: grid; grid-template-columns: 40px 1fr; gap: 0 6px; }
.agr-cl p { margin: 4px 0; }
.agr-it { margin-left: 40px; grid-template-columns: 30px 1fr; }
.agr-n { color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.agr-rows { display: grid; grid-template-columns: minmax(120px, 210px) 1fr; gap: 6px 16px; margin: 8px 0 14px; }
.agr-rows dt { font-weight: 600; }
.agr-rows dd { margin: 0; overflow-wrap: anywhere; }
.agr-scroll { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; background: var(--panel); }
.agr-card .agr-lines { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.agr-card .acts { margin-top: 12px; }
.agr-fp { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; color: var(--muted); }
.ob-signers { display: grid; gap: 8px; margin: 10px 0 4px; }
.ob-signers label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.ob-signers label:has(input:checked) { border-color: var(--accent); }
.sign-page { max-width: 820px; margin: 0 auto; padding: 28px 16px 64px; display: grid; gap: 16px; }
.sign-page .auth-brand { justify-self: start; }
.sign-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px 22px; display: grid; gap: 8px; }
.sign-card h1 { font-size: 22px; line-height: 1.25; margin: 0; }
.sign-card .msg:empty { display: none; }
.sign-card .code-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sign-card .code-row input { width: 9em; letter-spacing: .2em; font-size: 18px; }
.sign-form { display: grid; gap: 10px; }
.sign-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) {
  .agr-rows { grid-template-columns: 1fr; gap: 0; }
  .agr-rows dd { margin-bottom: 8px; }
  .agr-scroll { padding: 14px; }
  .sign-form .two { grid-template-columns: 1fr; }
}
