/* Tampilan pelanggan: gaya WhatsApp, warna biru muda & putih, khusus HP. */
:root {
  --primary: #1a9be8;
  --primary-press: #0f86cf;
  --primary-soft: #e3f3fd;
  --wall: #e9f5fd;
  --wall-doodle: #cfe7f8;
  --out: #d3ecfd;
  --in: #ffffff;
  --ink: #111b21;
  --muted: #667781;
  --line: #e4ebf0;
  --tick: #8696a0;
  --tick-read: #1a8fe0;
  --danger: #e53935;
  --sys: #fffbe8;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: #dbeaf5; color: var(--ink);
  font: 15.5px/1.38 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font-size: 16px; } /* cegah zoom otomatis di iPhone */
[hidden] { display: none !important; }
svg { display: block; }

/* Dikunci di layar (fixed): tinggi & posisi disesuaikan JS mengikuti keyboard
   iPhone, supaya header tidak terdorong keluar saat mengetik. */
.app {
  position: fixed; top: 0; left: 0; right: 0; height: 100dvh; max-width: 480px; margin: 0 auto;
  background: #fff; overflow: hidden; display: flex; flex-direction: column;
}
@media (min-width: 520px) { .app { box-shadow: 0 0 40px rgba(26,155,232,.18); } }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }

/* ---------- verifikasi (login) ---------- */
.verify { padding: calc(28px + env(safe-area-inset-top)) 28px calc(24px + env(safe-area-inset-bottom)); align-items: center; text-align: center; }
.verify h1 { color: var(--primary); font-size: 20px; font-weight: 600; margin: 8px 0 14px; }
.verify p { margin: 0 0 6px; color: var(--ink); font-size: 14.5px; }
.verify .muted { color: var(--muted); font-size: 13.5px; }
.verify .link { color: var(--primary); font-weight: 500; }
.verify .grow { flex: 1; }
.big-logo {
  width: 84px; height: 84px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 30px; margin: 10px auto 6px;
  box-shadow: 0 6px 20px rgba(26,155,232,.35);
}
.uline {
  width: 100%; max-width: 300px; margin: 18px auto 0; display: flex; align-items: flex-end; gap: 12px;
}
.uline .cc { width: 64px; border-bottom: 2px solid var(--primary); padding: 6px 0; font-size: 17px; color: var(--ink); }
.uline input {
  flex: 1; min-width: 0; border: 0; border-bottom: 2px solid var(--primary); outline: none; padding: 6px 2px;
  font-size: 17px; background: transparent; text-align: left;
}
.uline input.center { text-align: center; }
.otp-boxes { letter-spacing: 14px; font-size: 26px !important; text-align: center !important; font-weight: 500; padding-left: 14px !important; }
.err { color: var(--danger); font-size: 13.5px; min-height: 20px; margin: 10px 0 0; }
.dev { background: var(--sys); border-radius: 8px; padding: 6px 10px; font-size: 13px; margin: 12px auto 0; color: #7a5b00; }
.pill-btn {
  background: var(--primary); color: #fff; font-weight: 600; font-size: 15px;
  border-radius: 999px; padding: 11px 30px; min-width: 140px;
}
.pill-btn:active { background: var(--primary-press); }
.pill-btn:disabled { opacity: .5; }
.switch { margin-top: 18px; color: var(--primary); font-weight: 500; font-size: 14px; }
.consent { font-size: 12px; color: var(--muted); margin-top: 18px; max-width: 300px; }

/* ---------- header ---------- */
.bar {
  background: var(--primary); color: #fff; display: flex; align-items: center; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 6px 8px 10px; min-height: 56px; flex: none; z-index: 5;
}
.bar .ibtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.bar .ibtn:active { background: rgba(255,255,255,.18); }
.bar .ibtn svg { width: 22px; height: 22px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--primary);
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none;
}
.bar .title { flex: 1; min-width: 0; padding-left: 4px; text-align: left; color: #fff; }
.bar .title b { display: block; font-size: 16.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .title small { display: block; font-size: 12.5px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar input.search {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: #fff; font-size: 17px; padding: 6px 4px;
}
.bar input.search::placeholder { color: rgba(255,255,255,.75); }
.bar .count { flex: 1; font-size: 19px; font-weight: 500; padding-left: 8px; }

.menu {
  position: absolute; top: calc(52px + env(safe-area-inset-top)); right: 8px; z-index: 20; background: #fff; border-radius: 10px;
  box-shadow: 0 6px 28px rgba(0,0,0,.18); padding: 6px 0; min-width: 210px; animation: pop .14s ease-out;
}
.menu button { display: block; width: 100%; text-align: left; padding: 12px 20px; font-size: 15px; }
.menu button:active { background: var(--primary-soft); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
.scrim { position: absolute; inset: 0; z-index: 15; }

/* ---------- area chat ---------- */
.wall {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px 10px; position: relative;
  background-color: var(--wall);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='%23cfe7f8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 40c8-2 14-8 18-16 4 4 10 6 16 6 2 6 0 10-4 12H18c-4 0-6-1-4-2z'/%3E%3Ccircle cx='118' cy='30' r='9'/%3E%3Cpath d='M96 92l6 12 13 2-9 9 2 13-12-6-12 6 2-13-9-9 13-2z'/%3E%3Cpath d='M30 120q10-12 20 0t20 0'/%3E%3Cpath d='M126 128c10-2 16-8 20-16 4 4 9 6 14 6'/%3E%3Ccircle cx='60' cy='78' r='3'/%3E%3Ccircle cx='146' cy='70' r='3'/%3E%3C/svg%3E");
}
.day { display: table; margin: 10px auto 8px; background: #fff; color: var(--muted); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.sysmsg {
  display: table; margin: 6px auto 10px; max-width: 88%; background: var(--sys); color: #54656f; text-align: center;
  font-size: 13px; padding: 6px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); white-space: pre-wrap;
}

.row { display: flex; margin: 1px 0; position: relative; }
.row.out { justify-content: flex-end; }
.row.first { margin-top: 8px; }
.row.selected::before { content: ""; position: absolute; inset: -1px -10px; background: rgba(26,155,232,.18); }
.row.hit .bubble { outline: 2px solid #ffd54f; }
.bubble {
  position: relative; max-width: 82%; padding: 6px 8px 8px 9px; border-radius: 8px; background: var(--in);
  box-shadow: 0 1px .5px rgba(11,20,26,.13); word-wrap: break-word; overflow-wrap: anywhere; transition: transform .15s;
}
.row.out .bubble { background: var(--out); }
.row.first.in .bubble { border-top-left-radius: 0; }
.row.first.out .bubble { border-top-right-radius: 0; }
.row.first.in .bubble::before, .row.first.out .bubble::before {
  content: ""; position: absolute; top: 0; width: 8px; height: 13px;
}
.row.first.in .bubble::before { left: -8px; background: var(--in); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.row.first.out .bubble::before { right: -8px; background: var(--out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.text { white-space: pre-wrap; }
.ai-label { font-size: 11.5px; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.meta {
  float: right; margin: 6px 0 -6px 12px; font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px;
  position: relative; top: 2px;
}
.tick { width: 16px; height: 11px; color: var(--tick); }
.tick.read { color: var(--tick-read); }
.clock { width: 12px; height: 12px; color: var(--tick); }

/* media di dalam bubble */
.bubble.media { padding: 3px 3px 6px; }
.bubble.media .text { padding: 4px 6px 0; }
.bubble.media .meta { margin-right: 4px; }
.photo { display: block; width: 260px; max-width: 100%; max-height: 340px; object-fit: cover; border-radius: 6px; background: var(--primary-soft); }
.bubble.media.only { padding-bottom: 3px; }
.bubble.media.only .meta {
  position: absolute; right: 8px; bottom: 7px; margin: 0; color: #fff; top: auto;
  text-shadow: 0 0 4px rgba(0,0,0,.5);
}
.bubble.media.only .meta .tick:not(.read), .bubble.media.only .meta .clock { color: #fff; }
.doc { display: flex; align-items: center; gap: 10px; padding: 10px; background: rgba(17,27,33,.05); border-radius: 6px; text-decoration: none; color: inherit; min-width: 220px; }
.doc .ficon { width: 32px; height: 38px; border-radius: 4px; background: #e53935; color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: end center; padding-bottom: 5px; flex: none; }
.doc .ficon.other { background: var(--primary); }
.doc b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.doc small { color: var(--muted); font-size: 12px; }

.voice { display: flex; align-items: center; gap: 10px; width: 240px; max-width: 100%; padding: 4px 2px 0; }
.voice .play { width: 34px; height: 34px; color: var(--muted); flex: none; display: grid; place-items: center; }
.voice .play svg { width: 26px; height: 26px; }
.voice .track { flex: 1; height: 4px; background: #c5d3dc; border-radius: 2px; position: relative; }
.voice .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--primary); border-radius: 2px; }
.voice .knob { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); transform: translate(-50%, -50%); left: 0; }
.voice .dur { font-size: 11px; color: var(--muted); position: absolute; left: 46px; bottom: -2px; }
.voice-wrap { position: relative; padding-bottom: 8px; }
.voice .mic { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.voice .mic svg { width: 20px; height: 20px; }

.quote {
  display: block; width: 100%; text-align: left; background: rgba(17,27,33,.05); border-left: 4px solid var(--primary);
  border-radius: 6px; padding: 5px 8px; margin-bottom: 5px; font-size: 13.5px; color: var(--muted);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.quote b { display: block; color: var(--primary); font-size: 13px; font-weight: 600; }
.row.out .quote { border-left-color: #0f86cf; }
.flash .bubble { animation: flash 1.2s; }
@keyframes flash { 30% { box-shadow: 0 0 0 6px rgba(26,155,232,.35); } }

.fab-down {
  position: absolute; right: 12px; bottom: 84px; width: 42px; height: 42px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); display: grid; place-items: center; color: var(--muted); z-index: 4;
}
.fab-down svg { width: 22px; height: 22px; }
.fab-down .badge { position: absolute; top: -6px; right: -2px; }
.badge { background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; min-width: 20px; text-align: center; }

/* ---------- penulisan pesan ---------- */
.dock { flex: none; background: transparent; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 4px; background: var(--wall); }
.replybar {
  margin: 0 52px 0 0; background: #fff; border-radius: 18px 18px 0 0; padding: 6px 6px 0; display: flex; gap: 6px; align-items: flex-start;
}
.replybar .quote { margin: 0; flex: 1; }
.replybar + .composer .field { border-top-left-radius: 0; border-top-right-radius: 0; }
.composer { display: flex; align-items: flex-end; gap: 6px; }
.field {
  flex: 1; min-width: 0; background: #fff; border-radius: 24px; display: flex; align-items: flex-end;
  box-shadow: 0 1px .5px rgba(11,20,26,.13); padding: 0 4px 0 14px; min-height: 48px;
}
.field textarea {
  flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent;
  padding: 13px 0; max-height: 120px; line-height: 22px; height: 48px;
}
.field .ibtn { width: 40px; height: 48px; display: grid; place-items: center; color: var(--muted); flex: none; }
.field .ibtn svg { width: 23px; height: 23px; }
.round {
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.round:active { background: var(--primary-press); }
.round svg { width: 22px; height: 22px; }
.rec { flex: 1; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 24px; min-height: 48px; padding: 0 8px 0 16px; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
.rec .time { flex: 1; font-variant-numeric: tabular-nums; }
.rec .ibtn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
@keyframes blink { 50% { opacity: .2; } }

/* lembar lampiran */
.sheet {
  position: absolute; left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 20; background: #fff;
  border-radius: 16px; box-shadow: 0 6px 28px rgba(0,0,0,.18); padding: 22px 12px 14px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 6px; animation: rise .16s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.sheet button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sheet .circle { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.sheet .circle svg { width: 24px; height: 24px; }

/* pratinjau sebelum kirim */
.preview { background: #0b141a; color: #fff; z-index: 30; }
.preview .bar { background: transparent; }
.preview .stage { flex: 1; display: grid; place-items: center; padding: 10px; min-height: 0; }
.preview .stage img, .preview .stage video { max-width: 100%; max-height: 100%; border-radius: 4px; }
.preview .stage .doc { background: #fff; color: var(--ink); }
.preview .caption { display: flex; gap: 8px; align-items: flex-end; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); }
.preview .caption .field { background: #1f2c34; box-shadow: none; }
.preview .caption textarea { color: #fff; }
.preview .caption textarea::placeholder { color: #8696a0; }

/* panel info & media */
.panel { z-index: 25; background: #f0f4f7; animation: slide .18s ease-out; overflow-y: auto; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.panel .bar { position: sticky; top: 0; }
.card { background: #fff; padding: 18px 20px; margin-bottom: 10px; }
.card.center { text-align: center; padding: 24px 20px; }
.card .big-logo { margin-bottom: 12px; }
.card h2 { margin: 0; font-size: 22px; font-weight: 500; }
.card .sub { color: var(--muted); margin-top: 4px; }
.card .label { color: var(--muted); font-size: 13.5px; margin-bottom: 4px; }
.card a { color: var(--primary); text-decoration: none; }
.danger-row { display: flex; align-items: center; gap: 18px; color: var(--danger); font-size: 16px; width: 100%; }
.danger-row svg { width: 22px; height: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.grid3 button, .grid3 a { aspect-ratio: 1; overflow: hidden; background: var(--primary-soft); display: block; position: relative; }
.grid3 img, .grid3 video { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid3 .play-ov { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.list-docs .doc { margin-bottom: 8px; background: #f3f6f8; }
.empty-note { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 14px; }

.lightbox { position: absolute; inset: 0; z-index: 40; background: #000; display: flex; flex-direction: column; }
.lightbox .bar { background: rgba(0,0,0,.4); }
.lightbox .stage { flex: 1; display: grid; place-items: center; min-height: 0; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; }

/* ---------- kartu produk & katalog ---------- */
.bubble.prod-bubble { padding: 3px 3px 6px; width: 260px; max-width: 82%; }
.bubble.prod-bubble .ai-label, .bubble.prod-bubble .text { padding: 2px 6px 0; display: block; }
.bubble.prod-bubble .meta { margin-right: 6px; }
.pcard-img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--primary-soft); cursor: pointer; }
.pcard-body { padding: 6px 7px 2px; display: flex; flex-direction: column; gap: 1px; }
.pcard-body b { font-size: 15px; }
.pcard-price { color: var(--primary); font-weight: 700; }
.pcard-body small { color: var(--muted); font-size: 12.5px; }
.pcard-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: 6px; }
.pcard-actions button { padding: 9px 4px; color: var(--primary); font-weight: 600; font-size: 14px; }
.pcard-actions button + button { border-left: 1px solid var(--line); }
.pcard-actions button:active { background: var(--primary-soft); }
.catalog { padding: 10px; }
.cat-title { font-weight: 700; margin: 12px 4px 8px; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-item { background: #fff; border-radius: 12px; overflow: hidden; text-align: left; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cat-item img, .cat-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--primary-soft); display: grid; place-items: center; font-size: 40px; }
.cat-item b { padding: 8px 10px 0; font-size: 14px; }
.cat-item span { padding: 2px 10px 10px; color: var(--primary); font-weight: 700; font-size: 13.5px; }
.p-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: #fff; }
.p-gallery img { width: 100%; flex: none; aspect-ratio: 1; object-fit: cover; scroll-snap-align: start; }
.p-price { color: var(--primary); font-size: 20px; font-weight: 700; margin-top: 4px; }
.pre { white-space: pre-wrap; }
.p-cta { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #f0f4f7; }

/* ---------- rakit sepatu & rincian harga ---------- */
.cfg { padding: 4px 0 8px; }
.cfg-sec { background: #fff; padding: 14px 16px; margin-bottom: 8px; }
.cfg-sec > .note-box { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip-btn { border: 1.5px solid var(--line) !important; border-radius: 12px; padding: 8px 12px; text-align: left; display: flex; flex-direction: column; min-width: 64px; background: #fff; }
.chip-btn small { color: var(--muted); font-size: 11.5px; }
.chip-btn.on { border-color: var(--primary) !important; background: var(--primary-soft); color: #0b5f94; font-weight: 600; }
.chip-btn:disabled { opacity: .35; }
.qty { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line) !important; font-size: 20px; }
.qty b { font-size: 18px; min-width: 24px; text-align: center; }
.cfg textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 6px; resize: vertical; box-sizing: border-box; }
.cfg-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; justify-content: space-between; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.cfg-foot small { display: block; color: var(--muted); font-size: 12px; }
.cfg-foot b { font-size: 20px; color: var(--primary); }
.cfg-hint { color: #b26a00 !important; max-width: 190px; }
.bubble.quote-bubble { width: 290px; max-width: 86%; }
.qcard-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.qcard-head span { color: var(--muted); font-size: 13px; text-align: right; }
.qcard-choices { margin: 0 0 6px; padding-left: 18px; font-size: 13.5px; color: #3b4a54; }
.qcard-lines { border-top: 1px dashed var(--line); padding-top: 4px; }
.quote-bubble .pcard-actions { margin: 6px -9px 0; }

/* ---------- data pemesanan ---------- */
label.f { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 13px; color: var(--muted); min-width: 0; }
label.f i { color: var(--danger); font-style: normal; }
label.f input, label.f textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); background: #fff; outline: none; width: 100%; box-sizing: border-box; resize: vertical; }
label.f input:focus, label.f textarea:focus { border-color: var(--primary); }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-cta .err { margin: 0 0 8px; text-align: center; }
.ship-box { background: rgba(17,27,33,.05); border-radius: 8px; padding: 7px 9px; margin-top: 6px; font-size: 13px; line-height: 1.4; }
.ship-box b { display: block; font-size: 12.5px; }

/* ---------- cek ongkir ---------- */
.dest-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.dest-item { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line) !important; font-size: 13.5px; color: var(--ink); }
.dest-item:active { background: var(--primary-soft); }
.ongkir-box { margin-top: 12px; }
.free-ship { background: #dff5e7; color: #1d7a45; border-radius: 10px; padding: 10px 12px; font-weight: 600; }

/* ---------- invoice di chat ---------- */
.bubble.inv-bubble { padding: 0; overflow: hidden; width: 280px; max-width: 86%; }
.row.first.in .bubble.inv-bubble { overflow: visible; }
.inv-head { background: var(--primary); color: #fff; padding: 9px 12px; display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.row.first.in .inv-head { border-top-right-radius: 8px; }
.inv-body { padding: 8px 12px 4px; }
.inv-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 2px 0; }
.inv-line span:first-child { min-width: 0; overflow-wrap: anywhere; }
.inv-line span:last-child { white-space: nowrap; }
.inv-line.muted { color: var(--muted); font-size: 13.5px; }
.inv-line.total { font-weight: 700; border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 6px; }
.inv-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0 4px; }
.inv-state small { color: var(--muted); font-size: 12.5px; }
.inv-bubble .meta { margin: 0 10px 6px 0; }
.inv-msg { white-space: pre-wrap; padding: 8px 10px 8px; font-size: 14.5px; }
.inv-actions { display: flex; }
.inv-actions .inv-btn { flex: 1; text-align: center; text-decoration: none; }
.inv-actions .inv-btn + .inv-btn { border-left: 1px solid var(--line) !important; }
.qris { margin-top: 10px; background: #f3f8fc; border-radius: 12px; padding: 12px; text-align: center; }
.qris small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.qris img { width: 100%; max-width: 280px; border-radius: 8px; background: #fff; cursor: zoom-in; }
.qris-hint { font-size: 13px; margin: 8px 0 10px; color: #0b6fa8; font-weight: 600; }
.card a.qris-dl, .qris-dl { display: inline-block; text-decoration: none; color: #fff; }
.inv-btn { display: block; width: 100%; border-top: 1px solid var(--line) !important; padding: 11px; color: var(--primary); font-weight: 600; font-size: 14.5px; clear: both; }
.inv-btn:active { background: var(--primary-soft); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.chip.warn { background: #fff4d6; color: #8a6100; }
.chip.info { background: var(--primary-soft); color: #0b6fa8; }
.chip.ok { background: #dff5e7; color: #1d7a45; }
.chip.bad { background: #fde3e3; color: #b3261e; }

/* ---------- pesanan saya ---------- */
.order-row { display: block; width: 100%; text-align: left; }
.or-top, .or-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.or-items { color: var(--muted); font-size: 14px; margin: 6px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline { list-style: none; margin: 16px 0 4px; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 14px 24px; color: var(--muted); font-size: 14.5px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c5d3dc; background: #fff; }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 17px; bottom: 0; width: 2px; background: #e1e8ed; }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--primary); border-color: var(--primary); }
.timeline li.done::after { background: var(--primary); }
.timeline li.now { color: var(--primary); font-weight: 600; }
.timeline li.now::before { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.resi, .bank { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f3f8fc; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.resi small, .bank small { display: block; color: var(--muted); font-size: 12.5px; }
.resi b, .bank b { display: block; font-size: 16px; letter-spacing: .3px; }
.copy { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-weight: 600; font-size: 13.5px; padding: 6px 8px; border-radius: 8px; flex: none; }
.copy span svg { width: 16px; height: 16px; }
.copy:active { background: var(--primary-soft); }
.due { background: var(--primary-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.due small { display: block; color: #0b6fa8; font-size: 12.5px; }
.due b { font-size: 22px; }
.note-box { background: #fff8e1; color: #6d5200; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin: 8px 0; }
.amount { display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--primary); padding: 4px 2px; margin: 4px 0 12px; }
.amount span { color: var(--muted); }
.amount input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 18px; font-weight: 600; background: transparent; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px dashed #9fcdee !important; border-radius: 12px; padding: 12px; color: var(--primary); }
.pick > span:first-child svg { width: 26px; height: 26px; }
.pick b { display: block; font-size: 14.5px; }
.pick .sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 220px; }
.proof-thumb { margin-top: 10px; }
.proof-thumb img { max-width: 100%; max-height: 220px; border-radius: 8px; display: block; }
.card .err { margin: 10px 0 6px; }

/* ---------- ajakan notifikasi ---------- */
.notif-banner { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; z-index: 4; flex: none; }
.nb-actions { display: flex; justify-content: flex-end; gap: 6px; }
.nb-actions button { padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.nb-later { color: var(--muted); }
.nb-go { background: var(--primary); color: #fff; }

.toast {
  position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(17,27,33,.88); color: #fff;
  padding: 8px 16px; border-radius: 18px; font-size: 14px; z-index: 50; animation: rise .15s; max-width: 86%; text-align: center;
}

/* Pilihan kualitas foto di layar pratinjau (seperti tombol HD WhatsApp). */
.preview .hd-row { display: flex; justify-content: center; padding: 6px 12px 0; }
.preview .hd-toggle { border: 1px solid #3b4a54; background: #1f2c34; color: #d1d7db; border-radius: 99px; padding: 6px 14px; font-size: 13px; }
.preview .hd-toggle.on { background: #1a9be8; border-color: #1a9be8; color: #fff; font-weight: 600; }
