/* StreadPay — satu file CSS, tanpa build step.
   Tema: mengikuti sistem, bisa dipaksa lewat <html data-theme="light|dark">. */

:root {
  /* Terang */
  --bg: #ffffff;
  --bg-alt: #f4f4f4;
  --surface: #f7f7f7;
  --field: #ffffff;
  --line: #dedede;
  --line-soft: #ececec;
  --text: #000000;
  --mute: #555555;
  --dim: #8a8a8a;
  --accent: #000000;
  --on-accent: #ffffff;
  --ok: #157a3f;
  --warn: #a35a00;
  --bad: #c2321f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --sun: none;
  --moon: block;
  color-scheme: light;

  /* Panel kode selalu gelap di kedua tema */
  --code-bg: #0b0b0b;
  --code-line: #262626;
  --code-text: #e8e8e8;
  --code-mute: #8a8a8a;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 16px;

  --wrap: 1160px;
  --gutter: 16px;
  --nav-h: 68px;
  --sidebar-w: 248px;
  --bottom-h: 64px;
}

/* Gelap — ditulis dua kali: untuk sistem dan untuk pilihan manual. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #0b0b0b;
    --surface: #141414;
    --field: #0b0b0b;
    --line: #2b2b2b;
    --line-soft: #1b1b1b;
    --text: #f5f5f5;
    --mute: #a3a3a3;
    --dim: #6e6e6e;
    --accent: #ffffff;
    --on-accent: #000000;
    --ok: #6fcf97;
    --warn: #e8b45a;
    --bad: #ef7b6c;
    --shadow: none;
    --sun: block;
    --moon: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0b0b0b;
  --surface: #141414;
  --field: #0b0b0b;
  --line: #2b2b2b;
  --line-soft: #1b1b1b;
  --text: #f5f5f5;
  --mute: #a3a3a3;
  --dim: #6e6e6e;
  --accent: #ffffff;
  --on-accent: #000000;
  --ok: #6fcf97;
  --warn: #e8b45a;
  --bad: #ef7b6c;
  --shadow: none;
  --sun: block;
  --moon: none;
  color-scheme: dark;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 760px; }
.muted { color: var(--mute); }

.icon { flex: none; }

/* Motif dari logo: blok miring di belakang angka penting. */
.slant {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 0 0.28em;
  color: var(--on-accent);
}
.slant::before {
  content: "";
  position: absolute;
  inset: 0.04em 0;
  z-index: -1;
  background: var(--accent);
  border-radius: 0.12em;
  transform: skewX(-14deg);
}

/* ---------- Tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface); border-color: var(--dim); }
/* Dipakai di atas blok aksen (CTA band) */
.btn-inverse { background: var(--on-accent); color: var(--accent); }
.btn-inverse:hover { opacity: 0.88; }

.btn:active { opacity: 0.8; }
.btn:disabled,
.btn.is-loading { opacity: 0.55; cursor: progress; pointer-events: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--mute);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

.theme-toggle .icon-sun { display: var(--sun); }
.theme-toggle .icon-moon { display: var(--moon); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Brand & navigasi publik ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-inner .brand { min-width: 0; }
.nav-links { display: flex; flex: none; align-items: center; gap: 20px; font-size: 15px; }
.nav-links > a:not(.btn) { color: var(--mute); text-decoration: none; }
.nav-links > a:not(.btn):hover,
.nav-links > a.is-active { color: var(--text); }

@media (max-width: 639px) {
  .hide-sm { display: none !important; }
  .nav-links { gap: 10px; }
  .nav-links > a:not(.btn) { padding: 6px 2px; }
}
@media (min-width: 900px) {
  .only-sm { display: none !important; }
}

/* ---------- Hero ---------- */

.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }

.hero-title br { display: none; }
@media (min-width: 640px) { .hero-title br { display: inline; } }

.hero-title {
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.lead {
  max-width: 34rem;
  margin-top: 22px;
  color: var(--mute);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}
.hero .cta-row { margin-top: 32px; }

@media (min-width: 960px) {
  .hero { padding: 96px 0 112px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; }
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  color: var(--mute);
  font-size: 14px;
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: "";
  width: 14px;
  height: 7px;
  border-left: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(-45deg) translateY(-2px);
}

/* ---------- Ilustrasi ponsel: bot jualan + QRIS ---------- */

.phone-stage {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 310px;
  padding: 0 0 30px;
}
/* Rangka metal (graphite) dengan sudut besar, seperti iPhone Pro terbaru */
.phone {
  position: relative;
  z-index: 1;
  padding: 3px;
  border-radius: 52px;
  background: linear-gradient(140deg, #6e6e73 0%, #2c2c2e 22%, #8e8e93 48%, #2c2c2e 74%, #5a5a5e 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 40px 90px rgba(0, 0, 0, 0.32);
}
.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-alt);
  border: 6px solid #050505;
  border-radius: 49px;
}

/* Tombol samping: kiri = action + volume, kanan = power + camera control */
.phone-key {
  position: absolute;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #3a3a3c, #8e8e93, #3a3a3c);
}
.key-action, .key-vol-up, .key-vol-down { left: -3px; }
.key-power, .key-camera { right: -3px; }
.key-action { top: 17%; height: 5%; }
.key-vol-up { top: 25%; height: 8%; }
.key-vol-down { top: 35%; height: 8%; }
.key-power { top: 27%; height: 12%; }
.key-camera { top: 55%; height: 7%; }

