* { box-sizing: border-box; }
:root { --teal:#0f766e; --teal2:#14b8a6; --bg:#f6f4ef; --card:#fffdf8; --ink:#1c2420; --muted:#6b7280; --red:#dc2626; --line:#e7e2d6; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); }
.hidden { display:none !important; }
.muted { color:var(--muted); } .small { font-size:.8rem; } .err { color:var(--red); min-height:1.2em; }
button { font:inherit; cursor:pointer; }
input, select, textarea { font:inherit; padding:.55rem .7rem; border:1.5px solid #cbd5d1; border-radius:.6rem; background:#fff; width:100%; }
input:focus, select:focus, textarea:focus { outline:2px solid var(--teal2); border-color:var(--teal); }
label { display:block; font-size:.82rem; font-weight:600; margin:.6rem 0 .25rem; }
.btn { border:1.5px solid #cbd5d1; background:#fff; border-radius:.7rem; padding:.55rem 1rem; font-weight:600; }
.btn.primary { background:var(--teal); border-color:var(--teal); color:#fff; }
.btn.danger { background:var(--red); border-color:var(--red); color:#fff; }
.btn.ghost { background:transparent; }
.btn.big { width:100%; padding:.8rem; font-size:1.05rem; }
.btn.small { padding:.3rem .7rem; font-size:.85rem; }
.btn:disabled { opacity:.45; cursor:not-allowed; }

/* layar kunci */
.lock { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:1rem; }
.lock-box { background:var(--card); border:1px solid var(--line); border-radius:1.2rem; padding:1.6rem; max-width:380px; width:100%; text-align:center; box-shadow:0 8px 30px rgba(0,0,0,.06); }
.lock-logo { font-size:2.6rem; }
.lock-users { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin:1rem 0; }
.lock-user { border:2px solid var(--line); background:#fff; border-radius:.8rem; padding:.7rem .4rem; }
.lock-user.sel { border-color:var(--teal); background:#ecfdf5; }
.lock-user .r { font-size:.75rem; color:var(--muted); text-transform:capitalize; }

/* header + nav atas */
header { position:sticky; top:0; z-index:20; background:var(--bg); border-bottom:1px solid var(--line); }
.hdr-top { display:flex; justify-content:space-between; align-items:flex-start; padding:.7rem 1rem .3rem; }
.shop-name { font-size:1.45rem; font-weight:800; }
.on-duty { font-size:.72rem; letter-spacing:.06em; color:var(--teal); font-weight:700; }
nav#topNav { display:flex; justify-content:space-around; padding:.2rem .3rem 0; }
.nav-item { position:relative; background:none; border:none; padding:.45rem .3rem .55rem; font-size:.72rem; color:#374151; display:flex; flex-direction:column; align-items:center; gap:2px; min-width:52px; }
.nav-item .ic { font-size:1.25rem; }
.nav-item.active { color:var(--teal); font-weight:700; box-shadow: inset 0 -3px 0 var(--teal); }
.badge { position:absolute; top:0; right:2px; background:var(--red); color:#fff; font-size:.65rem; font-weight:800; min-width:18px; height:18px; border-radius:9px; display:flex; align-items:center; justify-content:center; padding:0 4px; }

main { padding:.9rem; max-width:760px; margin:0 auto; }
.card { background:var(--card); border:1px solid var(--line); border-radius:1rem; padding:1rem; margin-bottom:.9rem; }
.card h3 { margin:.1rem 0 .6rem; }
.big-num { font-size:1.9rem; font-weight:800; }
.up { color:#059669; font-weight:700; } .down { color:var(--red); font-weight:700; } .flat { color:var(--muted); font-weight:700; }
.pill { display:inline-block; padding:.1rem .55rem; border-radius:99px; font-size:.72rem; font-weight:700; background:#ecfdf5; color:#065f46; }
.pill.red { background:#fef2f2; color:var(--red); } .pill.gray { background:#f3f4f6; color:#4b5563; }
.bars { display:flex; align-items:flex-end; gap:6px; height:90px; margin:.6rem 0 .2rem; }
.bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:.62rem; color:var(--muted); }
.bar { width:70%; background:var(--teal2); border-radius:4px 4px 0 0; min-height:3px; }
.bar.today { background:var(--teal); }
.row { display:flex; justify-content:space-between; align-items:center; gap:.6rem; padding:.45rem 0; border-bottom:1px dashed var(--line); }
.row:last-child { border-bottom:none; }
.strip { display:flex; gap:.6rem; }
.strip > button { flex:1; text-align:left; }

/* daftar & kelompok */
.group-title { position:sticky; top:118px; z-index:5; background:var(--bg); padding:.45rem .2rem; font-weight:800; font-size:.85rem; color:var(--teal); text-transform:uppercase; letter-spacing:.03em; }
.chips { display:flex; gap:.4rem; flex-wrap:wrap; margin:.6rem 0; }
.chip { border:1.5px solid #cbd5d1; background:#fff; border-radius:99px; padding:.3rem .8rem; font-size:.82rem; font-weight:600; }
.chip.sel { background:var(--teal); color:#fff; border-color:var(--teal); }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.6rem; }
.pcard { background:var(--card); border:1px solid var(--line); border-radius:.9rem; padding:.7rem; text-align:left; width:100%; }
.pcard:active { transform:scale(.98); }
.pcard .nm { font-weight:700; font-size:.9rem; }
.pcard .meta { font-size:.75rem; color:var(--muted); margin-top:.2rem; }
.minus-label { display:inline-block; margin-top:.35rem; font-size:.72rem; font-weight:700; color:#92400e; background:#fef3c7; padding:.12rem .5rem; border-radius:99px; }
.oos { color:var(--red); font-weight:700; }

/* keranjang */
.cart-row { border:1px solid var(--line); border-radius:.8rem; padding:.6rem; margin-bottom:.5rem; background:#fff; }
.qty-ctl { display:flex; align-items:center; gap:.5rem; }
.qty-ctl button { width:32px; height:32px; border-radius:50%; border:1.5px solid #cbd5d1; background:#fff; font-size:1.05rem; font-weight:800; }
input.price { width:130px; text-align:right; font-weight:700; }
.minus-warn { color:var(--red); font-weight:700; font-size:.8rem; }

/* sheet (panel geser) */
#sheetWrap { position:fixed; inset:0; z-index:50; }
.sheet-bg { position:absolute; inset:0; background:rgba(0,0,0,.45); }
.sheet { position:absolute; left:0; right:0; bottom:0; max-height:92vh; overflow-y:auto; background:var(--bg); border-radius:1.2rem 1.2rem 0 0; padding:1rem; max-width:760px; margin:0 auto; }
.sheet h2 { margin:.2rem 0 .8rem; font-size:1.15rem; }
.x { float:right; border:none; background:#e5e7eb; width:34px; height:34px; border-radius:50%; font-size:1rem; }
.sect { background:var(--card); border:1px solid var(--line); border-radius:1rem; padding:.9rem; margin-bottom:.8rem; }
.sect h4 { margin:.1rem 0 .6rem; }

/* pemilih barang */
.picker-list { max-height:300px; overflow-y:auto; border:1px solid var(--line); border-radius:.8rem; background:#fff; }
.picker-item { display:block; width:100%; text-align:left; background:none; border:none; border-bottom:1px solid #f1efe8; padding:.6rem .8rem; }
.picker-item:disabled { opacity:.5; }
.picker-head { position:sticky; top:0; background:#ecfdf5; color:var(--teal); font-weight:800; font-size:.75rem; padding:.35rem .8rem; text-transform:uppercase; }
.banner { background:#fffbeb; border:1px solid #fde68a; color:#92400e; border-radius:.7rem; padding:.5rem .8rem; font-size:.85rem; margin-bottom:.5rem; }

/* saran ketik */
.suggest { position:relative; }
.suggest-box { position:absolute; left:0; right:0; top:100%; z-index:30; background:#fff; border:1px solid #cbd5d1; border-radius:.7rem; overflow:hidden; box-shadow:0 10px 24px rgba(0,0,0,.12); }
.suggest-box button { display:block; width:100%; text-align:left; background:none; border:none; padding:.55rem .8rem; border-bottom:1px solid #f3f4f6; }

/* tiket */
.ticket { background:var(--card); border:1px solid var(--line); border-radius:1rem; padding:.85rem; margin-bottom:.7rem; width:100%; text-align:left; }
.ticket .no { font-weight:800; }
.status { font-size:.72rem; font-weight:800; padding:.15rem .55rem; border-radius:99px; background:#e0f2f1; color:var(--teal); text-transform:capitalize; }
.status.selesai { background:#dcfce7; color:#166534; } .status.diambil { background:#e5e7eb; color:#374151; } .status.batal { background:#fee2e2; color:#991b1b; }
.warranty-badge { background:var(--red); color:#fff; font-size:.68rem; font-weight:800; padding:.15rem .5rem; border-radius:99px; }

/* struk & toast */
.receipt { font-family: ui-monospace, monospace; font-size:.85rem; white-space:pre-wrap; }
.toast { position:fixed; left:50%; bottom:22px; transform:translateX(-50%); background:#111827; color:#fff; padding:.65rem 1.1rem; border-radius:99px; z-index:99; font-size:.9rem; box-shadow:0 8px 24px rgba(0,0,0,.3); }
.flex { display:flex; gap:.6rem; } .flex > * { flex:1; }
.mt { margin-top:.7rem; } .right { text-align:right; }
