/* ============================================================
   Kaf — Design System
   Satu palet & satu bahasa visual untuk SEMUA halaman.
   ============================================================ */

:root {
  /* ── Warna ── */
  --canvas:      #EFE9E2;   /* latar luar, krem hangat */
  --surface:     #FFFFFF;   /* kartu */
  --surface-2:   #FAF6F1;   /* kartu sekunder / chip */
  --line:        #E7DED4;   /* garis halus */
  --line-soft:   #F1EAE2;

  --brand:       #5C3D2E;   /* coklat espresso */
  --brand-700:   #4A3125;
  --brand-tint:  #F3EBE4;   /* latar aktif */
  --accent:      #C08552;   /* karamel, untuk harga */

  --ink:         #1F1A17;   /* teks utama */
  --ink-2:       #6B6259;   /* teks sekunder */
  --ink-3:       #A79C91;   /* teks redup */
  --ok:          #3F7D58;
  --warn:        #B4632B;

  /* ── Bentuk ── */
  --r-card: 20px;
  --r-btn:  13px;
  --r-pill: 999px;

  /* ── Bayangan ── */
  --sh-1: 0 2px 8px rgba(31,26,23,.05);
  --sh-2: 0 8px 24px rgba(31,26,23,.07);
  --sh-3: 0 18px 44px rgba(31,26,23,.10);

  --ease: cubic-bezier(.32,.72,0,1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input  { font: inherit; color: inherit; }
h1,h2,h3,p { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor;
      stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   Kerangka: rail | stage | bill
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 84px minmax(0,1fr) 372px;
  gap: 14px;
  height: 100dvh;
  padding: 14px;
}

/* ── Rail (navigasi kiri) ── */
.rail {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  padding: 18px 10px 14px;
}

.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--brand); color: #fff;
  font-size: 22px; font-weight: 800; letter-spacing: -.5px;
  box-shadow: 0 6px 16px rgba(92,61,46,.28);
}

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 26px; width: 100%; }

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 100%; padding: 11px 4px;
  border-radius: 14px;
  color: var(--ink-3);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-item span { font-size: 10.5px; font-weight: 600; letter-spacing: .1px; }
.nav-item:hover { background: var(--surface-2); color: var(--ink-2); }
.nav-item.is-active { background: var(--brand-tint); color: var(--brand); }
.nav-item.is-active svg { stroke-width: 2; }

.rail-foot { margin-top: auto; display: flex; flex-direction: column;
             align-items: center; gap: 14px; width: 100%; }

.avatar {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--brand);
}

/* ── Stage (tengah) ── */
.stage {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  padding: 22px 24px;
  overflow: hidden;
}

