/* Volopay Import Pay (Malaysia) prototype.
   Calm ledger tones; teal for action, brass for currency; documents (quote slip, e-invoice) are the one visual flourish. */
:root {
  color-scheme: light;
  --ink: #16202c; --ink-2: #3d4a59; --mute: #66727f; --line: #dfe3e8; --line-2: #edf0f3;
  --bg: #f2f4f5; --surface: #fff; --sunk: #f7f8f9;
  --brand: #0e5a57; --brand-ink: #0a4542; --brand-tint: #e5f0ee; --brand-line: #b8d5d1;
  --brass: #a8741a; --brass-tint: #f6eedf;
  --ok: #1d7346; --ok-tint: #e7f3ec; --warn: #8f560a; --warn-tint: #fbf1e0; --bad: #b0281d; --bad-tint: #fbebe9; --info: #2a5a9e; --info-tint: #e9f0f9; --neutral: #5d6877; --neutral-tint: #eef1f4;
  --r-ctl: 6px; --r-panel: 10px; --r-doc: 3px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --side: 236px; --top: 58px;
  --shadow: 0 12px 32px rgba(22, 32, 44, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 .5em; }
code { font-family: var(--mono); font-size: 12px; background: var(--sunk); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-ctl); }
.skip:focus { top: 8px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i.xl { width: 44px; height: 44px; stroke-width: 1.4; }
.i.ok { color: var(--ok); }
.muted { color: var(--mute); }
.sm { font-size: 13px; }
.xs { font-size: 12px; }
.up { color: var(--ok); }
.down { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }
.mono-id { font-size: 12.5px; letter-spacing: .02em; word-break: break-all; color: var(--ink-2); }
.pad { padding: 16px; }
.center { text-align: center; }
.center .i.xl { margin: 0 auto 10px; display: block; }
.h3 { font-size: 14px; margin: 18px 0 10px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stack { display: grid; gap: 8px; margin-top: 14px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: var(--top) 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tb-l, .tb-r { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tb-menu { display: none; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 600; font-size: 15px; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.tb-prod { color: var(--brand); font-weight: 500; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.tb-ent { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proto-tag { font-size: 12px; color: var(--brass); background: var(--brass-tint); border: 1px solid #ead9b8; border-radius: 999px; padding: 2px 10px; }
.bell-wrap { position: relative; }
.bell { position: relative; }
.bell-c { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10.5px; line-height: 16px; font-weight: 600; }
.notif { position: absolute; right: 0; top: 42px; width: 360px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow); z-index: 40; }
.notif-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.notif ul { list-style: none; margin: 0; padding: 0; }
.notif li a { display: grid; gap: 2px; padding: 11px 14px 11px 22px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); position: relative; }
.notif li a:hover { background: var(--sunk); }
.notif li.unread a::before { content: ""; position: absolute; left: 9px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.tb-user { display: flex; align-items: center; gap: 10px; border: 1px solid transparent; background: none; padding: 4px 8px 4px 4px; border-radius: var(--r-ctl); cursor: pointer; font: inherit; color: inherit; }
.tb-user:hover { border-color: var(--line); background: var(--sunk); }
.tb-user-t { display: grid; text-align: left; line-height: 1.25; }
.tb-user-t span { font-size: 12px; color: var(--mute); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }

.sidebar { grid-row: 2; background: #fbfcfc; border-right: 1px solid var(--line); }
.side-in { position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column; justify-content: space-between; padding: 14px 12px; overflow-y: auto; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-ctl); color: var(--ink-2); text-decoration: none; position: relative; }
.nav a:hover { background: var(--neutral-tint); color: var(--ink); }
.nav a.on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 500; }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-c { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn-tint); color: var(--warn); font-size: 12px; line-height: 20px; text-align: center; font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.side-foot { display: grid; gap: 8px; padding-top: 16px; }
.side-foot p { margin: 0; line-height: 1.4; }
.main { grid-row: 2; padding: 26px 32px 64px; min-width: 0; outline: none; }
.main > * { max-width: 1240px; }

/* ---------- page structure ---------- */
.page-h { margin-bottom: 20px; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--mute); margin-bottom: 8px; }
.crumbs .i { width: 14px; height: 14px; }
.page-h-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-t { min-width: 0; max-width: 760px; }
.page-t h1 { font-size: 24px; line-height: 1.25; }
.page-sub { margin: 6px 0 0; color: var(--mute); }
.page-a { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); align-items: start; }
.grid.risk-top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; }
.col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.col > .panel, .grid > .panel { margin-bottom: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 16px; min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.panel-h h2 { font-size: 15px; }
.panel-a { display: flex; align-items: center; gap: 8px; }
.panel-b { padding: 14px 18px 18px; }
.panel.flush .panel-b { padding: 4px 0 2px; }
.panel.flush .panel-h + .panel-b { padding-top: 10px; }
.panel.flush .panel-b > p { padding: 0 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.kpi-l { font-size: 13px; color: var(--mute); }
.kpi-v { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.kpi-s { font-size: 12.5px; color: var(--mute); }
.kpi .bar { margin-top: 6px; }
.big-num { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 12.5px; font-weight: 500; color: var(--mute); text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl td.r, .tbl td.nw { white-space: nowrap; }
.tbl tr.link { cursor: pointer; }
.tbl tr.link:hover td { background: var(--sunk); }
.tbl.dense td { padding: 7px 12px; }
.tbl.dense th { padding: 7px 12px; }
.panel-b > .tablewrap .tbl th:first-child, .panel-b > .tablewrap .tbl td:first-child { padding-left: 18px; }
.panel-b > .tablewrap .tbl th:last-child, .panel-b > .tablewrap .tbl td:last-child { padding-right: 18px; }
.tbl.fx td { padding: 6px 8px; vertical-align: middle; }
.tbl.fx td:first-child { padding-left: 0; }
.tbl.fx td:last-child { padding-right: 0; }
.tbl.heat td { text-align: right; }
.tbl.heat td:first-child { text-align: left; }
.empty-row { padding: 22px 18px; color: var(--mute); }

/* ---------- badges, buttons, forms ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap; border: 1px solid transparent; }
.b-ok { background: var(--ok-tint); color: var(--ok); }
.b-warn { background: var(--warn-tint); color: var(--warn); }
.b-bad { background: var(--bad-tint); color: var(--bad); }
.b-info { background: var(--info-tint); color: var(--info); }
.b-neutral { background: var(--neutral-tint); color: var(--neutral); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 14px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--sunk); border-color: #cdd3da; color: var(--ink); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn.danger { color: var(--bad); border-color: #ecc4bf; }
.btn.danger:hover { background: var(--bad-tint); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--neutral-tint); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.sm .i { width: 16px; height: 16px; }
.btn.sq { width: 36px; padding: 0; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; white-space: nowrap; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.link-sm { font-size: 13px; }
.ctl { width: 100%; height: 38px; padding: 0 11px; border: 1px solid #cfd5dc; border-radius: var(--r-ctl); background: #fff; color: var(--ink); font: 14px var(--font); font-variant-numeric: tabular-nums; }
textarea.ctl { height: auto; padding: 9px 11px; line-height: 1.45; resize: vertical; }
select.ctl { padding-right: 28px; }
input[type="file"].ctl { padding: 7px 8px; height: auto; }
.ctl:hover { border-color: #b9c1ca; }
.ctl:focus { outline: 2px solid var(--brand-line); outline-offset: 0; border-color: var(--brand); }
.field { display: grid; gap: 5px; align-content: start; min-width: 0; border: 0; padding: 0; margin: 0; }
.field-l { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 0; }
.field-h { font-size: 12.5px; color: var(--mute); line-height: 1.4; }
.field-e { font-size: 12.5px; color: var(--bad); }
.form1 { display: grid; gap: 14px; margin: 12px 0; }
.form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 14px 0; }
.span2 { grid-column: 1 / -1; }
.form-f { margin-top: 16px; display: flex; justify-content: flex-end; }
.check { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0; line-height: 1.45; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); flex: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.searchrow { position: relative; margin-bottom: 12px; }
.searchrow .i { position: absolute; left: 11px; top: 10px; color: var(--mute); }
.searchrow .ctl { padding-left: 36px; }
.searchrow.sm { margin: 0; min-width: 240px; flex: 1; }
.searchrow.lg .ctl { height: 44px; font-size: 15px; }
.searchrow.lg .i { top: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters select.ctl { width: auto; min-width: 150px; }

/* ---------- notes, lists, misc ---------- */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-ctl); border: 1px solid; margin: 0 0 14px; }
.note .i { margin-top: 1px; }
.note-c { min-width: 0; }
.note-c p { margin: 3px 0 0; }
.note-a { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.n-ok { background: var(--ok-tint); border-color: #c7e3d2; color: #164f33; }
.n-ok .i { color: var(--ok); }
.n-warn { background: var(--warn-tint); border-color: #efd7ad; color: #5e3a08; }
.n-warn .i { color: var(--warn); }
.n-bad { background: var(--bad-tint); border-color: #f0c6c1; color: #7d1d15; }
.n-bad .i { color: var(--bad); }
.n-info { background: var(--info-tint); border-color: #cddcf0; color: #1f416f; }
.n-info .i { color: var(--info); }
.n-neutral { background: var(--neutral-tint); border-color: var(--line); color: var(--ink-2); }
.bar { height: 6px; border-radius: 3px; background: var(--neutral-tint); overflow: hidden; min-width: 60px; }
.bar-f { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.bar-f.t-warn { background: var(--brass); }
.dl { margin: 0; display: grid; }
.dl > div { display: grid; grid-template-columns: minmax(130px, 40%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.dl > div:last-child { border-bottom: 0; }
.dl dt { color: var(--mute); font-size: 13px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl.tight > div { padding: 5px 0; grid-template-columns: minmax(110px, 46%) minmax(0, 1fr); font-size: 13px; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plain li { display: flex; justify-content: space-between; gap: 12px; }
.plain.sm li { font-size: 13px; }
ol.plain.num-list { list-style: decimal; padding-left: 20px; gap: 6px; }
ol.plain.num-list li { display: list-item; padding-left: 4px; }
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.files li:last-child { border-bottom: 0; }
.files li span { flex: 1; }
.empty { text-align: center; padding: 28px 16px; color: var(--mute); }
.empty h3 { color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.att { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.att-i { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--neutral); border-radius: var(--r-ctl); }
.att-i p { margin: 2px 0 0; color: var(--mute); font-size: 13px; }
.att-i.t-warn { border-left-color: var(--brass); }
.att-i.t-bad { border-left-color: var(--bad); }
.att-i.t-info { border-left-color: var(--info); }
.credit { display: grid; }
.credit-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.credit-row:last-child { border-bottom: 0; }
.credit-row span { color: var(--mute); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 500; }
.cnt { font-size: 12px; background: var(--neutral-tint); color: var(--neutral); padding: 0 7px; border-radius: 999px; line-height: 19px; }
.spinner { width: 36px; height: 36px; margin: 6px auto 16px; border-radius: 50%; border: 3px solid var(--brand-tint); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- timeline and steps ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl-i { display: grid; grid-template-columns: 22px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.tl-i:last-child { padding-bottom: 0; }
.tl-i::before { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-dot { width: 12px; height: 12px; margin: 5px 0 0 5px; border-radius: 50%; background: #fff; border: 2px solid #c3cad2; position: relative; z-index: 1; }
.tl-i.done .tl-dot { background: var(--brand); border-color: var(--brand); }
.tl-i.done::before { background: var(--brand-line); }
.tl-i.now .tl-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.tl-i.bad .tl-dot { background: var(--bad); border-color: var(--bad); }
.tl-i.todo .tl-t { color: var(--mute); }
.tl-c { min-width: 0; }
.tl-t { font-weight: 500; }
.tl-m { font-size: 13px; color: var(--mute); margin-top: 2px; overflow-wrap: anywhere; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 18px; padding: 0; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--mute); }
.steps-n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #c3cad2; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #fff; }
.steps-n .i { width: 14px; height: 14px; stroke-width: 2.2; }
.steps li.done { color: var(--ink-2); }
.steps li.done .steps-n { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps li.now { color: var(--ink); font-weight: 500; }
.steps li.now .steps-n { border-color: var(--brand); color: var(--brand); }

/* ---------- pay a supplier ---------- */
.wiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.wiz-grid.rev { grid-template-columns: minmax(0, 1fr) 340px; }
.wiz-main { min-width: 0; }
.wiz-main > .panel { margin-bottom: 0; }
.wiz-side { position: sticky; top: calc(var(--top) + 16px); display: grid; gap: 16px; }
.wiz-side > .panel { margin-bottom: 0; }
.side-sum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 18px; }
.side-sum h3 { font-size: 14px; margin-bottom: 8px; }
.wiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.wiz-foot-r { display: flex; gap: 8px; }
.picks { display: grid; gap: 6px; max-height: 520px; overflow-y: auto; padding: 2px; }
.pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; }
.pick:hover { border-color: #c3cad2; }
.pick.on { border-color: var(--brand); background: var(--brand-tint); }
.pick.off { cursor: not-allowed; background: var(--sunk); }
.pick-main { display: grid; gap: 1px; min-width: 0; }
.pick-main span { font-size: 13px; }
.pick-side { display: grid; justify-items: end; gap: 3px; text-align: right; }
.drop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1.5px dashed #c3cad2; border-radius: var(--r-ctl); background: var(--sunk); margin-bottom: 14px; }
.drop-l { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.drop-l > span { display: grid; gap: 2px; }
.drop-l .i { color: var(--brand); width: 22px; height: 22px; }
.drop:focus-within { border-color: var(--brand); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-i { position: relative; display: grid; justify-items: center; min-width: 96px; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; background: #fff; }
.seg-i input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-i.on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-ink); font-weight: 500; }
.seg-i.off { opacity: .45; cursor: not-allowed; }
.seg-i:focus-within { outline: 2px solid var(--brand-line); }
.opts { display: grid; gap: 8px; margin-bottom: 14px; }
.opt { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; }
.opt > span { display: grid; gap: 3px; }
.opt input { margin-top: 3px; }
.opt.on { border-color: var(--brand); background: var(--brand-tint); }
.opt-m { font-size: 13px; color: var(--brand-ink); }
.wiz-main .field + .check, .wiz-main fieldset + .check { margin-top: 14px; }

/* the payment slip and the e-invoice: printed-document treatment */
.slip, .edoc { background: #fff; border: 1px solid #d6dbe1; border-top: 4px solid var(--brand); border-radius: var(--r-doc); box-shadow: 0 1px 0 #e3e7eb, 0 6px 18px rgba(22, 32, 44, .06); }
.slip-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); }
.slip-k { font-size: 12px; color: var(--mute); letter-spacing: .01em; }
.slip-ref { font-weight: 600; margin-top: 2px; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--brand-ink); background: var(--brand-tint); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.lock.exp { color: var(--bad); background: var(--bad-tint); }
.slip-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.slip-parties > div, .edoc-p > div { display: grid; gap: 2px; align-content: start; }
.slip-parties span, .edoc-p span { font-size: 13px; color: var(--ink-2); }
.slip-amt { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 18px 22px 20px; }
.slip-amt > div { display: grid; gap: 3px; align-content: start; }
.slip-amt span { font-size: 13px; color: var(--mute); }
.slip-big { font-size: 30px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
.slip-mid { font-size: 18px; font-weight: 600; color: var(--brass); }
.slip-perf { position: relative; height: 0; border-top: 1.5px dashed #c6ccd3; margin: 0 14px; }
.slip-perf::before, .slip-perf::after { content: ""; position: absolute; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid #d6dbe1; }
.slip-perf::before { left: -26px; clip-path: inset(0 0 0 50%); }
.slip-perf::after { right: -26px; clip-path: inset(0 50% 0 0); }
.slip-t { width: 100%; border-collapse: collapse; margin: 8px 0 0; }
.slip-t td { padding: 9px 22px; border-bottom: 1px solid var(--line-2); }
.slip-t td.r { text-align: right; white-space: nowrap; }
.slip-t tr.tot td { font-weight: 600; font-size: 15px; border-bottom: 0; border-top: 2px solid var(--ink); }
.slip-f { padding: 12px 22px 16px; font-size: 12.5px; color: var(--mute); background: var(--sunk); border-top: 1px solid var(--line-2); }
.edoc { margin-bottom: 16px; }
.edoc header { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); }
.edoc header h3 { font-size: 20px; margin: 2px 0; letter-spacing: -0.01em; }
.edoc header span { font-size: 13px; color: var(--ink-2); }
.edoc-p { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.edoc .slip-t td { padding: 7px 22px; font-size: 13.5px; }
.qr { width: 84px; height: 84px; flex: none; border: 1px solid var(--line); }
.qr-ph { width: 96px; flex: none; font-size: 11.5px; color: var(--mute); text-align: center; padding: 14px 8px; border: 1px dashed #c6ccd3; border-radius: var(--r-ctl); }

/* ---------- risk, charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .gl { stroke: #e6e9ed; stroke-width: 1; }
.chart .tk, .gauge .tk { fill: var(--mute); font-size: 11px; font-family: var(--font); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; font-size: 12.5px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.sw.dash { height: 2px; border-radius: 0; }
.donut { flex: none; }
.donut-v { font-size: 22px; font-weight: 600; fill: var(--ink); font-family: var(--font); }
.donut-s { font-size: 11px; fill: var(--mute); font-family: var(--font); }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-wrap .legend { flex-direction: column; margin: 0; flex: 1; min-width: 180px; }
.gauge { width: 100%; max-width: 300px; height: auto; display: block; }
.gauge-v { font-size: 38px; font-weight: 600; fill: var(--ink); font-family: var(--font); letter-spacing: -0.02em; }
.gauge-s { font-size: 12px; fill: var(--mute); font-family: var(--font); }
.gauge-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.gauge-side { flex: 1; min-width: 200px; }
.band-tag { display: inline-block; background: var(--bc); color: #fff; font-weight: 600; padding: 3px 12px; border-radius: 999px; margin-bottom: 10px; }
.spark { display: block; }
.hb { display: grid; gap: 10px; }
.hb-r { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) minmax(70px, auto); gap: 12px; align-items: center; font-size: 13px; }
.hb-l { color: var(--ink-2); }
.hb-t { height: 10px; background: var(--neutral-tint); border-radius: 5px; overflow: hidden; }
.hb-t span { display: block; height: 100%; border-radius: 5px; }
.hb-v { text-align: right; font-weight: 500; white-space: nowrap; }
.hb-v small { display: block; font-weight: 400; color: var(--mute); font-size: 11.5px; }
.factors { display: grid; gap: 14px; }
.factor-h { display: flex; justify-content: space-between; gap: 12px; }
.factor-h .num { font-weight: 600; }
.factor-bar { height: 6px; background: var(--neutral-tint); border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
.factor-bar span { display: block; height: 100%; border-radius: 3px; }
.factor-bar .pos { background: var(--brand); }
.factor-bar .neg { background: var(--bad); }
.factor p { margin: 0; }
.consents { list-style: none; margin: 0; padding: 0; }
.consents li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.consents li:last-child { border-bottom: 0; }
.consents li p { margin: 2px 0 0; }
.switch { position: relative; width: 40px; height: 22px; flex: none; border-radius: 11px; border: 0; background: #c3cad2; cursor: pointer; padding: 0; }
.switch-k { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch.on { background: var(--brand); }
.switch.on .switch-k { transform: translateX(18px); }
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.mini-v { font-size: 20px; font-weight: 600; }

/* ---------- overlays ---------- */
.drawer, .modal { position: fixed; inset: 0; z-index: 60; }
.drawer[hidden], .modal[hidden] { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(22, 32, 44, .38); }
.drawer-p { position: absolute; top: 0; right: 0; bottom: 0; width: min(540px, 100%); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide .18s ease-out; }
.drawer-p.wide { width: min(720px, 100%); }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-h, .modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.drawer-h h2, .modal-h h2 { font-size: 16px; }
.drawer-b { padding: 18px 22px 28px; overflow-y: auto; flex: 1; }
.drawer-f, .modal-f { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.drawer-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.modal-p { position: relative; width: min(480px, calc(100% - 32px)); margin: 12vh auto 0; background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--shadow); max-height: 76vh; display: flex; flex-direction: column; }
.modal-b { padding: 18px 22px 20px; overflow-y: auto; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 8px; max-width: min(420px, calc(100% - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; background: var(--ink); color: #fff; border-radius: var(--r-ctl); box-shadow: var(--shadow); font-size: 13.5px; animation: rise .2s ease-out; }
.toast .i { width: 16px; height: 16px; margin-top: 2px; }
.toast.t-ok .i { color: #8fd3ad; }
.toast.t-bad { background: #7d1d15; }
.toast.t-info .i { color: #a9c6ec; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---------- help ---------- */
.help-grid { grid-template-columns: 210px minmax(0, 1fr); align-items: start; }
.help-cats { display: grid; gap: 2px; position: sticky; top: calc(var(--top) + 16px); }
.help-cats a { padding: 7px 10px; border-radius: var(--r-ctl); color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.help-cats a:hover, .help-cats a.on { background: var(--brand-tint); color: var(--brand-ink); }
.faq-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.faq { border-bottom: 1px solid var(--line-2); }
.faq:last-child { border-bottom: 0; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 18px; cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mute); font-weight: 400; margin-left: 8px; }
.faq[open] summary::after { content: "\2212"; }
.faq summary .muted { margin-left: auto; font-weight: 400; white-space: nowrap; }
.faq-a { padding: 0 18px 16px; color: var(--ink-2); max-width: 72ch; }
.glossary { margin: 0; display: grid; }
.glossary > div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.glossary > div:last-child { border-bottom: 0; }
.glossary dt { font-weight: 500; }
.glossary dd { margin: 0; color: var(--ink-2); }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.status-list li:last-child { border-bottom: 0; }
.status-list p { margin: 3px 0 0; }

/* ---------- demo guide ---------- */
.demo-sec { padding-bottom: 6px; }
.demo-sec + .demo-sec { border-top: 1px solid var(--line-2); margin-top: 8px; }
.demo-sec .h3 { margin-top: 14px; }
.personas { display: grid; gap: 8px; }
.persona { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; font: inherit; color: inherit; cursor: pointer; }
.persona > span:last-child { display: grid; gap: 2px; }
.persona:hover { border-color: #c3cad2; }
.persona.on { border-color: var(--brand); background: var(--brand-tint); }
.tour { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.tour li { padding-left: 4px; }
.tour li a { display: block; }
.sim-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sim-btns .btn { white-space: normal; height: auto; min-height: 36px; padding: 8px 12px; text-align: center; line-height: 1.3; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.main-side, .grid.risk-top, .wiz-grid, .wiz-grid.rev { grid-template-columns: minmax(0, 1fr); }
  .wiz-side { position: static; }
}
@media (max-width: 880px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .tb-menu { display: inline-flex; }
  .tb-ent, .tb-user-t, .proto-tag { display: none; }
  .tb-prod { padding-left: 10px; }
  .sidebar { position: fixed; top: var(--top); bottom: 0; left: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow); grid-row: auto; }
  body.nav-open .sidebar { transform: none; }
  .side-in { height: 100%; position: static; }
  .main { grid-column: 1; padding: 20px 16px 56px; }
  .grid.two, .grid.three, .form2, .slip-parties, .slip-amt, .edoc-p, .help-grid, .mini-grid { grid-template-columns: minmax(0, 1fr); }
  .help-cats { position: static; grid-auto-flow: column; overflow-x: auto; }
  .glossary > div { grid-template-columns: 1fr; gap: 2px; }
  .notif { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .att-i { flex-direction: column; align-items: flex-start; }
  .slip-big { font-size: 26px; }
}
@media (max-width: 560px) {
  .grid.k4 { grid-template-columns: minmax(0, 1fr); }
  .page-t h1 { font-size: 21px; }
  .dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pick { grid-template-columns: auto minmax(0, 1fr); }
  .pick-side { grid-column: 2; justify-items: start; text-align: left; }
  .sim-btns { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .sidebar, .page-a, .wiz-foot, .toasts { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
}
