/* Panel admin NadaPay — token ikut docs/DESIGN-IDENTITI.md. Tiada rangka CSS pihak ketiga. */
@font-face {
  font-family: "Overpass";
  src: url("/assets/fonts/Overpass.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #0B1F33; --navy: #12324F; --navy-deep: #0B1F33; --navy-line: #2B4B69;
  --surface: #F4F6F8; --card: #FFFFFF; --line: #D5DCE3; --line-strong: #B8C3CE; --head: #FAFBFC;
  --teal: #0B7A75; --teal-dark: #085E5A; --teal-on-navy: #6FD3CB; --teal-tint: #F1FAF9;
  --amber: #B86E00; --amber-fill: #FFE7B8; --amber-ink: #5A3600;
  --red: #B3261E; --red-tint: #FDF1F0;
  --muted: #5B6B7B; --muted-on-navy: #A9BBCC;
  --focus: #1E6FD9;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--surface); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── reben DEMO ── */

/* ── rangka ── */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 37px); }
.side { background: var(--navy); color: #fff; padding: 22px 0; }
.side .brand { padding: 0 22px 18px; font-size: 19px; font-weight: 700; line-height: 1.2; border-bottom: 1px solid var(--navy-line); }
.side .brand small { display: block; font-weight: 400; font-size: 14px; color: var(--muted-on-navy); margin-top: 3px; }
.side nav { padding-top: 12px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 22px; min-height: 44px; font-size: 16px; color: #D4DFE9; border-left: 4px solid transparent; text-decoration: none; }
.side nav a:hover { background: #0F2A44; color: #fff; }
.side nav a[aria-current="page"] { background: var(--navy-deep); color: #fff; font-weight: 700; border-left-color: var(--teal-on-navy); }
.side .who { margin-top: 28px; padding: 16px 22px 0; border-top: 1px solid var(--navy-line); font-size: 14px; color: var(--muted-on-navy); }
.side .who b { display: block; color: #fff; font-size: 15px; }
.side .who span { display: block; }
.side .who a, .side .who button { color: var(--muted-on-navy); font: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px 0; display: block; text-align: left; }
.side .who a:hover, .side .who button:hover { color: #fff; }
.main { padding: 28px 36px 48px; min-width: 0; }
.main h1 { font-size: 30px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.main .sub { font-size: 17px; color: var(--muted); margin: 4px 0 22px; max-width: 70ch; }
.main .sub b { color: var(--ink); }
.main h2 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.main h2 .more { font-size: 15px; font-weight: 600; margin-left: auto; }
.crumb { font-size: 15px; margin-bottom: 8px; }

/* ── jadual ── */
.tw { overflow-x: auto; border: 1px solid var(--line); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; font-weight: 600; font-size: 14px; color: var(--muted); padding: 10px 14px; border-bottom: 2px solid var(--line); background: var(--head); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.n { font-weight: 700; }
td.t { font-variant-numeric: tabular-nums; white-space: nowrap; }
td .mut { color: var(--muted); font-size: 14px; display: block; }
tr.void td.n { text-decoration: line-through; color: var(--muted); font-weight: 600; }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: var(--teal-tint); }
tr.rowlink a { color: inherit; text-decoration: none; font-weight: 600; }
tr.rowlink a:hover { text-decoration: underline; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
.two.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.note { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 70ch; }

/* ── status ── */
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.chip svg.i { width: 18px; height: 18px; }
.chip.ok { color: var(--teal); } .chip.pend { color: var(--amber); } .chip.bad, .chip.rev { color: var(--red); }
.lock { color: var(--muted); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.dot::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.dot.on::before { background: var(--teal); }
.dot.off::before { border: 2px solid var(--muted); }

/* ── borang ── */
.bar { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
label, .lab { font-size: 14px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
/* [CHANGE 2026-10-01] what: medan tanpa atribut type, e-mel, telefon, nombor dan URL mendapat gaya yang sama; gaya petunjuk/ralat
   medan. why: borang sambungan gateway (B-82) memaparkan input lalai pelayar 20px (< 44px sentuh) dan petunjuk sebesar teks badan.
   verify: /admin/providers?m=<kedai> pada 375px — setiap input 44px, petunjuk kelabu 14px. */
input:not([type]), input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=url], input[type=date], input[type=search], select {
  border: 1.5px solid var(--line-strong); background: #fff; border-radius: 4px; padding: 0 10px; font: inherit; font-size: 16px;
  min-width: 150px; color: var(--ink); height: 44px; max-width: 100%;
}
input:hover, select:hover { border-color: var(--muted); }
input.wide { min-width: 260px; }
input.amount { font-size: 24px; font-weight: 700; height: 52px; width: 100%; font-variant-numeric: tabular-nums; }
.btn { height: 44px; padding: 0 16px; border-radius: 4px; background: var(--teal); color: #fff; font: inherit; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--teal); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn.o { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn.o:hover { background: var(--surface); border-color: var(--muted); color: var(--ink); }
.btn.r { background: #fff; color: var(--red); border-color: var(--red); }
.btn.r:hover { background: var(--red-tint); color: var(--red); }
.btn.s { height: 36px; font-size: 14px; padding: 0 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
form.inline { display: inline; }
.panel { background: var(--card); border: 1px solid var(--line); padding: 22px; }
.panel .field { margin-bottom: 16px; }
.panel .field input, .panel .field select { width: 100%; }
.panel .field textarea { width: 100%; min-height: 132px; border: 1.5px solid var(--line-strong); background: #fff; border-radius: 4px; padding: 10px; font: 14px/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); resize: vertical; }
.panel .field textarea:hover { border-color: var(--muted); }
.field .hint, .field .err { display: block; font-size: 14px; line-height: 1.45; margin-top: 5px; max-width: 70ch; }
.field .hint { color: var(--muted); }
.field .err { color: var(--red); font-weight: 600; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); }
.gw details > summary { cursor: pointer; font-weight: 700; padding: 11px 0; line-height: 22px; }
.gw details[open] > summary { margin-bottom: 4px; }
.msg { border: 1px solid var(--line); border-left-width: 5px; background: var(--card); padding: 12px 14px; margin-bottom: 18px; font-size: 16px; max-width: 80ch; }
.msg.ok { border-color: var(--teal); } .msg.err { border-color: var(--red); } .msg.warn { border-color: var(--amber); }
.msg b { display: block; }
fieldset { border: 0; }
.scn { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 16px; align-items: flex-start; cursor: pointer; font-weight: 400; color: var(--ink); margin: 0; }
.scn:last-of-type { border-bottom: 0; }
.scn small { display: block; color: var(--muted); font-size: 14px; }
.scn input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--teal); flex: none; }

/* ── pairing ── */
.pairbox { background: var(--card); border: 1px solid var(--line); padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 24px; align-items: center; }
.code { font-size: 54px; font-weight: 800; letter-spacing: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; word-break: break-all; }
.pairbox p { font-size: 15px; color: var(--muted); margin-top: 8px; max-width: 46ch; }
.pairbox p b { color: var(--amber); }
.qr { width: 210px; background: #fff; border: 1px solid var(--line); padding: 8px; }
.qr svg { display: block; width: 100%; height: auto; }

/* ── garis masa ── */
.steps { list-style: none; background: var(--card); border: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
.steps li:last-child { border-bottom: 0; }
.steps time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.steps small { display: block; color: var(--muted); font-size: 14px; }
.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 9px 16px; font-size: 16px; padding: 18px 22px; background: var(--card); border: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 15px; } .kv dd { font-weight: 600; word-break: break-word; }
.kv dd.plain { font-weight: 400; color: var(--muted); }
.bigamt { font-size: 44px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bigamt small { font-size: 20px; font-weight: 600; color: var(--muted); margin-right: 6px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 15px; color: var(--muted); gap: 12px; flex-wrap: wrap; }

/* ── log masuk & halaman awam ── */
.center { min-height: calc(100vh - 37px); display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 400px; }
.login h1 { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.login p { color: var(--muted); margin-bottom: 18px; }
.login .field input { width: 100%; }
.login .btn { width: 100%; justify-content: center; height: 48px; }
.pub { width: 100%; max-width: 460px; text-align: left; }
.pub .btn { width: 100%; justify-content: center; height: 52px; font-size: 18px; margin: 14px 0; }
.qr-amount { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); margin: 6px 0 14px; }
.qr-box { background: #fff; border: 1px solid var(--line); padding: 12px; max-width: 360px; margin: 0 auto 14px; }
.qr-box svg { display: block; width: 100%; height: auto; }
/* [CHANGE 2026-10-01] what: QR statik DuitNow (B-85) — pratonton kecil di panel + halaman cetak. why: pemilik 13:43.
   verify: /admin/providers (Fiuu disambung) dan /admin/static-qr/<id> pada 375px dan cetak. */
.sqr { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.sqr h3 { font-size: 17px; margin: 0 0 6px; }
.sqr code { overflow-wrap: anywhere; font-size: 13px; }
.qr-mini { width: 120px; background: #fff; border: 1px solid var(--line); padding: 4px; }
.qr-mini svg { display: block; width: 100%; height: auto; }
.sqr-print { text-align: center; }
.sqr-print .qr-amount { font-size: 26px; }

/* ── telefon: jadual → kad, sisi → bar bawah ── */
@media (max-width: 860px) {
  .shell { display: block; min-height: 0; padding-bottom: 66px; }
  .side { padding: 0; }
  .side .brand { padding: 12px 16px; border-bottom: 0; font-size: 17px; }
  .side .brand small { display: inline; margin-left: 8px; }
  .side nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; overflow-x: auto; background: var(--card); border-top: 1px solid var(--line); padding: 0; }
  .side nav a { flex: 1 0 auto; flex-direction: column; gap: 3px; padding: 8px 12px 9px; font-size: 12px; color: var(--muted); border-left: 0; border-top: 3px solid transparent; min-height: 56px; justify-content: center; }
  .side nav a:hover { background: var(--surface); color: var(--ink); }
  .side nav a[aria-current="page"] { background: var(--card); color: var(--teal); border-top-color: var(--teal); }
  .side .who { margin: 0; padding: 0 16px 12px; border-top: 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .side .who b, .side .who span { display: inline; }
  .side .who a, .side .who button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .main { padding: 20px 16px 32px; }
  .main h1 { font-size: 25px; }
  .two, .two.even { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pairbox { grid-template-columns: minmax(0, 1fr); }
  .code { font-size: 40px; letter-spacing: 4px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .bar > * { flex: 1 1 140px; }
  .bar input, .bar select { width: 100%; min-width: 0; }
  .tw.cards { border: 0; background: none; overflow: visible; }
  .tw.cards thead { display: none; }
  .tw.cards table, .tw.cards tbody, .tw.cards tr, .tw.cards td { display: block; width: 100%; }
  .tw.cards tr { background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; padding: 10px 14px; }
  /* [CHANGE 2026-10-01] what: teks tanpa ruang (JSON butiran audit, rujukan panjang) dibalut dalam kad. why: /admin/audit melimpah
     ke 447px pada 375px. verify: sapuan 375px semua halaman panel, scrollWidth = 375. */
  .tw.cards td { border: 0; padding: 3px 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .tw.cards td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 14px; font-weight: 400; }
  .tw.cards td.n { font-size: 20px; }
  /* kad transaksi: status di kiri, jumlah di kanan pada baris pertama */
  .tw.cards tr.txn { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
  .tw.cards tr.txn td { grid-column: 1 / -1; font-size: 15px; color: var(--muted); }
  .tw.cards tr.txn td.st { order: -2; grid-column: 1; }
  .tw.cards tr.txn td.amt { order: -1; grid-column: 2; text-align: right; color: var(--ink); }
  .tw.cards tr.txn.void td.amt { color: var(--muted); }
  .tw.cards tr.txn td[data-l]::before { content: none; }
  .tw.cards tr.txn td a { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .side, .bar, .btn, .no-print { display: none !important; } .shell { display: block; } .main { padding: 0; } * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .sqr-print .qr-box { max-width: 9cm; } }

.main h2.mt0 { margin-top: 0; }
.narrow { max-width: 440px; }
