/* VALTIRE — tampilan gaya mobile banking
   Palet: biru-baja (merek), kuning helm proyek (aksi utama/FAB), kertas abu kehijauan.
   Tata letak: HP = header + navigasi bawah dengan tombol Kasir di tengah; desktop = rel menu kiri + konten. */
:root {
  --bg: #e9eeed;
  --surface: #ffffff;
  --surface-2: #f4f7f6;
  --sunk: #f1f4f3;
  --line: #dbe2e0;
  --line-2: #e8edec;
  --fg: #13201f;
  --fg-2: #33433f;
  --muted: #5d6d6a;
  --faint: #8d9b98;
  --brand: #0b3b30;
  --brand-2: #134e40;
  --brand-3: #1d6b57;
  --brand-soft: #e1eee9;
  --on-brand: #f1f7f6;
  --accent: #e4a23c;
  --accent-ink: #8a5a00;
  --on-accent: #1e1503;
  --ok: #1d7f4f; --ok-soft: #e1f3e8;
  --warn: #9a6200; --warn-soft: #fff1d6;
  --bad: #b8382b; --bad-soft: #fbe5e1;
  --info: #1f5f9e; --info-soft: #e2edf8;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(11,59,48,.06), 0 10px 28px -14px rgba(11,59,48,.28);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --rail: 252px;
  color-scheme: light;
}
/* Tema: tanpa atribut = ikut sistem; data-theme="light"/"dark" = pilihan pengguna (Akun → Tampilan). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1212; --surface: #111c1c; --surface-2: #162323; --sunk: #142020; --line: #243433; --line-2: #1c2b2a;
    --fg: #e3edeb; --fg-2: #c3d2cf; --muted: #93a6a2; --faint: #6f827f;
    --brand: #0c2b24; --brand-2: #184a3e; --brand-3: #2a7d68; --brand-soft: #15302a; --on-brand: #e7f2f0;
    --accent: #eaae4c; --accent-ink: #f5c464; --on-accent: #1e1503;
    --ok: #4cc488; --ok-soft: #12301f; --warn: #f0b04a; --warn-soft: #33270d; --bad: #f07466; --bad-soft: #3a1714; --info: #74b2f2; --info-soft: #122a40;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0a1212; --surface: #111c1c; --surface-2: #162323; --sunk: #142020; --line: #243433; --line-2: #1c2b2a;
    --fg: #e3edeb; --fg-2: #c3d2cf; --muted: #93a6a2; --faint: #6f827f;
    --brand: #0c2b24; --brand-2: #184a3e; --brand-3: #2a7d68; --brand-soft: #15302a; --on-brand: #e7f2f0;
    --accent: #eaae4c; --accent-ink: #f5c464; --on-accent: #1e1503;
    --ok: #4cc488; --ok-soft: #12301f; --warn: #f0b04a; --warn-soft: #33270d; --bad: #f07466; --bad-soft: #3a1714; --info: #74b2f2; --info-soft: #122a40;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14.5px/1.5 var(--font); color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-3); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
code { font: 12.5px var(--mono); background: var(--sunk); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .grow { flex: 1; min-width: 0; }
.num, .r { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; }
.boot { display: grid; place-items: center; height: 100vh; }
.mono, input.mono { font-family: var(--mono); letter-spacing: .04em; }

/* ---------- status ---------- */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand-3); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 48px 0; justify-content: center; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty b { display: block; color: var(--fg); font-size: 15px; margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto 14px; }
.empty.big { padding: 80px 16px; }
.error-box { background: var(--bad-soft); color: var(--bad); padding: 16px; border-radius: var(--radius); }
.error-box b { display: block; margin-bottom: 4px; } .error-box .btn { margin-top: 10px; }

