/* Layerbeat Pay dashboard. Tokens and components from piti-design's canvas (core Layerbeat console tokens);
   app-only parts (drawer, dialogs, toasts, phone lists) at the end. No inline styles anywhere: the CSP forbids them. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/instrument-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --ink: oklch(0.239 0.004 106.7); --secondary: oklch(0.416 0.007 95.2); --muted: oklch(0.575 0.008 97.4); --muted-2: oklch(0.702 0.009 98.9);
  --paper: #f7f8fa; --white: #fff; --line: #e4e7ec; --line-subtle: #e4e7ec; --panel: #fff; --soft: #f0f2f5; --field: #fff;
  --hover: #f0f2f5; --shell: #f7f8fa; --workspace-frame: #18205b; --header: #fff; --control-border: #d4d9e1; --control-hover: #d1ad4f;
  --accent: #2e3cd2; --accent-ink: #fff; --accent-hover: #2632b8; --info: #3c61c6; --green: #197251; --focus: #b8860b;
  --danger: #b53b3b; --warning: #946321; --nav-hover: #edeff3; --row-hover: #181b2204;
  --success-bg: #1972510f; --success-border: #1972513d; --success-ink: #197251;
  --danger-bg: #b53b3b0f; --danger-border: #b53b3b3d; --warning-bg: #b67b1712; --warning-border: #b67b1742; --warning-ink: #946321;
  --info-bg: #3c61c610; --info-border: #3c61c63d;
  --warning-surface: #fff8eb; --warning-line: #e8d3ad; --warning-text: #855b22; --error-surface: #fff3f3; --error-line: #ecc7c7;
  --notice-surface: #edf2fa; --notice-ink: #465d84; --backdrop: #181b2266;
  --card-shadow: inset 0 1px 2px #181b220a; --field-shadow: inset 0 1px 2px #181b220a; --focus-ring: 0 0 0 3px #b8860b33;
  --window-shadow: inset 0 1px 0 #ffffff99, 0 3px 0 #e4e7ec, 0 5px 6px #181b221f;
  --radius: 12px; --pad: 1.25rem;
  /* Layerbeat type: the console's sizes (apps/console/src/styles/console.css 741-752) and Layerbeat's two fonts.
     Instrument Sans for text, Bricolage Grotesque for page titles and numbers (tabular figures, --num).
     JetBrains Mono only inside code blocks (API keys, webhook payloads). */
  --text-title: 2rem; --text-heading: 1.5rem; --text-section: 1.25rem; --text-card: 1.125rem; --text-body: 1rem;
  --text-ui: 1rem; --text-control: .9375rem; --text-small: .9375rem; --text-caption: .875rem; --text-micro: .8125rem; --text-axis: .75rem;
  --leading-ui: 1.45; --leading-copy: 1.6;
  --avatar-shine: #ffffffcc;
  --chart-1: #2e3cd2; --chart-track: #e8eaf8;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --num: var(--display); /* numbers: Bricolage Grotesque with tabular figures (owner, 2026-11-29) */
}
.sidebar { color-scheme: dark; --ink: #f4f6ff; --secondary: #ced5f4; --muted: #a3afd9; --white: #202a62; --line: #364580;
  --line-subtle: #2e3b76; --control-border: #4858a2; --hover: #2b3881; --soft: #222d68; --nav-hover: #222d68; --focus: #f5c242; }
[data-theme="dark"], [data-theme="dark"] .sidebar {
  color-scheme: dark;
  --ink: oklch(0.944 0.003 286.3); --secondary: oklch(0.778 0.008 286.2); --muted: oklch(0.619 0.01 286.1); --muted-2: oklch(0.488 0.011 286);
  --paper: #0f0f11; --white: #19191b; --line: #2a2a2e; --line-subtle: #232326; --panel: #1b1b1e; --soft: #202023; --field: #151517;
  --hover: #242428; --shell: #141416; --workspace-frame: #0f0f11; --header: #141416; --control-border: #2a2a2e; --control-hover: #44444c;
  --accent: #f3f3f5; --accent-ink: #121214; --accent-hover: #dcdce2; --info: #5b8cff; --green: #3ecf8e; --focus: #f5c242;
  --danger: #ef5b70; --warning: #e8a64a; --nav-hover: #1f1f23; --row-hover: #ffffff03;
  --success-bg: #3ecf8e1f; --success-border: #3ecf8e47; --success-ink: #45d79a;
  --danger-bg: #ef5b701f; --danger-border: #ef5b7047; --warning-bg: #e8a64a1f; --warning-border: #e8a64a47; --warning-ink: #f0c27a;
  --info-bg: #5b8cff1f; --info-border: #5b8cff47;
  --warning-surface: #29251d; --warning-line: #564127; --warning-text: #e8bb75; --error-surface: #302127; --error-line: #603441;
  --notice-surface: #20272e; --notice-ink: #b0bdd2; --backdrop: #00000099;
  --card-shadow: inset 0 1px 2px #00000059; --field-shadow: inset 0 1px 2px #00000066; --focus-ring: 0 0 0 3px #f5c24240;
  --window-shadow: inset 0 1px 0 #ffffff0a, 0 3px 0 #08080a, 0 5px 6px #00000066;
  --chart-1: #5b8cff; --chart-track: #24283a;
}
* { box-sizing: border-box; }
.lb { margin: 0; font: 400 var(--text-ui)/var(--leading-ui) var(--sans); color: var(--ink); background: var(--workspace-frame); -webkit-font-smoothing: antialiased; min-height: 100vh; position: relative; }
.lb :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
/* Numbers, IDs and dates: Bricolage Grotesque with tabular figures, so columns line up. */
.mono, .num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .secondary { color: var(--secondary); } .small { font-size: var(--text-small); line-height: var(--leading-copy); } .micro { font-size: var(--text-micro); }
.eyebrow { font: 500 var(--text-caption)/1.5 var(--sans); letter-spacing: 0; color: var(--muted); margin: 0; }

/* shell */
.workspace { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--workspace-frame); color: var(--ink); padding: 1.65rem 1rem 1rem; display: flex; flex-direction: column; }
[data-theme="dark"] .sidebar { background: var(--paper); }
.sidebar-brand { display: flex; align-items: center; justify-content: flex-start; gap: .5rem; margin: 0 .25rem 1.25rem 1.5rem; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: var(--text-ui); line-height: 1.15; }
.brand .logo-piti { display: block; height: 34px; width: auto; }
/* Sidebar collapse (desktop only): the chevron on the right of the logo row hides the labels, leaving an icon rail. */
.sidebar .sidebar-toggle { margin-left: auto; flex: none; color: var(--muted); background: none; border-color: transparent; box-shadow: none; }
.sidebar .sidebar-toggle:hover { background: none; color: var(--ink); }
.sidebar .sidebar-toggle svg { width: 18px; height: 18px; stroke-width: 2; }
.sidebar-toggle svg { transition: transform .18s ease; }
.workspace { transition: grid-template-columns .18s ease; }
@media (min-width: 861px) {
  .nav-collapsed .workspace { grid-template-columns: 72px minmax(0, 1fr); }
  .nav-collapsed .sidebar { padding-left: .75rem; padding-right: .75rem; }
  .nav-collapsed .sidebar-brand { justify-content: center; margin: 0 0 1.25rem; min-height: 34px; }
  .nav-collapsed .sidebar-brand .brand-link, .nav-collapsed .sidebar-brand .staff-tag { display: none; }
  .nav-collapsed .sidebar .sidebar-toggle { margin-left: 0; }
  .nav-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
  .nav-collapsed .nav-link, .nav-collapsed .docs-link { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-collapsed .nav-link span, .nav-collapsed .docs-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-collapsed .nav-count, .nav-collapsed .docs-link .docs-arrow, .nav-collapsed .theme-row svg { display: none; }
  .nav-collapsed .theme-row { justify-content: center; padding: 0; }
}
.nav-list { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: .7rem; min-height: 38px; padding: .45rem .7rem; line-height: 1.35; border-radius: 7px; border: 1px solid transparent; font-weight: 400;
  color: var(--secondary); text-decoration: none; font-size: var(--text-control); white-space: nowrap; }
.nav-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-link:hover { background: var(--nav-hover); color: var(--ink); }
.nav-link.active { background: var(--hover); border-color: var(--control-border); color: var(--ink); font-weight: 500; }
.nav-link svg, .docs-link svg { width: 16px; height: 16px; flex: none; color: var(--muted); stroke-width: 1.7; }
.nav-link.active svg { color: var(--ink); }
.nav-count { margin-left: auto; min-width: 21px; padding: 1px 6px; border: 1px solid var(--line-subtle); border-radius: 6px; text-align: center;
  background: var(--white); color: var(--muted); font: 500 .71875rem/1.5 var(--num); font-variant-numeric: tabular-nums; }
.nav-foot { margin-top: auto; padding-top: 1.5rem; flex-shrink: 0; display: flex; flex-direction: column; }
.docs-link { display: flex; align-items: center; gap: .5rem; min-height: 40px; padding: .55rem .7rem; border-radius: 7px; color: var(--secondary);
  font-size: var(--text-small); font-weight: 400; text-decoration: none; }
.docs-link:hover { background: var(--nav-hover); color: var(--ink); }
.docs-link .docs-arrow { margin-left: auto; width: 13px; height: 13px; }
.wbody { min-width: 0; margin: 8px 8px 8px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--shell); overflow: hidden; display: flex; flex-direction: column; }
.topbar { min-height: 62px; background: var(--header); border-bottom: 1px solid var(--line-subtle); border-radius: 14px 14px 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 2rem; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.topbar-left { flex: 1; }
.topbar-right { gap: .8rem; flex-shrink: 0; }
.crumb .menu-wrap { display: flex; min-width: 0; }
.crumb > * { min-width: 0; }
.crumb { display: flex; align-items: center; gap: .85rem; min-width: 0; font-size: var(--text-control); line-height: var(--leading-ui); color: var(--muted); }
.crumb b { color: var(--ink); font-weight: 400; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--white); color: var(--secondary); font: 500 var(--text-small)/1 var(--sans); box-shadow: inset 0 1px 0 var(--avatar-shine); }
.account-avatar { background: var(--soft); color: var(--secondary); font-size: var(--text-micro); }
.account-trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 4px 6px; border: 0; border-radius: 7px;
  background: none; color: var(--muted); cursor: pointer; }
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: var(--hover); }
.account-trigger > svg { width: 14px; height: 14px; }
.topbar .seg button { font-size: var(--text-caption); min-height: 30px; padding: 4px 12px; }
.topbar .seg svg { width: 14px; height: 14px; }
.topbar .role-badge { font-size: var(--text-micro); }
.test-strip { background: var(--warning-surface); border-bottom: 1px solid var(--warning-line); color: var(--warning-text); font-size: var(--text-caption); line-height: var(--leading-ui); padding: .55rem 2rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
main.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 1.75rem 2rem 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: .25rem; }
.page-heading h1 { font: 500 var(--text-title)/1.2 var(--display); letter-spacing: -.01em; margin: 0; overflow-wrap: anywhere; }
.page-heading p { margin: .4rem 0 0; color: var(--muted); max-width: 650px; line-height: var(--leading-copy); font-size: var(--text-body); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* segmented (mode switch) */
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line-subtle); border-radius: 8px; background: var(--white); gap: 2px; }
.seg button { font: 500 var(--text-caption) var(--sans); color: var(--secondary); background: transparent; border: 0; border-radius: 6px; padding: 4px 12px; min-height: 30px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--hover); color: var(--ink); }
.seg button.test[aria-pressed="true"] { background: var(--warning-bg); color: var(--warning-ink); }
.seg button.live[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:disabled { color: var(--muted-2); cursor: not-allowed; }
.seg svg { width: 14px; height: 14px; }

/* buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .45rem .9rem; min-height: 38px; border: 1px solid var(--control-border);
  border-radius: 7px; font: 500 var(--text-control)/var(--leading-ui) var(--sans); background: var(--white); color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { border-color: var(--control-hover); background: var(--hover); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-hover); }
.button.quiet { background: transparent; border-color: transparent; color: var(--secondary); }
.button.danger { color: var(--danger); }
.button.full { width: 100%; }
.button svg { width: 16px; height: 16px; }
.icon-button { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--control-border); background: var(--white); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.icon-button svg { width: 16px; height: 16px; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

/* cards */
.panel, .metric, .dialog, .auth-card { min-width: 0; background: var(--panel); border: 1px solid var(--line-subtle); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 1rem; padding: 1rem var(--pad); min-height: 56px; border-bottom: 1px solid var(--line-subtle); }
.panel-head h3 { margin: 0; font-size: var(--text-card); font-weight: 600; letter-spacing: -.2px; line-height: 1.4; }
.panel-head p { margin: .2rem 0 0; color: var(--muted); font-size: var(--text-small); line-height: 1.5; }
.panel-head .grow { margin-right: auto; }
.panel-body { padding: 1.125rem var(--pad); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.metric { padding: 1.125rem var(--pad); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric-label { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: var(--text-small); font-weight: 500; }
.metric-label svg { width: 17px; height: 17px; }
.metric strong { margin: .6rem 0 .3rem; font: 600 1.75rem/1.25 var(--num); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric.accent strong { color: var(--green); }
.metric p { margin: 0; color: var(--muted); font-size: var(--text-caption); line-height: 1.5; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.cols-main { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.cols-main > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.cols-main > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }

/* tables */
.table-wrap { overflow-x: auto; }
/* Financial tables: one line per row, numbers right-aligned in mono, console type sizes. */
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: var(--text-control); line-height: var(--leading-ui); }
/* Header on the card's own surface with a hairline under it (as in the console), not a grey band. */
thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
th { height: 40px; text-align: left; font-size: var(--text-caption); font-weight: 500; color: var(--muted); padding: 0 .75rem; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { height: 48px; padding: .45rem .75rem; border-top: 1px solid var(--line-subtle); vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; }
th:first-child, td:first-child { padding-left: var(--pad); } th:last-child, td:last-child { padding-right: var(--pad); }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--soft) 60%, var(--panel)); }
th.r, td.r { text-align: right; }
td.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
td .status { font-size: var(--text-caption); gap: 6px; }
td .badge { padding: 1px 6px; font-size: var(--text-micro); }
td .button { min-height: 30px; padding: .15rem .65rem; font-size: var(--text-caption); }
td .button svg { width: 14px; height: 14px; }
.tp { font-weight: 600; display: block; color: var(--ink); text-decoration: none; }
td .tp { display: inline; font-weight: 500; }
.ts { font-size: var(--text-caption); color: var(--muted); display: block; }
td .ts { font-size: var(--text-micro); line-height: 1.35; }
.ti { font-size: var(--text-micro); color: var(--muted); margin-left: 6px; }
.row-link { color: inherit; text-decoration: none; }
a.row-link:hover { color: var(--accent); text-decoration: underline; }
.table-foot { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: .75rem var(--pad); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 45%, var(--panel)); font-size: var(--text-caption); color: var(--muted); }
.table-foot b { font: 500 var(--text-caption) var(--num); font-variant-numeric: tabular-nums; color: var(--ink); }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: .6rem var(--pad); border-top: 1px solid var(--line-subtle); color: var(--muted); font-size: var(--text-caption); }
.pagination .button { min-height: 32px; padding: .2rem .75rem; font-size: var(--text-caption); }

