:root {
  --brand: #7a3b22;
  --brand-dark: #5a2a17;
  --brand-soft: #f8d6df;
  --gold: #e88aa6;
  --bg: #fff5f7;
  --card: #fffdfd;
  --line: #f2d9e0;
  --text: #3a231b;
  --muted: #9a7d78;
  --ok: #3f7a4a;
  --ok-soft: #e1efe1;
  --warn: #a8691b;
  --warn-soft: #f8ead3;
  --bad: #a33d32;
  --bad-soft: #f6e0dc;
  --info: #3a5873;
  --info-soft: #e0e8f0;
  --radius: 18px;
  --serif: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --sans: 'Nunito', system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: var(--serif); margin: 0; font-weight: 700; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  background: var(--brand); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.topbar-logo { width: 44px; height: 44px; border-radius: 50%; background: #fff; padding: 2px; }
.topbar h1 { flex: 1; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-back {
  border: 1.5px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12);
  color: #fff; border-radius: 999px; padding: 7px 16px; font-weight: 700;
}

main { max-width: 680px; margin: 0 auto; padding: 16px; }

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 0;
}
.bottomnav a span { font-size: 20px; line-height: 1.2; filter: grayscale(1); opacity: .7; }
.bottomnav a.active { color: var(--brand); }
.bottomnav a.active span { filter: none; opacity: 1; }
.bottomnav .nav-add span {
  width: 54px; height: 54px; border-radius: 50%; margin-top: -26px;
  background: var(--brand); color: #fff; font-size: 30px; line-height: 54px; text-align: center;
  filter: none; opacity: 1; box-shadow: 0 4px 14px rgba(122,59,34,.35); border: 3px solid var(--bg);
}

/* ---------- Cards & layout ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(90,42,23,.05);
}
.card h2 { font-size: 17px; margin-bottom: 12px; color: var(--brand-dark); }
.card h2 small { font-family: var(--sans); font-weight: 600; color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.hr { border: 0; border-top: 1px dashed var(--line); margin: 12px 0; }

.hello { margin: 4px 2px 16px; }
.hello h2 { font-size: 24px; color: var(--brand-dark); }
.hello p { margin: 4px 0 0; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
}
.stat b { display: block; font-size: 22px; font-family: var(--serif); color: var(--brand-dark); }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat.hl { background: var(--brand); border-color: var(--brand); }
.stat.hl b, .stat.hl span { color: #fff; }

/* ---------- Forms ---------- */
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 5px; }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; outline: none; font-size: 16px;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 800; font-size: 15.5px;
  background: var(--brand); color: #fff; cursor: pointer; width: 100%;
}
.btn:active { transform: scale(.98); }
.btn.alt { background: var(--brand-soft); color: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn.wa { background: #1f9e55; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; width: auto; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btns.one { grid-template-columns: 1fr; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 14px; color: var(--muted);
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.seg { display: flex; background: var(--brand-soft); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 4px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--brand-dark); }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ---------- Order list ---------- */
.olist { display: flex; flex-direction: column; gap: 10px; }
.oitem {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
}
.oitem .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.oitem .no { font-family: var(--serif); font-weight: 700; color: var(--brand-dark); }
.oitem .name { font-weight: 800; }
.oitem .meta { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.oitem .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--info-soft); color: var(--info); }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty b { display: block; font-size: 40px; }