/* ---------- tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s, transform .08s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-3); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn:not(.primary):not(.danger).busy::after { border-color: var(--line); border-top-color: var(--brand-3); }
.danger-text { color: var(--bad) !important; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--line-2); color: var(--fg); }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand-3); font-weight: 700; cursor: pointer; }

/* ---------- kerangka ---------- */
.shell { min-height: 100vh; }
.rail { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px 16px; background: var(--brand); color: var(--on-brand); }
.topbar .icon-btn { color: var(--on-brand); background: rgba(255,255,255,.08); }
.topbar .icon-btn:hover { background: rgba(255,255,255,.16); }
.top-biz { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.top-biz b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-biz small { display: block; font-size: 12px; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-mark { width: 38px; height: 38px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; flex: none; }
.biz-mark img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.plan-chip { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: var(--on-brand); white-space: nowrap; }
.plan-chip.trial { background: var(--accent); color: var(--on-accent); }
.banner { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; }
.banner span { flex: 1; }
.banner.danger { background: var(--bad-soft); color: var(--bad); }
.banner.warn, .banner.trial { background: var(--warn-soft); color: var(--warn); }
.view { padding: 16px 16px calc(110px + env(safe-area-inset-bottom, 0px)); width: 100%; max-width: 1180px; margin: 0 auto; outline: none; }
.view.flush { padding-top: 0; }

/* navigasi bawah gaya m-banking */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -20px rgba(0,0,0,.4); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; border: 0; background: none; color: var(--muted); font-size: 11.5px; font-weight: 700; cursor: pointer; text-decoration: none !important; min-height: 50px; justify-content: center; }
.tab .ic { width: 23px; height: 23px; }
.tab.on { color: var(--brand-3); }
.tab.fab .fab-ic { width: 58px; height: 58px; margin-top: -30px; border-radius: 19px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; border: 4px solid var(--surface); box-shadow: 0 8px 18px -6px rgba(242,165,22,.6); }
.tab.fab .fab-ic .ic { width: 26px; height: 26px; }
.tab.fab.on { color: var(--accent-ink); }

/* desktop: rel menu kiri */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); }
  .rail-head { display: flex; align-items: center; gap: 10px; padding: 16px; background: var(--brand); color: var(--on-brand); }
  .rail-head b { font-size: 15px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail-head small { font-size: 12px; opacity: .78; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail nav { flex: 1; overflow-y: auto; padding: 10px; }
  .nav-label { font-size: 11.5px; font-weight: 800; color: var(--faint); padding: 12px 10px 4px; text-transform: uppercase; letter-spacing: .06em; }
  .nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; color: var(--fg-2); font-weight: 600; }
  .nav-link:hover { background: var(--surface-2); text-decoration: none; }
  .nav-link.on { background: var(--brand-soft); color: var(--brand-3); }
  .nav-link .ic { width: 19px; height: 19px; }
  .rail-foot { padding: 12px; border-top: 1px solid var(--line); }
  .tabbar { display: none; }
  .topbar { padding: 12px 24px; }
  .topbar .top-biz.mobile-only { display: none; }
  .topbar-title { font-weight: 800; font-size: 17px; flex: 1; }
  .view { padding: 22px 28px 64px; }
  .banner { margin: 16px 28px 0; }
}
@media (max-width: 1023px) { .topbar-title, .desktop-only { display: none !important; } }