/* badges and status */
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: 2px 8px; border: 1px solid var(--line-subtle); border-radius: 6px; font-size: var(--text-micro); line-height: var(--leading-ui); font-weight: 500; white-space: nowrap; }
.badge.success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-ink); }
.badge.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.badge.warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-ink); }
.badge.info { background: var(--info-bg); border-color: var(--info-border); color: var(--info); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-control); font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.paid::before, .status.succeeded::before, .status.delivered::before { background: var(--green); }
.status.pending::before, .status.processing::before, .status.retrying::before { background: var(--warning); }
.status.failed::before { background: var(--danger); }
.status.review::before { background: var(--warning); box-shadow: 0 0 0 2px var(--warning-bg); }
.status.refunded::before { background: var(--info); }

/* forms */
.form { display: flex; flex-direction: column; gap: 1.125rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.125rem; }
label.field { display: flex; flex-direction: column; gap: .45rem; font-weight: 500; font-size: var(--text-control); line-height: var(--leading-ui); }
.input, select.input, textarea.input { height: 40px; border-radius: 10px; padding: .45rem .875rem; background: var(--field); border: 1px solid var(--control-border); box-shadow: var(--field-shadow);
  font: 400 var(--text-ui)/var(--leading-ui) var(--sans); color: var(--ink); width: 100%; }
textarea.input { height: auto; min-height: 96px; }
.input:hover { border-color: var(--control-hover); }
.input:focus { outline: none; border-color: var(--focus); box-shadow: var(--field-shadow), var(--focus-ring); }
.input.mono { font-variant-numeric: tabular-nums; }
.field-note { font-size: var(--text-caption); color: var(--muted); font-weight: 400; line-height: 1.5; }
.search { position: relative; flex: 1 1 240px; max-width: 320px; }
.search svg { position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; color: var(--muted); }
.search .input { padding-left: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font: 500 var(--text-caption) var(--sans); padding: 4px 12px; border-radius: 7px; border: 1px solid var(--control-border); background: var(--white); color: var(--secondary); cursor: pointer; min-height: 34px; }
.chip:hover { border-color: var(--control-hover); color: var(--ink); }
/* Selected: a soft tint of the accent, not a dark outline. */
.chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.upload { border: 1px dashed var(--control-border); border-radius: 8px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; background: var(--field); }
.upload svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-control); }
.box { width: 18px; height: 18px; flex: none; border-radius: 6px; border: 1px solid var(--control-border); background: var(--field); display: grid; place-items: center; }
.box.on { background: var(--focus); border-color: var(--focus); color: #fff; }
.box svg { width: 12px; height: 12px; }

/* callouts, secrets, dialog */
.callout { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; font-size: var(--text-control); line-height: var(--leading-copy); display: flex; gap: 10px; align-items: flex-start; }
.callout svg { width: 17px; height: 17px; flex: none; margin-top: 3px; }
.callout.warning { background: var(--warning-surface); border-color: var(--warning-line); color: var(--warning-text); }
.callout.notice { background: var(--notice-surface); border-color: transparent; color: var(--notice-ink); }
.callout.error { background: var(--error-surface); border-color: var(--error-line); color: var(--danger); }
.callout.success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-ink); }
.callout p { margin: 0; }
.secret-band { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: 8px; }
.secret-head { display: flex; gap: 10px; align-items: center; }
.secret-icon { width: 28px; height: 28px; border-radius: 7px; background: var(--success-bg); color: var(--success-ink); display: grid; place-items: center; flex: none; }
.secret-icon svg { width: 15px; height: 15px; }
pre.code { margin: 0; font: 400 var(--text-caption)/1.6 var(--mono); background: var(--white); border: 1px solid var(--control-border); border-radius: 7px; padding: .6rem .875rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.scrim { background: var(--backdrop); padding: 2rem 1rem; display: flex; justify-content: center; align-items: flex-start; }
.dialog { width: min(540px, 100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1rem .875rem var(--pad); border-bottom: 1px solid var(--line-subtle); }
.dialog-head h2 { font-size: var(--text-section); font-weight: 600; letter-spacing: -.2px; line-height: 1.35; margin: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 1rem var(--pad) 1.25rem; }

/* detail lists, timeline, steps */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem 1.25rem; margin: 0; }
.dl div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dl dt { font-size: var(--text-caption); color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; font-size: var(--text-control); overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; padding: 10px 0; font-size: var(--text-control); border-top: 1px solid var(--line-subtle); align-items: start; }
.timeline li:first-child { border-top: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin: 7px 0 0 3px; background: var(--muted-2); }
.dot.ok { background: var(--green); } .dot.info { background: var(--info); } .dot.warn { background: var(--warning); } .dot.bad { background: var(--danger); }
.timeline b { font-weight: 600; display: block; }
.timeline time { font: 400 var(--text-micro) var(--num); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px; font-size: var(--text-control); }
.steps li.current { background: var(--hover); font-weight: 600; }
.step-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 500 var(--text-micro) var(--num); border: 1px solid var(--control-border); flex: none; }
.steps li.done .step-n { background: var(--success-bg); border-color: var(--success-border); color: var(--success-ink); }
.steps li.current .step-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps svg { width: 12px; height: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--line-subtle); padding: 0 var(--pad); }
.tabs button { font: 500 var(--text-control) var(--sans); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: .8rem .125rem; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
[data-theme="dark"] .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.qr-box { width: 168px; height: 168px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; }
.positive { color: var(--green); font-family: var(--num); font-variant-numeric: tabular-nums; } .negative { color: var(--danger); font-family: var(--num); font-variant-numeric: tabular-nums; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 2.5rem 1rem; }
.empty h3 { margin: 0; font-size: var(--text-card); font-weight: 600; letter-spacing: -.2px; } .empty p { margin: 0; color: var(--muted); max-width: 460px; font-size: var(--text-small); line-height: var(--leading-copy); }
.footer-line { text-align: center; color: var(--muted-2); font-size: var(--text-micro); padding: 0 0 1rem; }
@media (max-width: 560px) { main.content { padding: 1.25rem 1rem 1.5rem; gap: 1rem; } .crumb span { display: none; } .lb { --pad: 1rem; }
  .page-heading h1 { font-size: 1.65rem; } .page-heading p { font-size: var(--text-small); } }

/* charts (dataviz rules: one hue per series, 24px max bars, 4px rounded data end, 2px gaps, hairline grid) */
.range { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chart-total { font: 600 1.375rem var(--num); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.plot { position: relative; height: 160px; margin: 16px 0 0 44px; }
.grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-subtle); }
.grid.base { border-top-color: var(--control-border); }
.tick { position: absolute; right: calc(100% + 8px); top: -8px; font: 400 var(--text-axis) var(--num); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; }
.bar-hit { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; background: none; border: 0; padding: 0; border-radius: 4px; cursor: default; }
.bar-hit:hover, .bar-hit:focus-visible { background: color-mix(in srgb, var(--hover) 80%, transparent); }
.bar-hit:hover .bar, .bar-hit:focus-visible .bar { filter: brightness(1.18); }
.bar { width: min(24px, 72%); background: var(--chart-1); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar.partial { opacity: .45; }
.cap { font: 500 .6875rem var(--num); font-variant-numeric: tabular-nums; color: var(--secondary); margin-bottom: 3px; white-space: nowrap; }
.xaxis { display: flex; gap: 2px; margin: 4px 0 0 44px; }
.xaxis span { flex: 1 1 0; min-width: 0; text-align: center; font: 400 var(--text-axis) var(--num); color: var(--muted); white-space: nowrap; overflow: visible; }
.tip { position: absolute; top: -6px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--window-shadow);
  padding: 8px 12px; pointer-events: none; display: flex; flex-direction: column; gap: 2px; z-index: 3; white-space: nowrap; font-size: var(--text-caption); color: var(--secondary); }
.tip b { font: 500 var(--text-control) var(--num); font-variant-numeric: tabular-nums; color: var(--ink); }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hbars li { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; font-size: var(--text-control); }
.hbars .track { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--chart-track); overflow: hidden; }
.hbars .fill { height: 100%; background: var(--chart-1); border-radius: 0 4px 4px 0; }
.hbars .val { font: 500 var(--text-caption) var(--num); font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---------- app ---------- */
html { background: var(--workspace-frame); }
[data-theme="dark"] { background: var(--paper); }
body.lb { min-height: 100dvh; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
[data-theme="dark"] a:not(.button):not(.nav-link):not(.docs-link):not(.row-link) { color: var(--info); }
button { font: inherit; }
button:disabled, .button:disabled, .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.boot { color: #fff; opacity: .6; padding: 2rem; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: .625rem; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; }
.ink { color: var(--ink); }
.m0 { margin: 0; }
.center { text-align: center; }

/* shell */
.workspace { min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.wbody { min-height: calc(100dvh - 16px); }
.menu-btn { display: none; }
.switcher { display: inline-flex; align-items: center; gap: .6rem; min-height: 38px; border: 0; background: none; font: 500 var(--text-ui)/var(--leading-ui) var(--sans); color: var(--ink); padding: .35rem .5rem; border-radius: 7px; max-width: 300px; min-width: 0; }
.switcher[aria-haspopup] { cursor: pointer; }
.switcher[aria-haspopup]:hover { background: var(--hover); }
.switcher .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher svg { width: 18px; height: 18px; color: var(--muted); flex: none; stroke-width: 1.9; }
.initial { width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 var(--text-micro) var(--sans); flex: none; }
.crumb .sep { color: var(--muted-2); }

.menu-wrap { position: relative; }
.menu { position: absolute; z-index: 30; top: calc(100% + 6px); width: min(280px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--window-shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.menu.right { right: 0; }
.menu.left { left: 0; }
.menu-head { padding: 10px 8px 12px; border-bottom: 1px solid var(--line-subtle); margin-bottom: 6px; display: flex; flex-direction: column; gap: 1px; }
.menu-head b { font-size: var(--text-control); font-weight: 500; line-height: var(--leading-ui); }
.menu-head span { font-size: var(--text-micro); color: var(--muted); overflow-wrap: anywhere; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; text-align: left; border: 0; background: none; color: var(--ink); padding: 7px 8px; border-radius: 7px; font-size: var(--text-control); line-height: var(--leading-ui); cursor: pointer; text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); }
.menu-item svg { width: 16px; height: 16px; flex: none; color: var(--muted); stroke-width: 1.7; }
.menu-item svg.cur { margin-left: auto; color: var(--accent); }
.menu-item small { color: var(--muted); font-size: var(--text-micro); margin-left: auto; }
.theme-row { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; padding: 0 .35rem; min-height: 40px; color: var(--muted); }
.theme-row svg { width: 16px; height: 16px; }
.switch { width: 42px; height: 24px; border-radius: 12px; border: 1px solid var(--control-border); background: var(--soft); position: relative; padding: 0; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--hover); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.drawer-scrim { display: none; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: var(--text-control); align-self: flex-start; }
.back svg { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .sidebar-toggle { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: min(248px, calc(100vw - 3rem)); transform: translateX(-100%); visibility: hidden;
    transition: transform .18s ease, visibility .18s; box-shadow: none; border-right: 1px solid var(--line); padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .nav-open .sidebar { transform: none; visibility: visible; box-shadow: 12px 0 40px #00000050; }
  .nav-open .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 20; background: var(--backdrop); }
  .wbody { margin: 8px; min-height: calc(100dvh - 16px); }
  .topbar { padding: .8rem 1.5rem; min-height: 62px; }
  .test-strip { padding: .55rem 1.5rem; }
  .crumb .sep, .crumb .page { display: none; }
  .topbar .role-badge { display: none; }
}
@media (max-width: 560px) {
  .topbar { padding: .7rem 1rem; gap: .6rem; }
  .test-strip { padding: .55rem 1rem; }
  .topbar-left { gap: .6rem; }
  .topbar-right { gap: .5rem; }
  .switcher { gap: 8px; padding: 4px 6px; }
  .account-trigger { padding: 4px; }
  .account-trigger > svg { display: none; }
}
@media (max-width: 420px) {
  .seg button, .topbar .seg button { padding: 3px 7px; min-height: 28px; font-size: var(--text-micro); gap: 4px; }
  .topbar .seg svg { width: 12px; height: 12px; }
  .switcher { max-width: 150px; }
}

/* auth */
.auth { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100dvh; background: var(--paper); }
.auth .sidebar { position: static; height: auto; flex: 1 1 380px; padding: 36px 40px; gap: 24px; justify-content: space-between; }
.auth .brand { padding: 0; }
.auth .brand .logo-piti { height: 40px; }
.auth-card .brand .logo-piti { height: 32px; color: var(--ink); }
.auth-pitch { display: flex; flex-direction: column; gap: 22px; max-width: 440px; }
.auth-pitch h1 { font: 500 clamp(2rem, 3.2vw, 2.5rem)/1.12 var(--display); letter-spacing: -.01em; margin: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; color: var(--secondary); font-size: var(--text-body); line-height: var(--leading-ui); }
.ticks li { display: flex; gap: 10px; }
.ticks svg { width: 20px; height: 20px; flex: none; color: var(--focus); }
.auth-main { flex: 999 1 480px; display: grid; place-items: center; padding: 48px 16px; }
.auth-card { width: min(460px, 100%); padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.auth-card .seg { align-self: flex-start; }
.auth-card h2 { font: 500 var(--text-heading)/1.2 var(--display); letter-spacing: -.01em; margin: 0; }
.auth-card .lead { margin: 6px 0 0; color: var(--muted); line-height: var(--leading-copy); }
.auth-foot { margin: 0; color: var(--muted); }
input[type="checkbox"].check { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--focus); flex: none; }
@media (max-width: 560px) {
  .auth .sidebar { padding: 20px 18px; gap: 14px; flex-basis: 100%; }
  .auth-pitch { gap: 12px; }
  .auth-pitch h1 { font-size: 1.65rem; }
  .ticks { gap: 6px; font-size: var(--text-small); }
  .auth-card { padding: 1.5rem 1.25rem; }
  .auth-main { padding: 16px 12px 32px; place-items: start center; }
  .auth .legal { display: none; }
}

/* forms */
.input[aria-invalid="true"] { border-color: var(--danger); }
.field .opt { font-weight: 400; color: var(--muted); }
.form-err { margin: 0; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .625rem; align-items: end; }
@media (max-width: 560px) { .inline-form { grid-template-columns: 1fr; } }
.input-affix { position: relative; }
.input-affix > span { position: absolute; left: 12px; top: 0; bottom: 0; display: grid; place-items: center; font: 500 var(--text-control) var(--num); color: var(--muted); }
.input-affix > .input { padding-left: 40px; font-family: var(--num); font-variant-numeric: tabular-nums; }
.method-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.method-opt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--control-border); border-radius: 8px; padding: 10px 12px; background: var(--field); cursor: pointer; font-size: var(--text-control); }
.method-opt:has(input:checked) { border-color: var(--focus); box-shadow: var(--focus-ring); }
.method-opt:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.method-opt input { margin: 4px 0 0; accent-color: var(--focus); }
.method-opt b { display: block; font-weight: 600; }
.method-opt span { color: var(--muted); font-size: var(--text-caption); }

/* dialog */
dialog.modal { padding: 0; border: 0; background: transparent; color: var(--ink); width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: visible; }
dialog.modal::backdrop { background: var(--backdrop); }
dialog.modal .dialog { width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; }
.dialog-actions .button.primary { min-width: 120px; }

/* toasts */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--window-shadow); padding: 10px 14px; font-size: var(--text-control); max-width: min(380px, calc(100vw - 32px)); display: flex; gap: 8px; align-items: flex-start; }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.toast.ok svg { color: var(--green); }
.toast.bad { border-color: var(--error-line); }
.toast.bad svg { color: var(--danger); }
@media (max-width: 560px) { .toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; } .toast { max-width: none; } }

/* states */
.loading { padding: 2rem var(--pad); color: var(--muted); font-size: var(--text-control); display: flex; gap: 8px; align-items: center; }
.loading::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--muted); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty svg { width: 28px; height: 28px; color: var(--muted-2); }
.page-error { margin: 0; }