.phone-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 4px 24px 0 28px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.island {
  position: absolute;
  top: 8px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 34%;
  height: 29px;
  padding-right: 10px;
  border-radius: 20px;
  background: #000;
  transform: translateX(-50%);
}
.island-cam {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a4a6a 0%, #111827 55%, #000 100%);
}
.status-icons { display: flex; align-items: center; gap: 6px; }
.signal { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.signal i { width: 3px; border-radius: 1px; background: currentColor; }
.signal i:nth-child(1) { height: 4px; }
.signal i:nth-child(2) { height: 6px; }
.signal i:nth-child(3) { height: 8px; }
.signal i:nth-child(4) { height: 11px; }
.battery {
  position: relative;
  width: 24px;
  height: 12px;
  padding: 1.5px;
  border: 1.5px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 4px;
}
.battery::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -4px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: color-mix(in srgb, currentColor 45%, transparent);
}
.battery span { display: block; width: 80%; height: 100%; border-radius: 1.5px; background: currentColor; }

.home-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 36%;
  height: 5px;
  border-radius: 3px;
  background: var(--text);
  opacity: 0.85;
  transform: translateX(-50%);
}
.phone-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}
.bot-meta { display: grid; gap: 1px; line-height: 1.2; }
.bot-meta strong { font-size: 14px; }
.bot-meta small { display: flex; align-items: center; gap: 5px; color: var(--dim); font-size: 12px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* Percakapan */
.chat { display: grid; gap: 8px; padding: 12px 12px 16px; background: var(--bg-alt); font-size: 13.5px; }
.chat-day {
  justify-self: center;
  margin-bottom: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--mute);
  font-size: 11px;
  font-weight: 600;
}
.msg { display: grid; gap: 3px; max-width: 90%; }
.msg-me { justify-self: end; justify-items: end; }
.msg-bot { justify-self: start; justify-items: start; }
.bubble { padding: 9px 13px; border-radius: 18px; line-height: 1.45; }
.bubble-me {
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 5px;
  font-family: var(--mono);
  font-size: 12.5px;
}
.bubble-bot {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-bottom-left-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.bubble-qr { padding: 10px; }
.bubble-qr > p { padding: 2px 4px 0; }
.msg-time { display: flex; align-items: center; gap: 4px; padding: 0 5px; color: var(--dim); font-size: 10.5px; }
.ticks { position: relative; width: 15px; height: 8px; }
.ticks::before, .ticks::after {
  content: "";
  position: absolute;
  top: 0;
  width: 8px;
  height: 4px;
  border-left: 1.5px solid var(--ok);
  border-bottom: 1.5px solid var(--ok);
  transform: rotate(-45deg);
}
.ticks::before { left: 0; }
.ticks::after { left: 5px; }

/* Kartu QR di dalam chat (QR selalu putih supaya bisa dipindai) */
.bubble-qr .qr-card {
  margin-top: 10px;
  padding: 10px 10px 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  color: #000;
}
.qr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qr-badge { padding: 2px 8px; border-radius: 6px; background: #000; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }
.qr-total { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.bubble-qr .qr-img svg { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.qr-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(0, 0, 0, 0.18); color: #555; font-size: 10.5px; }

.chat-system {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
}
.chat-system::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
}

/* Kolom ketik pesan (hiasan) */
.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 24px;
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
}
.input-field {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--dim);
  font-size: 13px;
}
.input-send { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); }
.input-send::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--on-accent);
  border-right: 2px solid var(--on-accent);
  transform: translate(-65%, -50%) rotate(45deg);
}

/* Notifikasi saldo masuk: di dalam layar ponsel, di bawah Dynamic Island */
.push {
  position: absolute;
  z-index: 3;
  top: 46px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.push-icon { flex: none; width: 34px; height: 34px; border-radius: 9px; }
.push-text { display: grid; gap: 3px; min-width: 0; }
.push-app { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; }
.push-app strong { font-weight: 700; }
.push-app small { color: var(--dim); font-size: 11px; }
.push-body { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--mute); }
.push-body .slant { font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }

/* Satu adegan saat halaman dibuka: pesan beli → QR → lunas → saldo masuk */
/* Adegan berulang: muncul berurutan, ditahan, lalu menghilang dengan urutan terbalik, lalu ulang.
   Hanya opacity/transform dipakai supaya tinggi percakapan tidak berubah antar putaran. */
.step-1, .step-2, .step-3, .step-4, .step-5 {
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes scene-1 {
  0%, 2.5% { opacity: 0; transform: translateY(10px) scale(0.98); }
  6.25%, 83.33% { opacity: 1; transform: none; }
  86.25%, 100% { opacity: 0; transform: translateY(10px) scale(0.98); }
}
.step-1 { animation-name: scene-1; }

@keyframes scene-2 {
  0%, 7.5% { opacity: 0; transform: translateY(10px) scale(0.98); }
  11.25%, 81.25% { opacity: 1; transform: none; }
  84.17%, 100% { opacity: 0; transform: translateY(10px) scale(0.98); }
}
.step-2 { animation-name: scene-2; }

@keyframes scene-3 {
  0%, 17.5% { opacity: 0; transform: translateY(10px) scale(0.98); }
  21.25%, 79.17% { opacity: 1; transform: none; }
  82.08%, 100% { opacity: 0; transform: translateY(10px) scale(0.98); }
}
.step-3 { animation-name: scene-3; }

@keyframes scene-4 {
  0%, 21.67% { opacity: 0; transform: translateY(10px) scale(0.98); }
  25.42%, 77.08% { opacity: 1; transform: none; }
  80%, 100% { opacity: 0; transform: translateY(10px) scale(0.98); }
}
.step-4 { animation-name: scene-4; }

@keyframes scene-5 {
  0%, 25.83% { opacity: 0; transform: translateY(-18px) scale(0.97); }
  29.58%, 75% { opacity: 1; transform: none; }
  77.92%, 100% { opacity: 0; transform: translateY(-18px) scale(0.97); }
}
.step-5 { animation-name: scene-5; }


.hero-mark {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 190%;
  max-width: none;
  transform: translate(-50%, -52%);
  fill: color-mix(in srgb, var(--text) 6%, transparent);
  pointer-events: none;
}
.hero { overflow: hidden; }

/* Strip "cocok untuk" & metode bayar */
.fit-strip { border-block: 1px solid var(--line-soft); }
.fit-rows { padding-block: 10px; }
.fit-rows .fit-inner + .fit-inner { border-top: 1px dashed var(--line-soft); }
.fit-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 14px; }
.fit-label { min-width: 120px; }
.pay-names { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.pay-names li { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--mute); }
.pay-names li.muted { font-size: 14px; font-weight: 400; color: var(--dim); }

