/* ==========================================================================
   IDPOIN Design System
   Satu sumber gaya untuk semua layar (customer, karyawan, kasir, admin).
   Warna memakai variabel RGB supaya bisa dipakai dengan opacity:
   rgb(var(--c-brand) / .5)
   ========================================================================== */

/* ---------- Token: tema "logo" (default), diambil dari logo IdPoin ---------- */
:root {
  --c-brand: 22 104 227;        /* #1668E3  biru "Id" */
  --c-brand-2: 41 182 255;      /* #29B6FF  biru muda (awal gradien) */
  --c-brand-deep: 10 74 190;    /* #0A4ABE  biru tua (akhir gradien) */
  --c-brand-tint: 232 242 255;  /* #E8F2FF */
  --c-ink: 12 31 64;            /* #0C1F40  navy tagline */
  --c-ink-2: 31 50 88;          /* #1F3258 */
  --c-muted: 92 107 135;        /* #5C6B87 */
  --c-line: 228 234 243;        /* #E4EAF3 */
  --c-canvas: 242 246 251;      /* #F2F6FB */
  --c-field: 236 241 248;       /* #ECF1F8 */

  --c-gold: 255 186 31;         /* #FFBA1F  koin / poin */
  --c-gold-2: 247 148 29;       /* #F7941D  oranye "Poin" */
  --c-gold-tint: 255 244 214;   /* #FFF4D6 */
  --c-gold-ink: 133 77 0;       /* #854D00 */
  --c-pink: 255 79 147;         /* #FF4F93  voucher / promo */
  --c-pink-tint: 255 233 242;   /* #FFE9F2 */
  --c-pink-ink: 196 29 98;      /* #C41D62 */
  --c-lime: 190 240 70;         /* #BEF046  progres / sukses */
  --c-lime-tint: 239 251 210;   /* #EFFBD2 */
  --c-lime-ink: 62 99 7;        /* #3E6307 */
  --c-red: 222 54 54;           /* #DE3636 */
  --c-red-tint: 254 235 235;    /* #FEEBEB */
  --c-wa: 29 168 81;            /* #1DA851  WhatsApp */

  --shadow-card: 0 8px 24px rgb(12 31 64 / .06);
  --shadow-float: 0 14px 34px rgb(12 31 64 / .14);
  --shadow-glow: 0 16px 34px rgb(var(--c-brand) / .30);
  --grad-hero: linear-gradient(135deg, rgb(var(--c-brand-2)) 0%, rgb(var(--c-brand)) 55%, rgb(var(--c-brand-deep)) 100%);
}

/* ---------- Tema alternatif: ungu (warna awal hasil Stitch) ----------
   Aktif kalau <html data-theme="violet">. Bisa dicoba dari halaman index. */
[data-theme="violet"] {
  --c-brand: 108 59 255;        /* #6C3BFF */
  --c-brand-2: 123 77 255;      /* #7B4DFF */
  --c-brand-deep: 74 31 214;    /* #4A1FD6 */
  --c-brand-tint: 238 233 255;  /* #EEE9FF */
  --c-ink: 21 19 31;            /* #15131F */
  --c-ink-2: 42 38 58;
  --c-muted: 110 106 128;       /* #6E6A80 */
  --c-line: 236 234 242;        /* #ECEAF2 */
  --c-canvas: 246 245 250;      /* #F6F5FA */
  --c-field: 241 240 246;       /* #F1F0F6 */
  --shadow-card: 0 8px 24px rgb(21 19 31 / .06);
  --shadow-float: 0 14px 34px rgb(21 19 31 / .14);
}

