/* AONCASH deposit — phone-first, light theme. Tokens first; components below. */
:root {
  color-scheme: light;
  /* AONCASH site theme (aonplus header, 2026-10-04): crimson bar #C80003 →
     #A90003, maroon nav #7E0002, light grey #EEEEF0. */
  --bg: #EEEEF0;
  --surface: #FFFFFF;
  --ink: #1D1D22;
  --ink-2: #3E3E47;
  --muted: #696975;
  --line: #DCDCE2;
  --line-strong: #BCBCC6;

  --brand-top: #C80003;
  --brand-bottom: #A90003;
  --brand-deep: #7E0002;

  --accent: #C00003;
  --accent-hover: #970002;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCEBEB;

  --slip: #7E0002;
  --slip-line: #9A2426;
  --slip-text: #FFF7F7;
  --slip-muted: #F2BDBE;
  --slip-pill: #FFFFFF;

  --ok: #0B7A47;
  --ok-soft: #E2F4EA;
  --bad: #B42318;
  --bad-soft: #FDEDEB;
  --warn: #855000;
  --warn-soft: #FFF3D9;

  --r-card: 20px;
  --r-field: 14px;
  --r-btn: 14px;
  --r-pill: 999px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Roboto Mono", "SFMono-Regular", "Droid Sans Mono", Menlo, Consolas, monospace;

  --gutter: 16px;
  --kb: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.45; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gutter) calc(112px + env(safe-area-inset-bottom));
}