/* Beranda: langkah singkat & harga satu baris */
.split.split-center { align-items: center; }
.price-facts { margin: 24px 0 28px; max-width: 420px; border-top: 1px solid var(--line); }
.price-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.price-facts dt { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; }
.price-facts dd { color: var(--mute); font-size: 14px; text-align: right; }
.steps-short p { margin-top: 4px; }
.fit-label { color: var(--dim); font-size: 14px; }
.fit-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fit-list li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Kalkulator biaya ---------- */

.calc {
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 640px) { .calc { padding: 32px; } }

.calc-label { display: block; color: var(--mute); font-size: 14px; }
.calc-input {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.calc-input:focus-within { border-bottom-color: var(--text); }
.calc-input span { color: var(--dim); }
.calc-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
}
.calc-error { margin-top: 8px; color: var(--bad); font-size: 14px; }

.calc-rows { display: flex; flex-direction: column; margin-top: 16px; }
.calc-fee { order: 1; }
.calc-code { order: 2; }
.calc-total { order: 3; }
/* Biaya ditanggung penjual: baris biaya pindah ke bawah total (dipotong dari saldo) */
.calc[data-bearer="merchant"] .calc-fee { order: 4; }

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}
.segmented legend { float: left; margin-right: 10px; color: var(--mute); font-size: 14px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
}
.segmented input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.calc-rows > div,
.calc-net {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.calc-rows > div { padding: 9px 0; }
.calc-rows dt { color: var(--mute); }
.calc-rows dt small { margin-left: 6px; color: var(--dim); font-size: 13px; }
.calc-rows dd { font-weight: 500; }
.calc-rows .calc-total { margin-top: 4px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.calc-rows .calc-total dt { color: var(--text); font-weight: 600; }
.calc-rows .calc-total dd { font-weight: 700; }

.calc-net {
  align-items: center;
  margin-top: 14px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.calc-net span { font-weight: 600; }
.calc-net strong { font-size: clamp(1.6rem, 4.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; }
.calc-note { margin-top: 18px; color: var(--dim); font-size: 13px; }

/* ---------- Section umum ---------- */

.section { padding: 72px 0; }
.section-tight { padding: 40px 0 72px; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }
@media (min-width: 960px) { .section { padding: 104px 0; } }

.section-title {
  max-width: 22ch;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.split { display: grid; gap: 36px; align-items: start; }
.split > * { min-width: 0; }
.split-copy .muted { max-width: 30rem; margin: 16px 0 28px; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; }
}

code {
  padding: 0.1em 0.35em;
  background: var(--line-soft);
  border-radius: 5px;
  font-size: 0.88em;
}
:not(pre) > code { white-space: nowrap; }
pre code { padding: 0; background: none; font-size: inherit; }

/* Langkah alur (memang berurutan) */
.steps {
  counter-reset: step;
  display: grid;
  gap: 32px;
  margin-top: 44px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  padding-top: 2px;
  border-top: 1px solid var(--text);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-1px);
}
.steps h3 { margin-top: 14px; font-size: 20px; letter-spacing: -0.01em; }
.steps p { margin-top: 8px; color: var(--mute); }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }

/* Panel kode */
.code-panel {
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--r-lg);
  color: var(--code-text);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--code-line);
  color: var(--code-mute);
  font-size: 13px;
}
.code-panel pre + .code-head { border-top: 1px solid var(--code-line); }
.code-panel pre,
.prose pre {
  margin: 0;
  padding: 18px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  color: var(--code-text);
  tab-size: 2;
}
.copy-btn {
  padding: 4px 10px;
  border: 1px solid var(--code-line);
  border-radius: 6px;
  background: transparent;
  color: var(--code-mute);
  font-size: 12px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--code-text); border-color: var(--code-mute); }

/* Harga */
.price-list { border-top: 1px solid var(--line); }
.price-row {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.price-row dt { color: var(--mute); }
.price-row dd strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.price-row dd span { display: block; margin-top: 2px; color: var(--dim); font-size: 14px; }
.price-foot { margin-top: 18px; color: var(--mute); font-size: 14px; }
@media (min-width: 640px) {
  .price-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: baseline; gap: 24px; }
}

/* CTA band: blok aksen penuh */
.cta-band { background: var(--accent); color: var(--on-accent); }
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 56px;
}
.cta-band h2 {
  max-width: 16ch;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

/* Halaman isi (harga, docs, legal) */
.page-head { padding: 56px 0 8px; }
.page-heading {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.page-head .lead { margin-top: 14px; }

.prose h2 { margin: 36px 0 10px; font-size: 20px; letter-spacing: -0.01em; }
.prose h2:first-child,
.prose .muted:first-child + h2 { margin-top: 0; }
.prose p { margin-bottom: 12px; max-width: 68ch; }
.prose p.muted { color: var(--mute); }
.prose pre {
  margin: 0 0 12px;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--r);
}
.prose a { text-underline-offset: 3px; }

.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mute); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--mute); max-width: 62ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); padding-top: 40px; }
.footer-inner { display: grid; gap: 28px; }
.footer-brand p { margin-top: 12px; max-width: 30ch; color: var(--mute); font-size: 14px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 760px) { .footer-links { grid-template-columns: repeat(2, auto); gap: 56px; } }
.footer-links h2 { margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.footer-links a { display: block; padding: 4px 0; color: var(--mute); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-base {
  margin-top: 32px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 13px;
}
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1fr auto; }
}