/* ---------- Dasar ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: rgb(var(--c-ink));
  background: rgb(var(--c-canvas));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; }
.font-display { font-family: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.025em; }
.num { font-variant-numeric: tabular-nums; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.coin { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
.ph, .ph-fill { line-height: 1; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 56px; padding: 0 1.5rem; border-radius: 9999px;
  font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
  cursor: pointer; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn i { font-size: 1.25em; }
.btn-dark { background: rgb(var(--c-ink)); color: #fff; box-shadow: var(--shadow-float); }
.btn-dark:hover { background: rgb(var(--c-ink-2)); }
.btn-primary { background: rgb(var(--c-brand)); color: #fff; box-shadow: 0 10px 24px rgb(var(--c-brand) / .28); }
.btn-primary:hover { background: rgb(var(--c-brand-deep)); }
.btn-soft { background: rgb(var(--c-brand-tint)); color: rgb(var(--c-brand)); }
.btn-soft:hover { background: rgb(var(--c-brand) / .16); }
.btn-ghost { background: #fff; color: rgb(var(--c-ink)); box-shadow: inset 0 0 0 1px rgb(var(--c-line)); }
.btn-ghost:hover { background: rgb(var(--c-canvas)); }
.btn-white { background: #fff; color: rgb(var(--c-ink)); box-shadow: var(--shadow-float); }
.btn-lime { background: rgb(var(--c-lime)); color: rgb(var(--c-ink)); }
.btn-lime:hover { filter: brightness(.96); }
.btn-wa { background: rgb(var(--c-wa)); color: #fff; }
.btn-wa:hover { filter: brightness(.95); }
.btn-wa-ghost { background: #fff; color: rgb(var(--c-wa)); box-shadow: inset 0 0 0 1px rgb(var(--c-line)); }
.btn-danger { background: rgb(var(--c-red-tint)); color: rgb(var(--c-red)); }
.btn-text { height: auto; padding: 0; background: none; color: rgb(var(--c-brand)); font-weight: 700; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-md { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 9999px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; box-shadow: var(--shadow-card); color: rgb(var(--c-ink)); font-size: 22px; position: relative;
  transition: transform .12s ease;
}
.icon-btn:active { transform: scale(.95); }
.icon-btn .dot { position: absolute; top: 10px; right: 11px; width: 9px; height: 9px; border-radius: 9999px; background: rgb(var(--c-pink)); box-shadow: 0 0 0 2px #fff; }
.icon-btn-sm { width: 36px; height: 36px; font-size: 18px; box-shadow: none; background: rgb(var(--c-canvas)); }
.icon-btn-flat { box-shadow: none; background: transparent; }

/* ---------- Permukaan ---------- */
.card { background: #fff; border-radius: 28px; box-shadow: var(--shadow-card); }
.card-sm { background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); }
.panel { background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); }
.soft { background: rgb(var(--c-canvas)); border-radius: 16px; }
.hero {
  background: var(--grad-hero); color: #fff; border-radius: 28px; box-shadow: var(--shadow-glow);
  position: relative; overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 9999px;
  background: radial-gradient(circle, rgb(255 255 255 / .30), transparent 68%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; left: -80px; bottom: -120px; border-radius: 9999px;
  background: radial-gradient(circle, rgb(var(--c-lime) / .28), transparent 70%);
}
.hero-flat { background: var(--grad-hero); color: #fff; }
.hero-dark {
  background: radial-gradient(90% 80% at 100% 0%, rgb(var(--c-lime) / .30) 0%, transparent 55%), rgb(var(--c-ink));
  color: #fff; border-radius: 28px; box-shadow: var(--shadow-float); position: relative; overflow: hidden;
}
.glass { background: rgb(255 255 255 / .16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- Chip & badge ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 9999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1;
}
.chip i { font-size: 14px; }
.chip .dot { width: 6px; height: 6px; border-radius: 9999px; background: currentColor; }
.chip-lg { height: 32px; padding: 0 12px; font-size: 13.5px; }
.chip-brand { background: rgb(var(--c-brand-tint)); color: rgb(var(--c-brand)); }
.chip-gold { background: rgb(var(--c-gold-tint)); color: rgb(var(--c-gold-ink)); }
.chip-pink { background: rgb(var(--c-pink-tint)); color: rgb(var(--c-pink-ink)); }
.chip-lime { background: rgb(var(--c-lime)); color: rgb(var(--c-ink)); }
.chip-lime-soft { background: rgb(var(--c-lime-tint)); color: rgb(var(--c-lime-ink)); }
.chip-red { background: rgb(var(--c-red-tint)); color: rgb(var(--c-red)); }
.chip-muted { background: rgb(var(--c-canvas)); color: rgb(var(--c-muted)); }
.chip-dark { background: rgb(var(--c-ink)); color: #fff; }
.chip-white { background: rgb(255 255 255 / .18); color: #fff; }
.chip-wa { background: rgb(var(--c-wa) / .12); color: rgb(var(--c-wa)); }

/* Chip filter (bisa dipilih) */
.fchip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 9999px;
  background: #fff; color: rgb(var(--c-ink)); font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-card); cursor: pointer; transition: background-color .15s, color .15s;
}
.fchip .count { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 9999px; background: rgb(var(--c-canvas)); color: rgb(var(--c-muted)); }
.fchip.is-active { background: rgb(var(--c-ink)); color: #fff; }
.fchip.is-active .count { background: rgb(255 255 255 / .18); color: #fff; }
.fchip-flat { box-shadow: inset 0 0 0 1px rgb(var(--c-line)); }

/* Segmented control */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 9999px; background: rgb(var(--c-line) / .8); }
.seg > * {
  flex: 1; height: 44px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; font-size: 15px; color: rgb(var(--c-muted)); cursor: pointer; transition: background-color .15s, color .15s; white-space: nowrap;
}
.seg > .is-active { background: rgb(var(--c-ink)); color: #fff; box-shadow: var(--shadow-card); }
.seg-sm > * { height: 36px; font-size: 13.5px; }
.seg-white { background: #fff; box-shadow: inset 0 0 0 1px rgb(var(--c-line)); }
.seg-brand > .is-active { background: rgb(var(--c-brand)); }

/* Tab garis bawah (web) */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid rgb(var(--c-line)); overflow-x: auto; scrollbar-width: none; }
.tabs > * {
  height: 44px; padding: 0 14px; font-weight: 600; font-size: 14px; color: rgb(var(--c-muted)); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.tabs > .is-active { color: rgb(var(--c-brand)); border-color: rgb(var(--c-brand)); }
.tabs .count { font-size: 12px; padding: 1px 7px; border-radius: 9999px; background: rgb(var(--c-canvas)); color: rgb(var(--c-muted)); }
.tabs > .is-active .count { background: rgb(var(--c-brand-tint)); color: rgb(var(--c-brand)); }

/* ---------- Form ---------- */
.label { display: block; font-size: 13px; font-weight: 600; color: rgb(var(--c-ink)); margin-bottom: 8px; }
.label .req { color: rgb(var(--c-red)); }
.hint { font-size: 12.5px; color: rgb(var(--c-muted)); margin-top: 6px; }
.input {
  width: 100%; height: 56px; border-radius: 16px; background: rgb(var(--c-field)); border: 0; padding: 0 16px;
  font-size: 15px; color: rgb(var(--c-ink)); outline: none; transition: box-shadow .15s, background-color .15s;
}
.input::placeholder { color: rgb(var(--c-muted)); }
.input:focus { box-shadow: 0 0 0 2px rgb(var(--c-brand)); background: #fff; }
textarea.input { height: auto; min-height: 104px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
.input-w {
  width: 100%; height: 44px; border-radius: 12px; background: #fff; border: 0; padding: 0 14px; font-size: 14px;
  color: rgb(var(--c-ink)); outline: none; box-shadow: inset 0 0 0 1px rgb(var(--c-line)); transition: box-shadow .15s;
}
.input-w::placeholder { color: rgb(var(--c-muted)); }
.input-w:focus { box-shadow: inset 0 0 0 2px rgb(var(--c-brand)); }
textarea.input-w { height: auto; min-height: 92px; padding: 11px 14px; line-height: 1.55; resize: vertical; }
select.input, select.input-w {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'%3E%3Cpath fill='%235C6B87' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; color: rgb(var(--c-muted)); pointer-events: none; }
.input-icon > .input, .input-icon > .input-w { padding-left: 42px; }
.input-icon > .trail { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.prefix-group { display: flex; align-items: center; gap: 0; border-radius: 16px; background: rgb(var(--c-field)); height: 56px; transition: box-shadow .15s; }
.prefix-group:focus-within { box-shadow: 0 0 0 2px rgb(var(--c-brand)); background: #fff; }
.prefix-group .pre { padding: 0 12px 0 16px; font-weight: 700; display: flex; align-items: center; gap: 4px; border-right: 1px solid rgb(var(--c-line)); height: 28px; }
.prefix-group input { flex: 1; height: 100%; background: transparent; border: 0; outline: none; padding: 0 14px; font-size: 15px; color: rgb(var(--c-ink)); min-width: 0; }
.prefix-w { display: flex; align-items: center; height: 44px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px rgb(var(--c-line)); }
.prefix-w:focus-within { box-shadow: inset 0 0 0 2px rgb(var(--c-brand)); }
.prefix-w .pre { padding: 0 4px 0 14px; color: rgb(var(--c-muted)); font-weight: 600; font-size: 14px; }
.prefix-w input { flex: 1; height: 100%; background: transparent; border: 0; outline: none; padding: 0 14px 0 6px; font-size: 14px; font-weight: 600; color: rgb(var(--c-ink)); min-width: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: rgb(var(--c-brand)); width: 18px; height: 18px; cursor: pointer; }

.switch { position: relative; width: 46px; height: 28px; border-radius: 9999px; background: rgb(var(--c-line)); transition: background-color .18s; flex-shrink: 0; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 9999px; background: #fff; box-shadow: 0 2px 6px rgb(12 31 64 / .2); transition: transform .18s; }
.switch.is-on { background: rgb(var(--c-brand)); }
.switch.is-on::after { transform: translateX(18px); }

/* Kartu pilihan (radio besar) */
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgb(var(--c-line)); cursor: pointer; transition: box-shadow .15s, background-color .15s; }
.opt:hover { background: rgb(var(--c-canvas) / .6); }
.opt.is-active { box-shadow: inset 0 0 0 2px rgb(var(--c-brand)); background: rgb(var(--c-brand-tint) / .55); }
.opt .opt-check { width: 22px; height: 22px; border-radius: 9999px; box-shadow: inset 0 0 0 2px rgb(var(--c-line)); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; margin-top: 1px; }
.opt.is-active .opt-check { background: rgb(var(--c-brand)); box-shadow: none; }
.opt .opt-check i { opacity: 0; }
.opt.is-active .opt-check i { opacity: 1; }

.drop {
  border: 2px dashed rgb(var(--c-brand) / .35); border-radius: 20px; background: rgb(var(--c-brand-tint) / .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 28px 20px; cursor: pointer;
}

/* ---------- Progres ---------- */
.bar { height: 10px; border-radius: 9999px; background: rgb(var(--c-brand-tint)); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 9999px; background: rgb(var(--c-lime)); }
.bar-sm { height: 6px; }
.bar-brand > span { background: rgb(var(--c-brand)); }
.bar-on-dark { background: rgb(255 255 255 / .16); }

/* ---------- Avatar & ikon bulat ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; font-weight: 700; background: rgb(var(--c-brand-tint)); color: rgb(var(--c-brand)); flex-shrink: 0; }
.avatar-brand { background: var(--grad-hero); color: #fff; }
.avatar-gold { background: rgb(var(--c-gold-tint)); color: rgb(var(--c-gold-ink)); }
.avatar-pink { background: rgb(var(--c-pink-tint)); color: rgb(var(--c-pink-ink)); }
.avatar-lime { background: rgb(var(--c-lime-tint)); color: rgb(var(--c-lime-ink)); }
.itile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9999px; flex-shrink: 0; font-size: 22px; }
.itile-sq { border-radius: 14px; }
.itile-brand { background: rgb(var(--c-brand-tint)); color: rgb(var(--c-brand)); }
.itile-pink { background: rgb(var(--c-pink-tint)); color: rgb(var(--c-pink)); }
.itile-gold { background: rgb(var(--c-gold-tint)); color: rgb(var(--c-gold-2)); }
.itile-lime { background: rgb(var(--c-lime-tint)); color: rgb(var(--c-lime-ink)); }
.itile-red { background: rgb(var(--c-red-tint)); color: rgb(var(--c-red)); }
.itile-muted { background: rgb(var(--c-canvas)); color: rgb(var(--c-muted)); }
.itile-white { background: #fff; color: rgb(var(--c-brand)); box-shadow: var(--shadow-card); }
.itile-wa { background: rgb(var(--c-wa) / .12); color: rgb(var(--c-wa)); }
.qtile { width: 60px; height: 60px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; font-size: 26px; color: rgb(var(--c-brand)); position: relative; }
.qtile .badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 9999px; background: rgb(var(--c-pink)); color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px rgb(var(--c-canvas)); }
.thumb { border-radius: 16px; overflow: hidden; background: rgb(var(--c-canvas)); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: rgb(var(--c-muted)); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Tiket voucher ---------- */
.ticket { --split: 104px; --notch-bg: rgb(var(--c-canvas)); display: flex; background: #fff; border-radius: 24px; box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.ticket::before, .ticket::after { content: ""; position: absolute; left: calc(var(--split) - 11px); width: 22px; height: 22px; border-radius: 9999px; background: var(--notch-bg); z-index: 2; }
.ticket::before { top: -11px; }
.ticket::after { bottom: -11px; }
.ticket-art { width: var(--split); flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.ticket-body { flex: 1; min-width: 0; padding: 16px 18px 16px 20px; border-left: 2px dashed rgb(var(--c-line)); }
.ticket-pink .ticket-art { background: linear-gradient(160deg, rgb(var(--c-pink-tint)), rgb(var(--c-pink) / .22)); }
.ticket-gold .ticket-art { background: linear-gradient(160deg, rgb(var(--c-gold-tint)), rgb(var(--c-gold) / .30)); }
.ticket-brand .ticket-art { background: linear-gradient(160deg, rgb(var(--c-brand-tint)), rgb(var(--c-brand) / .18)); }
.ticket-lime .ticket-art { background: linear-gradient(160deg, rgb(var(--c-lime-tint)), rgb(var(--c-lime) / .45)); }
.ticket-used { opacity: .55; filter: grayscale(.6); }

/* ---------- Daftar ---------- */
.list > * + * { border-top: 1px solid rgb(var(--c-line)); }
.list-inset > * + * { border-top: 0; position: relative; }
.list-inset > * + *::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: rgb(var(--c-line)); }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
a.row:hover, button.row:hover { background: rgb(var(--c-canvas) / .7); }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14.5px; }
.kv > :first-child { color: rgb(var(--c-muted)); }
.kv > :last-child { font-weight: 600; text-align: right; }
.divider { height: 1px; background: rgb(var(--c-line)); }
.divider-dash { border-top: 2px dashed rgb(var(--c-line)); }

/* ---------- Kerangka mobile ---------- */
.m-body { background: rgb(var(--c-canvas)); }
.m-app { max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: rgb(var(--c-canvas)); position: relative; overflow-x: hidden; }
.m-app.has-nav { padding-bottom: 124px; }
.m-app.has-cta { padding-bottom: 112px; }
@media (min-width: 520px) {
  .m-body { background: radial-gradient(circle at 20% 0%, rgb(var(--c-brand-tint)), rgb(var(--c-line)) 70%); }
  .m-app { box-shadow: 0 0 0 1px rgb(var(--c-line)), 0 30px 80px rgb(12 31 64 / .16); }
}
.m-pad { padding-left: 24px; padding-right: 24px; }
.m-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: rgb(var(--c-canvas) / .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.m-top .m-title { flex: 1; text-align: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.m-top .spacer { width: 44px; flex-shrink: 0; }
.m-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 8px; }
.m-head h1 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.03em; font-size: 30px; line-height: 1.1; }
.m-head p { color: rgb(var(--c-muted)); font-size: 15px; margin-top: 4px; }
.m-section { padding: 0 24px; margin-top: 28px; }
.m-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.m-section-head h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.02em; font-size: 19px; }
.m-cta { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(430px, 100%); padding: 16px 24px max(env(safe-area-inset-bottom), 20px); background: linear-gradient(to top, rgb(var(--c-canvas)) 70%, rgb(var(--c-canvas) / 0)); z-index: 35; }

/* Navigasi bawah (customer & karyawan) */
.m-nav {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); width: calc(min(430px, 100vw) - 28px);
  height: 74px; background: #fff; border-radius: 28px; box-shadow: var(--shadow-float); z-index: 40;
  display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); align-items: center; padding: 0 6px;
}
.m-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: rgb(var(--c-muted)); position: relative; padding: 6px 0; }
.m-nav a i { font-size: 24px; }
.m-nav a.is-active { color: rgb(var(--c-brand)); }
.m-nav a.is-active::after { content: ""; position: absolute; bottom: -6px; width: 5px; height: 5px; border-radius: 9999px; background: rgb(var(--c-lime)); box-shadow: 0 0 0 2px rgb(var(--c-lime) / .3); }
.m-nav .fab { width: 62px; height: 62px; border-radius: 9999px; background: var(--grad-hero); color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; margin-top: -40px; border: 5px solid #fff; box-shadow: var(--shadow-glow); }
.m-nav a.is-active .fab { box-shadow: 0 0 0 4px rgb(var(--c-lime)), var(--shadow-glow); }
.m-nav a.nav-fab.is-active::after { display: none; }

/* ---------- Kerangka kasir (web) ---------- */
.k-shell { display: flex; min-height: 100vh; }
.k-side { width: 92px; flex-shrink: 0; background: #fff; border-right: 1px solid rgb(var(--c-line)); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 14px 0 16px; gap: 6px; z-index: 35; }
.k-side .k-logo { width: 52px; height: 52px; border-radius: 16px; background: rgb(var(--c-gold-tint)); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.k-side .k-logo img { width: 38px; height: 38px; }
.k-side a.k-item { width: 72px; height: 66px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: rgb(var(--c-muted)); text-align: center; line-height: 1.15; }
.k-side a.k-item i { font-size: 24px; }
.k-side a.k-item:hover { background: rgb(var(--c-canvas)); color: rgb(var(--c-ink)); }
.k-side a.k-item.is-active { background: rgb(var(--c-brand-tint)); color: rgb(var(--c-brand)); }
.k-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.k-top { height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: #fff; border-bottom: 1px solid rgb(var(--c-line)); position: sticky; top: 0; z-index: 30; }
.k-top .logo { height: 34px; }
.k-content { padding: 24px; flex: 1; }

/* ---------- Kerangka admin (web) ---------- */
.a-shell { display: flex; min-height: 100vh; }
.a-side { width: 256px; flex-shrink: 0; background: #fff; border-right: 1px solid rgb(var(--c-line)); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 14px; z-index: 35; }
.a-side .logo { height: 42px; width: auto; }
.a-store { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 16px; background: rgb(var(--c-canvas)); margin: 14px 0 6px; }
.a-nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; min-height: 0; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.a-nav.a-nav-foot { flex: none; overflow: visible; }
.a-nav .grp { font-size: 11.5px; font-weight: 700; color: rgb(var(--c-muted)); padding: 10px 12px 4px; letter-spacing: .02em; }
.a-nav a { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: rgb(var(--c-muted)); transition: background-color .12s, color .12s; flex-shrink: 0; }
.a-nav a i { font-size: 20px; }
.a-nav a:hover { background: rgb(var(--c-canvas)); color: rgb(var(--c-ink)); }
.a-nav a.is-active { background: rgb(var(--c-brand-tint)); color: rgb(var(--c-brand)); }
.a-nav a .count { margin-left: auto; font-size: 11.5px; font-weight: 700; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 9999px; background: rgb(var(--c-pink)); color: #fff; display: flex; align-items: center; justify-content: center; }
.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-top { height: 72px; display: flex; align-items: center; gap: 14px; padding: 0 32px; background: rgb(var(--c-canvas) / .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgb(var(--c-line)); }
.a-content { padding: 28px 32px 56px; width: 100%; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.03em; font-size: 30px; line-height: 1.1; }
.page-sub { color: rgb(var(--c-muted)); font-size: 14.5px; margin-top: 6px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.panel-head h3 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.panel-head p { color: rgb(var(--c-muted)); font-size: 13px; margin-top: 2px; }
.kpi { padding: 20px 22px; }
.kpi .kpi-label { font-size: 13.5px; font-weight: 600; color: rgb(var(--c-muted)); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .kpi-value { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.03em; font-size: 30px; line-height: 1.1; margin-top: 12px; font-variant-numeric: tabular-nums; }
.kpi .kpi-foot { font-size: 12.5px; color: rgb(var(--c-muted)); margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Tabel */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: rgb(var(--c-muted)); padding: 11px 16px; background: rgb(var(--c-canvas)); white-space: nowrap; }
.tbl th:first-child { border-radius: 12px 0 0 12px; }
.tbl th:last-child { border-radius: 0 12px 12px 0; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid rgb(var(--c-line)); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .12s; }
.tbl tbody tr:hover { background: rgb(var(--c-canvas) / .6); }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl .nw { white-space: nowrap; }
.tbl .c { text-align: center; }
.tbl tr.is-active { background: rgb(var(--c-brand-tint) / .55); }

.pager { display: flex; align-items: center; gap: 6px; }
.pager > * { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13.5px; color: rgb(var(--c-muted)); }
.pager > .is-active { background: rgb(var(--c-brand)); color: #fff; }
.pager > a:hover { background: rgb(var(--c-canvas)); }

/* ---------- Overlay: sheet, modal, drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 70; display: none; background: rgb(var(--c-ink) / .42); }
.overlay.is-open { display: flex; animation: idp-fade .18s ease; }
.overlay.sheet-wrap { align-items: flex-end; justify-content: center; }
.overlay.modal-wrap { align-items: center; justify-content: center; padding: 24px; }
.overlay.drawer-wrap { justify-content: flex-end; }
.sheet { width: 100%; max-width: 430px; background: #fff; border-radius: 32px 32px 0 0; padding: 12px 24px max(env(safe-area-inset-bottom), 24px); animation: idp-up .24s cubic-bezier(.2,.8,.2,1); max-height: 92vh; overflow-y: auto; }
.sheet .handle { width: 40px; height: 4px; border-radius: 9999px; background: rgb(var(--c-line)); margin: 0 auto 18px; }
.modal { width: 100%; max-width: 440px; background: #fff; border-radius: 28px; padding: 28px; box-shadow: var(--shadow-float); animation: idp-pop .2s cubic-bezier(.2,.8,.2,1); max-height: calc(100vh - 48px); overflow-y: auto; }
.modal-lg { max-width: 640px; }
.drawer { width: min(540px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; animation: idp-left .24s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-float); }
.drawer-head { padding: 22px 28px; border-bottom: 1px solid rgb(var(--c-line)); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px 28px; }
.drawer-foot { padding: 16px 28px; border-top: 1px solid rgb(var(--c-line)); display: flex; gap: 12px; justify-content: flex-end; background: #fff; }
@keyframes idp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes idp-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes idp-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes idp-left { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* PIN */
.pin-dots { display: flex; gap: 14px; justify-content: center; }
.pin-dots span { width: 14px; height: 14px; border-radius: 9999px; background: rgb(var(--c-line)); transition: background-color .12s, transform .12s; }
.pin-dots span.is-filled { background: rgb(var(--c-brand)); transform: scale(1.08); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 56px; border-radius: 16px; background: rgb(var(--c-canvas)); font-size: 22px; font-weight: 700; font-family: "Bricolage Grotesque", sans-serif; transition: background-color .12s, transform .1s; }
.keypad button:hover { background: rgb(var(--c-brand-tint)); }
.keypad button:active { transform: scale(.96); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 112px; transform: translate(-50%, 16px); background: rgb(var(--c-ink)); color: #fff; padding: 12px 18px; border-radius: 9999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-float); white-space: nowrap; }
.toast i { color: rgb(var(--c-lime)); font-size: 18px; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.w-body .toast { bottom: 32px; }

/* Carousel */
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { flex: 0 0 100%; scroll-snap-align: start; }
.dots { display: flex; gap: 6px; align-items: center; }
.dots span { width: 8px; height: 8px; border-radius: 9999px; background: rgb(255 255 255 / .45); transition: width .25s, background-color .25s; }
.dots span.is-active { width: 24px; background: #fff; }
.dots-dark span { background: rgb(var(--c-ink) / .18); }
.dots-dark span.is-active { background: rgb(var(--c-brand)); }

/* Barcode & QR */
.barcode rect { fill: rgb(var(--c-ink)); }
.qr rect { fill: rgb(var(--c-ink)); }

/* Konfeti dekoratif (hanya untuk layar perayaan) */
.confetti i { position: absolute; display: block; border-radius: 3px; opacity: .9; }

/* Tautan prototipe ke daftar layar */
.proto-link { position: fixed; left: 20px; bottom: 20px; z-index: 95; display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 9999px; background: #fff; color: rgb(var(--c-ink)); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-float); }
.proto-link:hover { color: rgb(var(--c-brand)); }
@media (min-width: 1100px) { .proto-link { display: inline-flex; } }

/* Utilitas kecil */
.text-muted { color: rgb(var(--c-muted)); }
.truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-hidden { display: none !important; }
.only-all { display: none; }
.show-all .only-all { display: flex; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Thumbnail banner: teks ikut lebar kotak */
.bt { container-type: inline-size; }
.bt-text { font-size: clamp(9px, 7.2cqw, 22px); line-height: 1.1; }

/* ==========================================================================
   Revisi 2: responsif semua perangkat, halaman info, filter kasir
   ========================================================================== */

/* Elemen lebar tetap tidak boleh melebihi layar */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg > * { flex: 1 0 auto; padding: 0 12px; }
.tabs::-webkit-scrollbar { display: none; }
img, svg, video { max-width: 100%; }
.is-filtered { display: none !important; }

/* Isi halaman info (customer & editor admin memakai gaya yang sama) */
.prose-idp { font-size: 15.5px; line-height: 1.7; color: rgb(var(--c-ink-2)); overflow-wrap: anywhere; }
.prose-idp > :first-child { margin-top: 0; }
.prose-idp > :last-child { margin-bottom: 0; }
.prose-idp h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.02em; font-size: 20px; line-height: 1.25; color: rgb(var(--c-ink)); margin: 22px 0 8px; }
.prose-idp h3 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 17px; line-height: 1.3; color: rgb(var(--c-ink)); margin: 18px 0 6px; }
.prose-idp p { margin: 0 0 14px; }
.prose-idp strong, .prose-idp b { color: rgb(var(--c-ink)); font-weight: 700; }
.prose-idp a { color: rgb(var(--c-brand)); text-decoration: underline; text-underline-offset: 2px; }
.prose-idp ul, .prose-idp ol { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.prose-idp ul > li, .prose-idp ol > li { position: relative; background: rgb(var(--c-canvas)); border-radius: 14px; line-height: 1.45; }
.prose-idp ul > li { padding: 12px 14px 12px 46px; }
.prose-idp ul > li::before { content: ""; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); border-radius: 9999px; background: url(../img/coin.png) center/cover no-repeat; }
.prose-idp ol { counter-reset: idp; }
.prose-idp ol > li { counter-increment: idp; padding: 11px 14px 11px 50px; }
.prose-idp ol > li::before { content: counter(idp); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 9999px; background: rgb(var(--c-brand)); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.prose-idp [style*="text-align: center"] { text-align: center; }
.editor:focus { box-shadow: inset 0 0 0 2px rgb(var(--c-brand)); border-radius: 0 0 16px 16px; }

/* Admin: sidebar jadi laci di layar < 1024px */
.a-burger { display: none; }
.nav-scrim { display: none; }
@media (max-width: 1023px) {
  .a-burger { display: inline-flex; }
  .a-side { position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh; transform: translateX(-105%); transition: transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-float); z-index: 80; }
  body.nav-open .a-side { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 75; background: rgb(var(--c-ink) / .42); animation: idp-fade .18s ease; }
  body.nav-open { overflow: hidden; }
  .a-top { padding: 0 16px; gap: 10px; height: 64px; }
  .a-content { padding: 20px 16px 48px; }
  .page-title { font-size: 26px; }
}
@media (max-width: 639px) {
  .page-head { align-items: flex-start; }
  .page-head > div:last-child { width: 100%; }
  .kpi .kpi-value { font-size: 26px; }
  .panel-head { padding: 18px 18px 0; flex-wrap: wrap; }
  .tbl th, .tbl td { padding: 11px 12px; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 18px; padding-right: 18px; }
  .modal { padding: 22px; }
  .a-top .input-icon { display: none; }
  .a-top .ml-auto { margin-left: auto; }
}

/* Kasir: sidebar jadi navigasi bawah di HP */
@media (max-width: 767px) {
  .k-side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: calc(68px + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom); flex-direction: row; justify-content: space-around; align-items: center; gap: 0; border-right: 0; border-top: 1px solid rgb(var(--c-line)); box-shadow: 0 -8px 24px rgb(12 31 64 / .06); }
  .k-side .k-logo, .k-side .mt-auto { display: none; }
  .k-side a.k-item { flex: 1; width: auto; height: 58px; border-radius: 14px; font-size: 10.5px; gap: 3px; }
  .k-side a.k-item i { font-size: 22px; }
  .k-main { padding-bottom: 76px; }
  .k-top { padding: 0 16px; gap: 10px; height: 60px; }
  .k-content { padding: 16px; }
  .w-body .toast { bottom: 92px; }
  .page-title { font-size: 24px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .k-side { width: 80px; }
  .k-side a.k-item { width: 66px; font-size: 10.5px; }
  .k-content { padding: 20px; }
}

/* Aplikasi HP di layar sangat kecil */
@media (max-width: 359px) {
  .m-pad, .m-section { padding-left: 16px; padding-right: 16px; }
  .m-head { padding-left: 16px; padding-right: 16px; }
  .m-head h1 { font-size: 26px; }
  .m-nav a { font-size: 10.5px; }
}

/* Anak grid/flex boleh menyusut; tabel & grafik menggulir di dalam panelnya sendiri */
:where(.grid > *, .panel, .card, .card-sm) { min-width: 0; }
:where(.flex > .flex-1) { min-width: 0; }

/* Sidebar admin lebih rapat supaya semua menu muat di layar laptop */
.a-store { margin: 12px 0 4px; padding: 7px 10px; }
.a-nav a { min-height: 36px; font-size: 13.5px; }
.a-nav .grp { padding: 9px 12px 3px; }