.search {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 280px; max-width: 400px;
  height: 46px; padding: 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.search:focus-within { border-color: var(--brand); background: #fff; }
.search svg { color: var(--ink-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none;
                font-size: 14px; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }

/* ── Baris atas: judul Kategori + pencarian ── */
.stage-top { display: flex; align-items: center; justify-content: space-between;
             gap: 20px; flex-wrap: wrap; }
.stage-top h2 { font-size: 19px; font-weight: 800; letter-spacing: -.5px; }
.stage-top .sub { font-size: 12.5px; color: var(--ink-3); font-weight: 500;
                  margin-top: 1px; }

/* ── Chips kategori: ikon di atas, label di bawah (gaya referensi 2) ── */
.chips { display: flex; gap: 10px; margin-top: 15px; overflow-x: auto;
         padding: 3px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  flex: none; width: 76px; padding: 12px 6px 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink-2);
  transition: all .18s var(--ease);
}
.chip svg { width: 23px; height: 23px; stroke-width: 1.6; }
.chip span { font-size: 10.5px; font-weight: 600; letter-spacing: .1px; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-active {
  background: var(--brand-tint); border-color: var(--brand); color: var(--brand);
  box-shadow: 0 5px 14px rgba(92,61,46,.16);
}
.chip.is-active svg { stroke-width: 2; }

/* ── Judul seksi ── */
.section-head { display: flex; align-items: baseline; justify-content: space-between;
                gap: 12px; margin: 24px 0 16px; }
.section-head h2 { font-size: 25px; font-weight: 800; letter-spacing: -.8px; }
.section-head span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

/* ── Grid produk (scroll area) ── */
.grid {
  flex: 1; min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;   /* penting: tanpa ini muncul scrollbar horizontal */
  display: grid; gap: 16px; align-content: start;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.grid::-webkit-scrollbar { width: 8px; }
.grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.grid::-webkit-scrollbar-track { background: transparent; }

/* Kartu MAKANAN & SNACK — gambar bulat, teks tengah (gaya referensi 1) */
.grid.mode-round { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }

.card-round {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 20px 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              border-color .2s var(--ease);
}
.card-round:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: var(--line);
}
.card-round .thumb {
  width: 116px; height: 116px; border-radius: 50%;
  background: var(--surface-2);
  display: grid; place-items: center;
  overflow: hidden; flex: none;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.card-round .thumb img { width: 100%; height: 100%; object-fit: cover; }
/* ilustrasi berwarna mengisi lingkaran */
.card-round .thumb svg { width: 76%; height: 76%; }
.card-round .name { margin-top: 15px; font-size: 15px; font-weight: 700;
                    letter-spacing: -.2px; line-height: 1.35; }
.card-round .price { margin-top: 6px; font-size: 16px; font-weight: 800;
                     color: var(--accent); letter-spacing: -.3px; }
.card-round .stock { margin-top: 6px; font-size: 11.5px; color: var(--ink-2);
                     font-weight: 500; }
.card-round .stock.is-out { color: var(--warn); font-weight: 700; }

/* Kartu MINUMAN — gambar besar kiri-atas + kustomisasi (gaya referensi) */
.grid.mode-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card-wide {
  display: flex; flex-direction: column;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card-wide:hover { box-shadow: var(--sh-2); border-color: var(--line); }

/* ── Bagian atas: gambar besar + nama/harga/deskripsi ── */
.card-wide .top { display: flex; gap: 14px; align-items: flex-start; }
.card-wide .thumb {
  width: 104px; height: 104px; border-radius: 18px; flex: none;
  background: var(--surface-2); overflow: hidden;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.card-wide .thumb img { width: 100%; height: 100%; object-fit: cover; }
/* ilustrasi berwarna mengisi penuh kotak */
.card-wide .thumb svg { width: 88%; height: 88%; }
.card-wide .body { min-width: 0; flex: 1; padding-top: 2px; }
.card-wide .name { font-size: 15px; font-weight: 700; letter-spacing: -.25px;
                   line-height: 1.3; }
.card-wide .desc { margin-top: 5px; font-size: 11.5px; color: var(--ink-3);
                   line-height: 1.45; font-weight: 500;
                   display: -webkit-box; -webkit-line-clamp: 2;
                   -webkit-box-orient: vertical; overflow: hidden; }
.card-wide .price { margin-top: 9px; font-size: 17px; font-weight: 800;
                    color: var(--accent); letter-spacing: -.4px; }

/* ── Selector: label kiri, opsi kanan ── */
.card-wide .opts { margin-top: 15px; display: flex; flex-direction: column; gap: 11px; }

/* dua grup sebaris (Suhu | Ukuran) */
.opts-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.opt-grp { min-width: 0; }
.opt-grp .lab { display: block; font-size: 10.5px; font-weight: 600;
                color: var(--ink-3); margin-bottom: 7px;
                letter-spacing: .2px; text-transform: uppercase; }
.opt-grp .list { display: flex; gap: 6px; flex-wrap: wrap; }

/* opsi bulat (Suhu & Ukuran) */
.sel-c {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  transition: all .15s var(--ease);
}
.sel-c svg { width: 17px; height: 17px; }
.sel-c:hover { border-color: var(--ink-3); }
.sel-c.is-on {
  background: #fff; border-color: var(--brand); color: var(--brand);
  box-shadow: 0 3px 10px rgba(92,61,46,.18);
}

/* opsi pill (Gula) */
.sel-p {
  padding: 8px 13px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap;
  transition: all .15s var(--ease);
}
.sel-p:hover { border-color: var(--ink-3); }
.sel-p.is-on {
  background: var(--brand-tint); border-color: var(--brand);
  color: var(--brand); font-weight: 700;
}

/* ── Tombol tambah (dipakai kartu makanan, snack, dan minuman) ── */
.add {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; height: 42px; margin-top: 15px;
  background: var(--brand); color: #fff;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
  transition: background .18s var(--ease), transform .12s var(--ease);
}
.add:hover { background: var(--brand-700); }
.add:active { transform: scale(.985); }
.add svg { width: 16px; height: 16px; }
.add:disabled { background: var(--line); color: var(--ink-3);
                cursor: not-allowed; }

/* di kartu bulat (makanan/snack) tombolnya sedikit lebih ringkas */
.card-round .add { height: 38px; margin-top: 13px; font-size: 13px;
                   border-radius: 11px; }
.card-round .add svg { width: 15px; height: 15px; }

.card-wide.is-out { opacity: .62; }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center;
         justify-content: center; gap: 4px; text-align: center; }
.empty[hidden] { display: none; }
.empty p { font-size: 15px; font-weight: 700; }
.empty span { font-size: 13px; color: var(--ink-3); }

/* ============================================================
   Panel Bill (kanan)
   ============================================================ */
.bill {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  padding: 20px;
  overflow: hidden;
}

.bill-head { display: flex; align-items: flex-start; justify-content: space-between; }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--ink-3);
           letter-spacing: .3px; text-transform: uppercase; }
.bill-head h3 { font-size: 22px; font-weight: 800; letter-spacing: -.7px; margin-top: 2px; }
.table-tag { text-align: right; }

.seg { display: flex; gap: 6px; margin-top: 16px;
       background: var(--surface-2); padding: 4px; border-radius: var(--r-pill); }
.seg button {
  flex: 1; padding: 9px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: all .18s var(--ease);
}
.seg button.is-active { background: var(--brand); color: #fff;
                        box-shadow: 0 4px 12px rgba(92,61,46,.22); }

.bill-items { flex: 1; min-height: 0; overflow-y: auto; margin-top: 16px;
              display: flex; flex-direction: column; gap: 14px;
              scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.bill-items::-webkit-scrollbar { width: 6px; }
.bill-items::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.bitem { display: flex; gap: 11px; align-items: flex-start; }
.bitem .thumb {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: var(--surface-2); overflow: hidden;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.bitem .thumb img { width: 100%; height: 100%; object-fit: cover; }
.bitem .thumb svg { width: 80%; height: 80%; }
.bitem .info { flex: 1; min-width: 0; }
.bitem .nm { font-size: 13.5px; font-weight: 700; letter-spacing: -.1px; }
.bitem .var { font-size: 11.5px; color: var(--ink-2); font-weight: 500;
              margin-top: 2px; line-height: 1.4; letter-spacing: .1px; }
.bitem .ln { font-size: 13px; font-weight: 700; margin-top: 5px; }

.stepper { display: flex; align-items: center; gap: 7px; flex: none; }
.stepper button {
  width: 24px; height: 24px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-2);
  transition: all .15s var(--ease);
}
.stepper button:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper button svg { width: 13px; height: 13px; stroke-width: 2.4; }
.stepper b { min-width: 16px; text-align: center; font-size: 13.5px; font-weight: 700; }

.bill-empty { flex: 1; display: flex; flex-direction: column; align-items: center;
              justify-content: center; gap: 6px; text-align: center; padding: 20px 0; }
.bill-empty svg { width: 34px; height: 34px; color: var(--line); stroke-width: 1.4; }
.bill-empty p { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.bill-empty span { font-size: 12px; color: var(--ink-3); }

.bill-foot { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.sum { display: flex; flex-direction: column; gap: 8px; }
.sum-row { display: flex; align-items: center; justify-content: space-between;
           font-size: 13px; color: var(--ink-2); }
.sum-row b { font-weight: 700; color: var(--ink); }
.sum-row.is-total { margin-top: 4px; padding-top: 11px; border-top: 1px solid var(--line);
                    font-size: 15px; font-weight: 700; color: var(--ink); }
.sum-row.is-total b { font-size: 19px; font-weight: 800; letter-spacing: -.5px; }

.mt { margin-top: 16px; }
.pay { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 9px; }
.pay-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 4px; border-radius: var(--r-btn);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; color: var(--ink-2);
  transition: all .18s var(--ease);
}
.pay-tile svg { width: 19px; height: 19px; }
.pay-tile:hover { border-color: var(--ink-3); }
.pay-tile.is-active {
  background: #fff; border-color: var(--brand); color: var(--brand);
  box-shadow: 0 4px 12px rgba(92,61,46,.14);
}

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; height: 50px; margin-top: 16px;
  background: var(--brand); color: #fff;
  border-radius: var(--r-btn);
  font-size: 14.5px; font-weight: 700; letter-spacing: .1px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(92,61,46,.26);
  transition: background .18s var(--ease), transform .12s var(--ease);
}
.btn-primary:hover  { background: var(--brand-700); }
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { background: var(--line); color: var(--ink-3);
                        box-shadow: none; cursor: not-allowed; }
.btn-primary svg { width: 18px; height: 18px; }

/* ============================================================
   FAB keranjang (mobile)
   ============================================================ */
.cart-fab { display: none; }
.scrim {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(31,26,23,.4);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* ============================================================
   Lembar (sheet): login, pembayaran, struk
   PENTING: visibilitas TIDAK bergantung pada animasi — browser
   menjeda animasi CSS di tab yang tidak aktif, sehingga modal
   bisa tak terlihat. Jadi overlay & sheet terlihat secara default;
   animasi hanya menyentuh `transform`.
   ============================================================ */
.sheet-bg {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(31,26,23,.42);
  backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  overflow-y: auto;
}
.sheet-bg.is-closing { animation: kaf-fade-out .2s var(--ease) both; }

@keyframes kaf-fade-out { from { opacity: 1; } to { opacity: 0; } }

.sheet {
  width: min(440px, 100%); max-height: 90dvh; overflow-y: auto;
  background: var(--surface); border-radius: 24px;
  box-shadow: var(--sh-3); padding: 24px;
  animation: kaf-pop .26s var(--ease) both;
}
.sheet.is-wide { width: min(520px, 100%); }
@keyframes kaf-pop { from { transform: translateY(14px) scale(.97); } to { transform: none; } }

.sheet-title { font-size: 19px; font-weight: 800; letter-spacing: -.5px; }
.sheet-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }

.field { margin-top: 16px; }
.lab2 { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3);
        letter-spacing: .3px; text-transform: uppercase; margin-bottom: 7px; }
.mt { margin-top: 16px; }

.input {
  width: 100%; height: 46px; padding: 0 15px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-btn); outline: 0; font-size: 14px;
}
.input:focus { border-color: var(--brand); background: #fff; }
.input.big { height: 54px; font-size: 20px; font-weight: 800;
             letter-spacing: -.5px; text-align: right; }

.form-err {
  margin-top: 12px; padding: 10px 13px;
  background: #FBF0EC; border: 1px solid #EBD8C8; border-radius: 11px;
  font-size: 12.5px; color: var(--warn); font-weight: 600;
}

.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.btn-ghost {
  flex: none; padding: 0 22px; height: 50px;
  border-radius: var(--r-btn); border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  white-space: nowrap;
  transition: all .18s var(--ease);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

/* ── Pembayaran ── */
.pay-total {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; padding: 15px 17px;
  background: var(--brand-tint); border-radius: 15px;
}
.pay-total span { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.pay-total b { font-size: 24px; font-weight: 800; color: var(--brand);
               letter-spacing: -.7px; }

.pay-rows { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; }
.pay-rows div { display: flex; justify-content: space-between;
                font-size: 12.5px; color: var(--ink-2); }
.pay-rows b { font-weight: 700; color: var(--ink); }

.pay-pick { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.pay-pick button {
  height: 44px; border-radius: var(--r-btn);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: all .16s var(--ease);
}
.pay-pick button:hover { border-color: var(--ink-3); }
.pay-pick button.is-on {
  background: #fff; border-color: var(--brand); color: var(--brand);
  font-weight: 700; box-shadow: 0 4px 12px rgba(92,61,46,.14);
}

.quick { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.quick button {
  padding: 8px 13px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  transition: all .16s var(--ease);
}
.quick button:hover { border-color: var(--brand); color: var(--brand); }

.change-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.change-row b { font-size: 19px; font-weight: 800; color: var(--ok);
                letter-spacing: -.5px; }
.change-row b.is-short { color: var(--warn); }

/* ── Struk ── */
.receipt { font-size: 13px; }
.rc-head { text-align: center; padding-bottom: 15px;
           border-bottom: 1px dashed var(--line); }
.rc-mark {
  display: grid; place-items: center; width: 44px; height: 44px;
  margin: 0 auto 10px; border-radius: 13px;
  background: var(--brand); color: #fff; font-size: 21px; font-weight: 800;
}
.rc-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.rc-head p { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.rc-meta { display: flex; flex-direction: column; gap: 6px;
           padding: 14px 0; border-bottom: 1px dashed var(--line); }
.rc-meta div { display: flex; justify-content: space-between; font-size: 12px; }
.rc-meta span { color: var(--ink-3); }
.rc-meta b { font-weight: 700; }

.rc-items { padding: 14px 0; border-bottom: 1px dashed var(--line);
            display: flex; flex-direction: column; gap: 11px; }
.rc-line { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.rc-line b { font-weight: 700; white-space: nowrap; }
.rc-opt { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.rc-sums { padding: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.rc-sums div { display: flex; justify-content: space-between; font-size: 12.5px; }
.rc-sums span { color: var(--ink-2); }
.rc-sums b { font-weight: 700; }
.rc-total { margin-top: 5px; padding-top: 11px; border-top: 1px solid var(--line);
            font-size: 15px !important; font-weight: 800; }
.rc-total b { font-size: 20px; font-weight: 800; letter-spacing: -.5px; }

.rc-foot { text-align: center; font-size: 11.5px; color: var(--ink-3);
           margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ── Tombol akun staf di rail ── */
.user-chip {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 5px 14px rgba(92,61,46,.24);
  transition: transform .16s var(--ease);
}
.user-chip:hover { transform: translateY(-2px); }
.user-chip.is-guest {
  background: var(--surface-2); color: var(--ink-3);
  border: 1px solid var(--line); box-shadow: none;
}
.user-chip.is-guest svg { width: 19px; height: 19px; }

/* ── Keadaan memuat ── */
.loading {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 60px 20px; text-align: center;
}
.loading p { font-size: 15px; font-weight: 700; }
.loading span { font-size: 12.5px; color: var(--ink-3); max-width: 320px; }
.loading .btn-primary { width: auto; padding: 0 24px; margin-top: 8px; }

.spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: kaf-spin .8s linear infinite;
}
@keyframes kaf-spin { to { transform: rotate(360deg); } }

/* ============================================================
   PWA: tombol Install & penanda offline
   ============================================================ */
.install-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 38;
  display: flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 20px;
  background: var(--surface); color: var(--brand);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: var(--sh-2);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.install-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.install-btn:active { transform: none; }
.install-btn svg { width: 18px; height: 18px; }
.install-btn[hidden] { display: none; }

.net-badge {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%);
  z-index: 39;
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  background: var(--brand); color: #fff;
  border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(31,26,23,.24);
}
.net-badge svg { width: 16px; height: 16px; flex: none; }
.net-badge[hidden] { display: none; }
/* pesan "versi baru" pakai warna karamel supaya beda dari offline */
.net-badge.is-info { background: var(--accent); }

/* di mobile, tombol install naikkan sedikit agar tak menutupi keranjang */
@media (max-width: 860px) {
  .install-btn {
    right: 16px; left: 16px; bottom: 84px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .install-btn:hover { transform: none; }
}

/* ============================================================
   RESPONSIF
   ============================================================ */

/* Tablet: sembunyikan rail, bill tetap */
@media (max-width: 1180px) {
  .app { grid-template-columns: minmax(0,1fr) 340px; }
  .rail {
    position: fixed; left: 14px; top: 14px; bottom: 14px; z-index: 35;
    width: 76px; transform: translateX(calc(-100% - 20px));
    transition: transform .28s var(--ease);
  }
  .rail.is-open { transform: none; }
  .stage { padding-top: 22px; }
}

/* Mobile: bill jadi panel bawah */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0,1fr); padding: 10px;
         padding-bottom: 86px; gap: 10px; }
  .stage { padding: 18px 16px; }
  .section-head h2 { font-size: 21px; }
  .shop h1 { font-size: 19px; }
  .grid.mode-round { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .card-round .thumb { width: 96px; height: 96px; }
  .grid.mode-wide { grid-template-columns: 1fr; }

  .bill {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    max-height: 86dvh;
    border-radius: 24px 24px 0 0;
    transform: translateY(calc(100% + 20px));
    transition: transform .3s var(--ease);
    box-shadow: 0 -14px 44px rgba(31,26,23,.16);
  }
  .bill.is-open { transform: none; }

  .cart-fab {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 36;
    display: flex; align-items: center; gap: 12px;
    height: 58px; padding: 0 18px;
    background: var(--brand); color: #fff;
    border-radius: var(--r-pill);
    box-shadow: 0 12px 30px rgba(92,61,46,.34);
    transition: transform .22s var(--ease);
  }
  .cart-fab svg { width: 21px; height: 21px; flex: none; }
  .cart-fab #fab-count {
    display: grid; place-items: center; min-width: 24px; height: 24px;
    padding: 0 7px; border-radius: var(--r-pill);
    background: rgba(255,255,255,.2);
    font-size: 12px; font-weight: 700;
  }
  .cart-fab b { margin-left: auto; font-size: 14.5px; font-weight: 800; }
  .cart-fab:disabled { background: var(--line); color: var(--ink-3);
                       box-shadow: none; }
}

@media (max-width: 420px) {
  .grid.mode-round { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-round { padding: 16px 10px 14px; }
  .card-round .thumb { width: 82px; height: 82px; }
  .card-round .name { font-size: 13.5px; }
  .section-head h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