/* ---------- Tabel ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th,
.table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table th { color: var(--mute); font-weight: 500; background: var(--bg-alt); }
.table tr:last-child td { border-bottom: 0; }
.method { font-family: var(--mono); font-size: 12px; font-weight: 500; }

/* ---------- Form ---------- */

.form { display: grid; gap: 18px; margin-top: 28px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; }
.field-link { color: var(--mute); font-size: 14px; text-decoration: none; }
.field-link:hover { color: var(--text); }
.field-hint { color: var(--dim); font-size: 13px; }
.field-error { color: var(--bad); font-size: 13px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--r);
  outline: none;
  transition: border-color 0.15s;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--text); }
.field [aria-invalid="true"] { border-color: var(--bad); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mute); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check a { color: var(--text); text-underline-offset: 3px; }

.alert { padding: 12px 14px; border-radius: var(--r); font-size: 14px; margin-top: 20px; }
.alert-top { margin-top: 0; }
.alert-ok {
  background: color-mix(in srgb, var(--ok) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  color: var(--ok);
}
.detail-flush { padding: 0; }
.alert-error {
  background: color-mix(in srgb, var(--bad) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent);
  color: var(--bad);
}

/* ---------- Flash toast ---------- */

.flash {
  position: fixed;
  z-index: 60;
  top: 16px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 420px;
  margin-left: auto;
  padding: 14px 14px 14px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-weight: 500;
}
.flash-error { background: var(--bad); color: #fff; }
.flash-close {
  border: 0;
  background: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}
.flash.is-hidden { opacity: 0; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s; }

/* ---------- Auth ---------- */

.auth-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px var(--gutter);
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 420px;
  margin-bottom: 28px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 480px) { .auth-card { padding: 36px 32px; } .auth-shell { justify-content: center; } }
.auth-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.auth-sub { margin-top: 8px; color: var(--mute); }
.auth-card > .btn { margin-top: 24px; }
.auth-switch { margin-top: 22px; color: var(--mute); font-size: 14px; text-align: center; }
.auth-switch a { color: var(--text); text-underline-offset: 3px; }
.auth-foot { display: flex; gap: 18px; margin-top: 24px; font-size: 13px; }
.auth-foot a { color: var(--dim); text-decoration: none; }

/* ---------- Error page ---------- */

.error-page { padding: 96px 0 120px; }
.error-code { color: var(--dim); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.error-page .btn { margin-top: 28px; }

/* ---------- Dashboard shell ---------- */

body.app { background: var(--bg-alt); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--line-soft);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 14px 0 20px;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-label { padding: 0 10px 6px; color: var(--dim); font-size: 12px; font-weight: 500; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--mute);
  font-size: 15px;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.is-active { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 12px 14px 16px;
  border-top: 1px solid var(--line-soft);
}
.who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
}
.who-text { display: grid; min-width: 0; line-height: 1.3; }
.who-text strong,
.who-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text strong { font-size: 14px; }
.who-text small { color: var(--dim); font-size: 12px; }

.scrim { display: none; }

.app-main { min-height: 100vh; margin-left: var(--sidebar-w); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-left { min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }

.env-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.env-switch button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.env-switch button.is-on { background: var(--accent); color: var(--on-accent); }

.mode-strip {
  padding: 8px var(--gutter);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
  color: var(--warn);
  font-size: 13px;
}

.content {
  max-width: 1080px;
  padding: 28px var(--gutter) 48px;
  display: grid;
  gap: 20px;
  align-content: start;
}
.content > * { min-width: 0; }
.content > .page-title { font-size: 24px; }

.bottom-nav { display: none; }

@media (max-width: 899px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    width: min(86vw, 300px);
  }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.55);
  }
  body.drawer-open { overflow: hidden; }

  .app-main { margin-left: 0; }
  .content { padding-bottom: calc(var(--bottom-h) + 40px + env(safe-area-inset-bottom)); }

  .bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-soft);
  }
  .bottom-nav a,
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: none;
    color: var(--dim);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
  }
  .bottom-nav .is-active { color: var(--text); }
}

/* ---------- Komponen dashboard ---------- */

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--r);
}
.notice > .icon { color: var(--warn); }
.notice-text { display: grid; flex: 1 1 220px; font-size: 14px; }
.notice-text span { color: var(--mute); }