/* ---------- kepala halaman, tab, toolbar ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 3px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--fg); }
.tabs a.on { background: var(--brand-2); border-color: var(--brand-2); color: var(--on-brand); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar select, .toolbar input:not([type=checkbox]) { height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; min-width: 0; }
.search { position: relative; flex: 1; min-width: 180px; }
.search .ic { position: absolute; left: 12px; top: 11px; color: var(--faint); width: 19px; height: 19px; }
.search input { width: 100%; padding-left: 38px !important; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range span { color: var(--faint); }
.count { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- panel, angka ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel + .panel, .panel + .grid, .grid + .panel, .table-wrap + .panel, .panel + .table-wrap, .grid + .grid { margin-top: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.panel-head h3 { font-size: 15px; font-weight: 800; }
.panel-head h3 .ic { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; color: var(--brand-3); }
.panel-head p { color: var(--muted); font-size: 12.5px; }
.panel-body { padding: 14px 16px 16px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.side-r { grid-template-columns: minmax(0, 1fr) 340px; }
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ledger > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.ledger small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.ledger b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; }
.ledger em { font-style: normal; font-size: 12px; color: var(--muted); }
.ledger em.up { color: var(--ok); } .ledger em.down { color: var(--bad); }
.hero-figure { font-size: 36px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.list li:first-child { border-top: 0; }
.list small { display: block; color: var(--muted); font-size: 12px; }
.meter { height: 7px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand-3); border-radius: 99px; }
.meter.warn i { background: var(--accent); } .meter.over i { background: var(--bad); }
.bars { display: block; overflow: visible; }
tb-bars { width: 100%; }
.bars .bar { fill: var(--brand-3); opacity: .35; } .bars .bar.last { fill: var(--accent); opacity: 1; }
.bars .grid-line { stroke: var(--line); stroke-width: 1; }
.bars text { fill: var(--muted); font-size: 11px; font-family: var(--font); }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel .table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--line-2); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 800; color: var(--muted); padding: 11px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.r { text-align: right; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl td b { font-weight: 700; }
.tbl td small, .sub { display: block; color: var(--muted); font-size: 12px; }
.tbl tfoot td { font-weight: 800; background: var(--surface-2); border-top: 1px solid var(--line); }
.tbl input, .tbl select { height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); width: 100%; min-width: 70px; }
.tbl .tight { width: 1%; white-space: nowrap; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--fg-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--sunk); }

/* ---------- daftar gaya mutasi rekening ---------- */
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rowi { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-2); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; color: inherit; text-decoration: none !important; font-weight: 400; }
.rowi:first-child { border-top: 0; }
a.rowi:hover, button.rowi:hover { background: var(--surface-2); cursor: pointer; }
.rowi .av { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-3); flex: none; }
.rowi .av.in { background: var(--ok-soft); color: var(--ok); } .rowi .av.out { background: var(--bad-soft); color: var(--bad); } .rowi .av.wr { background: var(--warn-soft); color: var(--warn); }
.rowi .av .ic { width: 19px; height: 19px; }
.rowi .mid { flex: 1; min-width: 0; }
.rowi .mid b { display: block; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.rowi .mid small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowi .end { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.rowi .end b { display: block; font-size: 14px; }
.rowi .end small { color: var(--muted); font-size: 12px; display: block; }
.day-sep { padding: 7px 14px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800; border-top: 1px solid var(--line-2); }
.rows .day-sep:first-child { border-top: 0; }

/* ---------- beranda ---------- */
.hero { margin: -16px -16px 0; padding: 18px 16px 70px; background: var(--brand); color: var(--on-brand);
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; }
.hero h1 { font-size: 20px; font-weight: 800; }
.hero p { opacity: .8; font-size: 13px; }
.balance { position: relative; margin: -54px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 16px; }
.balance .lbl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.balance .big { display: flex; align-items: center; gap: 6px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.balance .split { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; border-top: 1px dashed var(--line); padding-top: 12px; }
.balance .split small { display: block; color: var(--muted); font-size: 12px; }
.balance .split b { font-size: 15px; font-variant-numeric: tabular-nums; }
.acc-strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; scrollbar-width: none; }
.acc-strip::-webkit-scrollbar { display: none; }
.acc-strip div { flex: none; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; min-width: 130px; }
.acc-strip small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.acc-strip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.qa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 4px; margin: 18px 0 6px; }
.qa a, .qa button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 2px; border-radius: 14px; border: 0; background: none; color: var(--fg); font-size: 12px; font-weight: 700; text-align: center; line-height: 1.2; text-decoration: none !important; cursor: pointer; position: relative; }
.qa .qi { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--brand-3); }
.qa .qi .ic { width: 24px; height: 24px; }
.qa a:active .qi { transform: scale(.94); }
.qa .cnt { position: absolute; top: 0; right: calc(50% - 34px); min-width: 19px; height: 19px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
@media (min-width: 700px) { .qa { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hero { margin: -22px -28px 0; padding: 24px 28px 74px; } }
.sec { margin-top: 20px; }
.sh { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; gap: 10px; }
.sh h2 { font-size: 15.5px; font-weight: 800; }
.task { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 13.5px; text-decoration: none !important; }
.task.info { background: var(--info-soft); color: var(--info); } .task.bad { background: var(--bad-soft); color: var(--bad); }
.task span { flex: 1; }
.stack { display: grid; gap: 8px; }
.eye { border: 0; background: none; color: var(--muted); padding: 4px; border-radius: 8px; cursor: pointer; display: inline-grid; }

/* ---------- semua menu ---------- */
.menu-group { margin-bottom: 18px; }
.menu-group h3 { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px 2px; }
.menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 8px; }
@media (min-width: 700px) { .menu-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- formulir ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--fg-2); }
.field .req { color: var(--bad); font-style: normal; margin-left: 2px; }
.field small { color: var(--muted); font-size: 12px; }
.field input, .field select, .field textarea, .input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 0 12px; transition: border-color .12s, box-shadow .12s; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--brand-3); box-shadow: 0 0 0 3px rgba(29,106,104,.18); background: var(--surface); }
.field input[readonly] { opacity: .75; }
.affix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.affix:focus-within { border-color: var(--brand-3); box-shadow: 0 0 0 3px rgba(29,106,104,.18); }
.affix span { display: grid; place-items: center; padding: 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.affix input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; background: transparent !important; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.check input { margin-top: 2px; accent-color: var(--brand-3); width: 18px; height: 18px; flex: none; }
.check b { display: block; font-weight: 700; } .check small { color: var(--muted); font-size: 12px; }
.check.inline { border: 0; padding: 6px 0 0; font-size: 13px; }
.form-section { padding-top: 8px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.form-grid > .form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section b { font-size: 13.5px; } .form-section p { color: var(--muted); font-size: 12.5px; }
.image-field { display: flex; gap: 14px; align-items: center; }
.image-field img, .image-field .ph { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: var(--sunk); display: grid; place-items: center; color: var(--faint); flex: none; }
.image-field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.lines { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 86px 96px 110px 36px; gap: 6px; align-items: center; padding: 8px; border-top: 1px solid var(--line-2); }
.line-row:first-child { border-top: 0; }
.line-row select, .line-row input { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; background: var(--surface-2); width: 100%; min-width: 0; }
.line-row .rm { width: 36px; height: 40px; border: 0; border-radius: 10px; background: var(--bad-soft); color: var(--bad); cursor: pointer; display: grid; place-items: center; }
.line-row .stock-hint { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -2px; }
@media (max-width: 640px) { .line-row { grid-template-columns: 1fr 1fr 36px; } .line-row select { grid-column: 1 / -1; } }
.lines-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: var(--surface-2); border-top: 1px solid var(--line); gap: 8px; flex-wrap: wrap; }
.total-box { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; font-variant-numeric: tabular-nums; }
.total-box .big { font-size: 19px; font-weight: 800; }

/* ---------- overlay: lembar bawah (HP) / panel samping (desktop) ---------- */
body.has-overlay { overflow: hidden; }
.overlay { position: fixed; inset: 0; z-index: 100; }
.overlay-bg { position: absolute; inset: 0; background: rgba(5, 20, 20, .45); opacity: 0; transition: opacity .18s; }
.overlay.in .overlay-bg { opacity: 1; }
.drawer, .modal { position: absolute; display: flex; flex-direction: column; background: var(--surface); left: 0; right: 0; bottom: 0; max-height: 94vh; border-radius: 22px 22px 0 0; transform: translateY(28px); opacity: 0; transition: transform .2s ease, opacity .2s ease; box-shadow: 0 -20px 50px -30px rgba(0,0,0,.6); }
.overlay.in .drawer, .overlay.in .modal { transform: none; opacity: 1; }
.drawer::before, .modal::before { content: ""; width: 42px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; flex: none; }
@media (min-width: 760px) {
  .drawer { left: auto; top: 0; width: min(580px, 100%); max-height: none; border-radius: 0; transform: translateX(24px); }
  .drawer.wide { width: min(880px, 100%); }
  .modal { left: 50%; right: auto; top: 12vh; bottom: auto; width: min(480px, calc(100% - 32px)); max-height: 80vh; border-radius: 20px; transform: translate(-50%, 10px); }
  .modal.wide { width: min(720px, calc(100% - 32px)); }
  .overlay.in .modal { transform: translate(-50%, 0); }
  .drawer::before, .modal::before { display: none; }
}
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 18px 12px; border-bottom: 1px solid var(--line-2); }
.ov-head h2 { font-size: 18px; font-weight: 800; }
.ov-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ov-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.ov-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.ov-foot .btn.primary, .ov-foot .btn.accent { flex: 1 1 auto; }
@media (min-width: 760px) { .ov-foot .btn.primary, .ov-foot .btn.accent { flex: 0 0 auto; } }
.lead { color: var(--fg-2); margin-bottom: 12px; }
.ov-section { margin-top: 18px; }
.ov-section > h4 { margin: 0 0 8px; font-size: 13.5px; }