/* payments */
.filters-bar { gap: 10px; }
.filters-bar .search { max-width: 360px; }
.amount-h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.amount-h1 h1 { font: 600 var(--text-title)/1.2 var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin: 0; }
.qr-panel .panel-body { display: grid; justify-items: center; gap: 10px; text-align: center; }
.qr-box { width: 208px; height: 208px; padding: 10px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-box.stale svg { opacity: .2; }
.va-number { font: 600 1.5rem var(--num); font-variant-numeric: tabular-nums; letter-spacing: .03em; overflow-wrap: anywhere; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row pre.code { flex: 1 1 auto; min-width: 0; }
/* In a narrow side column the link takes the full width and the copy button sits under it. */
.side .copy-row { flex-direction: column; }
.side .copy-row pre.code { word-break: break-all; }
.side .copy-row > .button { align-self: flex-start; }
.timeline.pad { padding: .25rem var(--pad) 1rem; }
.timeline .ts { overflow-wrap: anywhere; }
.panel-head.tight { flex-wrap: nowrap; }
.panel-head .button.sm, .button.sm { min-height: 32px; padding: 0 .7rem; font-size: var(--text-caption); }
.m-list { display: none; list-style: none; margin: 0; padding: 0; }
.m-list li { border-top: 1px solid var(--line-subtle); }
.m-list li:first-child { border-top: 0; }
.m-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 12px var(--pad); color: var(--ink); text-decoration: none; }
.m-list a:active { background: var(--hover); }
.m-list .ref { font: 500 var(--text-control) var(--num); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-list .amt { font: 500 var(--text-control) var(--num); font-variant-numeric: tabular-nums; text-align: right; }
.m-list .sub { font-size: var(--text-caption); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-list .status { justify-self: end; font-size: var(--text-caption); }
@media (max-width: 640px) {
  .has-m-list .table-wrap { display: none; }
  .has-m-list .m-list { display: block; }
  .filters-bar .search { max-width: none; flex-basis: 100%; }
  .filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
  .chip { flex: none; }
  .page-heading .actions { width: 100%; }
  .page-heading .actions .button { flex: 1 1 auto; }
}

/* payment link */
.share-text { font-size: var(--text-control); line-height: var(--leading-copy); }
.wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.wa:hover { background: #1a7a43; border-color: #1a7a43; color: #fff; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: var(--text-control); margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; }
.summary .total { font-weight: 600; color: var(--ink); border-top: 1px solid var(--line-subtle); padding-top: 8px; }
.summary dd.total { font-weight: 600; }

/* charts */
.chart-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.plot { margin-left: 64px; }
.xaxis { margin-left: 64px; }
.chart-empty { color: var(--muted); font-size: var(--text-control); padding: 1.5rem 0 .5rem; text-align: center; }
@media (max-width: 560px) { .cap { display: none; } }
.seg a.button { min-height: 30px; padding: 4px 12px; border: 0; border-radius: 6px; font-size: var(--text-caption); color: var(--secondary); }
.seg a.button.on { background: var(--hover); color: var(--ink); }
.brand-link { display: block; }
.sidebar a.brand-link, .sidebar a.brand-link:hover { color: var(--ink); text-decoration: none; }
main.content:focus { outline: none; }
.test-strip svg { width: 15px; height: 15px; flex: none; }
.test-strip span { min-width: 0; }
@media (max-width: 860px) { .auth .sidebar { position: static; transform: none; visibility: visible; width: auto; height: auto; min-height: 0; z-index: auto; box-shadow: none; border-right: 0; } }
tr.clickable { cursor: pointer; }
table.narrow { min-width: 520px; }
/* The payments list keeps its money columns; the ID (also on the detail page) goes first when space runs out. */
@media (max-width: 1500px) { .col-id { display: none; } }
.timeline li .button.sm { margin-top: 4px; }
.test-strip { flex-wrap: nowrap; align-items: flex-start; }
.test-strip svg { margin-top: 2px; }
@media (max-width: 560px) { .crumb .switcher span { display: inline; } .crumb .switcher .initial { display: grid; } }
[data-theme="dark"] .m-list a { color: var(--ink); }
.share-text { min-height: 0; resize: vertical; }
@media (max-width: 860px) { .cols-main.side-first > .side { order: -1; } }
.ti.review { color: var(--warning-ink); font-weight: 500; }
.r-align { text-align: right; }
.chart-body { padding-top: .5rem; }
.chart-note { margin: 10px 0 0; font-size: var(--text-caption); color: var(--muted); }
.chart-table { max-height: 280px; overflow-y: auto; }
table.flat { min-width: 0; }
.tip.hidden { display: none; }
.cols-main > .main > .panel.chart { width: 100%; }

/* ---------- apps (doc 010) ---------- */
.app-mark { width: 26px; height: 26px; border-radius: 7px; flex: none; display: inline-grid; place-items: center; object-fit: contain;
  background: var(--soft); border: 1px solid var(--line); color: var(--secondary); font: 600 var(--text-micro) var(--sans); }
img.app-mark { background: #fff; padding: 1px; }
.app-mark.branded { background: var(--app-bg); color: var(--app-ink); border-color: transparent; }
.app-mark.lg { width: 48px; height: 48px; border-radius: 12px; font-size: 1.125rem; }
.app-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
tr.archived td { color: var(--muted); }
.app-head { display: flex; align-items: center; gap: 14px; }
.app-head h1 { margin: 0; }
.tabs-panel { overflow-x: auto; }
.tabs-panel .tabs { border-bottom: 0; flex-wrap: nowrap; }
.tabs button { white-space: nowrap; }
.tabs button svg { width: 15px; height: 15px; }
.app-filter { width: auto; max-width: 220px; }
.danger-zone .panel-head { border-bottom: 0; }
label.button.is-disabled { opacity: .5; pointer-events: none; }
.button[hidden] { display: none; }
.color-input { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--field); cursor: pointer; }
.hex-input { width: 120px; font-variant-numeric: tabular-nums; }

.panel-body:empty { display: none; }
main.content .switch[aria-checked="true"] { background: var(--green); border-color: var(--green); }
main.content .switch:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- settlement (doc 010 §2) ---------- */
.panel-head.sub-head { min-height: 0; padding-top: .75rem; padding-bottom: .75rem; background: none; }
.export-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.date-input { width: auto; min-width: 150px; }
@media (max-width: 560px) { .export-row { margin-left: 0; } .date-input { flex: 1 1 130px; min-width: 0; } }
.eyebrow .keep { text-transform: none; letter-spacing: 0; }
@media (max-width: 560px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; }
  .metric { padding: .875rem; }
  .metric-label { font-size: var(--text-caption); gap: .4rem; }
  .metric-label svg { width: 15px; height: 15px; }
  .metric strong { font-size: 1.125rem; letter-spacing: -.3px; margin: .4rem 0 .2rem; }
  .metric p { font-size: var(--text-micro); }
}

/* ---------- payments: date range and export ---------- */
.filters-bar { flex-wrap: wrap; }
.filters-bar .filters { flex-basis: 100%; }
.grow-gap { flex: 1 1 0; }
.range-filter { width: auto; max-width: 200px; }
.date-range { margin-left: 0; }
.date-range[hidden] { display: none; }
@media (max-width: 640px) {
  .range-filter { max-width: none; flex: 1 1 140px; }
  .grow-gap { display: none; }
}

/* chart x axis: a short label (the day) on narrow screens, so 7 labels never run together */
.xaxis .xs { display: none; }
@media (max-width: 560px) { .xaxis .xl { display: none; } .xaxis .xs { display: inline; } }

/* refunds on a payment: a list on phones instead of a table that hides its amount */
.refund-list .sub { white-space: normal; }
.m-list .m-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px var(--pad); color: var(--ink); }
.refund-list .ref { font-family: var(--sans); }

/* ---------- account, team, verification ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem 1.25rem; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; align-items: center; gap: 10px; padding: .75rem var(--pad); border-top: 1px solid var(--line-subtle); font-size: var(--text-control); }
.plain-list li:first-child { border-top: 0; }
.session-list { list-style: none; margin: 0; padding: 0; }
.session-list li { display: flex; align-items: center; gap: 12px; padding: 1rem var(--pad); border-top: 1px solid var(--line-subtle); }
.session-list li:first-child { border-top: 0; }
.session-list .grow { display: flex; flex-direction: column; gap: 2px; }
.session-list b { font-size: var(--text-control); font-weight: 600; }
.session-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--soft); color: var(--secondary); }
.session-ico .ico { width: 16px; height: 16px; }
.avatar-sm { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--secondary); font: 600 var(--text-micro) var(--sans); }
@media (max-width: 560px) { .session-list li { gap: 10px; } .session-list .ts { white-space: normal; } }
.code.wrap { white-space: pre-wrap; word-break: break-all; }
.member-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.role-pick { width: auto; min-width: 140px; }
.role-list { margin: 0; padding: 1rem var(--pad); display: grid; gap: 4px 0; }
.role-list dt { margin-top: 8px; }
.role-list dt:first-child { margin-top: 0; }
.role-list dd { margin: 0; font-size: var(--text-control); line-height: var(--leading-copy); color: var(--secondary); }
@media (max-width: 560px) { .member-list li { flex-wrap: wrap; } .member-list .member-actions { margin-left: 42px; } .role-pick { min-width: 0; } }
.grid3 { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 1rem 1.25rem; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > :first-child { grid-column: 1 / -1; } }
.method-pick.two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.title-badge { margin-left: 12px; vertical-align: middle; font-size: var(--text-micro); }
.kyc-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 1rem; padding: 0; }
.kyc-steps li { display: flex; align-items: center; gap: 8px; font-size: var(--text-control); color: var(--muted); }
.kyc-steps .step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font: 600 var(--text-micro) var(--num); background: var(--panel); }
.kyc-steps .step-dot .ico { width: 13px; height: 13px; }
.kyc-steps li.done { color: var(--secondary); }
.kyc-steps li.done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.kyc-steps li.now { color: var(--ink); font-weight: 600; }
.kyc-steps li.now .step-dot { border-color: var(--ink); color: var(--ink); }
.session-ico.ok { background: var(--success-bg); color: var(--success-ink); }
.doc-list li { align-items: flex-start; }
.doc-list li > .button { flex: none; }
.doc-file { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--text-caption); }
.doc-file > .ico { width: 13px; height: 13px; color: var(--muted); flex: none; }
.link-button { border: 0; background: none; padding: 0; color: var(--info); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; text-align: left; }
.icon-button.sm { width: 30px; height: 30px; }
.icon-button.sm svg { width: 14px; height: 14px; }
.kyc-page > .callout { margin-bottom: 1rem; }
.kyc-steps { margin-top: .75rem; }

/* ---------- drawer (lib/drawer.js): a payment's detail over the payments list ---------- */
dialog.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line);
  width: min(480px, 100vw); height: 100dvh; max-width: 100vw; max-height: none; background: var(--shell); color: var(--ink);
  box-shadow: -24px 0 48px #0000002e; overflow: hidden; }
dialog.drawer[open] { display: flex; flex-direction: column; animation: drawer-in .2s ease-out; }
dialog.drawer::backdrop { background: var(--backdrop); }
@keyframes drawer-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.drawer[open] { animation: none; } }
.drawer-head { flex: none; display: flex; align-items: center; gap: .5rem; min-height: 56px; padding: .5rem .75rem .5rem 1.25rem;
  background: var(--header); border-bottom: 1px solid var(--line-subtle); }