.balance-hero {
  display: grid;
  gap: 24px;
  padding: 26px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.balance-amount {
  margin: 8px 0 20px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.balance-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.balance-side div { padding: 14px 16px; background: var(--bg-alt); border-radius: var(--r); }
.balance-side dt { color: var(--mute); font-size: 13px; }
.balance-side dd { margin-top: 4px; font-size: 18px; font-weight: 700; }
@media (min-width: 760px) {
  .balance-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: center; padding: 32px; }
  .balance-side { grid-template-columns: 1fr; }
}

.stat-label { color: var(--mute); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat {
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
}
.stat-value { margin-top: 6px; font-size: clamp(1.25rem, 3.4vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat-value small { color: var(--dim); font-size: 0.6em; font-weight: 500; }

.panel {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 { font-size: 16px; font-weight: 600; }
.link-quiet { color: var(--mute); font-size: 14px; text-decoration: none; }
.link-quiet:hover { color: var(--text); }

.empty { padding: 40px 20px; text-align: center; }
.empty-title { font-size: 17px; font-weight: 700; }
.empty p:not(.empty-title) { max-width: 38ch; margin: 6px auto 0; color: var(--mute); font-size: 14px; }
.empty .cta-row,
.empty > .btn { margin-top: 20px; justify-content: center; }

.tx-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.tx-list li:last-child { border-bottom: 0; }
.tx-main { display: grid; min-width: 0; }
.tx-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.tx-main small { color: var(--dim); font-size: 12px; }
.tx-amount { font-weight: 600; text-align: right; }
.tx-list .badge { grid-column: 2; justify-self: end; }
@media (min-width: 640px) {
  .tx-list li { grid-template-columns: minmax(0, 1fr) auto 96px; }
  .tx-list .badge { grid-column: auto; }
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--line-soft);
  color: var(--mute);
}
.badge-paid,
.badge-success { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge-pending,
.badge-requested,
.badge-processing { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.badge-failed,
.badge-rejected { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.panel-pad { display: grid; gap: 14px; padding: 22px 20px; }
.panel-title { font-size: 16px; font-weight: 600; }
.panel-pad > .muted { font-size: 14px; }

.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.btn-danger-solid { background: var(--bad); color: #fff; }

/* API keys */
.key-reveal {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--ok);
  border-radius: var(--r-lg);
}
.key-reveal h2 { font-size: 16px; }
.key-reveal p { margin-top: 4px; color: var(--mute); font-size: 14px; }
.key-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.key-box code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 0;
  background: none;
  font-size: 13px;
  white-space: nowrap;
}
.key-box-inline { padding: 4px 4px 4px 12px; }

.key-list li {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.key-list li:last-child { border-bottom: 0; }
.key-main { display: grid; gap: 6px; min-width: 0; }
.key-main > code { justify-self: start; font-size: 13px; }
.key-main small { color: var(--dim); font-size: 12px; }
.key-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 760px) {
  .key-list li { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

/* Dialog password */
.pw-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.pw-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.pw-dialog .form { margin-top: 0; }
.dialog-title { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.pw-dialog .muted { font-size: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Pilihan penanggung biaya */
.choices { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
@media (min-width: 760px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; top: 20px; right: 18px; width: 18px; height: 18px; accent-color: var(--accent); }
.choice-body {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 18px 48px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 14px;
}
.choice-body > strong { font-size: 16px; }
.choice input:checked + .choice-body { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--text); outline-offset: 2px; }
.choice-example { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.choice-example div { display: flex; justify-content: space-between; padding: 3px 0; }
.choice-example dt { color: var(--mute); }

/* ---------- Admin & komponen data ---------- */

.brand-row { display: inline-flex; align-items: center; gap: 8px; }
.area-tag {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--mute);
  font-size: 11px;
  font-weight: 600;
}

.badge-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.badge-bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.badge-muted { background: var(--line-soft); color: var(--mute); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  scrollbar-width: none;
}
.tabs a {
  flex: none;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: var(--mute);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); background: var(--surface); }
.tabs a.is-on { background: var(--accent); color: var(--on-accent); }
.tab-count { margin-left: 4px; opacity: 0.6; font-size: 12px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters input,
.filters select {
  flex: 1 1 200px;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  outline: none;
}
.filters select { flex: 0 1 200px; }
.filters input:focus,
.filters select:focus { border-color: var(--text); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1100px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) { .stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat-sub { margin-top: 4px; color: var(--dim); font-size: 13px; }
.hint { margin-top: -8px; color: var(--dim); font-size: 13px; }

.rev-list,
.held-list { display: grid; gap: 2px; font-size: 14px; }
.rev-list div,
.held-list div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.rev-list dt,
.held-list dt { color: var(--mute); }
.rev-list dd,
.held-list dd { font-weight: 600; }
.rev-sum { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px !important; }
.rev-sum dt { color: var(--text) !important; font-weight: 600; }
.rev-minus dd { color: var(--bad); }

.held { gap: 16px; }
@media (min-width: 760px) {
  .held { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: center; }
}

.two-col { display: grid; gap: 20px; }
.two-col > * { min-width: 0; }
@media (min-width: 1000px) { .two-col { grid-template-columns: 1fr 1fr; } }

.count-pill {
  min-width: 28px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.empty-sm { padding: 28px 20px; }
.empty-sm p { margin: 0 auto !important; }

.cell-main { display: grid; min-width: 0; text-decoration: none; }
.cell-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.cell-main small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
a.cell-main:hover strong,
a.tx-main:hover strong { text-decoration: underline; text-underline-offset: 3px; }
a.tx-main { color: inherit; text-decoration: none; }

.table .num { text-align: right; }
.table .cell-main strong,
.table .cell-main small { overflow: visible; }
@media (min-width: 900px) { .panel-table { overflow-x: auto; } }
.table td a { text-underline-offset: 3px; }

/* Tabel jadi kartu di layar kecil */
@media (max-width: 899px) {
  .table-cards thead { display: none; }
  .table-cards,
  .table-cards tbody,
  .table-cards tr,
  .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 5px 0;
    border: 0;
    white-space: normal;
    text-align: right;
  }
  .table-cards td::before { content: attr(data-label); color: var(--mute); font-size: 13px; text-align: left; flex: none; }
  .table-cards td:first-child { padding-bottom: 8px; text-align: left; }
  .table-cards td:first-child::before { display: none; }
  .table-cards .cell-main { width: 100%; }
}
@media (min-width: 900px) {
  .table-cards th:first-child,
  .table-cards td:first-child { padding-left: 20px; }
  .table-cards th:last-child,
  .table-cards td:last-child { padding-right: 20px; }
  .panel > .table { border-radius: var(--r-lg); overflow: hidden; }
  .panel > .table th:first-child { border-top-left-radius: var(--r-lg); }
  .panel > .table th:last-child { border-top-right-radius: var(--r-lg); }
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--mute);
  font-size: 14px;
}
.pagination div { display: flex; gap: 8px; }

.back-link { color: var(--mute); font-size: 14px; text-decoration: none; justify-self: start; }
.back-link::before { content: "‹ "; }
.back-link:hover { color: var(--text); }

.member-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.member-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.member-id > div { display: grid; gap: 6px; min-width: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 20px; }
.member-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.member-id .muted { font-size: 14px; overflow-wrap: anywhere; }

.detail-list { padding: 8px 20px 14px; font-size: 14px; }
.detail-list div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--mute); flex: none; }
.detail-list dd { text-align: right; overflow-wrap: anywhere; }

.merchant-list li {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.merchant-list li:last-child { border-bottom: 0; }
.merchant-main { display: grid; gap: 8px; min-width: 0; }
.note { color: var(--bad); font-size: 13px; }
.small { font-size: 13px; }
.kyc-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kyc-form input {
  flex: 1 1 180px;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  outline: none;
}
.kyc-form input:focus { border-color: var(--text); }
@media (min-width: 900px) {
  .merchant-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: center; }
  .kyc-form { justify-content: flex-end; }
}

.announce-list li {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.announce-list li:last-child { border-bottom: 0; }
.announce-list li.is-off .announce-body { opacity: 0.55; }
.announce-body { display: grid; gap: 6px; min-width: 0; }
.announce-body p { color: var(--mute); font-size: 14px; white-space: pre-line; }
.announce-body small { color: var(--dim); font-size: 12px; }
@media (min-width: 760px) {
  .announce-list li { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}

/* Banner pengumuman di dashboard member */
.announce {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--text);
  border-radius: var(--r);
  font-size: 14px;
}
.announce > .icon { margin-top: 1px; }
.announce p { margin-top: 2px; color: var(--mute); white-space: pre-line; }
.announce-warning { border-left-color: var(--warn); }
.announce-warning > .icon { color: var(--warn); }
.announce-success { border-left-color: var(--ok); }
.announce-success > .icon { color: var(--ok); }

/* ---------- Rekening & pencairan ---------- */

.form-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.mono { font-family: var(--mono); font-weight: 500; }
.bank-line { font-size: 15px; }
.link-btn { padding: 0; border: 0; background: none; cursor: pointer; }

.wd-preview {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: var(--r);
  font-size: 14px;
}
.wd-preview div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; }
.wd-preview dt { color: var(--mute); }
.wd-preview dd { font-weight: 600; }
@media (min-width: 760px) { .wd-preview { max-width: calc(50% - 8px); } }

.wd-list > li {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.wd-list > li:last-child { border-bottom: 0; }
.wd-info { display: grid; gap: 14px; }
.wd-who { display: grid; gap: 8px; min-width: 0; }
.wd-bank,
.wd-money {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-radius: var(--r);
  font-size: 14px;
}
.wd-bank div,
.wd-money div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; }
.wd-bank dt,
.wd-money dt { color: var(--mute); }
.wd-bank dd,
.wd-money dd { display: flex; align-items: center; gap: 8px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.wd-money .rev-sum dd { font-size: 17px; }
.copy-inline {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--mute);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.copy-inline:hover { color: var(--text); border-color: var(--dim); }
.wd-actions { display: grid; gap: 8px; }
@media (min-width: 1000px) {
  .wd-info { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.8fr); align-items: start; }
  .wd-actions { grid-template-columns: 1fr 1fr; }
}

/* ---------- Transaksi, mutasi, webhook, akun ---------- */

.link-form { gap: 14px; }
.link-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.link-fields input {
  flex: 1 1 180px;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--r);
  outline: none;
}
.link-fields input:focus { border-color: var(--text); }
@media (min-width: 900px) {
  .link-form { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; }
}

.tx-head { display: grid; gap: 18px; }
.tx-total { margin: 10px 0 2px; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; }
.tx-actions { display: grid; gap: 10px; align-content: center; }
.tx-actions .key-box code { font-size: 13px; }
@media (min-width: 900px) { .tx-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; } }

.mutation-list li { grid-template-columns: minmax(0, 1fr) auto; }
.mut-amount { font-weight: 700; text-align: right; }
.mut-amount.is-in { color: var(--ok); }
.mut-after { grid-column: 2; color: var(--dim); font-size: 12px; text-align: right; }
@media (min-width: 640px) {
  .mutation-list li { grid-template-columns: minmax(0, 1fr) 140px 160px; }
  .mut-after { grid-column: auto; }
}

.settle-total { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
@media (min-width: 760px) { .settle-total { justify-self: end; } }

.wh-url { justify-self: start; max-width: 100%; overflow-wrap: anywhere; font-size: 12px; }
.event-checks { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.event-checks legend { margin-bottom: 8px; font-size: 14px; font-weight: 500; }
@media (min-width: 760px) { .event-checks { grid-template-columns: 1fr 1fr; } .event-checks legend { grid-column: 1 / -1; } }
.event-checks code { font-size: 11px; }

.check-form { display: grid; gap: 6px; justify-items: start; }
.inline-form { display: inline; margin-left: 6px; }
.flash-info { background: var(--surface); color: var(--text); border: 1px solid var(--line); }

.kyc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* Halaman bayar pembeli */
.pay { display: grid; gap: 4px; text-align: center; }
.pay-merchant { font-weight: 700; font-size: 15px; }
.pay-label { margin-top: 14px; color: var(--mute); font-size: 13px; }
.pay-amount { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.pay-desc { color: var(--mute); font-size: 14px; }
.pay-qr { margin: 18px auto 6px; width: 100%; max-width: 280px; padding: 14px; background: #fff; border-radius: 14px; color: #000; }
.pay-qr .qr-head { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.pay-qr .qr-img svg { width: 100%; height: auto; }
.pay-timer { color: var(--mute); font-size: 14px; }
.pay-steps {
  margin: 14px 0;
  padding: 14px 16px 14px 34px;
  background: var(--bg-alt);
  border-radius: var(--r);
  list-style: decimal;
  text-align: left;
  font-size: 14px;
  color: var(--mute);
}
.pay-steps li + li { margin-top: 4px; }
.pay-sim { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px dashed var(--warn); border-radius: var(--r); }
.pay-sim p { color: var(--warn); font-size: 13px; }
.pay-wait { margin-top: 12px; color: var(--dim); font-size: 13px; }
.pay-result { display: grid; gap: 4px; justify-items: center; margin: 22px 0 8px; padding: 22px; background: var(--bg-alt); border-radius: var(--r); }
.pay-result strong { font-size: 18px; }
.pay-result span { color: var(--mute); font-size: 14px; }
.pay-check {
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
}
.pay-check::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 15px;
  width: 18px;
  height: 9px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}
.pay-foot { margin-top: 14px; color: var(--dim); font-size: 12px; }

/* ---------- Dokumentasi ---------- */

.docs-layout { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 80px; }
.docs-layout > * { min-width: 0; }
@media (min-width: 960px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 48px; }
  .docs-nav { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; }
}

.docs-toc summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 10px 0; list-style: none; }
.docs-toc summary::-webkit-details-marker { display: none; }
.docs-toc summary::after { content: " +"; color: var(--mute); }
.docs-toc[open] summary::after { content: " −"; }
.docs-toc nav { display: grid; gap: 1px; padding-bottom: 8px; border-left: 1px solid var(--line); }
.docs-toc a { padding: 5px 12px; color: var(--mute); font-size: 14px; text-decoration: none; margin-left: -1px; border-left: 1px solid transparent; }
.docs-toc a:hover { color: var(--text); border-left-color: var(--text); }
.docs-toc .toc-3 { padding-left: 24px; font-size: 13px; }
@media (max-width: 959px) {
  .docs-toc { border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; }
}

.docs { max-width: 780px; }
.docs-head { display: grid; gap: 20px; margin-bottom: 8px; }
.ai-box {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.ai-box p { margin-top: 2px; color: var(--mute); font-size: 14px; }
.ai-box .key-box code { white-space: normal; font-family: var(--font); font-size: 14px; line-height: 1.5; }

.docs-body h2 {
  margin: 48px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
  font-size: 26px;
  letter-spacing: -0.02em;
}
.docs-body h3 { margin: 32px 0 10px; font-size: 18px; letter-spacing: -0.01em; }
.docs-body h2,
.docs-body h3 { scroll-margin-top: calc(var(--nav-h) + 16px); }
.docs-body .anchor { color: inherit; text-decoration: none; }
.docs-body :not(pre) > code { white-space: normal; overflow-wrap: anywhere; }
.docs-body .table td:first-child code { white-space: nowrap; }
.docs-body .anchor:hover::after { content: " #"; color: var(--dim); }
.docs-body > p:first-child { color: var(--mute); font-size: 17px; }
.docs-body p,
.docs-body li { max-width: 72ch; }
.docs-body ul,
.docs-body ol { margin: 0 0 14px; padding-left: 20px; list-style: disc; }
.docs-body ol { list-style: decimal; }
.docs-body li { margin: 4px 0; }
.docs-body hr { display: none; }
.docs-body .code-panel,
.docs-body .table-wrap { margin: 14px 0 18px; }
.docs-body .table td,
.docs-body .table th { white-space: normal; vertical-align: top; }
.docs-body .table td:first-child { white-space: nowrap; }
.docs-body .code-panel pre { margin: 0; border: 0; border-radius: 0; background: none; }

/* ---------- Admin: integrasi ---------- */
.integration-form { display: grid; gap: 18px; }
.field-wide { grid-column: 1 / -1; }
.field textarea { font-family: var(--mono); font-size: 12px; line-height: 1.5; resize: vertical; }
.src-tag { padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--line-soft); color: var(--dim); }
.src-panel { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.src-env { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.check-sm { font-size: 12px; gap: 8px; }
.check-sm input { width: 15px; height: 15px; }
.save-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding-top: 16px; border-top: 1px dashed var(--line); }
.save-row .field { flex: 1 1 220px; max-width: 320px; }
.doku-extra { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.doku-extra > .btn { justify-self: start; }
.sub-title { font-size: 15px; font-weight: 600; }
.doku-extra .code-panel pre { font-size: 11px; }
.log-list li { padding-inline: 0; }

/* ---------- Kontrol form seragam (ganti tampilan bawaan browser) ---------- */

/* Dropdown: panah tipis sendiri, warna ikut tema */
select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--mute) 50%),
    linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  text-overflow: ellipsis;
}
select:not([multiple]):hover { border-color: var(--dim); }
select:not([multiple]):focus { border-color: var(--text); }
select option { background: var(--bg); color: var(--text); }

/* Checkbox & radio */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0; /* jangan ikut padding input teks (.field input) */
  background: var(--field);
  border: 1.5px solid var(--dim);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
input[type="checkbox"] { border-radius: 5px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--on-accent);
  border-bottom: 2px solid var(--on-accent);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--on-accent);
  opacity: 0;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before { opacity: 1; }
input[type="checkbox"]:hover,
input[type="radio"]:hover { border-color: var(--text); }
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.check input { margin-top: 1px; }
.field [aria-invalid="true"][type="checkbox"] { border-color: var(--bad); }

/* Kotak upload file */
.field-label { font-size: 14px; font-weight: 500; }
.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--field);
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.file-drop:hover { border-color: var(--dim); }
.file-drop:focus-within { border-color: var(--text); border-style: solid; }
.file-drop.has-file { border-style: solid; border-color: var(--ok); }
/* Input asli tetap ada (validasi & keyboard), hanya disembunyikan secara visual */
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--mute);
}
.file-drop.has-file .file-icon { color: var(--ok); }
.file-text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.file-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-text small { color: var(--dim); font-size: 12px; }
.file-drop .btn { flex: none; pointer-events: none; }
@media (max-width: 420px) { .file-drop .btn { display: none; } }

/* Kolom pencarian: hilangkan tombol silang bawaan */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Penyempurnaan tampilan: tombol, input, badge ---------- */

/* Tombol: kedalaman halus, gerak kecil saat disentuh, cincin fokus jelas */
.btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s, color 0.15s;
}
.btn-sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn .icon { width: 16px; height: 16px; }

.btn-primary {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover { opacity: 1; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.btn-ghost {
  background: var(--field);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--dim); transform: translateY(-1px); }
.btn-inverse:hover { opacity: 1; transform: translateY(-1px); }
.btn:active { opacity: 1; transform: translateY(0) scale(0.985); box-shadow: none; }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.btn-danger { background: var(--field); border-color: var(--line); }
.btn-danger:hover { transform: translateY(-1px); }
.btn-danger-solid:hover { box-shadow: 0 6px 16px color-mix(in srgb, var(--bad) 35%, transparent); }
.btn:disabled,
.btn.is-loading { opacity: 0.5; transform: none; box-shadow: none; }

.icon-btn { transition: background-color 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--surface); color: var(--text); }

/* Input & dropdown: tinggi seragam, cincin fokus lembut */
.field { align-content: start; }
.form-grid { align-items: start; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
.filters input,
.filters select,
.link-fields input {
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.field textarea { height: auto; }
.field input:not([type="checkbox"]):not([type="radio"]):hover,
.field select:hover,
.field textarea:hover,
.filters input:hover,
.filters select:hover,
.link-fields input:hover { border-color: var(--dim); }
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus,
.filters input:focus,
.filters select:focus,
.link-fields input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent);
}
.field input::placeholder,
.field textarea::placeholder,
.filters input::placeholder,
.link-fields input::placeholder { color: var(--dim); opacity: 1; }
.field input:disabled,
.field select:disabled { background: var(--surface); color: var(--dim); cursor: not-allowed; }

/* Baris "buat link bayar" tidak patah: kolom input diberi ruang lebih */
.link-fields input { flex: 1 1 140px; }
.link-fields .btn { flex: none; }
@media (min-width: 900px) {
  .link-form { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
}
.filters .btn { height: 44px; }
.save-row .btn { height: 44px; }

/* Badge: bentuk pil, teks rata tengah */
.badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}
.key-actions { align-items: center; }

.file-drop { border-radius: 12px; }
.file-drop:hover { background: var(--surface); }

/* ---------- Perapihan admin: pencairan, kartu angka, daftar ---------- */

/* Pencairan: tombol Salin tidak patah; dua kolom di layar sedang, tiga di layar lebar */
.wd-bank dt,
.wd-money dt { flex: none; white-space: nowrap; }
.wd-bank dd,
.wd-money dd { min-width: 0; justify-content: flex-end; }
.wd-bank dd code { overflow-wrap: anywhere; }
.copy-inline {
  flex: none;
  white-space: nowrap;
  padding: 3px 9px;
  background: var(--field);
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.copy-inline:hover { background: var(--surface); }
@media (min-width: 1000px) {
  .wd-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wd-who { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}
@media (min-width: 1500px) {
  .wd-info { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.8fr); }
  .wd-who { grid-column: auto; grid-template-columns: none; align-items: start; }
}

/* Formulir aksi (setujui/tolak): tinggi, fokus, dan tombol seragam dengan input lain */
.kyc-form input {
  height: 36px;
  border-radius: 9px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kyc-form input:hover { border-color: var(--dim); }
.kyc-form input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent); }
.kyc-form .btn { flex: none; height: 36px; }

/* Kartu angka: nominal besar tidak terpecah baris */
.stat { min-width: 0; }
.stat-value {
  overflow-wrap: normal;
  white-space: nowrap;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
}
@media (max-width: 1099px) { .stat-value { font-size: clamp(1.1rem, 4.6vw, 1.5rem); } }

/* Daftar dua kolom (tanpa badge): nama panjang dipotong, tidak membungkus */
.tx-list-2 li { grid-template-columns: minmax(0, 1fr) auto; }
.tx-list-2 .tx-main strong,
.tx-list-2 .tx-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Verifikasi OTP ---------- */
.otp-email { color: var(--text); font-weight: 600; word-break: break-all; }
html .field input.otp-input {
  height: 64px;
  padding: 0 14px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-align: center;
}
.otp-input::placeholder { letter-spacing: 0.4em; }
.otp-resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-size: 14px; }

/* Ukuran ponsel dikunci (tidak lagi mengikuti isi): rasio tetap, isi yang menyesuaikan */
.phone { aspect-ratio: 310 / 608; }
.phone-screen { height: 100%; }
.phone-top { padding: 10px 16px; }
.chat { flex: 1; min-height: 0; align-content: center; gap: 7px; padding: 9px 12px; overflow: hidden; }
.chat-day { margin-bottom: 0; padding: 2px 9px; font-size: 10.5px; }
.bubble { padding: 8px 12px; font-size: 13px; }
.bubble-qr { padding: 9px; }
.bubble-qr > p { padding: 0 3px; }
.bubble-qr .qr-card { margin-top: 7px; padding: 8px 10px 6px; }
.qr-top { margin-bottom: 6px; }
.bubble-qr .qr-img { width: 128px; margin: 0 auto; }
.qr-foot { gap: 8px; margin-top: 6px; padding-top: 5px; }
.phone-input { padding: 6px 12px 20px; }
.input-field { padding: 6px 14px; }
.input-send { width: 30px; height: 30px; }

/* Layar sangat sempit: ponsel mengecil, jadi buang detail kecil supaya chat tetap muat */
@media (max-width: 340px) {
  .qr-foot { display: none; }
  .bubble-qr .qr-img { width: 92px; }
  .bubble { font-size: 12.5px; }
}

/* Kartu saldo samping (Tertunda / Proses): sama tinggi, label tidak membungkus, angka rata bawah */
.balance-side div { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; min-height: 76px; }
.balance-side dt { white-space: nowrap; }
.balance-side dd { margin-top: 0; }

/* Aturan pencairan: label kecil rapi, menggantikan kalimat panjang */
.wd-rules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wd-rules li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg-alt);
  font-size: 12.5px;
  line-height: 1.3;
}
.wd-rules span { color: var(--mute); }
.wd-rules strong { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
