/* ===== Token warna & ukuran (merah logo RUPA + arang) ===== */
:root {
  --bg: #f4f3f0; --card: #ffffff; --ink: #1d1c1a; --muted: #6f6c66; --line: #e8e5df; --line2: #f0eee9;
  --brand: #d52a30; --brand-ink: #ffffff; --brand-soft: #fdeceb; --charcoal: #3f3f3f;
  --accent: var(--brand); --accent-ink: var(--brand-ink);
  --good: #18794e; --good-bg: #e5f4ec; --bad: #c4262e; --bad-bg: #fdecec; --warn-bg: #fff4d4; --input: #faf9f7;
  --c0: #3d6fd8; --c1: #e28a1d; --c2: #1f9254; --c3: #9a968e;
  --radius: 14px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(28, 25, 22, .04), 0 6px 20px rgba(28, 25, 22, .05);
  --shadow-l: 0 20px 60px rgba(28, 25, 22, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side: 268px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111110; --card: #1b1a19; --ink: #f2f0eb; --muted: #a29f98; --line: #2d2b29; --line2: #232220;
    --brand: #f04c51; --brand-ink: #ffffff; --brand-soft: #3a1b1c; --charcoal: #d8d6d1;
    --good: #5bd394; --good-bg: #15301f; --bad: #ff8a84; --bad-bg: #3a1a19; --warn-bg: #39301a; --input: #161514;
    --c0: #7ba2ff; --c1: #ffad5c; --c2: #5fd08f; --c3: #8d8a83;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ===== Kerangka: sidebar (desktop) / drawer + bottom nav (HP) ===== */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
.side-head { padding: 18px 16px 10px; display: flex; align-items: center; gap: 10px; }
.side-head .t { font-weight: 700; font-size: 15px; line-height: 1.2; }
.side-head .s { color: var(--muted); font-size: 12px; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: #fff; object-fit: contain; flex: none; box-shadow: 0 0 0 1px var(--line); }
.logo.sm { width: 28px; height: 28px; border-radius: 8px; }
.logo.lg { width: 72px; height: 72px; border-radius: 20px; }
.initials { display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.ent-btn { margin: 4px 12px 10px; display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); padding: 10px; background: var(--input); border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.ent-btn:hover { border-color: var(--brand); }
.ent-btn .n { font-weight: 600; font-size: 14px; line-height: 1.25; }
.ent-btn .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ent-btn .chev { margin-left: auto; color: var(--muted); }
.nav { padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--muted); font-size: 14px; text-align: left; transition: background .18s, color .18s; }
.nav button:hover { background: var(--line2); color: var(--ink); }
.nav button.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav svg, .bnav svg, .iconbtn svg, .ent-btn svg, .ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; padding: 12px 16px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.crumb { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumb span + span::before { content: "›"; margin-right: 6px; opacity: .6; }
.topbar .spacer { flex: 1; }
.iconbtn { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; place-items: center; }
.page { padding: 4px 28px 40px; max-width: 1240px; width: 100%; animation: enter .28s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.scrim { display: none; }
.bnav { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 320px); transform: translateX(-102%); transition: transform .32s var(--ease); box-shadow: var(--shadow-l); }
  .app.drawer .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 12, 10, .38); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 35; }
  .app.drawer .scrim { opacity: 1; pointer-events: auto; }
  .iconbtn { display: grid; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar h1 { font-size: 17px; }
  .topbar .month { max-width: 150px; }
  .page { padding: 4px 16px calc(96px + env(safe-area-inset-bottom)); }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font-size: 11px; border-radius: 12px; cursor: pointer; transition: color .18s, background .18s; }
  .bnav button.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
}

/* ===== Pemilih perusahaan (sheet) ===== */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(15, 12, 10, .4); animation: fade .2s; padding: 16px; }
.sheet { background: var(--card); width: min(520px, 100%); max-height: 82vh; overflow: auto; border-radius: 20px; box-shadow: var(--shadow-l); padding: 8px 8px 12px; animation: pop .26s var(--ease); }
.sheet h3 { margin: 10px 12px 8px; font-size: 16px; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { padding-left: 22px; border-left: 2px solid var(--line2); margin-left: 24px; }
.tree button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 12px; cursor: pointer; text-align: left; transition: background .15s; }
.tree button:hover { background: var(--line2); }
.tree button.on { background: var(--brand-soft); }
.tree .k { margin-left: auto; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) { .sheet-wrap { place-items: end center; padding: 0; } .sheet { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: up .32s var(--ease); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
@keyframes up { from { transform: translateY(100%); } }

/* ===== Komponen ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; letter-spacing: -.005em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .l { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .v { font-size: clamp(17px, 1.7vw, 22px); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; margin-top: 2px; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.hero { background: linear-gradient(135deg, var(--brand), #9e1d22); color: #fff; border: 0; }
.kpi.hero .l, .kpi.hero .s { color: rgba(255, 255, 255, .82); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.grid2 > .card, .grid2 > div > .card:last-child { margin-bottom: 16px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line2); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--card); }
tbody tr, table tr { transition: background .12s; }
table tr:hover td { background: color-mix(in srgb, var(--line2) 60%, transparent); }
tr.total td { font-weight: 650; border-top: 2px solid var(--line); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--good-bg); color: var(--good); }
.badge.no { background: var(--bad-bg); color: var(--bad); }
.badge.mid { background: var(--warn-bg); color: var(--ink); }
.badge:not(.ok):not(.no):not(.mid) { background: var(--line2); color: var(--ink); font-weight: 500; }
.muted { color: var(--muted); }
.neg { color: var(--bad); }
.pos { color: var(--good); }
input, select { background: var(--input); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; min-height: 38px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=checkbox] { min-height: 0; width: 18px; height: 18px; accent-color: var(--brand); }
td input[type=number], td input[type=text] { width: 100%; max-width: 130px; text-align: right; }
td input[type=text].l { text-align: left; max-width: none; }
td input[type=number] { min-width: 96px; }
td input[type=month] { min-width: 130px; }
td select { max-width: 160px; }
.btn { background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px; padding: 9px 16px; cursor: pointer; font-weight: 600; min-height: 38px; transition: transform .12s, filter .15s, box-shadow .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; box-shadow: none; }
.btn.small { padding: 5px 11px; font-size: 13px; min-height: 30px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.warn { background: var(--warn-bg); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.err { background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: 14px; opacity: 0; transition: opacity .2s, transform .25s var(--ease); pointer-events: none; z-index: 80; box-shadow: var(--shadow-l); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .toast { bottom: calc(86px + env(safe-area-inset-bottom)); } }
.saving { opacity: .55; }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }
.loading::before { content: ""; display: block; margin: 0 auto 10px; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details summary { cursor: pointer; margin: 8px 0; }
label.chk, .chk { display: inline-flex; flex-direction: row !important; align-items: center; gap: 6px; margin: 0 10px 4px 0; font-size: 13px; white-space: nowrap; color: var(--ink) !important; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }

/* ===== Login ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, var(--brand-soft), transparent 60%), radial-gradient(800px 500px at 110% 110%, color-mix(in srgb, var(--brand-soft) 70%, transparent), transparent 60%), var(--bg); }
.login { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; box-shadow: var(--shadow-l); animation: pop .35s var(--ease); text-align: center; }
.login h2 { margin: 14px 0 2px; font-size: 20px; }
.login p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.login input { width: 100%; margin-bottom: 10px; min-height: 44px; }
.login .btn { width: 100%; min-height: 44px; margin-top: 4px; }

/* ===== Grafik ===== */
svg.chart { width: 100%; height: auto; display: block; margin-top: 4px; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .zero { stroke: var(--muted); stroke-width: 1; }
svg.chart .ax { fill: var(--muted); font-size: 11px; }
svg.chart .f0 { fill: var(--c0); } svg.chart .f1 { fill: var(--c1); } svg.chart .f2 { fill: var(--c2); }
svg.chart .l0 { stroke: var(--c0); } svg.chart .l1 { stroke: var(--c1); } svg.chart .l2 { stroke: var(--c2); }
svg.chart polyline { stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .dot { stroke: var(--card); stroke-width: 1.5; }
svg.chart rect { transition: opacity .15s; }
svg.chart rect:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin: 6px 0; }
.legend .sw { display: inline-block; vertical-align: middle; margin-right: 6px; }
.legend .sw.bar { width: 11px; height: 11px; border-radius: 3px; }
.legend .sw.line { width: 16px; height: 3px; border-radius: 2px; }
.legend .s0 { background: var(--c0); } .legend .s1 { background: var(--c1); } .legend .s2 { background: var(--c2); }
.hb { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; gap: 10px; align-items: center; margin: 8px 0; font-size: 14px; }
.hbar { background: var(--line2); border-radius: 99px; height: 10px; overflow: hidden; }
.hfill { height: 100%; border-radius: 99px; transition: width .6s var(--ease); }
.k0 { background: var(--c0); } .k1 { background: var(--c1); } .k2 { background: var(--c2); } .k3 { background: var(--c3); }
.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin-top: 14px; background: var(--line); }

/* ===== Sub-menu, segmen, kartu khusus ===== */
nav.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 4px; scrollbar-width: none; }
nav.subtabs::-webkit-scrollbar { display: none; }
nav.subtabs button { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; cursor: pointer; color: var(--muted); white-space: nowrap; font-size: 14px; transition: all .18s; }
nav.subtabs button:hover { color: var(--ink); }
nav.subtabs button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { background: none; border: 0; padding: 6px 12px; cursor: pointer; color: var(--muted); font-size: 13.5px; transition: all .15s; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.rekstrip { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; scrollbar-width: none; }
.rek { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 170px; font-size: 13px; box-shadow: var(--shadow); }
.rek > div { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.health { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.hc .v { font-size: 18px; font-weight: 700; margin: 2px 0 4px; }
tr.sub td:first-child { padding-left: 22px; color: var(--muted); }
tr.subtotal td { font-weight: 600; }
.h3 { font-size: 13px; color: var(--muted); margin: 12px 0 4px; font-weight: 600; }
tr.payrow td { background: var(--input); }
.tags:not(:empty) { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.ubr { white-space: normal; min-width: 180px; }
table.lbl td:first-child { white-space: normal; }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.flow .step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); position: relative; }
.flow .step b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.ent-cell { display: flex; align-items: center; gap: 10px; }
.pill-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.logo-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 600px) {
  th, td { padding: 8px 6px; }
  .card { padding: 14px; border-radius: 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .hb { grid-template-columns: 1fr; gap: 3px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .row > label { flex: 1 1 140px; }
  .row > label input, .row > label select { width: 100%; }
}

/* ===== POS kasir ===== */
.posv { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; margin-bottom: 16px; }
.pos-search { width: 100%; margin-bottom: 12px; min-height: 44px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pitem { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 92px; padding: 14px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .12s var(--ease), border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; user-select: none; }
.pitem:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.pitem:active { transform: scale(.96); }
.pitem.in { border-color: var(--brand); background: var(--brand-soft); }
.pitem .pn { font-weight: 650; font-size: 15px; line-height: 1.25; }
.pitem .pp { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pitem .pq { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.pitem .pq:empty { display: none; }
.pitem.bump .pq { animation: bump .25s var(--ease); }
@keyframes bump { 50% { transform: scale(1.3); } }
.pos-cart { position: sticky; top: 76px; margin-bottom: 0; }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cart-head h2 { margin: 0; }
.clines { max-height: 38vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.cline { display: grid; grid-template-columns: minmax(0, 1fr) auto 88px; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line2); animation: enter .2s var(--ease); }
.cline .cn { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.cline .cn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cline .cn span { font-size: 12px; }
.cline .ca { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--input); }
.qty button { width: 32px; height: 34px; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--ink); }
.qty button:active { background: var(--line2); }
.qty input { width: 44px; min-height: 34px; border: 0; border-radius: 0; text-align: center; padding: 0; background: transparent; }
.qty input:focus { box-shadow: none; }
.ctot { margin: 10px 0; }
.rc-r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; font-variant-numeric: tabular-nums; font-size: 14px; }
.rc-r input { width: 140px; text-align: right; }
.rc-r.grand { font-size: 18px; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 4px; }
.pmethod { display: flex; width: 100%; margin: 6px 0 8px; }
.pmethod button { flex: 1; padding: 10px; font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chips button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; transition: border-color .15s; }
.chips button:hover { border-color: var(--brand); }
.rc-r.change b { font-size: 17px; color: var(--good); }
.rc-r.change.neg b { color: var(--bad); }
.btn.pay { width: 100%; min-height: 52px; font-size: 17px; margin-top: 10px; border-radius: 14px; }
.pos-bar { display: none; }
.pos-kpis { margin-bottom: 12px; }
tr.voided td { opacity: .55; }
tr.voided td:nth-child(5) { text-decoration: line-through; }
@media (max-width: 900px) {
  .posv { grid-template-columns: minmax(0, 1fr); }
  .pos-cart { position: static; scroll-margin-top: 70px; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
  .pitem { min-height: 84px; padding: 12px; }
  .pos-bar:not([hidden]) { display: flex; justify-content: space-between; align-items: center; position: fixed; left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 29;
    padding: 13px 16px; border: 0; border-radius: 16px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; box-shadow: var(--shadow-l); cursor: pointer; animation: up .3s var(--ease); }
  .pos-bar span { display: inline-flex; align-items: center; gap: 6px; }
  .pos-bar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
}

/* Struk */
.rcpt { font-size: 13.5px; }
.rc-h { text-align: center; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; }
.rc-h b { display: block; color: var(--ink); font-size: 15px; }
.rc-i { padding: 3px 0; }
.rc-i .rc-r { padding: 0; color: var(--muted); font-size: 12.5px; }
.rc-t { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 6px; }
.rc-t .big { font-size: 16px; }
.rc-void { margin-top: 10px; text-align: center; color: var(--bad); font-weight: 700; letter-spacing: .1em; }
.rc-void div { font-weight: 400; letter-spacing: 0; font-size: 12.5px; }
.rc-f { text-align: center; color: var(--muted); margin-top: 12px; font-size: 12.5px; }
.rc-sheet { width: min(400px, 100%); padding: 18px; }
.rc-ok { text-align: center; margin-bottom: 14px; }
.rc-check { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; font-size: 26px; font-weight: 700; animation: pop .35s var(--ease); }
.rc-change { margin-top: 4px; color: var(--muted); }
.rc-change b { color: var(--ink); font-size: 20px; }
.print-area { display: none; }
@media print {
  body.printing > *:not(.print-area) { display: none !important; }
  body.printing { background: #fff; }
  body.printing .print-area { display: block; width: 58mm; margin: 0 auto; color: #000; font-family: ui-monospace, Menlo, monospace; }
  body.printing .print-area * { color: #000 !important; border-color: #000 !important; }
  @page { margin: 4mm; }
}
label.chk.vchk { display: flex; white-space: normal; font-size: 12.5px; }