.drawer-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font: 600 var(--text-card)/1.3 var(--sans); letter-spacing: -.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.drawer-body .back { display: none; }
.drawer-head h2:focus { outline: none; }
.drawer-body .page-heading .actions { margin-left: auto; }
@media (max-width: 560px) {
  .drawer-head { padding-left: 1rem; }
  .drawer-body { padding: 1rem; gap: 1rem; }
  .drawer-head .button span, .drawer-head .button { font-size: var(--text-caption); }
}

/* ---------- staff console (staff.html, staff.js, staff/*) ---------- */
.staff-tag { display: inline-flex; align-items: center; align-self: center; padding: 2px 8px; border-radius: 6px; font: 600 var(--text-micro)/1.4 var(--sans);
  letter-spacing: .04em; text-transform: uppercase; background: #f5c24229; color: #f5c242; border: 1px solid #f5c24259; }
.sidebar-brand .staff-tag { margin-left: 0; }
.auth-pitch .staff-tag { align-self: flex-start; }
.staff-crumb { display: inline-flex; align-items: center; gap: 6px; }
.staff-crumb .ico { width: 15px; height: 15px; }
.staff-who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; min-width: 0; }
.staff-who b { font-weight: 500; font-size: var(--text-caption); }
.staff-who small { color: var(--muted); font-size: var(--text-micro); }
@media (max-width: 560px) { .staff-who { display: none; } }
.code-input { font: 500 1.25rem/1 var(--num); letter-spacing: .3em; text-align: center; height: 48px; }
.enrol-steps { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
.enrol-steps > li { display: flex; flex-direction: column; gap: .6rem; }
.enrol-steps > li::marker { font-weight: 600; }
.enrol-qr { width: 184px; height: 184px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.enrol-qr svg { width: 100%; height: 100%; display: block; }
.secret { word-break: break-all; }
.doc-list > li.doc-item { display: block; padding: .9rem var(--pad); }
.doc-kind { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-files { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.doc-files li { display: flex; align-items: center; gap: 10px; padding: .55rem .75rem; border: 1px solid var(--line-subtle); border-radius: 10px; background: var(--field); }
.doc-files li > .ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.doc-files .grow { display: flex; flex-direction: column; min-width: 0; }
.doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.nik-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nik-row .mono { font-size: var(--text-body); letter-spacing: .02em; }
.enrol-steps p { margin: 0; }
.audit-action { display: inline-flex; align-items: center; gap: 8px; }
.audit-action .dot { margin: 0; }
/* Table cells ignore max-width; the clipping sits on an inner block. */
.cut { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-who { max-width: 160px; } .audit-id { max-width: 130px; } .audit-detail { max-width: 220px; }
.m-list-audit { display: none; }
@media (max-width: 640px) { .audit-table { display: none; } .m-list-audit { display: block; } }
.review-page .page-heading .row h1 { margin-right: 4px; }

/* document viewer: full screen, dark stage, watermark over anything not watermarked by the server */
dialog.viewer { position: fixed; inset: 0; margin: 0; padding: 0; border: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: #0d0e14; color: #f3f3f6; }
dialog.viewer[open] { display: flex; flex-direction: column; }
dialog.viewer::backdrop { background: #000000cc; }
.viewer-head { flex: none; display: flex; align-items: center; gap: 8px; padding: .75rem 1rem .75rem 1.5rem; border-bottom: 1px solid #262838; }
.viewer-head h2 { margin: 0; font: 600 var(--text-card)/1.3 var(--sans); }
.viewer-head .ts { color: #9aa0b4; }
.viewer-head .icon-button { background: #1b1d29; border-color: #33364a; color: #f3f3f6; }
.viewer-head .icon-button:disabled { opacity: .35; }
.viewer-count { color: #9aa0b4; font: 500 var(--text-caption) var(--num); margin-right: 4px; }
.viewer-stage { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; padding: 1.25rem; overflow: auto; }
.viewer-stage .loading { color: #9aa0b4; }
.viewer-frame { position: relative; max-width: 100%; max-height: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 8px; }
.viewer-frame.is-pdf { width: min(1000px, 100%); height: 100%; }
.viewer-img { display: block; max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; background: #fff; user-select: none; -webkit-user-drag: none; }
.viewer-pdf { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-mark { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 140px; overflow: hidden; }
.viewer-mark span { place-self: center; transform: rotate(-24deg); white-space: nowrap; font: 600 13px/1 var(--sans); color: #6b6f8233; text-shadow: 0 0 1px #ffffff33; }

/* ---------- payment methods as cards (pages/methods.js) ---------- */
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.method-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; background: var(--panel); border: 1px solid var(--line-subtle);
  border-radius: var(--radius); box-shadow: var(--card-shadow); min-width: 0; }
.method-card.is-off { background: color-mix(in srgb, var(--soft) 55%, var(--panel)); }
.method-card.is-off .method-head h3, .method-card.is-off .method-fee dd { color: var(--muted); }
.methods-page .page-heading .actions { flex-wrap: nowrap; }
.methods-page .page-heading .seg { flex: none; }
.methods-page .page-heading .seg svg { width: 16px; height: 16px; stroke-width: 1.8; }
.methods-page .app-filter { height: 36px; min-width: 0; padding-block: 0; font-size: var(--text-caption); border-radius: 8px; }
@media (max-width: 560px) { .methods-page .app-filter { flex: 1 1 auto; max-width: none; } }
@media (max-width: 420px) { .methods-page .app-filter { height: 34px; } .methods-page .page-heading .seg svg { width: 14px; height: 14px; } }
/* Bank and QRIS logos: the original marks on a white tile in both themes (brands/SOURCES.md) */
.brand-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 76px; height: 44px; padding: 6px 7px;
  border: 1px solid #e4e7ec; border-radius: 9px; background: #fff; overflow: hidden; }
.brand-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo.sm { width: 68px; height: 38px; padding: 5px 6px; border-radius: 8px; }
.method-head .brand-logo { align-self: center; }
.method-ident { display: flex; align-items: center; gap: 12px; }
.method-ident > div { min-width: 0; }
.fee { display: grid; gap: 2px; }
.fee .fee-main { font-weight: 600; color: var(--ink); }
.fee .fee-tier { display: flex; align-items: baseline; gap: 8px; font-weight: 400; color: var(--secondary); white-space: nowrap; }
.method-fee dd .fee-tier { justify-content: flex-end; }
.fee .fee-sub { font-weight: 400; color: var(--muted); font-size: var(--text-micro); line-height: 1.45; white-space: nowrap; }
.method-card.is-off .fee .fee-main { color: var(--muted); }
/* List layout: stacks when the panel itself is narrow (the sidebar takes part of the window) */
.method-list { container-type: inline-size; }
.method-list table { min-width: 0; }
.method-list td { height: 64px; white-space: normal; }
.method-list th.r, .method-list td.r { white-space: nowrap; }
.method-list td.method-name { min-width: 170px; }
.method-list td.method-name b { font-weight: 600; white-space: nowrap; }
.method-list td.method-name .ts { max-width: 220px; }
.method-fee-text { font-size: var(--text-caption); max-width: 250px; }
.method-list .ts.num { font-family: var(--num); white-space: nowrap; }
.payer-options.compact { display: inline-flex; gap: 6px; }
.payer-options.compact label { padding: .3rem .6rem; border-radius: 8px; font-size: var(--text-caption); white-space: nowrap; }
.method-example-short { display: grid; gap: 2px; font-size: var(--text-caption); color: var(--secondary); white-space: nowrap; }
.method-example-short b { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.method-list tr.is-off td.method-name b, .method-list tr.is-off .fee-main { color: var(--muted); }
.method-list .method-toggle { justify-content: flex-end; }
@container (max-width: 940px) {
  .method-list table, .method-list tbody, .method-list td { display: block; min-width: 0; }
  .method-list thead { display: none; }
  .method-list tr { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; padding: 14px var(--pad); border-top: 1px solid var(--line-subtle); }
  .method-list tr:first-child { border-top: 0; }
  .method-list tbody tr:hover td { background: none; }
  .method-list td, .method-list td:first-child, .method-list td:last-child { height: auto; padding: 0; border: 0; min-width: 0; }
  .method-list td { grid-column: 1 / -1; }
  .method-list td.method-name { grid-column: 1; }
  .method-list td.r { grid-column: 2; grid-row: 1; }
  .method-fee-text, .method-list td.method-name .ts { max-width: none; }
  .method-example-short { display: flex; flex-wrap: wrap; gap: 4px 16px; }
}
@container (max-width: 480px) { .method-list .payer-options.compact { display: grid; grid-template-columns: 1fr 1fr; } }

.method-head { display: flex; align-items: flex-start; gap: .75rem; }
.method-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.method-title { margin-top: -.25rem; }
.method-title h3 { margin: 0 0 2px; font-size: var(--text-card); font-weight: 600; letter-spacing: -.2px; line-height: 1.3; }
.method-card.is-off .method-title h3 { color: var(--muted); }
.method-head h3 { margin: 0 0 2px; font-size: var(--text-card); font-weight: 600; letter-spacing: -.2px; line-height: 1.3; }
.method-toggle { display: inline-flex; align-items: center; gap: 8px; flex: none; cursor: pointer; }
.method-state { font: 600 var(--text-micro)/1 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.method-state.on { color: var(--green); }
.method-fee { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line-subtle); }
.method-fee dt { color: var(--muted); font-size: var(--text-caption); }
.method-fee dd { margin: 0; font-weight: 600; font-size: var(--text-caption); text-align: right; }
.method-fee dd.num { font-weight: 500; color: var(--secondary); }
.method-payer { border: 0; padding: 0; margin: 0; min-width: 0; }
.method-payer legend { padding: 0; margin-bottom: 8px; font: 600 var(--text-micro)/1.4 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.payer-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payer-options label { display: flex; align-items: center; gap: 8px; padding: .55rem .75rem; border: 1px solid var(--control-border); border-radius: 10px;
  background: var(--field); cursor: pointer; font-size: var(--text-control); }
.payer-options input { margin: 0; accent-color: var(--accent); }
.payer-options label:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); color: var(--accent); font-weight: 500; }
.method-payer:disabled .payer-options label { cursor: not-allowed; opacity: .6; }
.method-example { margin: 0; font-size: var(--text-caption); color: var(--secondary); line-height: 1.5; }
.method-example:empty { display: none; }
.method-example b { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.method-note { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: var(--soft); color: var(--secondary); font-size: var(--text-caption); line-height: 1.5; }
.method-note.warn { background: var(--warning-surface); color: var(--warning-text); }
.method-card .method-note:last-child { margin-top: auto; }

/* ---------- Tagihan (pages/invoices.js, pages/newpayment.js): the list, and the create form in a narrow drawer ---------- */
/* The create form: the drawer machinery, shown as a centred modal (owner: a modal, not a side drawer); a bottom sheet on phones. */
dialog.drawer.centered { inset: 0; margin: auto; width: min(600px, calc(100vw - 32px)); height: auto; max-height: calc(100dvh - 48px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 64px #0000003d; }
dialog.drawer.centered[open] { animation: sheet-in .18s ease-out; }
dialog.drawer.centered .drawer-head { min-height: 58px; }
@keyframes sheet-in { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  dialog.drawer.centered { inset: auto 0 0 0; width: 100vw; max-width: 100vw; max-height: 94dvh; border-radius: 16px 16px 0 0; border-width: 1px 0 0; }
  dialog.drawer.centered[open] { animation: sheet-up .2s ease-out; }
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.drawer.centered[open] { animation: none; } }
.invoice-sheet { display: flex; flex-direction: column; gap: 1.25rem; min-height: 100%; }
.invoice-form { display: flex; flex-direction: column; gap: 1.5rem; flex: 1 1 auto; }
.form-section { display: flex; flex-direction: column; gap: 1rem; }
.form-section + .form-section { padding-top: 1.5rem; border-top: 1px solid var(--line-subtle); }
.form-section > h3 { margin: 0; font: 600 var(--text-micro)/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.form-section .field > label { font-weight: 500; font-size: var(--text-control); line-height: var(--leading-ui); }
.form-section .field { display: flex; flex-direction: column; gap: .45rem; }
.form-row.tight { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.input-affix.lg > span { left: 16px; font-size: 1.125rem; }
.input-affix.lg > .input { height: 54px; padding-left: 52px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.3px; }
.input-affix.lg > .input::placeholder { color: var(--muted-2); font-weight: 500; }
.inv-note { margin: 0; color: var(--secondary); font-size: var(--text-small); line-height: var(--leading-copy); }
.inv-methods { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.inv-methods li { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; }
.inv-methods.with-amount li { grid-template-columns: minmax(0, 1fr) 108px 100px; gap: 10px; }
.inv-methods .inv-head span { white-space: nowrap; }
.inv-methods .brand-logo.sm { width: 60px; height: 34px; }
.inv-methods li + li { border-top: 1px solid var(--line-subtle); }
.inv-methods .inv-head { padding-block: 8px; background: var(--soft); font-size: var(--text-micro); font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.inv-methods .inv-empty { display: block; color: var(--muted); font-size: var(--text-small); }
.inv-ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.inv-name { display: flex; flex-direction: column; min-width: 0; }
.inv-name b { font-weight: 600; font-size: var(--text-control); }
.inv-name span { color: var(--muted); font-size: var(--text-caption); }
.inv-methods .num { font-size: var(--text-control); white-space: nowrap; }
.inv-methods li.out { opacity: .5; }
.sheet-actions { position: sticky; bottom: -1.5rem; z-index: 1; display: flex; justify-content: flex-end; gap: .5rem; margin: auto -1.5rem -1.5rem; padding: 1rem 1.5rem;
  background: var(--shell); border-top: 1px solid var(--line-subtle); }
.invoice-done { display: flex; flex-direction: column; gap: 1.25rem; }
.invoice-done-head { display: flex; align-items: flex-start; gap: 12px; }
.invoice-done-head h3 { margin: 0; font-size: var(--text-card); font-weight: 600; letter-spacing: -.2px; }
.invoice-done-head p { margin: 2px 0 0; color: var(--muted); font-size: var(--text-caption); }
.done-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--success-bg); color: var(--success-ink); }
.done-icon svg { width: 18px; height: 18px; }
.invoice-table td .ts.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .sheet-actions { bottom: -1rem; margin: auto -1rem -1rem; padding: .875rem 1rem; }
  .inv-methods.with-amount li { grid-template-columns: minmax(0, 1fr) auto; }
  .inv-methods.with-amount li > .num.muted, .inv-methods .inv-head span:last-child { display: none; }
  .inv-methods .brand-logo.sm { width: 56px; height: 32px; }
}

/* ---------- Recurring billing (pages/subscriptions.js, subscription.js, plans.js, newplan.js, newsubscription.js) ---------- */
.page-tabs { padding: 0; margin: -.25rem 0 0; }
.page-tabs a { font: 500 var(--text-control) var(--sans); color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; padding: .65rem .125rem; }
.page-tabs a:hover { color: var(--ink); }
.page-tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
[data-theme="dark"] .page-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); } }
.field-label { font-weight: 500; font-size: var(--text-control); line-height: var(--leading-ui); }
.interval-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: .5rem; }
.stack-inputs { display: flex; flex-direction: column; gap: .5rem; }
.count-input { text-align: left; }
.switch-cell { display: inline-flex; align-items: center; gap: 8px; }
.plan-table tr.off td:not(:nth-last-child(-n+2)) { opacity: .55; }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.row-actions .button { white-space: nowrap; }
h1.with-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1.with-status .status { font-size: var(--text-control); font-weight: 500; letter-spacing: 0; }
.button.danger-text { color: var(--danger); }
.dl.dl-1 { grid-template-columns: 1fr; gap: .875rem; }
dialog.modal .share-text { min-height: 180px; }
.plan-cards { display: none; list-style: none; margin: 0; padding: 0; }
.plan-cards li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
.plan-cards li + li { border-top: 1px solid var(--line-subtle); }
.plan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
.plan-card-head b { display: block; font-weight: 600; }
.plan-card-head span { color: var(--secondary); font-size: var(--text-small); }
@media (max-width: 760px) {
  .has-plan-cards .table-wrap { display: none; }
  .has-plan-cards .plan-cards { display: block; }
}

/* Create forms as a card under the page heading (lib/billing.js openCreate); two columns when the card is wide. */
.create-slot:empty { display: none; }
.create-card { container-type: inline-size; animation: card-in .16s ease-out; }
@keyframes card-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .create-card { animation: none; } }
.create-card > .panel-body { padding: 1.25rem var(--pad) 0; }
.create-card .invoice-sheet { min-height: 0; }
.form-cols { display: grid; gap: 1.5rem; }
.form-col { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.form-cols > .form-col + .form-col { padding-top: 1.5rem; border-top: 1px solid var(--line-subtle); }
@container (min-width: 820px) {
  .form-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2.5rem; }
  .form-cols > .form-col + .form-col { padding: 0 0 0 2.5rem; border-top: 0; border-left: 1px solid var(--line-subtle); }
}
.create-card .sheet-actions { position: static; margin: 0 calc(-1 * var(--pad)); padding: 1rem var(--pad); background: none; }
/* The row just created from the card: a short highlight so it is easy to spot. */
tr.just-added td, .m-list li.just-added { animation: just-added 2.4s ease-out; }
@keyframes just-added { 0%, 40% { background: color-mix(in srgb, var(--accent) 10%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.just-added td, .m-list li.just-added { animation: none; background: color-mix(in srgb, var(--accent) 8%, transparent); } }

/* ---------- account activation (pages/overview.js): Beat on the brand tile, one line, five small steps, one button ---------- */
.activation { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; padding: 1rem 1.25rem; }
.beat-tile { width: 88px; height: 88px; border-radius: 18px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(140deg, #0B1033 0%, #121A5C 45%, #2E3CD2 100%); }
.beat-tile img { width: 76px; height: auto; display: block; margin-top: 4px; }
.act-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.act-top { display: flex; align-items: baseline; gap: 10px; }
.act-top h3 { margin: 0; font-size: var(--text-card); font-weight: 600; letter-spacing: -.2px; }
.act-count { font: 600 var(--text-caption) var(--num); color: var(--muted); }
.act-say { margin: 0; color: var(--secondary); font-size: var(--text-small); line-height: 1.5; }
.act-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.act-steps li { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-caption); color: var(--muted); white-space: nowrap; }
.act-steps li:not(:last-child)::after { content: ""; width: 22px; height: 0; border-top: 1.5px dotted var(--line); margin: 0 8px; }
.act-steps li.done:not(:last-child)::after { border-top-style: solid; border-color: var(--success-border); }
.act-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 11px/1 var(--num);
  border: 1.5px solid var(--line); color: var(--muted); background: var(--panel); }
.act-dot svg { width: 12px; height: 12px; stroke-width: 2.6; }
.act-steps li.done { color: var(--secondary); }
.act-steps li.done .act-dot { background: var(--success-ink); border-color: var(--success-ink); color: #fff; }
.act-steps li.now, .act-steps li.wait, .act-steps li.fix { color: var(--ink); font-weight: 600; }
.act-steps li.now .act-dot { border-color: var(--accent); color: var(--accent); }
.act-steps li.wait .act-dot { border-color: var(--warning); color: var(--warning-ink); }
.act-steps li.fix .act-dot { border-color: var(--danger); color: var(--danger); }
[data-theme="dark"] .act-steps li.now .act-dot { border-color: var(--ink); color: var(--ink); }
.act-cta { white-space: nowrap; }
.act-bar { display: none; height: 6px; margin-top: 4px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.act-bar span { display: block; height: 100%; border-radius: inherit; background: var(--success-ink); }
@media (max-width: 760px) {
  .activation { grid-template-columns: auto minmax(0, 1fr); gap: .875rem 1rem; padding: 1rem; }
  .beat-tile { width: 64px; height: 64px; border-radius: 14px; align-self: start; }
  .beat-tile img { width: 56px; margin-top: 3px; }
  .act-steps { display: none; }
  .act-bar { display: block; }
  .act-cta { grid-column: 1 / -1; justify-content: center; }
}

/* ---------- Tampilan (pages/branding.js): form left, the real checkout in a frame right (half the page) ---------- */
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.brand-edit { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.brand-preview { position: sticky; top: 1rem; overflow: hidden; }
@media (max-width: 1080px) { .brand-layout { grid-template-columns: minmax(0, 1fr); } .brand-preview { position: static; } }
.brand-form { gap: 0; padding-top: 0; padding-bottom: 0; }
.brand-section { display: flex; flex-direction: column; gap: .875rem; padding: 1.25rem 0; }
.brand-section + .brand-section { border-top: 1px solid var(--line-subtle); }
.brand-section-head h3 { margin: 0; font-size: var(--text-control); font-weight: 600; }
.brand-section-head p { margin: .2rem 0 0; color: var(--muted); font-size: var(--text-small); }
.brand-actions { align-items: center; }
.dirty-note { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--warning-ink, var(--muted)); font-size: var(--text-caption); }
.dirty-note[hidden] { display: none; }
.dirty-note .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* theme cards: a miniature of each checkout theme (fixed light colours, like the checkout; --tt = the brand colour) */
.theme-grid { --tt: #1f5fe0; display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 10px; border: 1px solid var(--line-subtle); border-radius: 12px;
  background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.theme-card:hover { border-color: var(--control-border); }
.theme-card[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
[data-theme="dark"] .theme-card[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme-card:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; }
.theme-card:disabled { cursor: default; opacity: .7; }
.theme-text { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.theme-text b { font-size: var(--text-small); font-weight: 600; }
.theme-text span { color: var(--muted); font-size: var(--text-caption); line-height: 1.4; }
.tt { display: grid; place-items: center; height: 104px; border-radius: 8px; background: #f4f5f7; overflow: hidden; }
.tt-card { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62%; padding: 8px 7px 7px; border: 1px solid #e3e6eb; border-radius: 6px; background: #fff; }
.tt-head { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; padding-bottom: 5px; border-bottom: 1px solid #e3e6eb; }
.tt-logo { width: 22px; height: 4px; border-radius: 2px; background: #c4c9d1; }
.tt-amt { width: 38px; height: 7px; border-radius: 2px; background: #16181d; }
.tt-qr { width: 24px; height: 24px; border-radius: 3px; background: repeating-conic-gradient(#16181d 0 25%, #fff 0 50%) 0 0 / 6px 6px; opacity: .75; }
.tt-btn { width: 72%; height: 8px; border-radius: 3px; background: var(--tt); }
.tt-modern .tt-card { padding-top: 0; border: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 14px -6px rgb(16 24 40 / .3); }
.tt-modern .tt-head { width: calc(100% + 14px); margin: 0 -7px; padding: 8px 7px 7px; border: 0; background: var(--tt); }
.tt-modern .tt-logo { background: #fff; }
.tt-modern .tt-amt { background: #fff; }
.tt-modern .tt-btn, .tt-soft .tt-btn { border-radius: 99px; }
.tt-soft { background: color-mix(in srgb, var(--tt) 16%, #f4f5f7); }
.tt-soft .tt-card { border: 0; border-radius: 12px; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--tt) 70%, transparent); }
.tt-soft .tt-head { border-bottom-style: dashed; }
.tt-soft .tt-amt { background: var(--tt); }
.tt-minimal { background: #fff; box-shadow: inset 0 0 0 1px #eceef1; }
.tt-minimal .tt-card { align-items: stretch; border: 0; padding: 0; width: 70%; }
.tt-minimal .tt-head { align-items: flex-start; }
.tt-minimal .tt-amt { width: 50px; height: 10px; }
.tt-minimal .tt-qr { align-self: center; border-radius: 1px; }
.tt-minimal .tt-btn { width: 100%; border-radius: 1px; }
.tt-dark { background: #0b0c0e; }
.tt-dark .tt-card { border-color: #2a2b2f; border-top: 2px solid var(--tt); background: #19191b; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--tt) 70%, transparent); }
.tt-dark .tt-head { border-color: #2a2b2f; }
.tt-dark .tt-logo { background: #4a4d55; }
.tt-dark .tt-amt { background: #f1f2f4; }
.tt-dark .tt-qr { background: repeating-conic-gradient(#f1f2f4 0 25%, #19191b 0 50%) 0 0 / 6px 6px; }

/* colour presets */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; padding: 0; border: 2px solid var(--panel); border-radius: 50%; background: var(--sw); cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-subtle); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.swatch:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; }
.swatch:disabled { cursor: default; opacity: .6; }

/* logo */
.logo-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.logo-box { display: grid; place-items: center; width: 132px; height: 64px; padding: 8px; border: 1px dashed var(--control-border); border-radius: 10px; background: #fff; }
.logo-box img { display: none; max-width: 100%; max-height: 44px; object-fit: contain; }
.logo-box.has-logo { border-style: solid; border-color: var(--line-subtle); }
.logo-box.has-logo img { display: block; }
.logo-box.has-logo .logo-empty { display: none; }
.logo-empty { color: #8a919c; font-size: var(--text-caption); }
.logo-actions { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 220px; }

/* preview: the frame of /pay/preview; phone width or the panel's full width */
.brand-preview .panel-head { padding-top: .75rem; padding-bottom: .75rem; min-height: 0; }
.pv-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: .625rem var(--pad); border-bottom: 1px solid var(--line-subtle); }
.pv-toolbar .seg { flex-wrap: wrap; }
.pv-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-tools .seg button svg { width: 14px; height: 14px; }
.pv-stage { display: flex; justify-content: center; padding: 1rem; background: var(--soft);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px); background-size: 16px 16px; }
.pv-frame { display: block; width: 100%; height: min(860px, calc(100vh - 170px)); min-height: 600px; border: 1px solid var(--line-subtle); border-radius: 10px;
  background: #f4f5f7; opacity: 0; transition: opacity .15s; }
.pv-frame.is-ready { opacity: 1; }
.pv-stage.is-phone .pv-frame { width: 390px; max-width: 100%; height: min(800px, calc(100vh - 170px)); border: 10px solid #16181d; border-radius: 36px;
  box-shadow: 0 24px 48px -20px rgb(16 24 40 / .45); }
@media (max-width: 560px) { .pv-stage { padding: .75rem; } .pv-stage.is-phone .pv-frame { border-width: 6px; border-radius: 26px; } }

/* ---------- Developer (pages/apps.js, webhooklog.js, lib/deliveries.js; doc 016) ---------- */
.link-button { display: inline; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--text-caption); font-weight: 500;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); cursor: pointer; }
[data-theme="dark"] .link-button { color: var(--ink); }
.link-button:hover { text-decoration-color: currentColor; }
.link-button:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.link-button.danger { color: var(--danger); }
.dot-sep { color: var(--muted-2, var(--muted)); margin: 0 6px; font-size: var(--text-caption); }
.cell-actions { display: flex; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.cell-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.dev-table td { vertical-align: top; padding-top: .875rem; padding-bottom: .875rem; }
.dev-table td > .mono:first-child { font-size: var(--text-small); }
.dev-table .app-name { font-weight: 600; }
.dev-table tr.archived td { opacity: .6; }
.dev-table tr.disabled td:not(:last-child) { opacity: .65; }
.hook-cell { max-width: 340px; }
.hook-url { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-small); }

/* delivery result pills: HTTP code first, the way developers read it */
.dl-pill { display: inline-flex; align-items: center; gap: 2px; padding: 1px 8px; border-radius: 999px; font-size: var(--text-micro); font-weight: 500; line-height: 1.6; font-variant-numeric: tabular-nums;
  white-space: nowrap; border: 1px solid var(--line-subtle); color: var(--muted); background: var(--soft); }
.dl-pill.ok { color: var(--success-ink); background: var(--success-bg); border-color: var(--success-border); }
.dl-pill.bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.dl-pill.wait { color: var(--warning-ink); background: var(--warning-bg); border-color: var(--warning-border); }
.dl-result, .dl-event { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.dl-sub { font-size: var(--text-micro); color: var(--muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-sub.bad { color: var(--danger); }
.dl-sub a { font-size: inherit; }
.dl-table td { vertical-align: top; }
.dl-table td.nowrap, .nowrap { white-space: nowrap; }
.button.sm { min-height: 30px; padding: 4px 10px; font-size: var(--text-caption); }

/* Webhook page: one card per app */
.hook-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.hook-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: .875rem 1rem; border: 1px solid var(--line-subtle); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); text-decoration: none; box-shadow: var(--card-shadow); }
.hook-card:hover { border-color: var(--control-border); }
.hook-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hook-card .hook-url { color: var(--muted); font-size: var(--text-caption); }

/* integration checklist */
.progress { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-bottom: 1rem; }
.progress > span { display: block; height: 100%; width: var(--w, 0%); background: var(--green, #197251); border-radius: inherit; transition: width .3s; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: .875rem 0; border-top: 1px solid var(--line-subtle); }
.checklist li:first-child { border-top: 0; padding-top: 0; }
.check-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--control-border); color: var(--muted);
  font-size: var(--text-caption); font-weight: 600; }
.check-mark svg { width: 15px; height: 15px; }
.checklist li.is-done .check-mark { border-color: var(--green, #197251); background: var(--green, #197251); color: #fff; }
.check-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.check-body b { font-weight: 600; }
.checklist li.is-done .check-body b { color: var(--muted); }
.check-body p { margin: 0; color: var(--muted); font-size: var(--text-small); line-height: 1.5; }
.check-body pre.code { width: 100%; }
.callout-inline { display: flex; align-items: center; gap: 6px; margin: 1rem 0 0; color: var(--success-ink); font-weight: 500; }
.callout-inline svg { width: 18px; height: 18px; flex: none; }

/* secrets and signature samples */
.secret-item { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: var(--text-caption); font-weight: 600; }
.secret-code { word-break: break-all; white-space: pre-wrap; }
.rotate-box { display: flex; flex-direction: column; gap: 8px; padding: .75rem; border: 1px solid var(--warning-border); border-radius: 10px; background: var(--warning-bg); }
.bad-text { color: var(--danger); }
.sig-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sig-code { max-height: 420px; overflow: auto; white-space: pre; }
pre.code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
@media (max-width: 720px) { .hook-cell { max-width: 220px; } }

/* Tampilan: the real payment page to open, at the top of the preview (pages/branding.js) */
.pv-live { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: .75rem var(--pad); border-bottom: 1px solid var(--line-subtle); }
.pv-live-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.pv-live-text b { font-size: var(--text-small); font-weight: 600; }
.pv-live-note { color: var(--muted); font-size: var(--text-caption); }

/* Key rotation dialog (pages/developer-shared.js): icons sized; after revoking, the warning box turns into a success line. */
.rotate-box svg { width: 16px; height: 16px; flex: none; }
.rotate-box.done { background: var(--success-bg); border-color: var(--success-border); }
.rotate-done { display: flex; align-items: center; gap: 8px; color: var(--success-ink); font-weight: 500; }
.sig-rules { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: var(--text-small); line-height: 1.6; }
.check-progress { margin: 0 0 .5rem; color: var(--muted); font-size: var(--text-small); }

/* Payment detail (pages/payment.js): details as label–value rows, money first; compact in the drawer */
.kv-body { display: flex; flex-direction: column; gap: .75rem; padding-top: .5rem; padding-bottom: .5rem; }
.kv { margin: 0; display: flex; flex-direction: column; }
.kv + .kv { border-top: 1px solid var(--line-subtle); padding-top: .5rem; }
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .375rem 0; min-width: 0; }
.kv-row dt { color: var(--muted); font-size: var(--text-small); flex: none; }
.kv-row dd { margin: 0; font-size: var(--text-small); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.kv-row.kv-total { border-top: 1px dashed var(--line-subtle); margin-top: .25rem; padding-top: .5rem; }
.kv-row.kv-total dt { color: var(--ink); font-weight: 500; }
.kv-row.kv-total dd { font-size: var(--text-control); font-weight: 600; }
.kv-id { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.kv-id .mono { font-size: var(--text-caption); overflow-wrap: anywhere; text-align: right; }
.kv-wrap { font-size: var(--text-caption); }
.button.icon-copy { padding: 2px 4px; min-height: 0; border-color: transparent; background: none; color: var(--muted); }
.button.icon-copy svg { width: 14px; height: 14px; }
.button.icon-copy span:empty { display: none; }
.pay-head .amount-h1 h1 { font-size: 1.75rem; }
.pay-head p:not(.eyebrow) { margin-top: .25rem; font-size: var(--text-small); }
.pay-head .actions { flex-wrap: wrap; gap: 6px; }
.pay-compact { display: flex; flex-direction: column; gap: .875rem; }
.pay-compact .panel-head { min-height: 0; padding-top: .75rem; padding-bottom: .75rem; }
.timeline.tight li { padding-top: .5rem; padding-bottom: .5rem; }
.drawer-body .pay-head .actions { margin-left: 0; }
.pay-compact .qr-panel .panel-body { display: grid; justify-items: start; grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 1rem; row-gap: 4px; align-items: start; text-align: left; padding: .875rem; }
.pay-compact .qr-panel .qr-box { grid-row: 1 / span 3; width: 132px; height: 132px; margin: 0; padding: 6px; }
.pay-compact .qr-panel .qr-box svg { width: 100%; height: 100%; }
/* The 480px drawer: the panels' padding follows the narrower width */
dialog.drawer:not(.centered) .panel-body, dialog.drawer:not(.centered) .panel-head { padding-left: 1rem; padding-right: 1rem; }
dialog.drawer:not(.centered) .pay-head .amount-h1 { gap: 8px; }
dialog.drawer:not(.centered) .pay-compact .qr-panel .panel-body { grid-template-columns: 112px minmax(0, 1fr); }
dialog.drawer:not(.centered) .pay-compact .qr-panel .qr-box { width: 112px; height: 112px; }
/* Payment page: Rincian narrower, the side (QR, Bagikan ke customer) wider than the usual 300px column */
@media (min-width: 1100px) {
  .cols-main.pay-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); }
  .cols-main.pay-cols > .main, .cols-main.pay-cols > .side { min-width: 0; }
}
.cols-main.pay-cols .kv-body { max-width: 640px; }
/* Mode as a pill (pages/payments.js envPill, Developer table): test in the warning tone, live in the success tone */
.env-pill { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; font-size: var(--text-micro); font-weight: 600; line-height: 1.7; border: 1px solid transparent; }
.env-pill.test { background: var(--warning-bg); color: var(--warning-ink); border-color: var(--warning-border); }
.env-pill.live { background: var(--success-bg); color: var(--success-ink); border-color: var(--success-border); }
.pay-table td.pay-ref { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-item .sub .env-pill { padding: 0 7px; margin-right: 2px; }
/* Pembayaran never scrolls sideways (owner, 2026-11-29): the status note goes under the status, Biaya then Metode
   step aside on narrower screens (both are in the drawer), and below 1000px the list replaces the table. */
.pay-table .ti { display: block; margin: 2px 0 0; }
.pay-table td.pay-ref { max-width: 220px; }
@media (max-width: 1240px) { .pay-table .col-fee { display: none; } }
@media (max-width: 1100px) { .pay-table .col-method { display: none; } }
@media (max-width: 1000px) { .has-m-list.pay-list .table-wrap { display: none; } .has-m-list.pay-list .m-list { display: block; } }
.pay-table td.pay-amt { font-weight: 600; }
.invoice-table td.inv-customer { max-width: 180px; }
.invoice-table td.inv-customer .tp, .invoice-table td.inv-customer .ts { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Compatibility mode (pages/compat.js, doc 017) ---------- */
.compat-lead { color: var(--secondary); line-height: var(--leading-copy); }
.compat-hint { overflow-wrap: anywhere; }
.compat-actions { justify-content: space-between; }
.compat-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: 6px; color: var(--secondary); line-height: var(--leading-copy); }
.compat-steps code, .compat-support code { font-family: var(--num); font-size: .92em; background: var(--soft); padding: 1px 5px; border-radius: 5px; color: var(--ink); }
.compat-support { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 2rem; font-size: var(--text-small); }
.compat-support ul { margin: 6px 0 0; padding-left: 1.1rem; display: grid; gap: 4px; color: var(--secondary); }
.compat-soon .panel-body { padding-block: 1rem; }
.src-chip { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-subtle); color: var(--muted); font: 500 var(--text-micro)/1.6 var(--sans); vertical-align: 1px; }
.compat-methods { display: grid; gap: .875rem; font-size: var(--text-small); }
.compat-methods > div { display: grid; gap: 6px; }
.code-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.code-chips code { font-family: var(--num); font-size: .92em; background: var(--soft); padding: 2px 7px; border-radius: 6px; color: var(--ink); white-space: nowrap; }
.copy-inline { display: inline-flex; align-items: center; gap: 8px; }
/* Signup in two columns (pages/auth.js): a wider card, fields in pairs, the password across both */
.auth-card.auth-wide { width: min(720px, 100%); }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; align-items: start; }
.auth-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 760px) { .auth-grid { grid-template-columns: minmax(0, 1fr); } }
/* Merchant sign-in and sign-up (pages/auth.js, owner 2026-11-30): light, like DOKU's sign-up. Logo sections on the page,
   the form card on the right, a soft glow of money colours behind both. Phones and tablets: the form only. */
/* Background like bill.com's sign-up (owner, 2026-11-30): a warm off-white page; no glow behind the card (owner removed it). */
.auth.auth-light { min-height: 100dvh; background: #f6f6f3; overflow: clip; }
.auth.auth-light { display: flex; flex-direction: column; }
.auth-wrap { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 48px 40px 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px; align-items: center; }
.auth-info { display: flex; flex-direction: column; gap: 44px; max-width: 560px; }
/* Switching between sign-in and sign-up (owner, 2026-11-30): the card fades in and rises a little, the left side follows. */
@keyframes auth-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes auth-in-side { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.auth-light .auth-form .auth-card { animation: auth-in .34s cubic-bezier(.2, .7, .2, 1) both; }
.auth-light .auth-info, .auth-light .auth-beat { animation: auth-in-side .42s cubic-bezier(.2, .7, .2, 1) .06s both; }
@media (prefers-reduced-motion: reduce) { .auth-light .auth-form .auth-card, .auth-light .auth-info, .auth-light .auth-beat { animation: none; } }
.auth-legal { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 40px 32px; }
.auth-legal p { margin: 0; max-width: 880px; font-size: var(--text-caption); line-height: var(--leading-copy); color: var(--muted); }
.auth-info h2 { margin: 0 0 18px; font: 600 1.5rem/1.25 var(--display); letter-spacing: -.005em; color: var(--ink); }
.info-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.info-logos img { display: block; height: 30px; width: auto; max-width: 112px; object-fit: contain; }
.info-logos img[src$="qris.svg"] { height: 34px; }
.info-seals { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; }
.trust-seal { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.trust-seal img { display: block; height: 56px; width: auto; object-fit: contain; }
.trust-seal.wide img { height: 40px; margin: 8px 0; }
.trust-seal figcaption { font-size: var(--text-caption); line-height: 1.2; color: var(--muted); text-align: center; }
.auth-info .ticks svg { color: var(--green); }
/* Logos keep their colours: on a white plate in dark mode. */
[data-theme="dark"] .trust-seal figcaption { color: #5b6184; }
.auth-form { display: flex; justify-content: center; }
.auth-form .auth-card { width: 460px; max-width: 100%; box-shadow: 0 18px 48px #181b221a; border-color: transparent; }
.auth-form .auth-card.auth-wide { width: 680px; }
/* Sign-in: a big Beat on the left, mirrored to face the form; white, so a thin navy outline and a soft shadow (no tile). */
.auth-beat { display: grid; place-items: center; min-width: 0; }
.auth-beat img { display: block; width: min(440px, 100%); height: auto; transform: scaleX(-1);
  filter: drop-shadow(0 0 2px #1a2161) drop-shadow(0 18px 24px rgb(11 16 51 / .16)); }
.auth-beat img[hidden] { display: none; }
@media (max-width: 960px) { .auth-beat { display: none; } }
.auth-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.auth-card-switch { margin: 0; color: var(--muted); }
.auth-card-switch a { font-weight: 600; }
.auth-card-logo .brand { padding: 0; }
.auth-card-logo .logo-piti { height: 34px; color: var(--ink); }
@media (max-width: 1180px) { .auth-wrap { gap: 32px; padding: 40px 24px; } .auth-info { gap: 32px; } .auth-info h2 { font-size: 1.25rem; }
  .auth-form .auth-card.auth-wide { width: 580px; } .info-logos { gap: 12px 20px; } .info-logos img { height: 26px; } }
@media (max-width: 960px) {
  .auth-info { display: none; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); padding: 28px 12px 24px; align-items: start; }
  .auth-legal { padding: 0 16px 28px; }
}
.auth-grid-gap { min-height: 0; }
@media (max-width: 760px) { .auth-grid-gap { display: none; } }
.auth-card .auth-foot + .auth-foot { margin-top: -0.75rem; }


/* Short forms (payout account): fields stop at a readable width instead of spanning the panel. */
.form.form-narrow { max-width: 34rem; }
/* Rekening pencairan: the main card hugs the narrow form, Verifikasi takes the rest. Below this width the columns stack. */
@media (min-width: 1180px) {
  .cols-main.payout-cols { display: grid; grid-template-columns: minmax(0, 36.5rem) minmax(300px, 1fr); }
}

/* App settings: default return URL (button group beside the field). */
.inline-actions { display: flex; gap: .5rem; align-items: center; }

/* Email not confirmed (doc 018): info strip above the test-mode strip, with a resend button. */
.verify-strip { background: color-mix(in srgb, var(--info) 9%, var(--panel)); border-bottom: 1px solid color-mix(in srgb, var(--info) 25%, transparent); color: var(--ink); font-size: var(--text-caption); line-height: var(--leading-ui); padding: .5rem 2rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.verify-strip svg { width: 15px; height: 15px; flex: none; color: var(--info); }
.verify-strip span { min-width: 0; flex: 1 1 260px; }
@media (max-width: 860px) { .verify-strip { padding: .5rem 1.5rem; } }
@media (max-width: 560px) { .verify-strip { padding: .5rem 1rem; } }

/* ===== Business verification as two fixed processes (pages/verification.js, doc 019, owner 2026-11-30) ===== */
.kyc-chooser { margin-top: 8px; }
.kyc-chooser h2 { margin: 0 0 16px; font: 600 var(--text-section)/1.3 var(--display); }
.kyc-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kyc-choice { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kyc-choice:hover, .kyc-choice:focus-visible { border-color: var(--accent); box-shadow: 0 8px 24px #181b2214; transform: translateY(-1px); outline: none; }
.kyc-choice b { font: 600 1.25rem/1.3 var(--display); }
.kyc-choice ul { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 8px; color: var(--secondary); }
.kyc-choice li { display: flex; gap: 8px; align-items: flex-start; }
.kyc-choice li svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--green); }
.kyc-choice-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--accent); }
[data-theme="dark"] .kyc-choice-ico { color: var(--info); }
.kyc-choice-ico svg { width: 22px; height: 22px; }
.kyc-choice-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); }
[data-theme="dark"] .kyc-choice-go { color: var(--info); }
.kyc-choice-go svg { width: 16px; height: 16px; }

.kyc-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; align-items: start; }
.kyc-nav { position: sticky; top: 16px; background: var(--panel); border: 1px solid var(--line-subtle); border-radius: 14px; padding: 16px 12px; }
.kyc-nav-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 12px; border-bottom: 1px solid var(--line-subtle); margin-bottom: 8px; }
.kyc-process { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.kyc-process svg { width: 18px; height: 18px; color: var(--muted); }
.kyc-count { font: 600 var(--text-caption)/1 var(--num); color: var(--muted); font-variant-numeric: tabular-nums; }
.kyc-stepper { list-style: none; margin: 0; padding: 0; position: relative; }
.kyc-stepper li { position: relative; }
.kyc-stepper li + li::before { content: ""; position: absolute; left: 25px; top: -8px; height: 16px; border-left: 2px solid var(--line); }
.kyc-step { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 10px; background: none;
  color: var(--secondary); font: inherit; text-align: left; cursor: pointer; position: relative; z-index: 1; }
.kyc-step:hover { background: var(--hover); }
.kyc-step.now { background: var(--soft); color: var(--ink); font-weight: 600; }
/* each step's picture (stepArt): pale until reached, ringed when open, a tick or a mark in the corner */
.kyc-tile { position: relative; width: 36px; height: 36px; flex: none; border-radius: 10px; }
.kyc-tile .step-art { display: block; width: 36px; height: 36px; border-radius: 10px; transition: filter .15s, opacity .15s; }
.kyc-step.todo .step-art { filter: saturate(.45); opacity: .75; }
.kyc-step.todo:hover .step-art, .kyc-step.now .step-art { filter: none; opacity: 1; }
.kyc-step.now .kyc-tile { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
[data-theme="dark"] .kyc-step.now .kyc-tile { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--info); }
.kyc-badge { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--panel); color: #fff; }
.kyc-badge svg { width: 10px; height: 10px; stroke-width: 3; }
.kyc-badge.done { background: var(--green); }
.kyc-badge.fix { background: var(--danger); }
.kyc-switch { margin: 12px 8px 0; font-size: var(--text-caption); color: var(--muted); }

.kyc-main { min-width: 0; display: grid; gap: 16px; }
.kyc-panel .panel-head .badge svg { width: 13px; height: 13px; }
.kyc-form { display: grid; gap: 1rem; }
.kyc-sub { margin: 8px 0 -4px; font: 600 var(--text-body)/1.3 var(--sans); }
.kyc-bo[hidden] { display: none; }
.kyc-bo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.kyc-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line-subtle); margin-top: 4px; }
.kyc-actions .button svg { width: 16px; height: 16px; }
.kyc-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 12px 14px; border-radius: 10px; background: var(--soft); }
.kyc-brand .muted { flex-basis: 100%; font-size: var(--text-caption); }
.kyc-current { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-subtle); border-radius: 10px; }
.kyc-current > svg { width: 22px; height: 22px; color: var(--muted); }
.kyc-current div { display: grid; flex: 1; }

/* Documents: the guide pictures, then the drop zone */
.kyc-docs { display: grid; gap: 28px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.kyc-docs:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.kyc-doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kyc-doc h4 { margin: 0; font: 600 var(--text-card)/1.3 var(--sans); }
.kyc-doc-how { margin: 4px 0 12px; color: var(--muted); line-height: var(--leading-copy); }
.kyc-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.g-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel); }
.g-item.ok { border-color: var(--success-border); background: var(--success-bg); }
.g-art { height: 92px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; overflow: hidden; position: relative; }
.g-cap { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--text-caption); font-weight: 600; color: var(--ink); }
.g-cap svg { width: 15px; height: 15px; flex: none; }
.g-item.ok .g-cap svg { color: var(--green); }
.g-item.bad .g-cap svg { color: var(--danger); }
/* a card (KTP / NPWP) */
.g-card { width: 64%; aspect-ratio: 1.58; border: 2px solid var(--muted-2); border-radius: 7px; background: var(--panel); display: grid;
  grid-template-columns: 30% 1fr; grid-template-rows: 1fr auto; gap: 6px; padding: 7px; position: relative; }
.g-photo { border-radius: 3px; background: var(--line); }
.g-lines { display: grid; align-content: start; gap: 5px; padding-top: 2px; }
.g-lines i { display: block; height: 5px; border-radius: 3px; background: var(--line); }
.g-lines i:first-child { background: var(--muted-2); }
.g-lines i:nth-child(2) { width: 70%; }
.g-foot { grid-column: 1 / -1; height: 5px; width: 60%; border-radius: 3px; background: var(--line); }
/* a page (NIB, akta, SK) */
.g-page { width: 46%; aspect-ratio: .72; border: 2px solid var(--muted-2); border-radius: 5px; background: var(--panel); display: grid; align-content: start;
  gap: 5px; padding: 9px 8px; position: relative; z-index: 1; }
.g-page i { display: block; height: 4px; border-radius: 2px; background: var(--line); }
.g-page i:first-child { background: var(--muted-2); width: 70%; }
.g-page i.short { width: 55%; }
.g-page.back { position: absolute; z-index: 0; transform: translate(14px, -8px); opacity: .45; border-style: dashed; }
/* a selfie with the card */
.g-selfie { width: 70%; height: 82%; display: flex; align-items: flex-end; justify-content: center; gap: 6px; position: relative; }
.g-face { width: 46px; height: 54px; border-radius: 50% 50% 46% 46%; background: var(--muted-2); position: relative; margin-bottom: 4px; }
.g-eye { position: absolute; top: 20px; width: 5px; height: 5px; border-radius: 50%; background: var(--panel); }
.g-eye:first-child { left: 13px; }
.g-eye + .g-eye { right: 13px; }
.g-mouth { position: absolute; bottom: 13px; left: 16px; width: 14px; height: 4px; border-radius: 0 0 6px 6px; background: var(--panel); }
.g-mini { width: 44px; margin-bottom: 12px; }
.g-mini svg { display: block; width: 100%; height: auto; }
/* a KTP (fixed colours: the card looks the same in light and dark) */
.g-ktpwrap { width: min(72%, 128px); display: grid; place-items: center; }
.g-ktp { display: block; width: 100%; height: auto; filter: drop-shadow(0 2px 3px rgba(20, 50, 90, .18)); }
/* the mistakes */
.fx-cut > :first-child { transform: translateX(42%); }
.fx-blur > :first-child { filter: blur(2.5px); }
.fx-glare::after { content: ""; position: absolute; width: 46%; height: 34%; top: 26%; left: 34%; border-radius: 50%; background: #fff; opacity: .92; filter: blur(4px); }
.fx-blur-card .g-mini { filter: blur(2px); }
.fx-cover .g-face::after { content: ""; position: absolute; left: -6px; right: -6px; top: 14px; height: 16px; border-radius: 6px; background: var(--muted); }
.fx-dark { background: #2b2d36; }
.fx-dark .g-face { background: #4a4d5a; }
.fx-dark .g-mini { filter: brightness(.45); }
.fx-missing > .g-page:not(.back) { opacity: 1; }
/* drop zone */
.kyc-drop { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--control-border); border-radius: 12px;
  background: var(--soft); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.kyc-drop:hover, .kyc-drop.over { border-color: var(--accent); background: var(--info-bg); }
.kyc-drop svg { width: 22px; height: 22px; color: var(--muted); }
.kyc-drop .muted { font-size: var(--text-caption); }
.kyc-drop.busy { opacity: .55; pointer-events: none; }
.kyc-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--success-border); border-radius: 10px; background: var(--success-bg); }
.kyc-file > svg { width: 18px; height: 18px; color: var(--success-ink); }
.kyc-file .muted { margin-left: auto; font-size: var(--text-caption); }

/* review & submit */
.kyc-review { display: grid; gap: 12px; }
.kyc-review-sec { border: 1px solid var(--line-subtle); border-radius: 12px; padding: 14px 16px; }
.kyc-review-sec.incomplete { border-color: var(--warning-line); }
.kyc-review-sec.fix { border-color: var(--error-line); }
.kyc-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.kyc-review-head .link-button { margin-left: auto; }
.kyc-review-head .badge svg { width: 13px; height: 13px; }
.kyc-send { display: grid; gap: 12px; border-top: 1px solid var(--line-subtle); }
.kyc-send .callout .button { margin-left: 6px; }
.kyc-submit { justify-self: end; }

@media (max-width: 900px) {
  .kyc-layout { grid-template-columns: minmax(0, 1fr); }
  .kyc-nav { position: static; }
  .kyc-stepper { display: flex; overflow-x: auto; gap: 4px; }
  .kyc-stepper li + li::before { display: none; }
  .kyc-step { white-space: nowrap; }
  .kyc-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .kyc-choices, .kyc-bo { grid-template-columns: minmax(0, 1fr); }
  .kyc-step:not(.now) .kyc-step-title { display: none; }
}
/* the legal documents: one shared guide, then compact rows */
.kyc-paper { display: grid; gap: 0; }
.kyc-paper-list { display: grid; gap: 12px; }
.kyc-doc.compact { border: 1px solid var(--line-subtle); border-radius: 12px; padding: 14px 16px; }
.kyc-doc.compact.has { border-color: var(--success-border); }
.kyc-doc.compact h4 { font-size: var(--text-body); }
.kyc-doc.compact .kyc-doc-how { margin-bottom: 10px; font-size: var(--text-caption); }
.kyc-doc.compact .kyc-drop { grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; padding: 12px 14px; }
.kyc-doc.compact .kyc-drop .muted { display: none; }

/* Staff review: steps, beneficial owner, send steps back (doc 019) */
.step-list li.step-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-top: 1px solid var(--line); }
.step-list li.step-row:first-child { border-top: 0; }
.step-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.step-row > svg.ico { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.step-row.done > svg { color: var(--success-ink); }
.step-row.todo > svg { color: var(--danger); }
.bo { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
ul.review-items { margin: 6px 0 0; padding-left: 18px; }
.fix-steps { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.fix-step { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.fix-check { display: flex; gap: 10px; align-items: center; cursor: pointer; }

/* Verification: fields our payment partner registers (doc 019) */
.kyc-same { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: var(--text-small, 13px); }
.field-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-wrap > .field-note:empty { display: none; }
.field-wrap > .field-note:not(:empty) { color: var(--warning-ink); }
.kyc-qris { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.kyc-qris-card { width: 150px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--white); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.kyc-qris-logo { font-weight: 800; letter-spacing: .08em; font-size: 12px; color: var(--ink); }
.kyc-qris-code { display: grid; grid-template-columns: repeat(4, 14px); gap: 3px; }
.kyc-qris-code i { width: 14px; height: 14px; border-radius: 2px; background: var(--soft); }
.kyc-qris-code i.on { background: var(--ink); }
.kyc-qris-name { font-size: 11px; letter-spacing: .02em; text-align: center; word-break: break-word; max-width: 126px; }
@media (max-width: 640px) { .kyc-qris { grid-template-columns: 1fr; } .kyc-qris-card { justify-self: start; } }
.dl.compact { grid-template-columns: 1fr; gap: 8px; }
.kyc-gender { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kyc-gender .method-opt { align-items: center; padding: 9px 12px; }
/* four choices in one row (monthly volume); two by two on a phone */
.kyc-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kyc-options .method-opt { align-items: center; padding: 9px 12px; }
.kyc-options .method-opt b { font-weight: 500; white-space: nowrap; }
.kyc-options .method-opt.two-line b { font-weight: 600; }
.kyc-options .method-opt.two-line span { font-size: var(--text-caption); color: var(--muted); }
@media (max-width: 700px) { .kyc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kyc-mcc-about { font-size: 12.5px; line-height: 1.5; color: var(--secondary); background: var(--soft); border-radius: 8px; padding: 10px 12px; }
.kyc-mcc-about[hidden] { display: none; }
.kyc-mcc-similar { display: block; margin-top: 6px; }

/* Business type search (verification) */
.kyc-combo { position: relative; }
.kyc-combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: 76px; max-height: 340px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px #0f172a24; padding: 4px; }
.kyc-combo-list[hidden] { display: none; }
.kyc-combo-opt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: var(--text-control); }
.kyc-combo-opt .muted { flex-basis: 100%; font-size: 12px; }
.kyc-combo-opt .mono { font-size: 12px; color: var(--muted); }
.kyc-combo-opt:hover, .kyc-combo-opt.active { background: var(--soft); }
.kyc-combo-opt.chosen b { color: var(--focus); }
.kyc-combo-opt.blocked { opacity: .55; }
.kyc-combo-tag { font-size: 11px; color: var(--warning-ink); background: var(--warning-bg); border-radius: 999px; padding: 1px 8px; }
.kyc-combo-empty { padding: 12px; font-size: 13px; color: var(--muted); }
.kyc-form div.field { display: flex; flex-direction: column; gap: .45rem; }

/* verification: payment methods (doc 019, migration 0033) — a card per method with its banks and price */
.kyc-methods { display: grid; gap: 12px; }
.kyc-method { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--control-border); border-radius: 12px;
  background: var(--field); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.kyc-method:hover { border-color: var(--accent); }
.kyc-method:has(input:checked) { border-color: var(--focus); box-shadow: var(--focus-ring); }
.kyc-method:has(input:disabled) { cursor: default; }
.kyc-method > input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--focus); }
.kyc-method-body { display: grid; gap: 6px; min-width: 0; flex: 1; }
.kyc-method-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.kyc-method-top b { font: 600 var(--text-card)/1.3 var(--sans); }
.kyc-method-fee { font-size: var(--text-caption); font-weight: 600; color: var(--success-ink); }
.kyc-method .muted { line-height: var(--leading-copy); }
.kyc-method-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* activation card in orange (owner, 2026-11-30): the account is not active yet, on every page until live */
.activation { --act: #c2570c; --act-soft: #fff4e8; --act-line: #f3c99b; --act-ink: #ffffff;
  background: linear-gradient(100deg, var(--act-soft) 0%, var(--panel) 70%); border-color: var(--act-line); }
[data-theme="dark"] .activation { --act: #f08a2c; --act-soft: #2b2015; --act-line: #5e3d1f; --act-ink: #1d1206; }
.activation .beat-tile { background: linear-gradient(140deg, #5a2205 0%, #a9480a 50%, #f08a2c 100%); }
.activation .act-top h3 { color: var(--ink); }
.activation .act-count { color: var(--act); }
/* the button stays the usual blue primary (owner, 2026-11-30) */
.activation .act-bar span { background: var(--act); }
.activation .act-steps li.now .act-dot { border-color: var(--act); color: var(--act); }
[data-theme="dark"] .activation .act-steps li.now .act-dot { border-color: var(--act); color: var(--act); }

/* company contacts, in the person-in-charge step (migration 0035) */
.kyc-section { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line-subtle); font: 600 var(--text-card)/1.3 var(--sans); }
.kyc-contact-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 6px; }
.kyc-contact-head .kyc-sub { margin: 0; }
.kyc-copy { font-size: var(--text-caption); }

/* verification auto-save note, between Kembali and Simpan */
.kyc-saved { margin-left: auto; margin-right: 12px; font-size: var(--text-caption); color: var(--muted); align-self: center; }

.kyc-file .doc-lock { width: 13px; height: 13px; color: var(--muted); vertical-align: -2px; }

/* our own suggestion list under a text field (pekerjaan, jabatan, kota): white panel, black text */
.kyc-suggest { position: relative; }
.kyc-suggest-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px #0f172a24; padding: 4px; }
.kyc-suggest-list[hidden] { display: none; }
.kyc-suggest-opt { padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: var(--text-control); font-weight: 400; color: var(--ink); }
.kyc-suggest-opt:hover, .kyc-suggest-opt.active { background: var(--soft); }

/* under the step list: switch process, start over */
.kyc-nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 12px 8px 0; }
.kyc-nav-links .kyc-switch { margin: 0; }
.kyc-reset { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-caption); color: var(--danger); }
.kyc-reset svg { width: 13px; height: 13px; }

/* a confirm that deletes something (confirmDialog danger): solid red, not the blue primary */
.button.primary.destructive, .button.primary.destructive:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.button.primary.destructive:hover { filter: brightness(1.08); }

/* verification status page: Beat in the middle (owner, 2026-11-30) */
.kyc-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; max-width: 680px; margin: 8px auto 0;
  padding: 36px 28px 32px; background: var(--panel); border: 1px solid var(--line-subtle); border-radius: 20px; }
.kyc-hero h2 { margin: 6px 0 0; font: 600 1.6rem/1.25 var(--display); letter-spacing: -.3px; color: var(--ink); }
.kyc-hero > p { margin: 0; max-width: 520px; color: var(--secondary); line-height: var(--leading-copy); }
.kyc-hero .kyc-hero-meanwhile { font-size: var(--text-caption); color: var(--muted); }
.kyc-hero-beat { width: 168px; height: 168px; border-radius: 44px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 15%, #3f4ee0 0%, #1f2a9c 45%, #0b1033 100%);
  box-shadow: 0 18px 40px #1f2a9c33, inset 0 1px 0 #ffffff22; animation: beat-float 4.5s ease-in-out infinite; }
.kyc-hero-beat img { width: 150px; height: auto; display: block; margin-top: 8px; }
.kyc-hero.live .kyc-hero-beat { background: radial-gradient(120% 90% at 30% 15%, #34c38f 0%, #13805a 50%, #07402c 100%); box-shadow: 0 18px 40px #13805a33, inset 0 1px 0 #ffffff22; }
@keyframes beat-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .kyc-hero-beat { animation: none; } }
/* Dikirim → Diperiksa → Live */
.kyc-timeline { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 520px; }
.kyc-timeline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--text-caption); color: var(--muted); }
.kyc-timeline li + li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; border-top: 2px dashed var(--line); z-index: 0; }
.kyc-timeline li.done + li::before { border-top-style: solid; border-color: var(--success-border); }
.kyc-timeline b { color: var(--ink); font-size: var(--text-control); font-weight: 600; }
.kyc-tl-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--line); }
.kyc-tl-dot svg { width: 14px; height: 14px; stroke-width: 2.8; }
.kyc-timeline li.done .kyc-tl-dot { background: var(--success-ink); border-color: var(--success-ink); color: #fff; }
.kyc-timeline li.now .kyc-tl-dot { border-color: #e8770e; background: #fff4e8; }
.kyc-timeline li.now .kyc-tl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #e8770e; animation: tl-pulse 1.6s ease-in-out infinite; }
@keyframes tl-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .kyc-timeline li.now .kyc-tl-dot::after { animation: none; } }
.kyc-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.kyc-sent { max-width: 980px; margin: 18px auto 0; }
.kyc-doc-sent { display: inline-flex; align-items: center; gap: 6px; color: var(--success-ink); font-weight: 500; }
.kyc-doc-sent svg { width: 13px; height: 13px; }
@media (max-width: 560px) { .kyc-hero { padding: 28px 18px; border-radius: 16px; } .kyc-hero-beat { width: 132px; height: 132px; border-radius: 34px; } .kyc-hero-beat img { width: 118px; } .kyc-hero h2 { font-size: 1.3rem; } }