/* ---------- header + segment bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 17px; margin-bottom: 16px;
  /* full-bleed AON bar: crimson gradient ending in the maroon nav strip */
  border-image: linear-gradient(var(--brand-top) 0, var(--brand-bottom) calc(100% - 5px), var(--brand-deep) calc(100% - 5px)) fill 0 // 0 100vmax;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #FFFFFF; text-decoration: none; min-height: 44px; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: #FFFFFF; color: var(--brand-top);
  font-weight: 800; font-size: 17px; letter-spacing: -.02em;
}
.brand-word { font-weight: 800; font-size: 19px; letter-spacing: .06em; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand.has-logo .brand-mark, .brand.has-logo .brand-word { display: none; }
.top-title { font-size: 15px; font-weight: 700; color: #FFFFFF; }
.top :focus-visible { outline-color: #FFFFFF; }

.steps ol { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps li { display: flex; flex-direction: column; gap: 7px; }
.seg-bar { height: 4px; border-radius: 4px; background: var(--line); transition: background-color .3s var(--ease); }
.seg-lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.steps li[data-s="done"] .seg-bar { background: var(--accent); }
.steps li[data-s="active"] .seg-bar { background: var(--accent); }
.steps li[data-s="active"] .seg-lbl { color: var(--ink); font-weight: 700; }
.steps li[data-s="done"] .seg-lbl { color: var(--ink-2); }
.steps li[data-s="ok"] .seg-bar { background: var(--ok); }
.steps li[data-s="ok"] .seg-lbl { color: var(--ok); font-weight: 700; }

/* ---------- cards ---------- */
main { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.card[data-state="hidden"] { display: none; }
.card .sum { display: none; }
.card[data-state="done"] { border-radius: var(--r-field); }
.card[data-state="done"] .body { display: none; }
.card[data-state="done"] .sum {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; min-height: 60px;
}
.card[data-state="open"] .body { padding: 22px 18px 20px; animation: open .28s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(6px); } }

.sum-check {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C00003' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.sum-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sum-lbl { font-size: 13px; color: var(--muted); }
.sum-val { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

h2 { font-size: 21px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; margin-bottom: 16px; }
h2:focus { outline: none; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type="text"] {
  width: 100%; min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-field);
  background: var(--surface);
  font-size: 17px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]::placeholder { color: #8E8E99; font-weight: 500; }
input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--bad) !important; }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--bad-soft) !important; }

.amount-box {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 16px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-field);
  transition: border-color .15s, box-shadow .15s;
}
.amount-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.amount-box.invalid { border-color: var(--bad); }
.amount-box.invalid:focus-within { box-shadow: 0 0 0 4px var(--bad-soft); }
.amount-rp { font-size: 22px; font-weight: 700; color: var(--muted); }
.amount-box input[type="text"] {
  border: 0; box-shadow: none !important; padding: 0; min-height: 48px;
  font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.amount-box input::placeholder { color: #BCBCC6; }

.hint { font-size: 14px; color: var(--muted); }
.hint.is-error, .field-err { color: var(--bad); font-weight: 600; font-size: 14px; }
.field-err { margin-top: 2px; }

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.chip {
  min-height: 46px; padding: 8px 4px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface);
  font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums;
  transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- identity ---------- */
.identity {
  display: flex; gap: 14px; align-items: center;
  padding: 16px; margin-bottom: 10px;
  background: var(--bg); border-radius: 16px;
}
.id-avatar {
  flex: none; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 19px;
}
.id-lines { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.id-name { font-size: 20px; font-weight: 800; letter-spacing: .04em; word-break: break-all; }
.id-sub { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.id-user { font-size: 14px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  border: 0; border-radius: var(--r-btn);
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active:not(:disabled) { transform: scale(.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { background: #C9C9D1; color: #F7F7F9; cursor: not-allowed; }
.btn-outline { background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent); }
.btn-ghost { background: transparent; color: var(--accent); width: 100%; }
.btn-ghost:hover { background: var(--accent-soft); }
.link-btn {
  min-height: 44px; min-width: 44px; padding: 0 12px;
  background: none; border: 0; border-radius: 10px;
  color: var(--accent); font-weight: 700; font-size: 15px;
}
.link-btn:hover { background: var(--accent-soft); }
.link-btn.danger { color: var(--bad); padding: 0; min-height: 36px; text-align: left; }
.link-btn.danger:hover { background: none; text-decoration: underline; }

.pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill);
  background: var(--slip-pill); color: var(--slip);
  font-weight: 700; font-size: 14px;
  position: relative;
}
.pill::after { content: ""; position: absolute; inset: -4px; } /* 44px hit area */
.pill { min-width: 92px; justify-content: center; }
.pill.copied { background: var(--ok-soft); color: var(--ok); }
.nowrap { white-space: nowrap; }
.pill-light { background: var(--accent-soft); color: var(--accent); }

/* ---------- destination slip (the one bold element) ---------- */
.slip {
  background: var(--slip); color: var(--slip-text);
  border-radius: 18px;
  padding: 6px 18px 16px;
}
.slip-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--slip-line); }
.slip-lbl { font-size: 13px; color: var(--slip-muted); }
.slip-bank { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.slip-holder { font-size: 16px; font-weight: 600; }
.slip-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.slip-row:has(.pill) { padding-top: 8px; }
.slip-num { font-size: 27px; font-weight: 700; letter-spacing: .02em; word-spacing: -.3em; line-height: 1.25; white-space: nowrap; }
/* app.js fitAcct() shrinks it to the room; .wrap = last resort, breaks between digit groups */
.slip-num.wrap { white-space: normal; }
.slip-amount { border-bottom: 0; }
.slip-amt { font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.slip-valid {
  margin-top: 4px; padding: 9px 12px;
  border-radius: 10px; background: var(--slip-line);
  font-size: 14px; color: var(--slip-text);
}
.slip-valid.expired { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.slip-valid .link-btn { color: inherit; text-decoration: underline; padding: 0; min-height: 0; min-width: 0; }
.slip-valid .link-btn:hover { background: none; }
.slip .pill:focus-visible { outline-color: var(--slip-pill); }

.callouts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.callouts li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border-radius: 12px;
  background: var(--warn-soft); color: #5A3700;
  font-size: 15px; font-weight: 600; line-height: 1.4;
}
.callouts svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--warn); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note { margin-top: 10px; font-size: 14px; color: var(--ink-2); padding: 0 2px; }

/* ---------- receipt ---------- */
.receipt { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.tile, .thumb { flex: none; width: 76px; height: 76px; border-radius: 14px; }
.tile {
  display: grid; place-items: center;
  border: 1.5px dashed var(--line-strong); background: var(--bg);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.tile svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.receipt:focus-within .tile { outline: 3px solid var(--accent); outline-offset: 2px; }
.thumb { overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.receipt-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
.receipt-title { font-weight: 700; font-size: 15px; }
.receipt-title .muted { font-weight: 500; }
.receipt-file { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- notices ---------- */
.notice {
  margin-top: 14px; padding: 13px 14px;
  border-radius: 12px; font-size: 15px; line-height: 1.45;
  background: var(--bad-soft); color: #7A1A12;
}
.notice[data-tone="info"] { background: var(--accent-soft); color: var(--ink); }
.notice[data-tone="warn"] { background: var(--warn-soft); color: #5A3700; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.notice-actions .btn { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.notice .btn-outline { border-color: currentColor; color: inherit; background: transparent; }

/* ---------- status ---------- */
.st-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.st-head h2 { margin-bottom: 4px; }
.st-sub { color: var(--ink-2); font-size: 15px; }
.st-icon {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft);
  background-position: center; background-repeat: no-repeat; background-size: 26px;
}
.st-head[data-tone="wait"] .st-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C00003' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
}
.st-head[data-tone="ok"] .st-icon {
  background-color: var(--ok);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  animation: pop .45s var(--ease);
}
.st-head[data-tone="bad"] .st-icon {
  background-color: var(--bad-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B42318' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
}
.st-head[data-tone="warn"] .st-icon {
  background-color: var(--warn-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23855000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17v.01'/%3E%3C/svg%3E");
}
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } }

.timeline { list-style: none; margin: 0 0 18px; padding: 0; }
.timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 8px; top: 20px; bottom: -2px; width: 2px;
  background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline li[data-s="done"]::before { background: var(--accent); }
.tl-dot {
  flex: none; position: relative; z-index: 1; margin-top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--surface);
}
.timeline li > div { display: flex; flex-direction: column; line-height: 1.35; }
.tl-title { font-weight: 700; font-size: 15px; color: var(--muted); }
.tl-meta { font-size: 14px; color: var(--muted); }
.timeline li[data-s="done"] .tl-dot { border-color: var(--accent); background: var(--accent); }
.timeline li[data-s="done"] .tl-title,
.timeline li[data-s="active"] .tl-title { color: var(--ink); }
.timeline li[data-s="active"] .tl-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 1.8s ease-in-out infinite; }
.timeline li[data-s="ok"] .tl-dot { border-color: var(--ok); background: var(--ok); }
.timeline li[data-s="ok"] .tl-title { color: var(--ok); }
.timeline li[data-s="bad"] .tl-dot { border-color: var(--bad); background: var(--bad); }
.timeline li[data-s="bad"] .tl-title { color: var(--bad); }
.timeline li[data-s="warn"] .tl-dot { border-color: var(--warn); background: var(--warn-soft); }
.timeline li[data-s="warn"] .tl-title { color: var(--warn); }
.timeline li[data-s="bad"] .tl-meta { color: var(--ink-2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(192, 0, 3, .12); } }

.facts { margin: 0 0 16px; padding: 4px 14px; background: var(--bg); border-radius: 14px; }
.facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: 14px; color: var(--muted); flex: none; }
.facts dd { margin: 0; text-align: right; font-weight: 700; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.fact-ref dd { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }

.st-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.st-actions .btn { width: 100%; }

.safe {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px; border-radius: 14px; border: 1px dashed var(--line-strong);
  font-size: 15px; color: var(--ink-2);
}
.safe strong { color: var(--ink); }
.st-conn { margin-top: 10px; }

/* ---------- sticky CTA ---------- */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(238, 238, 240, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(calc(-1 * var(--kb)));
}
.cta-bar[hidden] { display: none !important; }
.btn-cta { display: flex; width: 100%; max-width: 448px; margin: 0 auto; min-height: 54px; font-size: 17px; }
.btn[aria-busy="true"] .cta-label::before {
  content: ""; display: inline-block; vertical-align: -3px; margin-right: 10px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 30;
  bottom: calc(96px + env(safe-area-inset-bottom) + var(--kb));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px;
  white-space: nowrap; max-width: calc(100vw - 32px);
  transition: opacity .2s, transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.no-cta .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
body.no-cta .shell { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }

@media (max-width: 359px) {
  .chip { font-size: 13.5px; }
  .slip-num, .slip-amt { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
