/* ================================================================
   POS F&B — design system
   Breakpoint: HP < 640px · Tablet 640–1099px · Komputer ≥ 1100px
   ================================================================ */
:root {
  --bg: #f5f4ef;
  --bg-2: #eeede6;
  --panel: #ffffff;
  --ink: #16201b;
  --ink-2: #3b4641;
  --muted: #727b76;
  --line: #e6e5de;
  --line-2: #f0efe9;
  --accent: #0e7a5f;
  --accent-2: #0b5f4a;
  --accent-soft: #e3f2ec;
  --accent-ink: #ffffff;
  --side: #102620;
  --side-ink: #b9cbc4;
  --gold: #c98a1b;
  --gold-soft: #fbf1dc;
  --blue: #2f6fd6;
  --blue-soft: #e7effc;
  --violet: #7a4fd0;
  --violet-soft: #f0eafb;
  --danger: #c0352b;
  --danger-soft: #fcebe9;
  --warn: #b8650d;
  --warn-soft: #fdf1e2;
  --ok: #138a4f;
  --ok-soft: #e4f5eb;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(20, 30, 25, .05), 0 1px 3px rgba(20, 30, 25, .04);
  --sh-2: 0 4px 16px rgba(20, 30, 25, .08), 0 1px 3px rgba(20, 30, 25, .05);
  --sh-3: 0 24px 60px rgba(10, 20, 15, .22);
  --side-w: 248px;
  --rail-w: 78px;
  --bnav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 680; letter-spacing: -.015em; }