/* ---------- Order form items ---------- */
.lines { margin: 0 0 6px; }
.line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dotted var(--line); align-items: flex-start; }
.line .d { flex: 1; min-width: 0; }
.line .d b { display: block; }
.line .d small { color: var(--muted); display: block; }
.line .p { font-weight: 800; white-space: nowrap; }
.line .x { border: 0; background: var(--bad-soft); color: var(--bad); width: 28px; height: 28px; border-radius: 8px; font-weight: 800; flex: none; }
.qty { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 6px; background: #fff; }
.qty button { border: 0; background: var(--brand-soft); width: 32px; height: 30px; font-weight: 800; }
.qty span { min-width: 34px; text-align: center; font-weight: 800; }

.totals .between { padding: 4px 0; }
.totals .grand { font-size: 20px; font-weight: 800; color: var(--brand-dark); border-top: 2px solid var(--line); margin-top: 6px; padding-top: 8px; }
.totals input { width: 110px; padding: 6px 10px; text-align: right; }

/* ---------- Stepper ---------- */
.stepper { display: flex; justify-content: space-between; position: relative; margin: 14px 0 6px; }
.stepper::before { content: ''; position: absolute; left: 12%; right: 12%; top: 18px; height: 3px; background: var(--line); }
.step { position: relative; flex: 1; text-align: center; border: 0; background: transparent; padding: 0; }
.step i {
  display: block; width: 38px; height: 38px; margin: 0 auto 4px; border-radius: 50%;
  background: var(--brand-soft); color: #fff; font-style: normal; font-weight: 800; line-height: 38px;
  border: 3px solid var(--card);
}
.step span { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.step.done i { background: var(--gold); }
.step.cur i { background: var(--brand); }
.step.cur span { color: var(--text); }
.status-line { font-weight: 800; color: var(--info); padding: 0 4px; }

.note {
  background: var(--brand-soft); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; display: flex; gap: 10px;
}

/* ---------- Invoice ---------- */
.inv-wrap { overflow-x: auto; margin: 0 -4px 14px; padding: 4px; }
.invoice {
  background: #fff; color: #3a231b; border-radius: 6px; padding: 26px 22px; max-width: 640px; margin: 0 auto;
  box-shadow: 0 2px 14px rgba(90,42,23,.12); position: relative; overflow: hidden; font-size: 14px;
}
.invoice::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 7px; background: var(--brand); }
.inv-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.inv-head img { width: 76px; height: 76px; }
.inv-head .biz { flex: 1; }
.inv-head .biz b { font-family: var(--serif); font-size: 17px; color: var(--brand-dark); display: block; }
.inv-head .biz small { display: block; color: #8a6a66; font-size: 12px; line-height: 1.4; }
.inv-title { text-align: right; }
.inv-title h3 { font-size: 20px; letter-spacing: 2px; color: var(--brand); }
.inv-title small { display: block; color: #8a6a66; font-size: 12px; }
.inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: #fff1f4; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; }
.inv-meta .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; color: #a77d84; text-transform: uppercase; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-table th { text-align: left; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: #a77d84; border-bottom: 2px solid var(--brand); padding: 6px 4px; }
.inv-table td { padding: 8px 4px; border-bottom: 1px solid #f3e1e6; vertical-align: top; }
.inv-table td small { color: #9a7d78; display: block; }
.inv-table .r { text-align: right; white-space: nowrap; }
.inv-sum { margin-left: auto; width: 62%; min-width: 210px; margin-top: 10px; font-size: 13.5px; }
.inv-sum .between { padding: 3px 0; }
.inv-sum .grand { font-weight: 800; font-size: 16px; color: #fff; background: var(--brand); padding: 8px 10px; border-radius: 8px; margin: 6px 0; }
.inv-sum .bal { font-weight: 800; color: var(--bad); }
.inv-pay { display: flex; gap: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed #ecc3cf; font-size: 13px; }
.inv-pay .t { flex: 1; }
.inv-pay b.lbl { display: block; font-size: 10.5px; letter-spacing: 1px; color: #a77d84; text-transform: uppercase; margin-bottom: 4px; }
.inv-pay img { width: 110px; height: 110px; object-fit: contain; border: 1px solid #f3e1e6; border-radius: 8px; }
.inv-foot { text-align: center; color: #9a7d78; font-size: 12px; margin-top: 16px; }
.stamp {
  position: absolute; right: 18px; top: 120px; transform: rotate(-14deg);
  border: 3px solid var(--ok); color: var(--ok); font-weight: 800; letter-spacing: 3px; font-size: 22px;
  padding: 4px 14px; border-radius: 8px; opacity: .75;
}

/* ---------- Products editor ---------- */
.pcat input.cat { font-weight: 800; }
.prow { display: grid; grid-template-columns: 1fr 92px 34px; gap: 8px; margin-bottom: 8px; }
.prow input { padding: 9px 10px; }
.prow .x { border: 0; background: var(--bad-soft); color: var(--bad); border-radius: 10px; font-weight: 800; }

/* ---------- Sheet / toast ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 50; background: rgba(58,35,27,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet[hidden] { display: none; }
.sheet .panel {
  background: var(--card); width: 100%; max-width: 680px; border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto;
  animation: up .2s ease-out;
}
.sheet .panel h2 { font-size: 18px; margin-bottom: 12px; color: var(--brand-dark); }
.sheet .opt { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; font-weight: 700; }
.sheet .opt small { display: block; font-weight: 600; color: var(--muted); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Print: invoice only ---------- */
@media print {
  @page { margin: 10mm; }
  body { background: #fff; padding: 0; }
  .topbar, .bottomnav, .no-print, .toast, .sheet { display: none !important; }
  main { padding: 0; max-width: none; }
  .invoice { box-shadow: none; max-width: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- v2 additions ---------- */
.bottomnav a span { filter: none; opacity: 1; display: flex; align-items: center; justify-content: center; height: 26px; }
.bottomnav a.active span { color: var(--brand); }
.bottomnav .nav-add span { display: flex; align-items: center; justify-content: center; height: 54px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin: 2px 0 12px; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.link-btn { border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 12.5px; text-decoration: underline; padding: 0 4px; }
.link-btn[hidden] { display: none; }
.sheet-x { border: 0; background: var(--brand-soft); color: var(--brand-dark); width: 34px; height: 34px; border-radius: 50%; font-weight: 800; flex: none; }
.sheet .opt.sel { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.btn:disabled { opacity: .5; }
.price-in { width: 92px; padding: 7px 8px; text-align: right; }
.price-in.need { border-color: var(--bad); background: var(--bad-soft); }
.prow { grid-template-columns: 1fr 70px 70px 34px; }
.prow3 { display: grid; grid-template-columns: 1fr 72px 72px 72px; gap: 8px; margin-bottom: 8px; }
.prow3 input { padding: 9px 8px; }
.note.warn { background: var(--warn-soft); color: var(--warn); font-weight: 700; margin-bottom: 14px; }
.f .flabel { display: block; font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.thumb { width: 140px; max-height: 200px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); display: block; margin-bottom: 8px; background: #fff; }
.label-sm small { font-weight: 600; }
label.f > span small { font-weight: 600; }

/* invoice v2 */
.inv-head { margin-bottom: 14px; }
.inv-head .biz small { font-size: 12px; }
.inv-titlebar { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--brand); padding-bottom: 8px; margin-bottom: 14px; }
.inv-titlebar h3 { font-size: 22px; letter-spacing: 3px; color: var(--brand); }
.inv-titlebar div { text-align: right; font-size: 13px; }
.inv-titlebar div b { display: block; font-size: 15px; }
.inv-titlebar div small { color: #8a6a66; }
.inv-sum .req { font-weight: 800; color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 8px; margin-top: 4px; }
.inv-terms { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #ecc3cf; font-size: 11.5px; color: #5e4540; line-height: 1.5; }
.inv-terms b.lbl { display: block; font-size: 10.5px; letter-spacing: 1px; color: #a77d84; text-transform: uppercase; margin-bottom: 4px; }
.inv-terms ol { margin: 0; padding-left: 18px; }
.stamp { top: 150px; }

/* small-screen fixes */
.seg button { min-width: 0; }
#zone { display: grid; grid-template-columns: 1fr 1fr; }
.prow { grid-template-columns: minmax(0, 1fr) 64px 64px 32px; }
.prow3 { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 64px)); }
.prow3 b { font-size: 11.5px; line-height: 1.2; }
input, select, textarea { min-width: 0; }
.line > div[style] { flex: none; }
.line input.price-in { width: 84px; padding: 7px 8px; text-align: right; }
@media (max-width: 380px) {
  .row.stack-sm { flex-direction: column; align-items: stretch; gap: 0; }
}
.stat b { font-size: 19px; }


/* full-screen image viewer */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(20,16,8,.92); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.lightbox .sheet-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; }

/* sync */
.sync-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #8fd19e; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.sync-dot[hidden] { display: none; }
.sync-dot.busy { background: #f3d27a; }
.sync-dot.err { background: #f08a7e; }
.sync-big { font-family: ui-monospace, Menlo, monospace; font-size: 23px; font-weight: 800; letter-spacing: 2px; text-align: center; background: var(--brand-soft); color: var(--brand-dark); border-radius: 16px; padding: 18px 10px; word-break: break-all; }
.sync-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.linkcard { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.linkcard b { display: block; color: var(--brand-dark); }
.linkcard small { color: var(--muted); }
.linkcard > span { font-size: 26px; color: var(--muted); }

/* kunci PIN */
.pinlock { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; }
.pin-inner { width: 100%; max-width: 340px; text-align: center; }
.pin-logo { width: 84px; height: 84px; margin-bottom: 8px; }
.pinlock h2 { font-size: 22px; color: var(--brand-dark); }
.pin-sub { color: var(--muted); margin: 4px 0 16px; font-size: 14.5px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; height: 18px; margin-bottom: 6px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand); }
.pin-dots i.on { background: var(--brand); }
.pin-msg { min-height: 20px; color: var(--bad); font-weight: 700; font-size: 14px; margin: 6px 0 10px; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-keys button { height: 62px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font-size: 24px; font-weight: 700; color: var(--text); }
.pin-keys button:active { background: var(--brand-soft); }
.pin-keys .pin-ok { background: var(--brand); color: #fff; border-color: var(--brand); font-size: 18px; }
.pin-foot { display: flex; justify-content: center; gap: 24px; margin-top: 16px; min-height: 24px; }
.pin-foot .link-btn { font-size: 15px; }
.pinlock.shake .pin-dots { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

/* kalendar */
.cal-head h2 { font-size: 18px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); padding-bottom: 2px; }
.cal-cell { position: relative; aspect-ratio: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 3px 0 0; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 14px; color: var(--text); min-width: 0; }
.cal-cell.blank { border: 0; background: none; }
.cal-cell span { font-weight: 700; }
.cal-cell b { font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.cal-cell.busy { background: #fde8ee; }
.cal-cell.full { background: var(--bad-soft); border-color: #e9b9b2; }
.cal-cell.full b { background: var(--bad); color: #fff; }
.cal-cell.off, .cal-cell.holiday { background: #f1ecec; color: #b0a3a3; }
.cal-cell.holiday::after { content: 'cuti'; font-size: 9px; font-weight: 800; color: var(--bad); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-cell i { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.cal-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line); }
.lg.busy { background: #fde8ee; } .lg.full { background: var(--bad-soft); } .lg.off { background: #f1ecec; } .lg.ev { background: var(--gold); border-radius: 50%; }

/* laporan */
.bar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; }
.bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-t { height: 10px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; }
.bar-t i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar-row b { font-size: 13.5px; white-space: nowrap; }
.rtable { overflow-x: auto; }
.rtable table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rtable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 2px solid var(--brand); padding: 6px 4px; }
.rtable td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.rtable .r { text-align: right; white-space: nowrap; }
.rtable .tot td { font-weight: 800; border-top: 2px solid var(--line); }
.rtable .neg { color: var(--bad); }
.print-only { display: none; }
@media print { .print-only { display: block; } .card { break-inside: avoid; box-shadow: none; } }

.kvs .between { align-items: flex-start; padding: 2px 0; }
.kvs .between > span:last-child { white-space: nowrap; }

/* ---------- Mika's Kitchen ---------- */
.prow2 { display: grid; grid-template-columns: minmax(0, 1fr) 92px 34px; gap: 8px; margin-bottom: 8px; }
.prow2 input { padding: 9px 10px; min-width: 0; }
.prow2 .x { border: 0; background: var(--bad-soft); color: var(--bad); border-radius: 10px; font-weight: 800; }
.hello h2 { font-weight: 600; }
.chips .chip { flex: none; }
[hidden] { display: none !important; }
input[type=time], input[type=date] { width: 100%; }

/* ================= Gaya comel Mika's Kitchen (ikut logo) ================= */
:root { --pink: #f4a7b9; --pink-2: #f9c9d6; --pink-3: #fde6ec; --rose: #e57f9c; --script: 'Pacifico', cursive; }
body {
  background-color: #fff5f7;
  background-image: radial-gradient(#f9d3dd 1.2px, transparent 1.3px);
  background-size: 22px 22px;
}
/* Bar atas pink lembut, tulisan coklat */
.topbar {
  background: linear-gradient(135deg, #f9c4d2 0%, #fcdde6 60%, #fbe7ec 100%);
  color: var(--brand-dark); box-shadow: 0 3px 14px rgba(229,127,156,.25);
  border-bottom: 2px dashed rgba(122,59,34,.18);
}
.topbar h1 { font-family: var(--script); font-weight: 400; font-size: 21px; letter-spacing: .2px; padding-top: 2px; }
.topbar-logo { box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(122,59,34,.2); width: 42px; height: 42px; }
.btn-back { color: var(--brand-dark); border-color: rgba(122,59,34,.35); background: rgba(255,255,255,.55); }

/* Kad: bucu bulat, bayang pink, garis putus-putus dalam macam lencana logo */
.card {
  border-radius: 24px; border: 1.5px solid #f6d3dd; background: #fffdfe;
  box-shadow: 0 6px 18px rgba(229,127,156,.10); position: relative;
}
.card > h2:first-child, .card > .between:first-child h2 { display: flex; align-items: center; gap: 6px; }
.card > h2:first-child::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px var(--pink-3); flex: none; }
.card > h2:first-child small { margin-left: 2px; }

/* Kad sambutan di Utama */
.hero {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(140deg, #fbd3de 0%, #fde9ee 55%, #fff6f8 100%);
  border-radius: 28px; padding: 16px; margin: 2px 0 16px;
  box-shadow: 0 8px 22px rgba(229,127,156,.22); overflow: hidden;
}
.hero::after { content: ''; position: absolute; inset: 7px; border: 2px dashed rgba(229,127,156,.45); border-radius: 22px; pointer-events: none; }
.hero img { width: 82px; height: 82px; border-radius: 50%; flex: none; background: #fff; box-shadow: 0 0 0 4px #fff, 0 4px 12px rgba(122,59,34,.18); }
.hero .t { min-width: 0; position: relative; z-index: 1; }
.hero small { display: block; font-weight: 800; color: var(--rose); font-size: 13px; letter-spacing: .3px; }
.hero h2 { font-family: var(--script); font-weight: 400; font-size: 25px; color: var(--brand-dark); line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.hero p { margin: 2px 0 0; color: #8a5a55; font-size: 14px; }
.hero .hearts { position: absolute; right: 14px; top: 10px; color: var(--rose); opacity: .55; font-size: 15px; letter-spacing: 4px; z-index: 1; }

/* Statistik */
.stat { border-radius: 20px; border: 1.5px solid #f6d3dd; background: #fff; box-shadow: 0 4px 12px rgba(229,127,156,.08); position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; right: -14px; top: -14px; width: 48px; height: 48px; border-radius: 50%; background: var(--pink-3); }
.stat b, .stat span { position: relative; }
.stat.hl { background: linear-gradient(135deg, #8d4628, #6a301b); border-color: transparent; box-shadow: 0 6px 16px rgba(122,59,34,.28); }
.stat.hl::before { background: rgba(255,255,255,.12); }
.stat.hl span { color: #fbd9e2; }

/* Butang */
.btn { border-radius: 999px; background: linear-gradient(135deg, #8d4628, #6f321d); box-shadow: 0 4px 12px rgba(122,59,34,.22); }
.btn.alt { background: linear-gradient(135deg, #fbd3de, #fde6ec); color: var(--brand-dark); box-shadow: none; }
.btn.ghost { background: #fff; box-shadow: none; border: 1.5px solid #f3cbd6; }
.btn.wa { background: linear-gradient(135deg, #25b864, #1a9450); }
.btn.danger { box-shadow: none; }
.chip { border-radius: 999px; }
.chip.on { background: var(--rose); border-color: var(--rose); }
.seg { background: var(--pink-3); border-radius: 999px; }
.seg button { border-radius: 999px; }
.seg button.on { color: var(--brand-dark); box-shadow: 0 2px 8px rgba(229,127,156,.3); }

/* Senarai order */
.oitem { border-radius: 18px; border: 1.5px solid #f6d3dd; background: #fff; border-left: 5px solid var(--pink); }
.tag { background: var(--pink-3); }
.tag.info { background: #fbe0e8; color: #b34a6c; }

/* Kosong */
.empty::before { content: '🧁'; display: block; font-size: 38px; margin-bottom: 6px; }

/* Menu bawah */
.bottomnav { background: rgba(255,253,254,.96); border-top: 1.5px solid #f6d3dd; box-shadow: 0 -4px 16px rgba(229,127,156,.12); }
.bottomnav a.active span, .bottomnav a.active { color: var(--rose); }
.bottomnav .nav-add span { background: linear-gradient(135deg, #f19ab3, #e57f9c); box-shadow: 0 6px 16px rgba(229,127,156,.5); border-color: #fff5f7; }

/* Stepper status */
.step.done i { background: var(--pink); } .step.cur i { background: var(--rose); }

/* Kunci PIN */
.pinlock { background: linear-gradient(170deg, #fbd3de 0%, #fff5f7 45%); }
.pin-logo { width: 110px; height: 110px; border-radius: 50%; box-shadow: 0 0 0 5px #fff, 0 6px 18px rgba(229,127,156,.35); }
.pin-keys button { border-radius: 999px; background: #fff; border-color: #f6d3dd; }
.pin-dots i.on { background: var(--rose); border-color: var(--rose); }

/* Lagi */
.linkcard > span { color: var(--rose); }
.status-line { color: var(--brand); }
