/* Kaban Penguji -- shared styles for /daftar and /p/<token>. Colours and sizes from the Claude Design mockup
   "Kaban Penguji — Tester Chat Mockup". Mobile first (Redmi / Android Chrome, then iPhone Safari). */
:root {
  --ink: #141A26; --navy: #1E2A44; --bg: #F3F4F6; --card: #FFFFFF; --border: #E3E6EB; --line: #D1D5DB; --muted: #5B6475;
  --light: #C9CFDA; --teal: #0F766E; --teal-bg: #E6F4F1; --teal-dark: #0B5A54; --teal-soft: #CCEDE7;
  --clay: #C2410C; --clay-bg: #FDEDE4; --clay-line: #F6C9AE; --clay-dark: #9A3412; --orange: #F97316; --red: #EF4444; --red-dark: #B91C1C;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--clay); } a:hover { color: var(--clay-dark); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100%; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); position: relative; overflow: hidden; }

/* ---------- header ---------- */
.bar { height: 64px; flex-shrink: 0; padding: 0 16px; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; }
.bar .who { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.bar .name { font-size: 16px; font-weight: 700; }
.bar .sub { font-size: 12px; color: var(--light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-chip { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 22px; background: var(--teal); color: #fff;
  border: none; font-size: 15px; font-weight: 700; cursor: pointer; }
.avatar { flex-shrink: 0; }

/* ---------- daftar ---------- */
.hero { flex-shrink: 0; padding: 20px 20px 22px; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 10px; }
.hero .brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.hero h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.25; }
.hero p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--light); }
.form { flex-grow: 1; overflow-y: auto; padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.verified { display: flex; align-items: center; gap: 10px; background: var(--teal-bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--teal-dark); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .legend { font-size: 14px; font-weight: 700; }
.legend .opt, .field .opt { font-weight: 500; color: var(--muted); }
.help { font-size: 12px; color: var(--muted); }
.input, .select { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 0 14px; font-size: 16px; color: var(--ink); min-width: 0; width: 100%; }
.select { padding: 0 10px; }
.input:focus, .select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
fieldset { margin: 0; padding: 0; border: none; display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { border: 2px solid var(--clay); background: var(--clay-bg); color: var(--clay-dark); font-weight: 700; padding: 0 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tick { display: flex; gap: 10px; align-items: flex-start; }
.tick input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--teal); }
.tick label { font-size: 14px; line-height: 1.45; }
.tick.opt label { color: var(--muted); }
.btn { min-height: 52px; border-radius: 14px; border: none; background: var(--teal); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; padding: 0 18px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.err { color: var(--red-dark); font-size: 13px; font-weight: 600; }
.panel { margin: auto 0; display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; padding: 8px 4px; }
.panel h2 { margin: 0; font-size: 20px; font-weight: 800; }
.panel p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.status-pill { align-self: center; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 12px; background: var(--teal-bg); color: var(--teal-dark); }

/* ---------- chat ---------- */
.chat { flex-grow: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.day { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted); background: #E5E7EB; padding: 4px 10px; border-radius: 10px; }
.b { max-width: 82%; font-size: 15px; line-height: 1.45; padding: 10px 14px; overflow-wrap: anywhere; }
.b.k { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; }
.b.me { align-self: flex-end; background: var(--navy); color: #fff; border-radius: 16px 4px 16px 16px; }
.b strong.money { color: var(--teal); }
.task { align-self: flex-start; width: min(300px, 86%); background: var(--clay-bg); border: 1px solid var(--clay-line); border-radius: 4px 16px 16px 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.task .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task .label { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--clay-dark); }
.task .pay { font-size: 12px; font-weight: 700; color: var(--teal); background: #fff; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.task .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.task .tag { font-size: 12px; font-weight: 700; color: #fff; background: var(--clay-dark); padding: 3px 8px; border-radius: 8px; }
.task .text { font-size: 17px; font-weight: 700; line-height: 1.35; }
.task .hint { font-size: 13px; color: var(--muted); }
.task.small .text { font-size: 15px; }
.clipb { align-self: flex-end; max-width: 86%; background: var(--navy); color: #fff; border-radius: 16px 4px 16px 16px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.clipb .play { width: 32px; height: 32px; flex-shrink: 0; border-radius: 16px; border: none; background: #fff; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.clipb .bars { display: flex; align-items: center; gap: 3px; flex: 0 1 auto; height: 28px; overflow: hidden; }
.clipb .bars i { display: block; width: 3px; border-radius: 2px; background: var(--light); }
.clipb .dur { font-size: 12px; color: var(--light); flex-shrink: 0; }
.clipb.queued { opacity: .7; }
.heard { align-self: flex-start; width: min(300px, 86%); background: #fff; border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.heard .cap { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.heard .txt { font-size: 16px; font-weight: 600; line-height: 1.4; }
.heard .row { display: flex; gap: 8px; }
.vbtn { flex: 1; min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--muted); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.vbtn.betul.on { border-color: var(--teal); background: var(--teal); color: #fff; }
.vbtn.salah.on { border-color: var(--clay); background: var(--clay); color: #fff; }
.more { position: relative; }
.more > button { width: 32px; height: 32px; border: none; background: transparent; border-radius: 16px; cursor: pointer; color: var(--muted); }
.more .menu { position: absolute; right: 0; top: 34px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 20px rgba(20,26,38,.12); z-index: 5; min-width: 160px; }
.more .menu button { display: block; width: 100%; min-height: 44px; border: none; background: none; text-align: left; padding: 0 14px; font-size: 15px; cursor: pointer; }
.pill { align-self: center; font-size: 13px; font-weight: 700; color: var(--teal); background: var(--teal-bg); padding: 6px 12px; border-radius: 12px; }
.pill.warn { color: var(--clay-dark); background: var(--clay-bg); }
.consent { align-self: flex-start; width: min(320px, 90%); background: #fff; border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.consent .h { font-size: 15px; font-weight: 800; }
.consent .btn { min-height: 48px; border-radius: 12px; }

.quick { flex-shrink: 0; display: flex; gap: 8px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick button { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.quick button:first-child { border-color: var(--clay-line); color: var(--clay-dark); font-weight: 700; }
.queue-note { flex-shrink: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--clay-dark); background: var(--clay-bg); padding: 6px 12px; }
.fixstrip { flex-shrink: 0; padding: 8px 16px; background: var(--clay-bg); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fixstrip span { font-size: 13px; font-weight: 700; color: var(--clay-dark); }
.fixstrip button { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--clay-dark); background: none; border: none; cursor: pointer; }

.inputbar { flex-shrink: 0; padding: 10px 12px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.inputbar.fixing { align-items: flex-end; }
.msg { flex-grow: 1; min-width: 0; height: 48px; border-radius: 24px; border: 1px solid var(--line); background: var(--bg); padding: 0 16px; font-size: 16px; color: var(--ink); }
.fix { flex-grow: 1; min-width: 0; border-radius: 20px; border: 2px solid var(--clay); background: #fff; padding: 12px 16px; font-size: 16px; line-height: 1.4; color: var(--ink); resize: none; }
.round { width: 56px; height: 56px; flex-shrink: 0; border-radius: 28px; border: none; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.round.mic { background: var(--clay); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.round.mic:disabled { background: var(--line); cursor: default; }
.round.send { background: var(--teal); }
.round.mic.rec { width: 76px; height: 76px; border-radius: 38px; box-shadow: 0 0 0 10px var(--clay-bg); }
.cancel-hint { flex-grow: 1; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--muted); }
.cancel-hint.armed { color: var(--red-dark); }

.recpanel { align-self: stretch; background: var(--ink); color: #fff; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.recpanel .t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.recpanel .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--red); animation: blink 1s steps(2) infinite; }
.recpanel .wave { display: flex; align-items: center; gap: 4px; height: 56px; }
.recpanel .wave i { display: block; width: 4px; border-radius: 2px; background: var(--orange); height: 4px; }
.recpanel .h { font-size: 13px; color: var(--light); text-align: center; }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .recpanel .dot { animation: none; } }

.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 30; max-width: 90%; text-align: center; }

/* ---------- wallet sheet ---------- */
.sheet-back { position: absolute; inset: 0; background: var(--ink); z-index: 20; display: flex; flex-direction: column; }
.sheet { margin-top: 56px; flex-grow: 1; min-height: 0; background: #fff; border-radius: 24px 24px 0 0; padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.grab { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line); flex-shrink: 0; }
.sheet .head { display: flex; justify-content: space-between; align-items: center; }
.sheet h1 { margin: 0; font-size: 20px; font-weight: 800; }
.sheet h2 { margin: 0 0 6px; font-size: 15px; font-weight: 800; }
.x { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 22px; background: var(--bg); border: none; cursor: pointer; }
.big { background: var(--teal); color: #fff; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.big .l { font-size: 13px; font-weight: 600; color: var(--teal-soft); }
.big .v { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.big .s { font-size: 13px; color: var(--teal-soft); }
.big .track { height: 8px; border-radius: 4px; background: var(--teal-dark); margin-top: 8px; overflow: hidden; }
.big .track i { display: block; height: 8px; border-radius: 4px; background: #fff; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); }
.tile.pend { background: var(--clay-bg); }
.tile .l { font-size: 12px; font-weight: 700; color: var(--muted); }
.tile.pend .l { color: var(--clay-dark); }
.tile .v { font-size: 20px; font-weight: 800; }
.tile .s { font-size: 12px; color: var(--muted); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .top { display: flex; justify-content: space-between; font-size: 13px; }
.meter .top b { font-weight: 700; } .meter .top span { color: var(--muted); }
.meter .track { height: 6px; border-radius: 3px; background: #E5E7EB; overflow: hidden; }
.meter .track i { display: block; height: 6px; background: var(--clay); }
.nextpay { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.nextpay .t { font-size: 14px; font-weight: 700; } .nextpay .s { font-size: 12px; color: var(--muted); }
.preview { background: var(--clay-bg); color: var(--clay-dark); border-radius: 14px; padding: 12px 14px; font-size: 13px; font-weight: 700; line-height: 1.45; }
.hist { display: flex; flex-direction: column; }
.hist .r { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F0F1F3; }
.hist .r:last-child { border-bottom: none; }
.hist .w { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hist .n { font-size: 14px; font-weight: 600; }
.hist .st { font-size: 12px; color: var(--muted); }
.hist .st.ok { color: var(--teal); font-weight: 600; } .hist .st.no { color: var(--red-dark); font-weight: 600; }
.hist .amt { font-size: 14px; font-weight: 700; color: var(--clay-dark); white-space: nowrap; }
.hist .amt.ok { color: var(--teal); } .hist .amt.no { color: var(--muted); }
.duitnow { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