h1 { font-size: 21px; } h2 { font-size: 16px; } h3 { font-size: 14px; } h4 { font-size: 13px; }
p { line-height: 1.5; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.b { font-weight: 650; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.pos-c { color: var(--ok); } .neg-c { color: var(--danger); }
.row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.spacer { flex: 1; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span-all { grid-column: 1 / -1; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; }
.brand { padding: 18px 18px 12px; display: flex; gap: 11px; align-items: center; color: #fff; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(140deg, #19a37f, #0b5f4a); display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.logo svg { width: 20px; height: 20px; stroke: #fff; }
.brand .bt { font-weight: 700; font-size: 15px; line-height: 1.15; }
.brand .bs { font-size: 11px; color: #7fa094; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.nav { padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-sep { margin: 14px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #6b8a7f; font-weight: 650; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: inherit; font-weight: 520; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 620; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #2bd19f; }
.nav a .cnt { margin-left: auto; background: #2bd19f; color: #08261c; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.me-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; cursor: pointer; }
.me-card:hover { background: rgba(255, 255, 255, .06); }
.me-card b { color: #fff; display: block; font-size: 13px; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: rgba(245, 244, 239, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); min-height: 64px; position: relative; z-index: 5; }
.top h1 { font-size: 19px; }
.top .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.content { padding: 22px 24px 40px; overflow-y: auto; flex: 1; }
.content.flush { padding: 0; overflow: hidden; }
.bnav { display: none; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 18px; }

/* ---------------------------------------------------------------- components */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; }
.card-pad { padding: 16px 18px; }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; min-height: 54px; }
.card-head h2 { font-size: 15px; }
.card-head .hint { margin-left: 2px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; white-space: nowrap; min-height: 38px; color: var(--ink); transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { border-color: #cfcec5; background: #fbfbf8; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 2px rgba(14, 122, 95, .3); }
.btn.primary:hover { background: var(--accent-2); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-2); }
.btn.danger { color: var(--danger); border-color: #f1cdc9; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 20px; font-size: 16px; min-height: 52px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 38px; }
.btn.sm.icon { width: 30px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 620; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; line-height: 1.3; }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.accent { background: var(--accent-soft); color: var(--accent-2); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; }
.av svg.i { width: 20px; height: 20px; }
.av.sm { width: 32px; height: 32px; border-radius: 10px; }
.av.sm svg.i { width: 16px; height: 16px; }
.t-ok { background: var(--ok-soft); color: var(--ok); } .t-warn { background: var(--warn-soft); color: var(--warn); }
.t-danger { background: var(--danger-soft); color: var(--danger); } .t-accent { background: var(--accent-soft); color: var(--accent); }
.t-blue { background: var(--blue-soft); color: var(--blue); } .t-violet { background: var(--violet-soft); color: var(--violet); }
.t-gold { background: var(--gold-soft); color: var(--gold); } .t-gray { background: var(--bg-2); color: var(--ink-2); }

input[type=text], input[type=number], input[type=password], input[type=date], input[type=time], input[type=search], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #dcdbd3; border-radius: 10px; background: #fff; min-height: 40px; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 122, 95, .14); }
textarea { min-height: 70px; resize: vertical; }
.search { position: relative; }
.search svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 560; }
label.f > span { color: var(--ink-2); }
label.chk { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.callout { padding: 11px 14px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-2); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 620; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfbf8; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #fafaf6; }
table.t tr.off td { color: #a3a9a5; }
table.t tr.total td { font-weight: 700; background: #fafaf6; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.rank { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--bg-2); color: var(--ink-2); }
.rank.r1 { background: #fbe7b5; color: #8a5a00; } .rank.r2 { background: #e8e8e8; color: #555; } .rank.r3 { background: #f3d9c4; color: #85471c; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; background: var(--bg-2); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 7px 14px; cursor: pointer; color: var(--muted); font-weight: 620; border-radius: 9px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { background: var(--panel); color: var(--ink); box-shadow: var(--sh-1); }
.tabs button .c { background: var(--line); color: var(--ink-2); border-radius: 99px; font-size: 11px; padding: 0 6px; }
.tabs button.on .c { background: var(--accent); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chip { border: 1px solid var(--line); background: var(--panel); padding: 6px 13px; border-radius: 99px; cursor: pointer; font-weight: 600; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.chip:hover { border-color: #cfcec5; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
a.chip { display: inline-flex; gap: 6px; align-items: center; }

/* KPI */
.kpi { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 580; }
.kpi .v { font-size: 23px; font-weight: 750; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; line-height: 1.15; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delta { font-weight: 650; font-size: 12px; }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }
.hero { background: linear-gradient(135deg, #0f3a2f 0%, #0e7a5f 100%); color: #e9f6f1; border: 0; }
.hero .l, .hero .s { color: #a9d8c7; }
.hero .delta.down { color: #ffc2b8; } .hero .delta.up { color: #9af0cd; }
.hero .av { background: rgba(255,255,255,.12); color: #fff; }

/* list rows (transaksi, pembelian, mutasi) */
.lgroup { margin-bottom: 18px; }
.lgroup-h { display: flex; align-items: baseline; gap: 10px; padding: 4px 4px 8px; position: sticky; top: -22px; background: var(--bg); z-index: 2; }
.lgroup-h h3 { font-size: 13.5px; }
.lgroup-h .muted { font-size: 12px; }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.lrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .1s; }
.lrow:last-child { border-bottom: 0; }
.lrow.recv { grid-template-columns: auto minmax(0, 1fr) minmax(0, 250px); }
.lrow:hover { background: #fafaf6; }
.lrow.off { opacity: .55; }
.lrow .tt { font-weight: 640; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lrow .mm { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .rr { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lrow .amt { font-weight: 720; font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }

/* stat bar */
.bar-h { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.bar-h > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.stack > i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }

/* timeline */
.tl { display: flex; flex-direction: column; gap: 0; }
.tl-i { display: grid; grid-template-columns: 22px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.tl-i::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-d { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2); color: var(--muted); display: grid; place-items: center; }
.tl-d svg.i { width: 12px; height: 12px; stroke-width: 3; }
.tl-i.done .tl-d { background: var(--accent); color: #fff; }
.tl-i.bad .tl-d { background: var(--danger); color: #fff; }
.tl-i .tl-t { font-weight: 620; font-size: 13px; }
.tl-i .tl-s { font-size: 12px; color: var(--muted); }

/* steps (status PO) */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.steps i.on { background: var(--accent); }

/* modal & drawer */
.modal-back { position: fixed; inset: 0; background: rgba(12, 20, 16, .45); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 14px; z-index: 50; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--panel); border-radius: 18px; width: 100%; max-width: 540px; box-shadow: var(--sh-3); display: flex; flex-direction: column; max-height: 90vh; animation: pop .16s ease-out; }
.modal.wide { max-width: 880px; } .modal.xwide { max-width: 1100px; }
.modal-head, .drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.modal-head h2, .drawer-head h2 { font-size: 16.5px; }
.modal-body, .drawer-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot, .drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.x { border: 0; background: var(--bg-2); width: 32px; height: 32px; border-radius: 10px; cursor: pointer; color: var(--ink-2); margin-left: auto; display: grid; place-items: center; flex: none; }
.x:hover { background: var(--line); }
.drawer-back { position: fixed; inset: 0; background: rgba(12, 20, 16, .35); z-index: 45; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); z-index: 46; display: flex; flex-direction: column; box-shadow: var(--sh-3); animation: slide .2s ease-out; }
.drawer.wide { width: min(780px, 100vw); }
.drawer-body { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
.sheet-grip { display: none; }

#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #16201b; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--sh-2); max-width: 90vw; display: flex; gap: 8px; align-items: center; font-weight: 560; animation: pop .16s; }
.toast.err { background: var(--danger); }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .av { width: 52px; height: 52px; border-radius: 16px; }
.empty .av svg.i { width: 24px; height: 24px; }
.empty b { color: var(--ink); font-size: 14.5px; }
.skel { height: 120px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--bg-2), #f7f6f2, var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--panel); }
.login-art { background: radial-gradient(1200px 600px at 10% 10%, #1b6b55 0%, #0f3a2f 45%, #0b241d 100%); color: #d9efe7; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: 34px; color: #fff; line-height: 1.15; max-width: 440px; }
.login-art .feat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 480px; }
.login-art .feat div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.login-form { display: grid; place-items: center; padding: 24px; }
.login-form form { width: 100%; max-width: 360px; }

/* charts */
.chart { width: 100%; display: block; }
.chart text { font-size: 10.5px; fill: var(--muted); font-family: inherit; }
.chart .gl { stroke: var(--line-2); stroke-width: 1; }
.chart .bar { fill: var(--accent); transition: opacity .1s; }
.chart .bar:hover { opacity: .75; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .ar { fill: url(#ga); opacity: .9; }
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut-wrap svg { width: 132px; height: 132px; flex: none; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100%; min-height: 0; }
.pos-left { display: flex; flex-direction: column; min-height: 0; padding: 16px 18px 0; gap: 12px; }
.pos-right { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pos-right .cart-head { display: none; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; overflow-y: auto; align-content: start; padding-bottom: 18px; }
.prod { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; min-height: 120px; box-shadow: var(--sh-1); transition: transform .06s, border-color .1s, box-shadow .1s; position: relative; }
.prod:hover { border-color: var(--accent); box-shadow: var(--sh-2); }
.prod:active { transform: scale(.97); }
.prod .ph { height: 54px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; letter-spacing: .02em; }
.prod .n { font-weight: 640; line-height: 1.25; font-size: 13.5px; }
.prod .p { margin-top: auto; color: var(--accent-2); font-weight: 720; }
.prod .q { position: absolute; top: 8px; right: 8px; background: var(--ink); color: #fff; border-radius: 99px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; font-weight: 700; padding: 0 6px; box-shadow: 0 0 0 3px #fff; }
.cart { flex: 1; overflow-y: auto; padding: 4px 16px; }
.cart-item { padding: 12px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; }
.cart-item .mods { font-size: 12px; color: var(--muted); margin-top: 2px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: var(--bg); width: 32px; height: 32px; cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: var(--bg-2); }
.qty span { min-width: 32px; text-align: center; font-weight: 700; }
.totals { padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfbf8; }
.totals .line { display: flex; justify-content: space-between; padding: 2px 0; font-size: 13.5px; gap: 10px; }
.totals .grand { font-size: 21px; font-weight: 780; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); letter-spacing: -.02em; }
.cust-box { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.seg { display: inline-flex; background: var(--bg-2); padding: 3px; border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; cursor: pointer; font-weight: 620; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.dropdown { position: relative; }
.dropdown .menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-2); z-index: 10; max-height: 280px; overflow-y: auto; padding: 4px; }
.dropdown .menu div { padding: 9px 10px; cursor: pointer; border-radius: 8px; }
.dropdown .menu div:hover { background: var(--accent-soft); }
.opt-group { margin-bottom: 16px; }
.opt-group h3 { margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1.5px solid var(--line); background: #fff; border-radius: 11px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pay-methods .opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; font-size: 13px; }
.pay-row { display: grid; grid-template-columns: 1fr 160px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.big-total { font-size: 34px; font-weight: 820; text-align: center; letter-spacing: -.03em; padding: 4px 0 14px; }
.cart-bar { display: none; }
.open-shift { max-width: 420px; margin: 8vh auto; }

/* recipe editor */
.rec-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 56px 100px 34px; gap: 6px; align-items: center; margin-bottom: 6px; }
.opt-edit { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; background: #fbfbf8; }
.opt-edit .head { display: grid; grid-template-columns: 1fr 130px 34px; gap: 6px; }
.opt-edit .rec-row { grid-template-columns: minmax(0, 1fr) 110px 56px 34px; }

/* receipt */
#print-area { display: none; }
.receipt { font-family: "Courier New", ui-monospace, monospace; font-size: 12px; color: #000; width: 100%; line-height: 1.35; }
.receipt .c { text-align: center; } .receipt .b { font-weight: 700; }
.receipt .hr { border-top: 1px dashed #000; margin: 5px 0; }
.receipt .r { display: flex; justify-content: space-between; gap: 6px; }
.receipt .r span:last-child { text-align: right; white-space: nowrap; }
.receipt .ind { padding-left: 10px; font-size: 11px; }
.receipt-preview { background: #fff; border: 1px solid var(--line); padding: 14px; margin: 0 auto; box-shadow: var(--sh-1); border-radius: 4px; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; left: 0; top: 0; width: var(--paper, 58mm); padding: 0 2mm; }
  .receipt { font-size: 11px; }
}

/* staff home tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; box-shadow: var(--sh-1); text-align: left; transition: transform .06s, box-shadow .12s; }
.tile:hover { box-shadow: var(--sh-2); }
.tile:active { transform: scale(.98); }
.tile b { font-size: 14.5px; } .tile .s { font-size: 12px; color: var(--muted); }

/* =========================================================== TABLET */
@media (min-width: 640px) and (max-width: 1099px) {
  .shell { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .brand { justify-content: center; padding: 16px 0 10px; }
  .brand .bt, .brand .bs, .nav-sep, .me-card div { display: none; }
  .nav { padding: 6px 8px; }
  .nav a { flex-direction: column; gap: 4px; padding: 9px 2px 8px; font-size: 10.5px; text-align: center; line-height: 1.15; font-weight: 560; }
  .nav a svg.i { width: 21px; height: 21px; }
  .nav a.active::before { left: -8px; }
  .nav a .cnt { position: absolute; top: 4px; right: 8px; padding: 0 5px; font-size: 10px; }
  .nav-gap { height: 8px; }
  .me-card { justify-content: center; }
  .top { padding: 10px 18px; }
  .content { padding: 18px 18px 32px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .pos { grid-template-columns: minmax(0, 1fr) 340px; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .hide-tab { display: none !important; }
}

/* =========================================================== HP */
@media (max-width: 639px) {
  :root { font-size: 14.5px; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 10px 14px; min-height: 56px; gap: 8px; }
  .top h1 { font-size: 17px; }
  .top .sub { display: none; }
  .content { padding: 14px 14px calc(var(--bnav-h) + 24px + var(--safe-b)); }
  .content.flush { padding-bottom: 0; }
  .bnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bnav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 30; }
  .bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 620; position: relative; }
  .bnav a svg.i { width: 22px; height: 22px; }
  .bnav a.active { color: var(--accent); }
  .bnav a.active svg.i { stroke-width: 2.2; }
  .bnav a .cnt { position: absolute; top: 6px; left: 55%; background: var(--danger); color: #fff; border-radius: 99px; font-size: 10px; padding: 0 5px; font-weight: 700; }
  .g2, .g3, .g4, .g-main { grid-template-columns: 1fr; }
  .g4.keep2, .g3.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { gap: 10px; }
  .kpi { padding: 13px 14px; gap: 10px; }
  .kpi .v { font-size: 19px; }
  .kpi .av { display: none; }
  .card-head { padding: 12px 14px; }
  .card-pad { padding: 14px; }
  .lrow { padding: 11px 13px; gap: 11px; }
  .lrow .av { width: 36px; height: 36px; }
  .lrow .amt { font-size: 14px; }
  .lgroup-h { top: -14px; }
  .page-head { gap: 8px; }
  .page-head > .search, .page-head > input, .page-head > select { flex: 1 1 100%; max-width: none !important; }
  .tabs { width: 100%; }
  .hide-phone { display: none !important; }
  table.t th, table.t td { padding: 9px 10px; }
  /* modal jadi bottom sheet */
  .modal-back { padding: 0; align-items: flex-end; }
  .modal, .modal.wide, .modal.xwide { max-width: none; border-radius: 20px 20px 0 0; max-height: 94vh; animation: up .22s ease-out; padding-bottom: var(--safe-b); }
  .sheet-grip { display: block; width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 8px auto -4px; }
  .modal-head, .drawer-head { padding: 12px 16px; }
  .modal-body, .drawer-body { padding: 14px 16px; }
  .modal-foot, .drawer-foot { padding: 10px 16px calc(10px + var(--safe-b)); }
  .modal-foot .btn, .drawer-foot .btn { flex: 1; }
  .drawer, .drawer.wide { width: 100vw; animation: up .22s ease-out; }
  .rec-row { grid-template-columns: minmax(0, 1fr) 76px 34px 30px; }
  .rec-row .cost { display: none; }
  .pay-row { grid-template-columns: 1fr 120px 30px; }
  .big-total { font-size: 30px; }
  /* POS HP: keranjang jadi sheet */
  .pos { grid-template-columns: 1fr; }
  .pos-left { padding: 12px 12px 0; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: calc(var(--bnav-h) + 86px); }
  .prod { min-height: 108px; }
  .prod .ph { height: 44px; font-size: 16px; }
  .pos-right { position: fixed; inset: 0; z-index: 40; transform: translateY(105%); transition: transform .22s ease-out; border: 0; }
  .pos-right.open { transform: none; }
  .pos-right .cart-head { display: flex; padding: 12px 16px; border-bottom: 1px solid var(--line-2); align-items: center; gap: 10px; }
  .pos-actions { padding-bottom: calc(10px + var(--safe-b)) !important; }
  .cart-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(var(--bnav-h) + 10px + var(--safe-b)); z-index: 31; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px; align-items: center; gap: 12px; box-shadow: var(--sh-3); border: 0; cursor: pointer; font-weight: 650; }
  .cart-bar .n { background: var(--accent); border-radius: 10px; min-width: 30px; height: 30px; display: grid; place-items: center; }
  .cart-bar.empty { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .lrow.recv { grid-template-columns: auto minmax(0, 1fr); }
  .lrow.recv > :last-child { grid-column: 1 / -1; }
  #outlet-sel { max-width: 40vw; font-size: 13px; padding: 7px 8px; min-height: 36px; }
  .top h1 { max-width: 34vw; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut-wrap svg { margin: 0 auto; }
  #toast-root { bottom: calc(var(--bnav-h) + 18px); }
  .desk-only { display: none !important; }
}
@media (min-width: 640px) { .phone-only { display: none !important; } }
@media (max-width: 1099px) { .hide-mid { display: none !important; } }

/* login (gaya CRM: kartu di tengah) */
.login1 { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, #dff0e8 0%, var(--bg) 60%); }
.login1-card { width: 100%; max-width: 380px; text-align: center; }
.login1-card .logo svg { width: 32px; height: 32px; }
.login1-title { font-size: 24px; font-weight: 780; letter-spacing: -.02em; margin-top: 14px; }
.login1-sub { color: var(--muted); margin: 4px 0 20px; }
code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 5px; font-size: 12px; word-break: break-all; }
