/* Tampilan pelanggan: gaya WhatsApp, warna pastel lembut Bantalin (ungu muda, merah muda, putih), khusus HP. */
:root {
  --primary: #9b7cf0;
  --primary-press: #7457d4;
  --primary-soft: #efe8ff;
  --wall: #f8f2f8;
  --wall-doodle: #efdff0;
  --out: #efe8ff;
  --in: #ffffff;
  --ink: #3a2e4d;
  --muted: #7b6d8f;
  --line: #eee3ef;
  --tick: #a596b8;
  --tick-read: #7457d4;
  --danger: #e7708a;
  --sys: #fff3df;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: #f3eaf4; 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(155,124,240,.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(155,124,240,.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: #8a5c17; }
.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-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='%23e6d9f8' d='M18 26c0-6 4-9 10-9h22c6 0 10 3 10 9-2 4-2 8 0 12 0 6-4 9-10 9H28c-6 0-10-3-10-9 2-4 2-8 0-12z'/%3E%3Cpath stroke='%23f7d6e6' d='M112 40c-4-6-13-4-13 3 0 6 13 13 13 13s13-7 13-13c0-7-9-9-13-3z'/%3E%3Cpath stroke='%23f7d6e6' d='M96 102c0-6 4-9 10-9h26c6 0 10 3 10 9-2 4-2 8 0 12 0 6-4 9-10 9h-26c-6 0-10-3-10-9 2-4 2-8 0-12z'/%3E%3Cpath stroke='%23e6d9f8' d='M36 112c-3-5-10-3-10 2 0 5 10 10 10 10s10-5 10-10c0-5-7-7-10-2z'/%3E%3Ccircle cx='80' cy='70' r='2.5' stroke='%23e6d9f8'/%3E%3Ccircle cx='140' cy='150' r='2' stroke='%23f7d6e6'/%3E%3Ccircle cx='10' cy='150' r='2' stroke='%23e6d9f8'/%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(58,46,77,.13); }
.sysmsg {
  display: table; margin: 6px auto 10px; max-width: 88%; background: var(--sys); color: #6d5f82; text-align: center;
  font-size: 13px; padding: 6px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(58,46,77,.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(155,124,240,.18); }
.row.hit .bubble { outline: 2px solid #f3c77a; }
.bubble {
  position: relative; max-width: 82%; padding: 6px 8px 8px 9px; border-radius: 8px; background: var(--in);
  box-shadow: 0 1px .5px rgba(58,46,77,.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(58,46,77,.05); border-radius: 6px; text-decoration: none; color: inherit; min-width: 220px; }
.doc .ficon { width: 32px; height: 38px; border-radius: 4px; background: #e7708a; 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: #ddd0e3; 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(58,46,77,.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: #7457d4; }
.flash .bubble { animation: flash 1.2s; }
@keyframes flash { 30% { box-shadow: 0 0 0 6px rgba(155,124,240,.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(58,46,77,.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: #2f2540; 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: #3a2e4d; box-shadow: none; }
.preview .caption textarea { color: #fff; }
.preview .caption textarea::placeholder { color: #a596b8; }

/* panel info & media */
.panel { z-index: 25; background: #f6f0f7; 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: #f8f2f8; }
.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: #f6f0f7; }

/* ---------- rakit bantal & 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: #5f45b8; 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: #a8701c !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: #4d3f63; }
.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(58,46,77,.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: #e3f5ec; color: #2f8f64; 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: #fbf7fb; 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: #7457d4; 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: #ffefd6; color: #a8701c; }
.chip.info { background: var(--primary-soft); color: #7457d4; }
.chip.ok { background: #e3f5ec; color: #2f8f64; }
.chip.bad { background: #fde8ee; color: #c4475f; }

/* ---------- 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 #ddd0e3; background: #fff; }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 17px; bottom: 0; width: 2px; background: #ecdff0; }
.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: #fbf7fb; 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: #7457d4; font-size: 12.5px; }
.due b { font-size: 22px; }
.note-box { background: #fff3df; color: #8a5c17; 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 #cbb8ff !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(58,46,77,.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 #4d3f63; background: #3a2e4d; color: #e0d3e5; border-radius: 99px; padding: 6px 14px; font-size: 13px; }
.preview .hd-toggle.on { background: #9b7cf0; border-color: #9b7cf0; color: #fff; font-weight: 600; }

/* Masuk dengan Google di layar login & menu Akun. */
.g-area { width: 100%; max-width: 320px; margin: 14px auto 0; }
.g-area .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.g-area .or::before, .g-area .or::after { content: ""; flex: 1; height: 1px; background: #eadcee; }
.g-area.g-first { margin: 4px auto 10px; }
.g-area.g-first .or { margin: 14px 0 4px; }
.g-area.g-first .g-btn { display: flex; justify-content: center; }
.g-btn { display: flex; justify-content: center; min-height: 44px; }
.g-note { font-size: 12.5px; color: #6d5f82; background: #f6f0f7; border-radius: 10px; padding: 8px 10px; margin-top: 8px; text-align: left; line-height: 1.45; }

/* Spanduk "Buka di Chrome/Safari" saat dibuka dari dalam Instagram/Facebook. */
.inapp-banner { width: 100%; max-width: 360px; margin: 0 auto 14px; background: #efe8ff; border: 1px solid #d9c9f7; border-radius: 12px; padding: 10px 12px; text-align: left; font-size: 13px; line-height: 1.45; color: #3a2e4d; }
.inapp-banner .ia-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.inapp-banner button { border: 0; border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.inapp-banner .ia-later { background: transparent; color: #6d5f82; }
.inapp-banner .ia-go { background: #9b7cf0; color: #fff; }

/* Logo toko di tombol info & kartu info */
#open-info { padding: 0; overflow: hidden; background: #fff; }
.big-logo { overflow: hidden; background: #fff !important; padding: 0; }
.big-logo .shop-logo, #open-info .shop-logo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
/* Form konsep desain: pilihan (select) bergaya sama dengan kotak isian */
label.f select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); background: #fff; outline: none; width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; min-height: 44px; }
label.f select:focus { border-color: var(--primary); }
label.f input[type="file"] { padding: 8px; font-size: 13px; }

/* 👋 Sambutan tamu (app-sambutan.js): foto bantal jadi + tombol tanya cepat */
.sb-wrap { margin: 10px 12px; }
.sb-hai { display: grid; gap: 4px; font-size: 14px; color: #4d3f63; line-height: 1.45; }
.sb-hai b { font-size: 15px; color: #3a2e4d; }
.sb-foto { display: flex; gap: 6px; overflow-x: auto; margin: 10px -4px 0; padding: 0 4px 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.sb-foto[hidden] { display: none; }
.sb-thumb { flex: 0 0 auto; width: 96px; padding: 0; border: 0; background: none; border-radius: 8px; overflow: hidden; scroll-snap-align: start; cursor: pointer; }
.sb-thumb img { width: 96px; height: 96px; object-fit: cover; display: block; }
.sb-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sb-label { font-size: 12.5px; color: var(--muted); margin: 10px 0 6px; }
.sb-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sb-chip { border: 1px solid var(--primary); background: #fff; color: var(--primary); border-radius: 16px; padding: 8px 6px; font-size: 13px; font-weight: 600; line-height: 1.25; cursor: pointer; }
.sb-chip:active { background: var(--primary); color: #fff; }
/* Galeri foto sambutan (layar penuh, geser kiri-kanan) */
.sb-galeri .title { display: grid; }
.sb-galeri .title small { color: #e2d6e6; }
.sb-g-close { background: none; border: 0; color: #fff; font-size: 22px; width: 44px; height: 44px; cursor: pointer; }
.sb-g-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sb-g-track::-webkit-scrollbar { display: none; }
.sb-g-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; }
.sb-g-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sb-g-cap { color: #e8dcea; text-align: center; font-size: 13px; padding: 6px 12px 0; }
.sb-g-cta { padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }

/* 🛏️ Rakit bantal bertahap (app-rakit.js) */
.rk { padding: 10px 0 8px; }
.rk-prog { display: grid; gap: 4px; padding: 0 16px 10px; }
.rk-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.rk-bar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .25s; }
.rk-prog small { color: var(--muted); font-size: 12px; }
.rk-title { font-size: 17px; margin: 0 16px 10px; }
.rk-col { flex-direction: column; align-items: stretch; }
.rk-col .chip-btn { width: 100%; }
.rk-big { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; margin-bottom: 10px; }
.rk-big img { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #fff; }
.rk-big small { display: block; color: var(--muted); font-size: 12px; padding: 6px 10px; background: #fbf6fb; }
.rk-sols { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.rk-sol { display: grid; gap: 2px; text-align: left; border: 1.5px solid var(--line) !important; border-radius: 12px; padding: 8px; background: #fff; cursor: pointer; }
.rk-sol img, .rk-sol .rk-noimg { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; border-radius: 8px; display: grid; place-items: center; }
.rk-sol small { color: var(--muted); font-size: 11.5px; }
.rk-sol.on { border-color: var(--primary) !important; background: var(--primary-soft); }
.rk-back { border: 1px solid var(--line) !important; border-radius: 99px; padding: 10px 16px; background: #fff; font-weight: 600; }
.rk-back:disabled { opacity: .4; }
.rk-tot { flex: 1; min-width: 0; }
