/* Kasir Gerobak. Huruf disimpan di server sendiri supaya layar kasir tetap rapi tanpa internet.
   Plus Jakarta Sans (teks) dan Lilita One (angka uang & judul), keduanya OFL (lihat fonts/). */
@font-face {
  font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/plus-jakarta-sans-latin.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face { font-family: 'Lilita One'; font-display: swap; src: url(/fonts/LilitaOne-Regular.ttf) format('truetype'); }

/* Warna dari dagangan gerobak: cokelat mesis untuk kepala & teks, kuning keju hanya untuk aksi utama (Bayar),
   warna kategori sebagai penanda kelompok produk. */
:root {
  --cocoa: #2b1a12;
  --cocoa-2: #4b3427;
  --cocoa-3: #6d5446;
  --keju: #f5c03a;
  --keju-strong: #d9a21b;
  --keju-soft: #fdf1cc;
  --bg: #ebebe7;
  --surface: #ffffff;
  --surface-2: #f6f6f3;
  --line: #dcd9d2;
  --line-strong: #c6c1b8;
  --text: #2b1a12;
  --text-2: #4b3427;
  --muted: #776a62;
  --ok: #2f7a4b;
  --ok-soft: #e3f1e7;
  --warn: #9a5b05;
  --warn-soft: #fbefd6;
  --danger: #b8321c;
  --danger-soft: #f9e4df;
  --k1: #e8a900; --k2: #9b521c; --k3: #db7418; --k4: #c43f55; --k5: #3d7d9a; --k6: #6b8e23;
  --radius: 12px;
  --money: 'Lilita One', 'Plus Jakarta Sans', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
a { color: var(--cocoa-2); }
button { font: inherit; color: inherit; }
.money { font-family: var(--money); font-weight: 400; letter-spacing: .01em; }
.muted { color: var(--muted); }
.pre-line { white-space: pre-line; }
.boot { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
.ico { flex: none; }

/* ---------- kontrol */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px;
}
textarea { min-height: 70px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--cocoa); box-shadow: 0 0 0 3px var(--keju); }
:focus-visible { outline: 3px solid var(--keju-strong); outline-offset: 2px; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--cocoa); }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field-label { font-weight: 600; font-size: 14px; color: var(--text-2); }
.hint { color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.check input { margin-top: 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--cocoa-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--cocoa); border-color: var(--cocoa); color: #fff; }
.btn.primary:hover { background: var(--cocoa-2); }
.btn.bayar { background: var(--keju); border-color: var(--keju-strong); color: var(--cocoa); font-weight: 800; }
.btn.bayar:hover { background: #f9cd57; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(43, 26, 18, .06); }
.btn.sm { min-height: 34px; padding: 4px 10px; font-size: 14px; }
.btn.lg { min-height: 56px; font-size: 18px; padding: 10px 22px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; }
.icon-btn:hover { background: rgba(43, 26, 18, .08); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.high { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 24px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--cocoa); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: var(--danger-soft); color: var(--danger); padding: 14px 16px; border-radius: 10px; }
.error-box p { margin: 0 0 8px; }
.empty { text-align: center; color: var(--muted); padding: 22px !important; }

/* ---------- tabel */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--surface-2); font-weight: 600; color: var(--text-2); white-space: nowrap; position: sticky; top: 0; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-strong); border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #faf6ea; }
.tbl tr.batal td { color: var(--muted); text-decoration: line-through; }
.tbl tr.batal td:last-child { text-decoration: none; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 8px 0; color: var(--muted); font-size: 14px; }

/* ---------- tab */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 14px; overflow-x: auto; overflow-y: hidden; }
.tab-btn { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; cursor: pointer; white-space: nowrap; }
.tab-btn.active { color: var(--cocoa); border-bottom-color: var(--keju-strong); }