/* PIN pad otorisasi */
.pinpad { display: grid; justify-items: center; gap: 14px; padding: 4px 0 6px; }
.pin-dots { display: flex; gap: 14px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand-3); }
.pin-dots i.f { background: var(--brand-3); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; }
.pin-keys button { height: 60px; border-radius: 18px; border: 0; background: var(--surface-2); font-size: 23px; font-weight: 700; cursor: pointer; color: var(--fg); }
.pin-keys button:active { background: var(--line); }
.pin-keys .e { background: transparent; }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------- kasir ---------- */
.pos-layout { display: grid; gap: 14px; }
.pos-layout > * { min-width: 0; }
@media (min-width: 1024px) { .pos-layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .pos-cart { position: sticky; top: 76px; } .cartbar { display: none !important; } }
@media (max-width: 1023px) { .pos-cart { display: none; } }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.prod { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; min-width: 0; }
.prod:hover { border-color: var(--brand-3); }
.prod small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod b { font-size: 13.5px; line-height: 1.3; min-height: 35px; }
.prod .price { font-weight: 800; font-variant-numeric: tabular-nums; }
.prod.out { opacity: .5; }
.cartbar { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 35; padding: 0 12px; pointer-events: none; }
.cartbar button { pointer-events: auto; width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 16px; background: var(--brand-2); color: var(--on-brand); padding: 13px 16px; font-weight: 800; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); cursor: pointer; }
.cartbar .n { background: var(--accent); color: var(--on-accent); border-radius: 9px; padding: 1px 8px; font-size: 12.5px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cart-line b { font-size: 13.5px; }
.cart-line select { height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 0 6px; max-width: 100%; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; }
.stepper input { width: 56px; height: 34px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.paychips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--fg-2); }
.chip:hover { border-color: var(--brand-3); }
.chip.on { background: var(--brand-2); border-color: var(--brand-2); color: var(--on-brand); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.receipt { font: 12.5px/1.55 var(--mono); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; white-space: pre; overflow-x: auto; color: var(--fg); }
.shift-gate { max-width: 440px; margin: 20px auto; }

/* ---------- toast ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--fg); color: var(--bg); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 700; animation: tin .18s ease; }
.toast-err { background: var(--bad); color: #fff; } .toast-warn { background: var(--accent); color: var(--on-accent); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- halaman masuk ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.auth-art { background: var(--brand); color: var(--on-brand); padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 26px 26px; }
.auth-art .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.auth-art h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; font-weight: 800; max-width: 15ch; letter-spacing: -.02em; }
.auth-art p { max-width: 44ch; opacity: .82; margin-top: 14px; font-size: 15px; }
.mini-bal { background: var(--surface); color: var(--fg); border-radius: 20px; padding: 16px; max-width: 340px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.5); }
.mini-bal small { color: var(--muted); font-weight: 700; font-size: 12px; }
.mini-bal b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-bal div { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 26px; font-weight: 800; }
.auth-card > p { color: var(--muted); margin: 6px 0 22px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn.primary { height: 50px; font-size: 15.5px; }
.auth-switch { margin-top: 18px; color: var(--muted); text-align: center; }
.auth-msg { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 12px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.pw { position: relative; } .pw input { padding-right: 46px; }
.pw button { position: absolute; right: 2px; top: 2px; }
.auth-shell.solo { grid-template-columns: 1fr; background: var(--bg); }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
@media (max-width: 860px) { .auth-shell { grid-template-columns: 1fr; } .auth-art { padding: 28px 20px 24px; } .auth-art .mini-bal, .auth-art .art-copy p { display: none; } .auth-art h2 { font-size: 24px; } }

/* ---------- komponen lain ---------- */
.biz-list { display: grid; gap: 6px; margin-bottom: 12px; }
.biz-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; width: 100%; }
.biz-row div { flex: 1; } .biz-row small { display: block; color: var(--muted); font-size: 12px; }
.biz-row.current { background: var(--brand-soft); border-color: transparent; cursor: default; }
.perm-table td:first-child { min-width: 240px; }
.perm-table input { width: 18px !important; height: 18px !important; min-width: 0 !important; accent-color: var(--brand-3); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.plan.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan h3 { font-size: 16px; } .plan .price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan ul { margin: 0; padding-left: 18px; color: var(--fg-2); font-size: 13px; }
.plan .btn { margin-top: auto; }
.callout { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; }
.rcode { font: 700 clamp(20px, 5vw, 26px)/1.2 var(--mono); letter-spacing: .08em; text-align: center; padding: 18px 12px; border: 2px dashed var(--brand-3); border-radius: 14px; background: var(--brand-soft); color: var(--brand-3); user-select: all; word-break: break-all; }
.rc-tips { margin: 14px 0 0; padding-left: 18px; color: var(--fg-2); font-size: 13px; display: grid; gap: 4px; }
.pay-due { border-color: var(--accent); background: var(--warn-soft); }
.pay-due-main { display: flex; gap: 18px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.pay-due-main > div:first-child { min-width: 0; flex: 1 1 300px; }
.pay-amount { font-size: 15px; margin: 4px 0 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pay-amount b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-left: 4px; }
.pay-due-act { display: flex; gap: 8px; flex-wrap: wrap; }
.num-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.steps-line { display: flex; gap: 4px; margin: 4px 0 14px; }
.steps-line i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps-line i.d { background: var(--brand-3); }
.statement td { padding: 8px 12px; }
.statement tr.t td { font-weight: 800; border-top: 1px solid var(--line); }
.statement tr.g td { font-weight: 800; font-size: 16px; background: var(--surface-2); }

/* notifikasi */
.notif-pop { position: fixed; right: 12px; top: 64px; width: min(400px, calc(100vw - 24px)); max-height: min(72vh, 560px); overflow: auto; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); z-index: 60; }
.notif-pop header { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 10px 16px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); }
.notif-pop ul { list-style: none; margin: 0; padding: 6px; }
.n-item { display: flex; gap: 10px; padding: 10px 8px; border-radius: 12px; color: var(--fg); font-weight: 400; }
.n-item:hover { background: var(--surface-2); text-decoration: none; }
.n-item b { display: block; font-size: 13.5px; }
.n-item small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 1px; }
.n-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.n-item.warn .n-ic { background: var(--warn-soft); color: var(--warn); }
.n-item.bad .n-ic { background: var(--bad-soft); color: var(--bad); }
.n-empty { text-align: center; padding: 26px 18px 30px; color: var(--muted); }
.n-empty b { display: block; color: var(--fg); margin: 6px 0 2px; }
.dot { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 800 10.5px/17px var(--font); font-style: normal; text-align: center; }
.dot.hot { background: var(--bad); color: #fff; }

/* ---------- responsif ---------- */
@media (max-width: 1100px) { .grid.three { grid-template-columns: 1fr 1fr; } .grid.side-r { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  body { font-size: 15px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 21px; }
  .page-actions { width: 100%; } .page-actions > .btn { flex: 1 1 auto; }
  .field input, .field select, .field textarea, .input, .toolbar select, .toolbar input:not([type=checkbox]) { font-size: 16px; }
  .hero-figure { font-size: 30px; }
}
/* tabel menjadi kartu di HP */
@media (max-width: 640px) {
  .table-wrap:has(.tbl:not(.statement)) { overflow: visible; background: transparent; border: 0; }
  .tbl:not(.statement) thead { display: none; }
  .tbl:not(.statement), .tbl:not(.statement) tbody, .tbl:not(.statement) tfoot, .tbl:not(.statement) tr, .tbl:not(.statement) td { display: block; width: 100%; }
  .tbl:not(.statement) tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
  .panel .tbl:not(.statement) tr { border-width: 0 0 1px; border-radius: 0; margin: 0; }
  .tbl:not(.statement) td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 4px 0; border: 0 !important; text-align: right; }
  .tbl:not(.statement) td::before { content: attr(data-label); flex: none; max-width: 48%; text-align: left; color: var(--muted); font-size: 13px; font-weight: 700; }
  .tbl:not(.statement) td[data-label=""]::before { content: none; }
  .tbl:not(.statement) td[data-label=""] { justify-content: flex-end; }
  .tbl:not(.statement) td:first-child { justify-content: flex-start; text-align: left; font-size: 15px; font-weight: 700; padding-top: 0; }
  .tbl:not(.statement) td:first-child::before { content: none; }
  .tbl:not(.statement) td:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .rail, .topbar, .tabbar, .banner, .page-actions, .toolbar, .tabs, .cartbar { display: none !important; } .shell { display: block; } .view { padding: 0; } body { background: #fff; } }

/* Pilihan tema */
.theme-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme-seg button { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--fg-2); font-weight: 700; font-size: 13px; cursor: pointer; }
.theme-seg button:hover { border-color: var(--brand-3); }
.theme-seg button.on { border-color: var(--brand-3); background: var(--brand-soft); color: var(--fg); box-shadow: inset 0 0 0 1px var(--brand-3); }
.theme-seg .sw { width: 100%; max-width: 72px; aspect-ratio: 16 / 10; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; display: grid; grid-template-rows: 30% 1fr; }
.theme-seg .sw.l { background: #e9eeed; } .theme-seg .sw.l::before { content: ""; background: #0b3b30; }
.theme-seg .sw.d { background: #0a1212; } .theme-seg .sw.d::before { content: ""; background: #0c2b24; }
.theme-seg .sw.a { background: linear-gradient(135deg, #e9eeed 50%, #0a1212 50%); } .theme-seg .sw.a::before { content: ""; background: linear-gradient(135deg, #0b3b30 50%, #0c2b24 50%); }
.auth-theme { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 40; background: var(--surface); border: 1px solid var(--line); color: var(--fg-2); }

/* Merek VALTIRE */
.auth-art .brand-logo { height: 30px; width: auto; display: block; }
.brand-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: var(--on-brand); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.rail-brand { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px 0 2px; opacity: .75; font-size: 11.5px; color: var(--muted); }
.rail-brand .ic { width: 16px; height: 16px; color: var(--fg); }

/* =========================================================
   Kelontong & minimarket
   ========================================================= */
.ic.flip { transform: scaleX(-1); }
kbd { font: 700 10.5px var(--mono); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); vertical-align: 1px; }
.btn kbd { background: rgba(0,0,0,.08); border-color: transparent; color: inherit; }
.exp-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--warn); }
.exp-row .ic { width: 16px; height: 16px; }
.exp-row input { height: 36px !important; max-width: 180px; }

/* layar kasir penuh: rel & navigasi disembunyikan */
body.pos-full .rail, body.pos-full .topbar, body.pos-full .tabbar, body.pos-full .banner { display: none !important; }
body.pos-full .shell { display: block; }
body.pos-full .view { max-width: none; padding: 0; }
.kp { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.kp-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background: var(--brand); color: var(--on-brand);
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; }
.kp-top .icon-btn { color: var(--on-brand); background: rgba(255,255,255,.08); }
.kp-who { min-width: 0; }
.kp-who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-who small { display: block; font-size: 12px; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-loc { height: 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12); color: var(--on-brand); padding: 0 8px; max-width: 160px; }
.kp-loc option { color: #13201f; }
.kp-tool { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 62px; padding: 5px 6px; border: 0; border-radius: 12px; background: transparent; color: var(--on-brand); font: 700 11px var(--font); cursor: pointer; opacity: .92; }
.kp-tool:hover { background: rgba(255,255,255,.12); opacity: 1; }
.kp-tool .ic { width: 20px; height: 20px; }
.kp-tool i { position: absolute; top: 0; right: 8px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 800 10.5px/17px var(--font); font-style: normal; padding: 0 4px; }
.kp-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 12px 12px 120px; width: 100%; max-width: 1400px; margin: 0 auto; }
.kp-left { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.kp-scan { position: relative; display: flex; gap: 8px; }
.kp-input { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 2px solid var(--brand-3); border-radius: 14px; padding: 0 12px; min-width: 0; }
.kp-input:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-3) 22%, transparent); }
.kp-input > .ic { color: var(--brand-3); width: 22px; height: 22px; }
.kp-input input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; font-size: 17px; font-weight: 600; outline: none; }
.kp-qty { background: var(--accent); color: var(--on-accent); border-radius: 9px; padding: 3px 9px; font-weight: 800; font-size: 14px; }
.kp-cam { height: 56px; flex-direction: column; gap: 1px; padding: 0 12px; font-size: 11px; border-radius: 14px; }
.kp-cam .ic { width: 22px; height: 22px; }
.kp-sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.kp-s { display: flex; width: 100%; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 14px; border: 0; border-top: 1px solid var(--line-2); background: none; text-align: left; cursor: pointer; color: var(--fg); }
.kp-s:first-child { border-top: 0; }
.kp-s.on, .kp-s:hover { background: var(--brand-soft); }
.kp-s small { display: block; color: var(--muted); font-size: 12px; }
.kp-hint { margin: -2px 2px 0; color: var(--muted); font-size: 12px; }
.kp-lines { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 180px; }
.kp-line { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto 110px 36px; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line-2); cursor: pointer; }
.kp-line:first-child { border-top: 0; }
.kp-line.sel { background: var(--brand-soft); box-shadow: inset 4px 0 0 var(--accent); }
.kp-no { color: var(--faint); font-weight: 800; font-size: 12.5px; text-align: center; }
.kp-name { min-width: 0; }
.kp-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-name small { color: var(--muted); font-size: 12.5px; }
.kp-line select { height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 0 6px; max-width: 110px; }
.kp-unit { color: var(--muted); font-size: 13px; font-weight: 700; min-width: 40px; text-align: center; }
.kp-sub { text-align: right; font-size: 15px; }
.kp-rm { width: 34px; height: 34px; color: var(--faint); }
.kp-rm:hover { color: var(--bad); background: var(--bad-soft); }
.kp-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 46px 20px; color: var(--muted); }
.kp-empty .ic { width: 42px; height: 42px; color: var(--brand-3); opacity: .6; }
.kp-empty b { color: var(--fg); font-size: 16px; }
.kp-right { display: none; }
.kp-total { background: var(--brand); color: var(--on-brand); border-radius: 18px; padding: 16px 18px; margin-bottom: 14px;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 20px 20px; }
.kp-total small { display: block; font-size: 12.5px; opacity: .8; font-weight: 700; }
.kp-total b { display: block; font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; overflow-wrap: anywhere; }
.kp-total em { font-style: normal; font-size: 12.5px; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 2px 9px; font-weight: 800; }
.kp-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.kp-paybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -20px rgba(0,0,0,.4); }
.kp-paybar:empty { display: none; }
.kp-paybar > div { flex: 1; min-width: 0; }
.kp-paybar small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.kp-paybar b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kp-reader { width: 100%; min-height: 240px; border-radius: 14px; overflow: hidden; background: #000; }
.kp-reader video { border-radius: 14px; }
@media (min-width: 1024px) {
  .kp-main { grid-template-columns: minmax(0, 1fr) 380px; padding: 16px 20px 24px; align-items: start; }
  .kp-right { display: block; position: sticky; top: 78px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
  .kp-paybar { display: none; }
  .kp-lines { min-height: calc(100vh - 230px); }
}
@media (max-width: 700px) {
  .kp-tool span { display: none; } .kp-tool { min-width: 40px; }
  .kp-cam span { display: none; } .kp-cam { width: 52px; padding: 0; }
  .kp-line { grid-template-columns: minmax(0, 1fr) auto 32px; grid-template-areas: "name sub rm" "unit step step"; row-gap: 6px; }
  .kp-no { display: none; }
  .kp-name { grid-area: name; } .kp-sub { grid-area: sub; } .kp-rm { grid-area: rm; }
  .kp-line select, .kp-unit { grid-area: unit; justify-self: start; }
  .kp-line .stepper { grid-area: step; justify-self: end; }
}
.unit-row { display: grid; grid-template-columns: 1fr 70px 1fr 1.4fr 36px; gap: 6px; margin-bottom: 6px; align-items: center; }
.tier-row { display: grid; grid-template-columns: auto 90px auto 1fr 36px; gap: 8px; margin-bottom: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--fg-2); }
.bc-in { display: flex; gap: 6px; align-items: center; }
.bc-in input { flex: 1; min-width: 0; }
.bc-in .btn { height: 44px; }
@media (max-width: 640px) { .unit-row { grid-template-columns: 1fr 70px 36px; } .unit-row input[name^="up_"] { grid-column: 1 / 2; } .unit-row .bc-in { grid-column: 1 / -1; } .tier-row { grid-template-columns: auto 70px auto 1fr 36px; } }
@media (max-width: 480px) { .topbar .plan-chip { display: none; } }
.unit-head { font-size: 11.5px; font-weight: 800; color: var(--muted); margin-bottom: 2px; }
.tier-row .affix input { height: 42px; }
@media (max-width: 640px) { .unit-head { display: none; } }