/* ---------- toast & modal */
.toasts { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100% - 24px)); }
.toast { background: var(--cocoa); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(43, 26, 18, .25); font-size: 14.5px; transition: opacity .3s, transform .3s; }
.toast.ok { background: var(--ok); }
.toast.error { background: var(--danger); }
.toast.warn { background: #7a4504; }
.toast.hide { opacity: 0; transform: translateY(6px); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(30, 18, 12, .5); z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 12px; }
.modal { background: var(--surface); border-radius: 16px; width: min(520px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.modal.wide { width: min(960px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 4px 18px; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 8px 18px 14px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94dvh; }
  .modal-foot .btn { flex: 1 1 auto; }
}

.about { text-align: center; }
.about h2 { font-family: var(--money); font-weight: 400; font-size: 28px; margin: 8px 0 0; }
.about-ver { color: var(--muted); margin: 2px 0 10px; }
.about-ayat { background: var(--surface-2); border-radius: 10px; padding: 12px; margin-top: 12px; }
.about-ayat .ar { font-size: 20px; line-height: 2; margin: 0 0 6px; }
.about-ayat .arti { font-size: 13.5px; margin: 0; }
.about-ayat .sumber { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

/* ---------- struk */
.receipt { font: 12px/1.35 ui-monospace, Consolas, 'Courier New', monospace; color: #000; background: #fff; }
.receipt.p58 { font-size: 11.5px; }
.receipt .r-center { text-align: center; }
.receipt .big { font-size: 1.4em; }
.receipt .b { font-weight: 700; }
.receipt .r-left { word-break: break-word; }
.receipt .r-pair { display: flex; justify-content: space-between; gap: 8px; }
.receipt .r-pair span:first-child { white-space: pre-wrap; }
.receipt .r-pair span:last-child { white-space: nowrap; }
.receipt .r-sep { border-top: 1px dashed #000; margin: 4px 0; }
.receipt.tebal { font: 700 15px/1.35 Arial, 'Helvetica Neue', Helvetica, sans-serif; }
.receipt.tebal .big { font-size: 1.35em; }
.receipt.tebal .tinggi { font-size: 1.2em; }
.receipt.tebal .r-sep { border-top: 2px dashed #000; }
.receipt.tebal.ukur, #print-area .receipt.tebal { width: 58mm; padding: 1mm 4mm 4mm; box-sizing: border-box; }
.receipt.tebal.p80.ukur, #print-area .receipt.tebal.p80 { width: 80mm; }
.receipt.tebal.ukur { position: absolute; left: -10000px; top: 0; visibility: hidden; }
.receipt-preview { background: var(--bg); border-radius: 10px; padding: 14px; display: flex; justify-content: center; max-height: 56vh; overflow: auto; }
.receipt-preview .receipt { padding: 12px 12px 18px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); width: 270px; }
#print-area { display: none; }
@media print {
  @page { margin: 0; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  #print-area .receipt { width: 100%; padding: 2mm 3mm 6mm; }
}

/* ================================================================ LAYAR MASUK (kasir & dashboard) */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: var(--cocoa);
}
.login-box { width: min(380px, 100%); background: var(--surface); border-radius: 18px; padding: 26px 22px 22px; }
.login-box h1 { font-family: var(--money); font-weight: 400; font-size: 34px; line-height: 1.05; color: var(--cocoa); }
.login-box .sub { margin: 6px 0 20px; color: var(--muted); }
.login-box .btn { width: 100%; margin-top: 4px; }
.pasang-btn { margin-top: 10px; }
.pasang .login-box { text-align: center; }
.pasang-ikon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 12px; display: block; }
.langkah-pasang { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 17px; }
.langkah-pasang li { display: flex; gap: 12px; align-items: center; }
.langkah-pasang .no { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--keju); color: var(--cocoa); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.langkah-pasang .no img { width: 40px; height: 40px; }
.login-foot { color: #d9c9bd; text-align: center; font-size: 13px; margin-top: 14px; }

/* ================================================================ APLIKASI KASIR */
.kasir { height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto; font-size: 16px; }
.k-head { background: var(--cocoa); color: #fff; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; }
.k-head .icon-btn { color: #fff; }
.k-head .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.k-title { flex: 1; min-width: 0; }
.k-title strong { display: block; font-family: var(--money); font-weight: 400; font-size: 21px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-title small { color: #dccbbd; font-size: 13px; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #f0e2d6; background: rgba(255, 255, 255, .1); padding: 4px 10px; border-radius: 99px; border: 0; cursor: pointer; white-space: nowrap; }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: #7bd389; }
.sync.offline .dot { background: #f0a43a; }
.sync.error .dot { background: #ff6b5b; }

.k-tools { background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 10px; display: grid; gap: 8px; }
.k-search { position: relative; }
.k-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.k-search input { padding-left: 38px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 6px 16px; font-weight: 700; cursor: pointer; min-height: 44px; font-size: 16px; display: inline-flex; align-items: center; gap: 7px; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--cocoa)); }
.chip.on { background: var(--cocoa); border-color: var(--cocoa); color: #fff; }

.k-main { min-height: 0; display: grid; grid-template-columns: 1fr; }
.grid { overflow: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; }
.grid-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 8px 2px 0; font-weight: 700; color: var(--text-2); }
.grid-group i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.tile {
  position: relative; text-align: left; border: 1px solid var(--line); border-left: 6px solid var(--c, var(--cocoa));
  background: var(--surface); border-radius: var(--radius); padding: 10px 10px 9px 11px; cursor: pointer; min-height: 84px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
}
.tile:active { transform: scale(.98); }
.tile .t-cat { font-size: 12px; color: var(--muted); line-height: 1.2; }
.tile .t-name { font-weight: 700; font-size: 17px; line-height: 1.22; }
.tile .t-price { font-family: var(--money); font-size: 23px; color: var(--cocoa); }
.tile .t-qty { position: absolute; top: -6px; right: -6px; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 99px; background: var(--keju); color: var(--cocoa); border: 2px solid var(--surface); display: grid; place-items: center; font-family: var(--money); font-size: 17px; }
.tile.in-cart { border-color: var(--keju-strong); border-left-color: var(--c, var(--cocoa)); background: #fffbef; }

.cart { display: none; }
.k-bar { background: var(--cocoa); color: #fff; display: flex; gap: 10px; align-items: center; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
.k-bar .sum { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.k-bar .sum small { display: block; color: #dccbbd; font-size: 13px; }
.k-bar .sum .money { font-size: 30px; line-height: 1.05; color: var(--keju); }
.k-bar .btn.bayar { min-height: 56px; padding: 8px 26px; font-size: 19px; }

.cart-lines { display: grid; gap: 2px; }
.cline { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.cline:last-child { border-bottom: 0; }
.cline .n { font-weight: 600; line-height: 1.25; }
.cline .p { color: var(--muted); font-size: 13.5px; }
.cline .tot { font-family: var(--money); font-size: 18px; text-align: right; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.stepper button { width: 42px; height: 40px; border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.stepper span { min-width: 36px; text-align: center; font-family: var(--money); font-size: 18px; }
.cart-empty { color: var(--muted); text-align: center; padding: 30px 10px; }

@media (min-width: 900px) {
  .kasir { grid-template-rows: auto auto 1fr; grid-template-columns: 1fr 380px; }
  .k-head { grid-column: 1 / -1; }
  .k-tools { grid-column: 1; }
  .k-main { grid-column: 1; }
  .k-bar { display: none; }
  .cart { display: flex; flex-direction: column; grid-column: 2; grid-row: 2 / 4; background: var(--surface); border-left: 1px solid var(--line); min-height: 0; }
  .cart-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
  .cart-head h2 { font-size: 17px; }
  .cart-body { flex: 1; overflow: auto; padding: 4px 16px; }
  .cart-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
  .cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
  .cart-total .money { font-size: 34px; }
  .toasts { bottom: 24px; }
}

/* ---------- bayar */
.pay-total { text-align: center; padding: 4px 0 14px; }
.pay-total small { color: var(--muted); }
.pay-total .money { display: block; font-size: 46px; line-height: 1.05; }
.pay-total .disc { color: var(--ok); font-weight: 600; font-size: 14px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-bottom: 14px; }
.seg button { min-height: 50px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--cocoa); color: #fff; border-color: var(--cocoa); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.quick button { flex: 1 1 72px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface-2); font-weight: 700; cursor: pointer; }
.cash-input { font-family: var(--money); font-size: 30px; text-align: right; min-height: 60px; }
.change { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--keju-soft); }
.change .money { font-size: 30px; }
.change.kurang { background: var(--danger-soft); color: var(--danger); }
.done { text-align: center; padding: 10px 0 4px; }
.done .ok-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: inline-grid; place-items: center; }
.done h3 { margin: 10px 0 2px; font-size: 18px; }
.done .money { font-size: 52px; line-height: 1.05; display: block; }
.done .muted { margin-bottom: 4px; }

/* ---------- menu & daftar */
.menu-list { display: grid; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 600; min-height: 58px; font-size: 17px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.menu-item small { display: block; font-weight: 400; color: var(--muted); }
.menu-item.danger { color: var(--danger); }
.list-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); align-items: center; }
.list-row:last-child { border-bottom: 0; }
.list-row .money { font-size: 18px; }
.list-row.batal { color: var(--muted); }
.list-row.batal .money { text-decoration: line-through; }
.note-box { background: var(--keju-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.note-box.warn { background: var(--warn-soft); color: var(--warn); }
.stock-grid { display: grid; grid-template-columns: 1fr 110px; gap: 8px 10px; align-items: center; margin-bottom: 8px; }
.stock-grid input { text-align: right; font-weight: 700; }
.summary-lines { display: grid; gap: 4px; margin: 10px 0; }
.summary-lines div { display: flex; justify-content: space-between; gap: 10px; }
.summary-lines .b { font-weight: 700; }
.pin-input { font-family: var(--money); font-size: 30px; letter-spacing: .3em; text-align: center; }

/* ================================================================ DASHBOARD (HP, untuk orang tua)
   Satu kolom selebar HP di semua layar, huruf 18 px, tombol minimal 56 px, empat tombol tetap di bawah. */
.d-app { min-height: 100dvh; max-width: 640px; margin: 0 auto; background: var(--bg); font-size: 18px; line-height: 1.45;
  padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.d-top { position: sticky; top: 0; z-index: 20; background: var(--cocoa); color: #fff; display: flex; align-items: center; gap: 6px;
  min-height: 62px; padding: 8px 14px; }
.d-top h1 { font-family: var(--money); font-weight: 400; font-size: 25px; line-height: 1.1; flex: 1; min-width: 0; }
.d-back { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 12px;
  min-height: 46px; padding: 0 14px 0 8px; font-weight: 700; font-size: 17px; cursor: pointer; }
.d-main { padding: 14px 14px 24px; }
.d-pad { padding: 20px; }
.d-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 2px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); max-width: 640px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.d-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 74px; color: var(--muted);
  text-decoration: none; font-weight: 700; font-size: 15px; }
.d-nav a .ic { position: relative; display: grid; place-items: center; width: 56px; height: 34px; border-radius: 99px; }
.d-nav a.on { color: var(--cocoa); }
.d-nav a.on .ic { background: var(--keju); }
.d-nav .cnt { position: absolute; top: -6px; right: 2px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--danger);
  color: #fff; font-size: 14px; display: grid; place-items: center; border: 2px solid var(--surface); }

.d-daybar { display: grid; grid-template-columns: 60px 1fr 60px; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.d-arrow { border: 2px solid var(--line-strong); background: var(--surface); border-radius: 14px; display: grid; place-items: center; cursor: pointer; min-height: 64px; }
.d-arrow.next svg { transform: scaleX(-1); }
.d-arrow:disabled { opacity: .35; cursor: default; }
.d-daytitle { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: 14px; padding: 6px 8px; min-height: 64px; cursor: pointer; }
.d-daytitle strong { font-size: 19px; line-height: 1.2; }
.d-daytitle small { color: var(--muted); font-size: 14px; }
.d-datepick { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; min-height: 0; border: 0; }

.d-hero { background: var(--cocoa); color: #fff; border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; }
.d-hero small { color: #e3d2c4; font-size: 17px; }
.d-hero .money { display: block; font-size: clamp(30px, 10.5vw, 46px); line-height: 1.05; color: var(--keju); margin: 2px 0 6px; white-space: nowrap; }
.d-hero p { margin: 2px 0 0; font-size: 18px; }
.d-hero p.naik { color: #a6e3b4; }
.d-hero p.turun { color: #ffc2b5; }
.d-alert { display: flex; align-items: center; gap: 12px; background: var(--danger); color: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; text-decoration: none; }
.d-alert span { flex: 1; display: grid; }
.d-alert strong { font-size: 19px; }
.d-alert > svg:last-child { transform: scaleX(-1); }

.d-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.d-sec h2 { font-size: 20px; margin-bottom: 8px; }
.d-sec > summary { font-size: 19px; font-weight: 700; cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.d-empty { color: var(--muted); margin: 6px 0; }
.d-lead { margin: 0 0 14px; color: var(--text-2); }
.d-note { color: var(--muted); font-size: 16px; margin: 10px 2px; }
.d-note.bad { color: var(--danger); font-weight: 700; }
.d-label { margin: 4px 2px 6px; font-weight: 700; color: var(--text-2); }

.d-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.d-row:last-child { border-bottom: 0; }
.d-row.total { font-size: 20px; }
.d-rank { margin: 0; padding-left: 28px; }
.d-rank li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.d-rank li:last-child { border-bottom: 0; }
.d-rank li span { display: block; font-weight: 600; }
.d-rank li strong { color: var(--muted); font-weight: 600; font-size: 16px; }

.d-lapak { display: block; color: inherit; text-decoration: none; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
a.d-lapak:active { background: var(--surface-2); }
.d-lapak .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.d-lapak .top strong { font-size: 20px; }
.d-lapak .top .money { font-size: 26px; }
.d-lapak .sub { color: var(--muted); font-size: 16px; }
.d-lapak .st { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; font-size: 17px; }
.d-lapak .st i { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.d-lapak.buka .st i { background: #2fa35a; }
.d-lapak.pas .st { color: var(--ok); }
.d-lapak.pas .st i { background: var(--ok); }
.d-lapak.selisih { border-color: var(--danger); }
.d-lapak.selisih .st { color: var(--danger); }
.d-lapak.selisih .st i { background: var(--danger); }
.d-lapak .st.warn { color: var(--warn); }

.d-dayrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; min-height: 54px; padding: 6px 2px;
  border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.d-dayrow:last-child { border-bottom: 0; }
.d-dayrow .n { font-weight: 600; }
.d-dayrow strong { font-family: var(--money); font-weight: 400; font-size: 22px; }
.d-dayrow.on { background: var(--keju-soft); }

.d-ev { background: var(--surface); border: 2px solid var(--line); border-left: 8px solid var(--warn); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; display: grid; gap: 8px; }
.d-ev.high { border-left-color: var(--danger); }
.d-ev.info { border-left-color: var(--line-strong); }
.d-ev.done { opacity: .65; }
.d-ev h3 { font-size: 21px; }
.d-ev p { margin: 0; }
.d-ev .kapan { color: var(--muted); font-size: 16px; }
.d-ok { text-align: center; padding: 30px 10px; color: var(--ok); display: grid; justify-items: center; gap: 6px; }
.d-ok strong { font-size: 24px; }
.d-ok p { color: var(--muted); margin: 0; }

.d-menus { display: grid; gap: 10px; }
.d-menu { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px;
  min-height: 72px; text-align: left; color: inherit; text-decoration: none; cursor: pointer; font-size: 18px; }
.d-menu .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--keju-soft); display: grid; place-items: center; flex: none; }
.d-menu strong { display: block; font-size: 19px; }
.d-menu small { color: var(--muted); font-size: 15px; }

.d-struk { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; cursor: pointer; font-size: 17px; }
.d-struk .jam { font-weight: 700; color: var(--text-2); }
.d-struk .isi { min-width: 0; }
.d-struk .isi strong { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.d-struk .isi small { display: block; color: var(--muted); font-size: 15px; }
.d-struk .money { font-size: 21px; }
.d-struk.batal { opacity: .6; }
.d-struk.batal .money { text-decoration: line-through; }

.d-verdict { margin-top: 10px; border-radius: 12px; padding: 12px; text-align: center; font-weight: 800; font-size: 21px; }
.d-verdict.good { background: var(--ok-soft); color: var(--ok); }
.d-verdict.bad { background: var(--danger-soft); color: var(--danger); }
.d-porsi { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.d-porsi:last-child { border-bottom: 0; }
.d-porsi span { color: var(--text-2); font-size: 16px; }
.d-porsi em { font-style: normal; font-weight: 700; color: var(--ok); }
.d-porsi.bad em { color: var(--danger); }

.d-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.d-chip { min-height: 46px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 99px; border: 2px solid var(--line-strong);
  background: var(--surface); color: inherit; text-decoration: none; font-weight: 700; font-size: 16px; }
.d-chip.on { background: var(--cocoa); border-color: var(--cocoa); color: #fff; }
.d-rep { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.d-rep strong { display: block; }
.d-rep small { color: var(--muted); font-size: 15px; }
.d-rep .money { font-size: 21px; white-space: nowrap; }

.d-prod { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-left: 8px solid var(--c, var(--line-strong)); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
  min-height: 62px; cursor: pointer; font-size: 18px; }
.d-prod strong { display: block; font-weight: 600; }
.d-prod small { color: var(--muted); font-size: 15px; }
.d-prod .money { font-size: 22px; white-space: nowrap; }
.d-prod > svg { transform: scaleX(-1); color: var(--muted); flex: none; }
.d-prod.off { opacity: .55; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.d-sec .btn.block, .d-main > .btn.block { margin-top: 10px; }
.d-sticky { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); padding: 10px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); }

/* formulir & modal di dashboard: lebih besar */
.d-form .field-label, .d-detail { font-size: 17px; }
.big-input, .d-form input:not([type=checkbox]), .d-form select { min-height: 54px; font-size: 19px; }
.check.big { font-size: 18px; align-items: center; min-height: 48px; }
.check.big input { width: 28px; height: 28px; }
.d-form details, .d-sec details { margin-top: 8px; }
.d-form summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; color: var(--text-2); cursor: pointer; }
body.d-body .modal, body.d-body .toast { font-size: 17px; }
body.d-body .modal-head h3 { font-size: 21px; }
body.d-body .modal .btn { min-height: 54px; font-size: 18px; }
body.d-body .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
.d-login .login-box h1 { font-size: 32px; }
.d-login .field-label { font-size: 17px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
