/* F&B Control — gaya dasar. Semua warna lewat token di :root. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --soft: #f3f5f8; --ink: #101623; --muted: #5a6474; --line: #e4e7ec;
  --accent: #c2410c; --accent-ink: #ffffff; --accent-soft: #fff1e8; --accent-strong: #9a3412;
  --shadow-1: 0 1px 2px rgba(16, 22, 35, .05), 0 1px 3px rgba(16, 22, 35, .04);
  --shadow-2: 0 6px 20px rgba(16, 22, 35, .08), 0 2px 6px rgba(16, 22, 35, .05);
  color-scheme: light;
  --good: #14774a; --good-bg: #dff3e8; --warn: #9a5b00; --warn-bg: #fcefd2; --bad: #b3261e; --bad-bg: #fbe1df; --info: #1d4f91; --info-bg: #e0ebfa;
  --radius: 14px; --side-w: 268px; --tabbar-h: 64px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* Tombol & isian */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.icon { padding: 7px 11px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 15px; font-weight: 400; color: var(--ink); min-width: 0; max-width: 100%; }
.msg { min-height: 20px; font-size: 13px; font-weight: 600; color: var(--bad); }
.msg.ok { color: var(--good); }

/* Masuk */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 22px; }
.brand-row { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-row strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.brand-row span { display: block; font-size: 12px; color: var(--muted); }
.brand-mark { flex: none; width: 40px; height: 40px; display: grid !important; place-items: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink) !important; font-size: 13px !important; font-weight: 700; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

/* Kerangka */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.nav-search input { width: 100%; padding: 8px 11px; font-size: 14px; background: var(--soft); }
#nav { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group > span { padding: 0 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav-link:hover { background: var(--soft); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-link small { font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-user strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.side-user span { font-size: 12px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
#menuBtn { display: none; }
.crumb { min-width: 0; flex: 1; }
.crumb span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.crumb h1 { font-size: 20px; line-height: 1.2; }
.today { font-size: 13px; color: var(--muted); white-space: nowrap; }
.page { padding: 20px 24px 56px; display: flex; flex-direction: column; gap: 18px; outline: none; }
.scrim { position: fixed; inset: 0; z-index: 19; background: rgba(10, 13, 18, .5); }

/* Blok isi */
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card h2 { font-size: 15px; }
.card .sub { font-size: 13px; color: var(--muted); }
.kpi-card { gap: 2px; }
.kpi-card span { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-card strong { font-size: 24px; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-card small { font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 12px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--soft); color: var(--muted); }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
.notice { padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; background: var(--info-bg); color: var(--info); }
.notice.warn { background: var(--warn-bg); color: var(--warn); } .notice.bad { background: var(--bad-bg); color: var(--bad); }
.empty { padding: 14px 2px; color: var(--muted); font-size: 14px; max-width: 60ch; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
th { text-align: left; padding: 6px 10px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.right { text-align: right; }

/* Alur harian */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.step { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.step:hover { border-color: var(--accent); }
.step .n { font-size: 12px; font-weight: 700; color: var(--muted); }
.step b { font-size: 15px; }
.step .s { font-size: 13px; color: var(--muted); }

/* Batang perbandingan */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 14px; }
.bar-row span:first-child { overflow-wrap: anywhere; }
.bar-row .val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bar-row .track { grid-column: 1 / -1; height: 7px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.chart-box { position: relative; height: 250px; }
ul.tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; width: min(var(--side-w), 86vw); transform: translateX(-102%); transition: transform .18s ease; }
  .app.menu-open .sidebar { transform: none; }
  #menuBtn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .page { padding: 16px 16px 48px; }
  .today { display: none; }
  .kpi-card strong { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* Tab, formulir, dan dialog */
.tabs { display: flex; gap: 4px; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.row.end { justify-content: flex-end; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.link { border: 0; background: none; padding: 4px 6px; color: var(--accent); }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1.1fr) 84px minmax(0, 1.1fr) minmax(0, 1fr) 36px; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.line .field { font-size: 12px; }
.line input, .line select { padding: 8px 9px; width: 100%; }
.line .sum { font-weight: 700; font-variant-numeric: tabular-nums; padding-bottom: 9px; text-align: right; white-space: nowrap; }
.total-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); font-weight: 600; }
.total-bar strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.facts div { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.facts b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.log { display: flex; flex-direction: column; gap: 6px; }
.notice.good { background: var(--good-bg); color: var(--good); }
.muted-row td { opacity: .6; }
details.card > summary { cursor: pointer; font-weight: 700; }
dialog.ask { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 20px; width: min(460px, calc(100vw - 32px)); }
dialog.ask::backdrop { background: rgba(10, 13, 18, .55); }
dialog.ask form { display: flex; flex-direction: column; gap: 14px; }
dialog.ask h2 { font-size: 17px; }
dialog.ask p { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .line .f-name { grid-column: 1 / -1; }
  .line .sum { text-align: left; }
}

.nowrap { white-space: nowrap; }
.clip { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.split { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }
textarea { resize: vertical; }

/* Kolom aksi selalu terlihat walau tabel digulir ke samping */
table.acts th:last-child, table.acts td:last-child { position: sticky; right: 0; background: var(--surface); box-shadow: -8px 0 8px -8px var(--line); }
.facts span { font-size: 12px; }

tfoot th { border-top: 2px solid var(--line); padding-top: 10px; font-variant-numeric: tabular-nums; }
.kpi-card .pill, .kpi-card small { white-space: normal; overflow-wrap: anywhere; }

/* Deretan bagian pada halaman gabungan */
.page-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; }
.subnav a { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- v22: layar muat, koneksi, akun, cetak ---------- */
.splash { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--bg); color: var(--muted); font-weight: 600; }
.offline { position: fixed; left: 0; right: 0; top: 0; z-index: 50; padding: 8px 16px; background: #b42318; color: #fff; text-align: center; font-weight: 600; font-size: 14px; }
.side-user { align-items: flex-start; }
.side-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; }
.check input { width: 18px; height: 18px; }
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px; } /* iPhone tidak memperbesar layar saat isian disentuh */
  .btn.small { min-height: 40px; }
  .sidebar { height: 100dvh; }
}
@media print {
  .sidebar, .topbar, .subnav, .tabs, .btn, .toast, .offline, .scrim, form.card { display: none !important; }
  .app { display: block; } .main, .page { padding: 0; }
  .table-wrap { overflow: visible; } .card { border: 0; box-shadow: none; padding: 0; break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* ================= v25: tampilan baru (terang, ikon, pintasan bawah di HP) ================= */
body { font-size: 15px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { letter-spacing: -.01em; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Tombol dan isian */
.btn { border-radius: 10px; padding: 10px 16px; min-height: 42px; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; box-shadow: var(--shadow-1); }
.btn:hover { border-color: #c9ced6; background: var(--soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { box-shadow: 0 1px 2px rgba(154, 52, 18, .35), 0 4px 12px rgba(194, 65, 12, .22); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.small { min-height: 34px; padding: 6px 12px; border-radius: 8px; box-shadow: none; }
.btn.danger { background: var(--surface); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.link { box-shadow: none; min-height: 0; }
.btn.link:hover { background: none; text-decoration: underline; }
.btn:disabled { box-shadow: none; transform: none; }
.field { gap: 7px; color: #3d4654; }
input, select, textarea { border-radius: 10px; padding: 11px 13px; border-color: #d5d9e0; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #b9c0ca; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .16); }
input::placeholder, textarea::placeholder { color: #9aa3b0; }

/* Masuk */
.login { background: radial-gradient(1200px 600px at 50% -10%, #ffe7d6 0%, rgba(255, 231, 214, 0) 60%), var(--bg); }
.login-card { border-radius: 20px; padding: 32px; border-color: transparent; box-shadow: var(--shadow-2); }
.login-card h1 { font-size: 24px; }
.brand-mark { border-radius: 12px; width: 44px; height: 44px; box-shadow: 0 2px 8px rgba(194, 65, 12, .3); }

/* Sidebar */
.sidebar { padding: 20px 14px 14px; gap: 16px; border-right-color: var(--line); }
.sidebar .brand-row { padding: 0 6px; }
.sidebar .brand-row strong { font-size: 16px; }
.nav-search input { border-radius: 10px; background: var(--soft); border-color: transparent; }
#nav { gap: 18px; }
.nav-group > span { padding: 0 12px 6px; font-size: 11px; color: #8a93a1; }
.nav-link { justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #333c4a; font-weight: 600; position: relative; }
.nav-link .ico { color: #7b8493; }
.nav-link:hover { background: var(--soft); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }
.nav-link[aria-current="page"] .ico { color: var(--accent); }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.side-user { background: var(--soft); border: 0; border-radius: 12px; padding: 12px; }
.side-actions .btn { width: 100%; }

/* Kepala halaman */
.topbar { background: rgba(246, 247, 249, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); padding: 14px 28px; }
.crumb span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8a93a1; }
.crumb h1 { font-size: 22px; }
.page { padding: 22px 28px 64px; gap: 20px; max-width: 1480px; width: 100%; }

/* Kartu, angka, tabel */
.card { border-radius: var(--radius); padding: 20px; border-color: var(--line); box-shadow: var(--shadow-1); gap: 14px; }
.card h2 { font-size: 16px; }
.card .sub { font-size: 13.5px; line-height: 1.5; }
.kpi-card { padding: 18px 20px; gap: 4px; }
.kpi-card > span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: #7b8493; }
.kpi-card strong { font-size: 27px; letter-spacing: -.02em; }
.facts { gap: 12px; }
.facts div { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.facts b { font-size: 18px; }
.pill { padding: 2px 10px; }
.notice { border-radius: 10px; padding: 12px 14px; }
th { padding: 10px 12px; background: var(--soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #6b7482; border-bottom: 1px solid var(--line); }
thead th:first-child { border-radius: 8px 0 0 8px; } thead th:last-child { border-radius: 0 8px 8px 0; }
td { padding: 12px; border-bottom-color: #eef0f3; }
tbody tr:hover td { background: #fafbfc; }
table.acts th:last-child { background: var(--soft); }
table.acts tbody tr:hover td:last-child { background: #fafbfc; }
.empty { padding: 22px 4px; }

/* Langkah, tab, bagian */
.step { padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-1); transition: border-color .12s, box-shadow .12s, transform .08s; }
.step:hover { border-color: var(--accent); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.step .n { color: var(--accent); }
.subnav { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px; gap: 4px; width: fit-content; max-width: 100%; box-shadow: var(--shadow-1); }
.subnav a { border: 0; border-radius: 8px; padding: 8px 16px; background: none; }
.subnav a:hover { background: var(--soft); }
.subnav a[aria-current="page"] { box-shadow: 0 1px 2px rgba(154, 52, 18, .3); }
.tabs { gap: 6px; }
.tabs button { padding: 11px 16px; font-size: 14.5px; border-bottom-width: 3px; border-radius: 8px 8px 0 0; }
.tabs button:hover { color: var(--ink); background: var(--soft); }
.seg { border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border-radius: 7px; }
.drop { border-radius: var(--radius); background: var(--soft); }
.total-bar { border-radius: 12px; }
dialog.ask { border: 0; border-radius: 18px; padding: 24px; box-shadow: 0 24px 60px rgba(16, 22, 35, .28); }
dialog.ask h2 { font-size: 18px; }
dialog.ask::backdrop { background: rgba(16, 22, 35, .45); backdrop-filter: blur(2px); }
.toast { border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow-2); background: #1b2332; color: #fff; }
.splash { background: var(--bg); }

/* Pintasan bawah: hanya di HP */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: #6b7482; font: inherit; font-size: 11.5px; font-weight: 700; text-decoration: none; cursor: pointer; min-width: 0; }
  .tabbar .ico { width: 23px; height: 23px; }
  .tabbar [aria-current="page"] { color: var(--accent); }
  .tabbar [aria-current="page"] .ico { stroke-width: 2.1; }
  .page { padding: 16px 14px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px)); gap: 16px; }
  .topbar { padding: 10px 14px; }
  #menuBtn { display: none; } /* menu dibuka dari pintasan bawah */
  .crumb h1 { font-size: 19px; }
  .card { padding: 16px; }
  .toast { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); }
  .sidebar { z-index: 30; box-shadow: var(--shadow-2); padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .scrim { z-index: 29; }
  .subnav { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .btn { min-height: 46px; }
  .btn.small { min-height: 40px; }
  .grid.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { padding: 14px; }
  .kpi-card strong { font-size: clamp(16px, 4.9vw, 21px); overflow-wrap: normal; white-space: nowrap; }
  .login-card { padding: 24px; }
}
@media print { .tabbar { display: none !important; } }

.page a:not(.btn):not(.step):not(.nav-link), .login a { color: var(--accent); font-weight: 600; text-underline-offset: 2px; }
.subnav a, .subnav a[aria-current="page"] { text-decoration: none; }
.page .subnav a:not(.btn):not(.step):not(.nav-link) { color: var(--muted); font-weight: 600; }
.page .subnav a[aria-current="page"]:not(.btn):not(.step):not(.nav-link) { color: var(--accent-ink); }

/* v26 */
.side-user { flex-direction: column; align-items: stretch; gap: 10px; }
.side-user strong, .side-user span { overflow-wrap: normal; }
.side-actions { flex-direction: row; flex-wrap: wrap; }
.side-actions .btn { flex: 1 1 auto; width: auto; }
.subnav { position: relative; z-index: 1; }

/* v29: daftar menu di Resep & HPP tidak lagi saling menimpa */
#rMenus > .btn { flex: none; height: auto; min-height: 44px; padding: 8px 12px; box-shadow: none; }
#rMenus > .btn > span:first-child { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
#rMenus > .btn .pill { flex: none; }

/* v30: judul kolom bisa diketuk untuk mengurutkan */
.page thead th { cursor: pointer; user-select: none; }
.page thead th:empty { cursor: default; }
.page thead th:not(:empty):hover { color: var(--ink); }
.page thead th[data-sort] { color: var(--accent); }
.page thead th[data-sort="asc"]::after { content: " ▲"; font-size: 9px; }
.page thead th[data-sort="desc"]::after { content: " ▼"; font-size: 9px; }

/* v31: kolom status tidak tertutup kolom tombol */
table.acts td:nth-last-child(2), table.acts th:nth-last-child(2) { padding-right: 18px; }
table.acts td:last-child { padding-left: 8px; }
table.acts td:last-child .btn.small { padding: 5px 9px; min-height: 32px; }
table.acts .pill { white-space: normal; text-align: center; line-height: 1.25; padding: 3px 9px; }

/* v37: kontras teks kecil, sasaran ketuk di HP, pemberitahuan koneksi & versi baru */
.nav-group > span, .crumb span, .kpi-card > span, th { color: var(--muted); }
input::placeholder, textarea::placeholder { color: #6b7482; }
.notice.update { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 14px 28px 0; }
/* Pemberitahuan koneksi di bawah layar supaya judul halaman tidak tertutup */
.offline { top: auto; bottom: 0; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
.offline:not([hidden]) ~ .toast { bottom: 64px; }
@media (max-width: 900px) {
  .nav-search input { font-size: 16px; } /* iPhone tidak memperbesar layar */
  table.acts td:last-child .btn.small { min-height: 40px; }
  .btn.link, .seg button { min-height: 40px; }
  .notice.update { margin: 12px 14px 0; }
  .offline { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: 8px; }
  .offline:not([hidden]) ~ .toast { bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom, 0px)); }
}
@media print { .notice.update { display: none !important; } }

/* Kolom bahan yang bisa dicari (v47) */
.ss { position: relative; width: 100%; }
.ss-input { width: 100%; }
select.ss-asli { display: none; }
.ss-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; max-height: 300px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-2); padding: 4px; font-weight: 400; }
.ss-item { padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.ss-item.on, .ss-item:hover { background: var(--accent-soft); color: var(--accent-strong); }
.ss-kosong { padding: 10px; color: var(--muted); font-size: 14px; }
.ss-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ss-tag { flex: none; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 8px; }
.ss-tag.prep { color: var(--info); background: var(--info-bg); }

/* Jendela bantuan mengambang */
.fh-btn { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 99px; background: var(--accent, #c2410c); color: #fff; font: inherit; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.18); cursor: pointer; }
.fh-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.fh-btn.on { filter: brightness(.92); }
.fh-panel { position: fixed; right: 20px; bottom: 80px; z-index: 31; width: min(400px, calc(100vw - 24px)); max-height: min(70vh, 620px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.22); overflow: hidden; }
.fh-panel[hidden] { display: none; }
.fh-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fh-close { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: inherit; width: 40px; height: 40px; }
.fh-field { padding: 10px 16px 6px; margin: 0; }
.fh-list { overflow-y: auto; padding: 4px 16px 8px; }
.fh-list details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.fh-list summary { cursor: pointer; font-weight: 700; }
.fh-list p { margin: 8px 0 0; }
.fh-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 900px) {
  .fh-btn { right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px); height: 44px; padding: 0 12px; }
  .fh-btn span { display: none; }
  .fh-panel { right: 12px; left: 12px; width: auto; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 64px); max-height: 65vh; }
}
@media print { .fh-btn, .fh-panel { display: none !important; } }

/* ---------- v50: perbaikan tampilan (audit 14 Okt) ---------- */
/* Baris yang dibatalkan: kolom aksi yang menempel di kanan tetap berlatar penuh supaya tidak menumpuk teks di belakangnya */
.muted-row td:last-child { opacity: 1; }
.muted-row td:last-child > * { opacity: .6; }
/* Ruang di bawah halaman supaya baris terakhir dan tombol simpan tidak tertutup tombol Bantuan */
@media (min-width: 901px) { #page { padding-bottom: 88px; } }
/* Laporan laba rugi: judul baris total tidak huruf kapital semua, angka tidak terpotong */
table.statement th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
table.statement td.right, table.statement th.right { white-space: nowrap; }
.tm-more { display: block; width: 100%; margin-top: 10px; }
.tm-hide { display: none !important; }
@media (max-width: 640px) {
  /* Tabel menjadi kartu: setiap baris satu kartu, label kolom di kiri, nilai di kanan */
  .table-wrap:has(> table.tm-card) { overflow: visible; border: 0; max-height: none !important; }
  table.tm-card { min-width: 0 !important; width: 100%; border-collapse: separate; }
  table.tm-card thead { display: none; }
  table.tm-card, table.tm-card tbody, table.tm-card tfoot, table.tm-card tr, table.tm-card td, table.tm-card tfoot th { display: block; }
  table.tm-card tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--surface); }
  table.tm-card tfoot tr { background: var(--bg); }
  table.tm-card tfoot th { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
  table.tm-card td, table.tm-card tfoot th { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 8px; padding: 5px 0 !important; border: 0 !important; text-align: right; white-space: normal; min-height: 0; min-width: 0 !important; }
  table.tm-card td::before, table.tm-card tfoot th::before { content: attr(data-label); flex: 0 1 auto; max-width: 45%; margin-right: auto; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
  table.tm-card td[data-label=""]::before, table.tm-card tfoot th[data-label=""]::before { display: none; }
  table.tm-card td > .tm-v { flex: 0 1 auto; min-width: 0; max-width: 60%; text-align: right; overflow-wrap: anywhere; }
  table.tm-card td > .tm-v .pill { margin-left: 4px; }
  table.tm-card td:first-child { font-weight: 700; }
  table.tm-card td:empty, table.tm-card td.tm-dash { display: none; }
  table.tm-card .nowrap { white-space: normal; }
  table.acts td:last-child, table.acts th:last-child { position: static; box-shadow: none; background: none !important; }
  table.acts td:last-child { justify-content: flex-end; gap: 8px; padding-top: 8px !important; }
  table.acts tbody tr:hover td:last-child { background: none; }
  table.tm-card tr.tm-hide { display: none; }
  /* Tabel lain tetap bisa digeser; laporan laba rugi: label boleh turun baris, persen disembunyikan */
  table.statement td:nth-child(3), table.statement th:nth-child(3) { display: none; }
  table.statement td:first-child, table.statement th:first-child { white-space: normal; padding-left: 8px !important; }
  /* Kartu angka: nilai panjang tidak terpotong */
  .kpi-card b, .kpi-card strong, .facts b { overflow-wrap: anywhere; }
  .kpi-card .pill { white-space: normal; }
  /* Isian saringan selebar layar */
  .card .row > .field, .card .row > label.field { flex: 1 1 100%; min-width: 0; }
  .card .row > .field input, .card .row > .field select { width: 100%; }
}
@media (max-width: 400px) { .grid.kpi { grid-template-columns: 1fr; } }
.fh-btn[hidden] { display: none; }
/* Laptop: formulir di atas, riwayat selebar halaman di bawahnya, supaya semua kolom tabel terlihat tanpa digeser */
@media (min-width: 901px) and (max-width: 1500px) {
  .split:not(.keep) { grid-template-columns: minmax(0, 1fr); }
  .split:not(.keep) > :first-child { max-width: 760px; }
}

/* v52: di HP tombol Bantuan pindah ke bilah judul atas, tidak menutupi isi halaman */
@media (max-width: 640px) {
  .topbar .fh-btn { position: static; margin-left: auto; height: 38px; padding: 0 12px; box-shadow: none; flex: 0 0 auto; }
  .topbar .fh-btn span { display: inline; font-size: 14px; }
  .topbar .fh-btn ~ .today { display: none; }
  .fh-panel { top: calc(env(safe-area-inset-top, 0px) + 64px); bottom: auto; }
  #page { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 48px); }
}

/* v53: di HP tabel jadi daftar 1 baris (nama · lokasi · angka ›); ketuk untuk detail */
.tm-sum { display: none; }
@media (max-width: 640px) {
  .table-wrap:has(> table.tm-list) { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
  table.tm-list tbody tr { display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  table.tm-list tbody tr:last-child { border-bottom: 0; }
  table.tm-list tbody tr > td:not(.tm-sum) { display: none; }
  table.tm-list tbody tr.tm-open { background: var(--bg); }
  table.tm-list tbody tr.tm-open > td:not(.tm-sum):not(:empty):not(.tm-dash) { display: flex; padding: 4px 14px !important; font-weight: 400; }
  table.tm-list tbody tr.tm-open { padding-bottom: 10px; }
  table.tm-list td.tm-sum { order: -1; display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto 12px; align-items: center; gap: 10px; padding: 12px 14px !important; cursor: pointer; text-align: left; font-weight: 400; min-height: 48px; }
  table.tm-list td.tm-sum::before { display: none; }
  .tm-t { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; overflow-wrap: anywhere; }
  .tm-s { color: var(--muted); font-size: 13px; max-width: 26vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tm-n { font-weight: 700; text-align: right; white-space: nowrap; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; } /* v113: angka panjang tidak mendorong keluar layar */
  .tm-n.bad { color: var(--bad); } .tm-n.warn { color: var(--warn); }
  .tm-c { color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
  tr.tm-open .tm-c { transform: rotate(90deg); }
  .tm-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--good, #15803d); vertical-align: middle; }
  table.tm-list tfoot tr { margin-top: 0; border-radius: 0; border: 0; border-top: 2px solid var(--line); }
}
/* ---------- Tema: Gelap ---------- */
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a21; --soft: #1f232c; --ink: #eef1f6; --muted: #9aa3b2; --line: #2a2f3a;
  --accent: #ea580c; --accent-ink: #ffffff; --accent-soft: #2a1a10; --accent-strong: #fb923c;
  --good: #4ade80; --good-bg: #10291b; --warn: #fbbf24; --warn-bg: #2d2310; --bad: #f87171; --bad-bg: #351616; --info: #93c5fd; --info-bg: #13233a;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 24px rgba(0,0,0,.45);
  color-scheme: dark;
}
:root[data-theme="dark"] .topbar { background: rgba(15, 17, 21, .88); }
:root[data-theme="dark"] .tabbar { background: rgba(23, 26, 33, .96) !important; }
:root[data-theme="dark"] .login { background: radial-gradient(1200px 600px at 50% -10%, #3a1d0c 0%, rgba(58, 29, 12, 0) 60%), var(--bg); }
:root[data-theme="dark"] .field { color: #c7cdd8; }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--soft); border-color: #343a47; color: var(--ink); }
:root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: #6f7887; }
:root[data-theme="dark"] .btn:hover { border-color: #444b59; }
:root[data-theme="dark"] .nav-group > span, :root[data-theme="dark"] .crumb span, :root[data-theme="dark"] .kpi-card > span, :root[data-theme="dark"] th, :root[data-theme="dark"] .tabbar a, :root[data-theme="dark"] .tabbar button { color: #8f98a8; }
:root[data-theme="dark"] .nav-link { color: #d3d8e1; }
:root[data-theme="dark"] .nav-link .ico { color: #8f98a8; }
:root[data-theme="dark"] td { border-bottom-color: #232833; }
:root[data-theme="dark"] tbody tr:hover td, :root[data-theme="dark"] table.acts tbody tr:hover td:last-child { background: #1b1f27; }
:root[data-theme="dark"] .toast { background: #eef1f6; color: #0f1115; }
:root[data-theme="dark"] .tabbar [aria-current="page"] { color: var(--accent-strong); }

/* ---------- Tema: Bangka Garage (bingkai gelap, isi terang) ---------- */
:root[data-theme="brand"] { --frame: #16171b; --frame-2: #202227; --frame-ink: #f2f2f4; --frame-muted: #9a9ca5; --bg: #f3f1ee; --line: #e5e1db; --soft: #f4f1ec; }
:root[data-theme="brand"] .sidebar { background: var(--frame); border-right-color: var(--frame); color: var(--frame-ink); }
:root[data-theme="brand"] .sidebar .brand-row strong, :root[data-theme="brand"] .sidebar .brand-row { color: var(--frame-ink); }
:root[data-theme="brand"] .nav-search input { background: var(--frame-2); color: var(--frame-ink); }
:root[data-theme="brand"] .nav-group > span { color: #6f727b; }
:root[data-theme="brand"] .nav-link { color: #d6d7dc; }
:root[data-theme="brand"] .nav-link .ico { color: #8d9099; }
:root[data-theme="brand"] .nav-link:hover { background: var(--frame-2); color: #fff; }
:root[data-theme="brand"] .nav-link[aria-current="page"] { background: rgba(234, 88, 12, .16); color: #fdba74; }
:root[data-theme="brand"] .nav-link[aria-current="page"] .ico { color: #fb923c; }
:root[data-theme="brand"] .side-user { background: var(--frame-2); color: var(--frame-ink); }
:root[data-theme="brand"] .side-user .sub, :root[data-theme="brand"] .sidebar .sub { color: var(--frame-muted); }
:root[data-theme="brand"] .sidebar .btn { background: var(--frame-2); border-color: #33363d; color: var(--frame-ink); }
:root[data-theme="brand"] .topbar { background: var(--frame); border-bottom-color: var(--frame); color: var(--frame-ink); backdrop-filter: none; }
:root[data-theme="brand"] .topbar .crumb span { color: #fb923c; }
:root[data-theme="brand"] .topbar .btn.icon { background: var(--frame-2); border-color: #33363d; color: var(--frame-ink); }
:root[data-theme="brand"] .topbar .today { color: var(--frame-muted); }
:root[data-theme="brand"] .tabbar { background: var(--frame) !important; border-top-color: var(--frame); }
:root[data-theme="brand"] .tabbar a, :root[data-theme="brand"] .tabbar button { color: #9a9ca5; }
:root[data-theme="brand"] .tabbar [aria-current="page"] { color: #fb923c; }
/* Pilihan tampilan di menu samping */
.theme-pick { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.theme-pick span { font-size: 12px; font-weight: 600; color: var(--muted); }
.theme-pick select { padding: 8px 10px; min-height: 38px; }
:root[data-theme="brand"] .theme-pick span { color: var(--frame-muted); }
:root[data-theme="brand"] .theme-pick select { background: var(--frame-2); border-color: #33363d; color: var(--frame-ink); }
:root[data-theme="brand"] .sidebar .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .splash, :root[data-theme="dark"] body { background: var(--bg); }

/* v55: menu samping bisa dikecilkan (laptop) */
.side-toggle { display: none; }
@media (min-width: 901px) {
  .brand-row { position: relative; }
  .side-toggle { display: inline-grid; place-items: center; margin-left: auto; width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; }
  .side-toggle:hover { color: var(--ink); background: var(--soft); }
  .side-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  :root[data-theme="brand"] .side-toggle { background: var(--frame-2); border-color: #33363d; color: #c9cbd1; }
  .app { transition: grid-template-columns .18s ease; }
  .app.side-small { grid-template-columns: 76px minmax(0, 1fr); }
  .app.side-small .sidebar { padding: 16px 10px; align-items: center; overflow-x: hidden; }
  .app.side-small .brand-row { flex-direction: column; gap: 10px; padding: 0; }
  .app.side-small .brand-row > div, .app.side-small .nav-search, .app.side-small .nav-group > span, .app.side-small .side-user, .app.side-small .nav-link span { display: none; }
  .app.side-small .side-toggle { margin: 0; }
  .app.side-small .side-toggle svg path:last-child { transform: scaleX(-1); transform-origin: 12.5px 12px; }
  .app.side-small #nav { gap: 10px; width: 100%; }
  .app.side-small .nav-group { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
  :root[data-theme="brand"] .app.side-small .nav-group { border-top-color: #2a2c32; }
  .app.side-small .nav-group:first-child { border-top: 0; padding-top: 0; }
  .app.side-small .nav-link { justify-content: center; width: 48px; height: 44px; padding: 0; }
  .app.side-small .nav-link[aria-current="page"]::before { left: -10px; }
  .app.side-small .page { max-width: none; }
}

/* v56: di HP/tablet bagian bawah halaman tidak tertutup tombol navigasi bawah */
@media (max-width: 900px) { #page { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 48px); } }

/* v57: analisa Beranda */
.kpi-card .delta { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.grid.kpi .kpi-card strong { font-size: clamp(19px, 1.6vw, 26px); white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 640px) { .grid.kpi .kpi-card strong { font-size: 22px; white-space: normal; } }
.kpi-card .delta.good { color: var(--good); }
.kpi-card .delta.bad { color: var(--bad); }
.heat-wrap { overflow-x: auto; }
table.heat { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 520px; }
table.heat th { background: none; font-size: 11px; padding: 2px 4px; text-align: center; color: var(--muted); border: 0; letter-spacing: 0; text-transform: none; }
table.heat tbody th { text-align: left; }
table.heat td { height: 26px; min-width: 22px; padding: 0; border: 0 !important; border-radius: 4px; background: var(--soft); text-align: center; font-size: 9px; color: #fff; }
table.heat tbody tr:hover td { background-blend-mode: normal; }
table.heat .sr { opacity: 0; }
table.heat td[data-cell] { cursor: pointer; transition: transform .08s; }
table.heat td[data-cell]:hover { outline: 2px solid var(--ink); outline-offset: -2px; }
table.heat td.on { outline: 3px solid var(--ink); outline-offset: -3px; }
.heat-info:not(:empty) { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
table.heat tbody tr:hover td:not([style]), table.heat tbody tr:hover td[style=""] { background: var(--soft); }
.heat-info .facts div { background: var(--surface); }

/* v59: opname beberapa bahan */
.tm-dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--good); vertical-align: middle; }
.om-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.om-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(110px, .8fr); gap: 10px 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.om-row:last-child { border-bottom: 0; }
.om-row.on { background: var(--accent-soft); }
.om-name { display: flex; flex-direction: column; min-width: 0; }
.om-name .sub { font-size: 12.5px; }
.om-in { display: flex; gap: 8px; }
.om-in label { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 11.5px; color: var(--muted); }
.om-in input { width: 100%; min-height: 40px; padding: 8px 10px; font-size: 16px; }
.om-diff { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; }
.om-bar { position: sticky; bottom: 12px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-2); }
.om-bar #mCount { flex: 1; font-weight: 700; }
.om-dialog { width: min(760px, calc(100vw - 24px)); }
@media (max-width: 900px) { .om-bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px); } }
@media (max-width: 640px) {
  .om-row { grid-template-columns: minmax(0, 1fr) auto; }
  .om-name { grid-column: 1 / -1; }
  .om-diff { min-width: 90px; }
  .om-bar { flex-wrap: wrap; } .om-bar #mCount { flex-basis: 100%; }
}
@media (min-width: 901px) { .om-bar { margin-right: 150px; } }

/* v60: halaman absen karyawan */
.absen-body { min-height: 100vh; background: var(--bg); }
.ab-top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #16171b; color: #f2f2f4; }
.ab-top small { color: #fb923c; font-weight: 700; letter-spacing: .1em; font-size: 11px; }
.ab-top h1 { margin: 0; font-size: 20px; }
.ab-clock { font-size: 13px; color: #c9cbd1; text-align: right; }
.ab-main { max-width: 480px; margin: 0 auto; padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
.ab-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.ab-person { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 60px; }
.ab-person:last-child { border-bottom: 0; }
.ab-person:active { background: var(--accent-soft); }
.ab-person span:first-child { display: flex; flex-direction: column; }
.ab-person small { color: var(--muted); font-size: 12.5px; }
.ab-cam { position: relative; height: 300px; border-radius: 18px; overflow: hidden; background: #1d1f24; display: grid; place-items: center; }
.ab-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.ab-face { position: relative; width: 150px; height: 190px; border-radius: 50%; border: 3px dashed #fb923c; }
.ab-cam span { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 3px #000; }
.ab-loc { padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.ab-loc.ok { background: var(--good-bg); color: var(--good); }
.ab-loc.bad { background: var(--bad-bg); color: var(--bad); }
.ab-pin { display: flex; justify-content: center; gap: 8px; }
.ab-pin i { width: 40px; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; font-style: normal; font-size: 26px; }
.ab-pin i.on { border-color: var(--accent); }
.ab-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ab-keys button { height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 22px; font-weight: 600; cursor: pointer; }
.ab-keys button:active { background: var(--accent-soft); }
.ab-go { display: flex; gap: 10px; }
.ab-go .btn { flex: 1; min-height: 58px; font-size: 18px; }
.ab-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ab-done { text-align: center; padding: 40px 10px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.ab-check { width: 96px; height: 96px; border-radius: 50%; background: var(--good); color: #fff; font-size: 56px; display: grid; place-items: center; }
.ab-done p { font-size: 20px; line-height: 1.5; }
/* Halaman Karyawan */
.ab-photo { width: 120px; height: 150px; object-fit: cover; border-radius: 10px; background: var(--soft); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack > h2, .stack > h3, .stack > p { margin: 0; }
/* v62: halaman absen muat satu layar HP; tombol Masuk/Pulang selalu terlihat di bawah */
.ab-main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); gap: 10px; }
.ab-cam { height: min(300px, 30vh); min-height: 170px; }
.ab-face { width: auto; height: 82%; aspect-ratio: 4 / 5; }
.ab-pin i { height: 42px; font-size: 22px; }
.ab-keys { gap: 6px; }
.ab-keys button { height: min(54px, 6.4vh); min-height: 42px; font-size: 20px; }
.ab-loc { padding: 8px 12px; font-size: 13px; }
.ab-go { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.12); }
.ab-go .btn { max-width: 230px; margin: 0 auto; }
/* v67: jadwal kerja */
.jd-grid td, .jd-grid th { padding: 6px 4px; }
.jd-grid td:first-child { min-width: 130px; padding-left: 10px; }
.jd-in { width: 66px; min-height: 38px; padding: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.jd-in.changed { border-color: var(--accent); background: var(--accent-soft); }
.jd-in::placeholder { color: var(--muted); opacity: .55; font-size: 12px; }
.ab-sched { text-align: center; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-weight: 600; font-size: 14px; }
.ab-sched.late { background: var(--bad-bg); color: var(--bad); }
/* v71: hak akses */
.acc-list { max-height: 55vh; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.acc-list fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.acc-list legend { font-weight: 700; font-size: 12.5px; padding: 0 4px; }
.acc-list .check.off { opacity: .5; }
/* v76: cek stok */
.cs-table tbody tr.cs-row { cursor: pointer; }
.cs-table tbody tr.cs-row:hover { background: var(--accent-soft); }
.cs-table td, .cs-table th { padding: 10px 8px; }
.cs-seg button { min-height: 40px; }
@media (max-width: 700px) { .cs-table { font-size: 13.5px; } .cs-table td, .cs-table th { padding: 8px 5px; } }
.cs-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--muted); }
.cs-dot.good { background: var(--good); } .cs-dot.warn { background: #e0a100; } .cs-dot.bad { background: var(--bad); }
@media (max-width: 700px) { .cs-table .cs-st { display: none; } .cs-table td:first-child { min-width: 110px; } }

/* v81 — tampilan ringkas HP staf */
.cx-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cx-chips::-webkit-scrollbar { display: none; }
.cx-chips button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px; min-height: 40px; font-weight: 700; font-size: 14px; cursor: pointer; }
.cx-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cx-find { width: 100%; min-height: 48px; font-size: 17px; }
.cx-head { display: flex; flex-direction: column; gap: 10px; }
.cx-sum { font-size: 13px; color: var(--muted); }
.cx-list { display: flex; flex-direction: column; }
.cx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; min-height: 54px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.cx-row:last-child { border-bottom: 0; }
.cx-name { min-width: 0; font-weight: 600; line-height: 1.3; }
.cx-name small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cx-val { flex: 0 0 auto; text-align: right; font-weight: 800; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-val small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
.cx-val.bad { color: var(--bad); } .cx-val.warn { color: var(--warn); } .cx-val.zero { color: var(--muted); font-weight: 600; }
.cx-rank { flex: 0 0 26px; color: var(--muted); font-weight: 700; font-size: 13px; }
.cx-big { font-size: 28px; font-weight: 800; line-height: 1.1; }
.cx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-tile { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; min-height: 72px; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.cx-tile b { font-size: 15px; line-height: 1.25; }
.cx-tile span { font-size: 13px; color: var(--muted); font-weight: 600; }
.cx-tile span.bad { color: var(--bad); }
.cx-step { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cx-step button { width: 54px; height: 52px; border: 0; background: var(--soft); font-size: 24px; font-weight: 800; cursor: pointer; color: var(--ink); }
.cx-step input { width: 72px; height: 52px; border: 0; border-radius: 0; text-align: center; font-size: 20px; font-weight: 800; }
.cx-out { display: flex; align-items: center; gap: 10px; }
.cx-out input { width: 140px; min-height: 52px; font-size: 22px; font-weight: 800; text-align: right; }
.cx-out span { font-size: 17px; font-weight: 700; }
.cx-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: block; }
.cx-line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cx-line input { text-align: right; min-height: 44px; }
.cx-sticky { position: sticky; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
.cx-sticky .btn { width: 100%; min-height: 54px; font-size: 17px; box-shadow: var(--shadow-2); }
@media (min-width: 761px) { .cx-sticky { bottom: 12px; } }
.cx-done { text-align: center; padding: 22px 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cx-done .cx-ok { width: 56px; height: 56px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.cx-link { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 8px 0; cursor: pointer; font: inherit; }
.cx-back { display: inline-flex; align-items: center; gap: 6px; }
.cx-sub-list { margin: 4px 0 6px 12px; padding-left: 10px; border-left: 3px solid var(--accent-soft); }
.cx-sub-list .cx-row { min-height: 40px; padding: 7px 2px; font-size: 14px; }
.cx-sub-list .cx-val { font-size: 14px; }
.cx-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; background: var(--good); }
.cx-dot.bad { background: var(--bad); } .cx-dot.warn { background: var(--warn); }

/* v88: kelompok menu samping bisa dilipat */
.nav-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin: 0; padding: 4px 12px 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; text-align: left; cursor: pointer; }
.nav-head:hover { color: var(--ink); background: var(--soft); }
.nav-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav-head svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.nav-group.shut .nav-head svg { transform: rotate(-90deg); }
.nav-items { display: flex; flex-direction: column; gap: 2px; }
.nav-group.shut .nav-items { display: none; }
#nav { gap: 10px; }
:root[data-theme="dark"] .nav-head { color: #8f98a8; }
:root[data-theme="dark"] .nav-head:hover { color: #e6e9ef; }
:root[data-theme="brand"] .nav-head { color: #8d9099; }
:root[data-theme="brand"] .nav-head:hover { color: #fff; background: var(--frame-2); }
@media (prefers-reduced-motion: reduce) { .nav-head svg { transition: none; } }
@media (min-width: 901px) {
  .app.side-small .nav-head { display: none; }
  .app.side-small .nav-items, .app.side-small .nav-group.shut .nav-items { display: flex; align-items: center; width: 100%; }
}
/* v92 — Bahan & stok: satu baris per bahan, stok tiap lokasi berdampingan. */
.bx-table td, .bx-table th { vertical-align: middle; padding-left: 7px; padding-right: 7px; }
.bx-table td.bx-acts { white-space: normal; }
.bx-acts > div { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.bx-table th.bx-hl, .bx-table td.bx-hl { background: var(--accent-soft); }
.bx-cell { background: none; border: 0; padding: 0; min-height: 32px; justify-content: center; font: inherit; color: inherit; cursor: pointer; text-align: right; display: inline-flex; flex-direction: column; align-items: flex-end; }
.bx-cell:hover .bx-q, .bx-cell:focus-visible .bx-q { text-decoration: underline; }
.bx-q.bad { color: var(--bad); font-weight: 700; } .bx-q.warn { color: var(--warn); font-weight: 700; } .bx-q.zero { color: var(--muted); }
.bx-pack { display: block; font-size: 11.5px; }
.bx-pick { display: flex; flex-direction: column; gap: 8px; }
.bx-pick .btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; text-align: left; }
.bx-pick .btn .sub { font-weight: 500; font-size: 13px; }
.bx-pick .btn.danger .sub { color: inherit; opacity: .85; }
.bx-cards { display: flex; flex-direction: column; }
.bx-card { padding: 12px 2px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bx-card:last-child { border-bottom: 0; }
.bx-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-width: 0; }
.bx-name { min-width: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bx-name small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 2px; }
.bx-locs { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 10px; min-height: 32px; display: inline-flex; align-items: center; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
button.bx-chip { cursor: pointer; }
.bx-chip.bad { color: var(--bad); border-color: var(--bad); } .bx-chip.warn { color: var(--warn); border-color: var(--warn); } .bx-chip.zero { color: var(--muted); }
.bx-chip.total { background: var(--soft); }
.bx-act { display: flex; gap: 8px; justify-content: flex-end; }
.bx-table th { white-space: normal; vertical-align: bottom; }
.bx-table td:nth-child(2) { min-width: 140px; }
/* v93 — label bahan: hijau "dipotong saat terjual", abu-abu "biaya saja". */
.bx-auto, .bx-cost { font-size: 11px; vertical-align: 1px; cursor: help; }
.bx-name .bx-auto, .bx-name .bx-cost { margin-top: 3px; }
/* v94 — lokasi berdampingan di Laporan stok, Beranda, Produksi, Persetujuan & Riwayat opname. */
.lx-table td, .lx-table th { vertical-align: middle; padding-left: 7px; padding-right: 7px; }
.lx-table th { white-space: normal; vertical-align: bottom; }
.lx-table th.bx-hl, .lx-table td.bx-hl { background: var(--accent-soft); }
.lx-table td.lx-tot { border-left: 1px solid var(--line); }
.lx-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.lx-sub.bad { color: var(--bad); } .lx-sub.warn { color: var(--warn); }
.lx-foot { font-size: 12.5px; line-height: 1.4; }
.lx-view { margin: 12px 0 0; width: max-content; max-width: 100%; align-self: flex-start; }
.lx-view button { min-height: 36px; }
.lx-cell { cursor: help; }

/* v96: baris bahan yang bisa diganti / ditambah (Ubah batch & Catat produksi) */
.px-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 52px 36px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.px-row select, .px-row input { min-height: 40px; width: 100%; }
.px-row input { text-align: right; }
.px-row .px-x { background: none; border: 1px solid var(--line); border-radius: 8px; min-height: 36px; color: var(--bad); font-weight: 700; cursor: pointer; }
.px-row small { grid-column: 1 / -1; color: var(--muted); margin-top: -4px; }
.px-head { display: grid; grid-template-columns: minmax(0, 1fr) 110px 52px 36px; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .px-row, .px-head { grid-template-columns: minmax(0, 1fr) 84px 40px 32px; } }
/* v102: dialog "dipakai di resep" */
dialog.pr-box { width: min(860px, calc(100vw - 24px)); max-width: none; }
dialog.pr-box .pr-body { max-height: 65vh; overflow: auto; margin: 8px 0 12px; }
dialog.pr-box .pr-loc { font-size: 15px; margin: 14px 0 6px; }
dialog.pr-box td .pill { white-space: normal; }
.ss-pick .ss-list { z-index: 80; }
@media (max-width: 640px) {
  dialog.pr-box thead { display: none; }
  dialog.pr-box table, dialog.pr-box tbody, dialog.pr-box tr, dialog.pr-box td { display: block; width: 100%; }
  dialog.pr-box tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  dialog.pr-box td { border: 0; padding: 2px 0; text-align: left; }
  dialog.pr-box td:first-child { font-size: 12px; color: var(--muted); }
}

/* v113: tabel berdampingan (tm-keep) di HP lebih rapat supaya tidak terpotong di kanan */
@media (max-width: 760px) {
  table.tm-keep th { letter-spacing: 0; padding: 8px 5px; font-size: 10.5px; white-space: normal; }
  table.tm-keep td { padding: 8px 5px; font-size: 13px; }
  table.tm-keep td:first-child, table.tm-keep th:first-child { padding-left: 8px; }
}

/* ===== v114 POS tahap 2: denah meja, PIN staf, modifier, stok porsi, monitor ===== */
.pos-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; margin-bottom: 10px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.pos-who > span:first-child { flex: 1 1 220px; }
.pos-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pos-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; background: var(--soft); border: 1px solid var(--line); }
.pos-legend .busy::before { background: var(--info-bg); border-color: var(--info); }
.pos-legend .slow::before { background: var(--warn-bg); border-color: var(--warn); }
.pos-legend .late::before { background: var(--bad-bg); border-color: var(--bad); }
.pos-legend .ready::before { background: var(--accent-soft); border-color: var(--accent); }
.pos-legend .done::before { background: var(--good-bg); border-color: var(--good); }
.pos-area h2 { font-size: 17px; }
.pos-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pos-tables.wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pos-table { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2px; min-height: 76px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.pos-table b { font-size: 20px; line-height: 1.1; color: inherit; font-variant-numeric: tabular-nums; }
.pos-table small { font-size: 11.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pos-table:hover { border-color: var(--muted); }
.pos-table.busy { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.pos-table.slow { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.pos-table.late { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); animation: pos-pulse 1.6s ease-in-out infinite; }
.pos-table.ready { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.pos-table.done { background: var(--good-bg); border-color: var(--good); color: var(--good); }
@keyframes pos-pulse { 50% { box-shadow: 0 0 0 4px var(--bad-bg); } }
@media (prefers-reduced-motion: reduce) { .pos-table.late { animation: none; } }
.pos-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 14px; align-items: start; }
.pos-cart { position: sticky; top: 8px; }
@media (max-width: 1000px) { .pos-split { grid-template-columns: minmax(0, 1fr); } .pos-cart { position: static; } }
.pos-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cx-tile.out { opacity: .5; cursor: not-allowed; }
.pos-left { align-self: flex-start; padding: 1px 8px; border-radius: 99px; background: var(--soft); font-size: 12px !important; }
.pos-left.warn { background: var(--warn-bg); color: var(--warn) !important; } .pos-left.bad { background: var(--bad-bg); color: var(--bad) !important; }
.pos-board { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
dialog.pos-pin, dialog.pos-order, dialog.pos-mod { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
dialog.pos-order { width: min(680px, calc(100vw - 24px)); }
.pp-wrap { display: flex; flex-direction: column; gap: 12px; }
.pos-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; }
.pos-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pos-name:hover { border-color: var(--accent); }
.pos-name small { font-size: 12px; color: var(--muted); }
.pp-dots { display: flex; justify-content: center; gap: 12px; min-height: 22px; }
.pp-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
.pp-dots span.on { background: var(--ink); border-color: var(--ink); }
.pp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp-keys button { min-height: 60px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); font: inherit; font-size: 24px; font-weight: 800; cursor: pointer; }
.pp-keys button:active { background: var(--accent-soft); }
.pos-scroll { max-height: 46vh; overflow: auto; }
.pos-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-actions .btn { flex: 1 1 180px; min-height: 48px; }
.pos-group { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; margin: 0; }
.pos-group legend { font-weight: 800; padding: 0 6px; }
.pos-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-opt { position: relative; }
.pos-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pos-opt span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; cursor: pointer; }
.pos-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pos-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pos-opt small { font-weight: 600; opacity: .85; }
.pos-portion { grid-template-columns: minmax(0, 1fr) 96px auto; }
.pos-portion .bad { color: var(--bad); } .pos-portion .warn { color: var(--warn); }
.pos-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.pos-settings .pos-wide { grid-column: 1 / -1; }
.pos-arearow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pos-arearow .field:first-child { grid-column: 1 / -1; }
.pos-modform { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.pos-chk { display: flex; gap: 8px; align-items: center; min-height: 44px; font-weight: 600; }
.pos-modmenu { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pos-modmenu > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pos-modchip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.pos-modchip.off { opacity: .5; text-decoration: line-through; }
.pos-modchip .cx-link { padding: 0; font-size: 13px; }
.mon-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mon-kpi strong { font-size: 36px !important; }
.mon-kpi.bad { background: var(--bad-bg); border-color: var(--bad); } .mon-kpi.bad strong { color: var(--bad); }
.mon-kpi.warn { background: var(--warn-bg); border-color: var(--warn); } .mon-kpi.warn strong { color: var(--warn); }
.mon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.mon-grid .cx-name { font-size: 16px; }
:fullscreen .mon-grid .cx-name { font-size: 19px; }
@media (max-width: 760px) {
  .pos-tables { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
  .pos-table { min-height: 64px; padding: 6px 7px; }
  .pos-table b { font-size: 17px; }
  .pos-table small:last-child { display: none; }
  .pos-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-board { grid-template-columns: minmax(0, 1fr); }
  .pos-portion { grid-template-columns: minmax(0, 1fr) 80px; }
  .pos-portion > span:last-child { grid-column: 1 / -1; justify-content: flex-end; }
}
dialog.pos-order a[data-lvoid] { color: var(--bad); font-weight: 700; }
/* v116: batal per menu — pilih Tidak terbuang / Waste */
dialog.pos-void { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.pos-voidlist { display: flex; flex-direction: column; gap: 8px; max-height: 44vh; overflow: auto; }
.pos-voidrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.pos-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.pos-seg label { position: relative; }
.pos-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pos-seg span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.pos-seg input:checked + span { background: var(--good-bg); color: var(--good); }
.pos-seg .w input:checked + span { background: var(--bad-bg); color: var(--bad); }
.pos-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
/* v118: petunjuk cek wajah */
.ab-cam span.ok { color: #86efac; font-weight: 700; }
/* v122: angka gaji disembunyikan sampai diklik */
.uang-tutup .uang { filter: blur(7px); cursor: pointer; user-select: none; transition: filter .15s; }
.uang-tutup .buka .uang, .uang-tutup .uang.buka { filter: none; }
/* v123: daftar karyawan per nama */
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.k-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.k-card:hover { border-color: var(--accent, #c2410c); }
.k-card small { color: var(--muted, #6b7280); }
.k-card span:empty { display: none; }
input.uang { transition: filter .15s; }

/* ================= v126: menu samping lebih rapi + Beranda modern ================= */
:root { --dx-c1: #ea580c; --dx-c2: #f59e0b; --dx-c3: #0d9488; --dx-c4: #2563eb; --dx-c5: #7c3aed; --dx-c6: #e11d48; --dx-c7: #64748b; --dx-ring: #fb923c; --dx-card-shadow: 0 1px 2px rgba(16, 22, 35, .04), 0 8px 24px -12px rgba(16, 22, 35, .12); }
:root[data-theme="dark"] { --dx-c1: #fb923c; --dx-c2: #fbbf24; --dx-c3: #2dd4bf; --dx-c4: #60a5fa; --dx-c5: #a78bfa; --dx-c6: #fb7185; --dx-c7: #94a3b8; --dx-card-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

/* --- Menu samping --- */
.sidebar { gap: 12px; padding: 16px 12px 12px; scrollbar-width: thin; }
.sidebar .brand-row { padding: 2px 4px 6px; }
.sidebar .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.nav-search { position: relative; display: block; }
.nav-search .ns-ico { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; color: var(--muted); pointer-events: none; }
.nav-search input { padding: 9px 58px 9px 36px; border-radius: 10px; border-color: transparent; }
.nav-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); font: 600 10.5px var(--font); color: var(--muted); pointer-events: none; }
.nav-search input:focus + kbd, .nav-search input:not(:placeholder-shown) + kbd { display: none; }
#nav { gap: 6px; }
.nav-group { gap: 1px; }
.nav-group + .nav-group { padding-top: 6px; }
.nav-head { padding: 8px 10px 4px; font-size: 10.5px; letter-spacing: .12em; }
.nav-link { position: relative; gap: 11px; justify-content: flex-start; min-height: 38px; padding: 7px 10px; border-radius: 10px; font-size: 14px; transition: background .12s ease, color .12s ease; }
.nav-link span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link .ico { width: 19px; height: 19px; }
.nav-link[aria-current="page"]::before { left: -12px; top: 9px; bottom: 9px; width: 3px; }
/* Akun di bawah */
.side-user { position: relative; display: block; margin-top: auto; padding: 10px 0 0; border-top: 1px solid var(--line); background: none !important; }
.user-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.user-chip:hover, .user-chip[aria-expanded="true"] { background: var(--soft); }
.user-chip .avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #fb923c, #c2410c); color: #fff; font-weight: 800; font-size: 13.5px; letter-spacing: .02em; }
.user-chip .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-chip .who strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .chev { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); transition: transform .15s; }
.user-chip[aria-expanded="true"] .chev { transform: rotate(180deg); }
.user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .35); }
.user-menu .side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.user-menu .side-actions .btn { width: 100%; }
.user-menu #installBtn { grid-column: 1 / -1; }
.user-menu .theme-pick { margin: 0; }
:root[data-theme="brand"] .side-user { border-top-color: #2a2c32; }
:root[data-theme="brand"] .nav-search input { border-color: transparent; }
:root[data-theme="brand"] .nav-search .ns-ico, :root[data-theme="brand"] .nav-search kbd { color: #8d9099; border-color: #33363d; }
:root[data-theme="brand"] .nav-head { color: #6f727b; }
:root[data-theme="brand"] .nav-head:hover { background: var(--frame-2); color: #c9cbd1; }
:root[data-theme="brand"] .user-chip { color: var(--frame-ink); }
:root[data-theme="brand"] .user-chip:hover, :root[data-theme="brand"] .user-chip[aria-expanded="true"] { background: var(--frame-2); }
:root[data-theme="brand"] .user-chip .who span, :root[data-theme="brand"] .user-chip .chev { color: var(--frame-muted); }
:root[data-theme="brand"] .user-menu { background: var(--frame-2); border-color: #33363d; color: var(--frame-ink); }
:root[data-theme="dark"] .nav-search kbd { border-color: #343a47; }
@media (max-width: 900px) { .nav-search kbd { display: none; } .nav-search input { padding-right: 12px; } }
@media (min-width: 901px) {
  .app.side-small .side-user { display: block !important; width: 100%; }
  .app.side-small .user-chip { justify-content: center; padding: 6px 0; }
  .app.side-small .user-chip .who, .app.side-small .user-chip .chev { display: none; }
  .app.side-small .user-menu { left: 0; right: auto; width: 240px; }
  .app.side-small .nav-search { display: none; }
}

/* --- Beranda --- */
.page:has(> .page-body > .dx-hero) { max-width: 1320px; }
.dx-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px; padding: 22px 24px; border-radius: 20px; color: #f6f3ef;
  background: radial-gradient(700px 260px at 100% -20%, rgba(251, 146, 60, .38), rgba(251, 146, 60, 0) 60%), radial-gradient(500px 240px at -10% 120%, rgba(13, 148, 136, .22), rgba(13, 148, 136, 0) 60%), linear-gradient(135deg, #1b1c21 0%, #24201c 55%, #2c1f15 100%);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .6); }
.dx-hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px; }
.dx-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fdba74; }
.dx-hero h2 { margin-top: 4px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.dx-period { margin-top: 4px; font-size: 14px; color: #c9c4bd; }
.dx-hero-act { display: flex; align-items: center; gap: 8px; }
.dx-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); }
.dx-seg button { border: 0; background: none; color: #d8d3cc; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer; }
.dx-seg button:hover { color: #fff; }
.dx-seg button[aria-pressed="true"] { background: #fff; color: #1b1c21; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.dx-iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08); color: #f6f3ef; cursor: pointer; }
.dx-iconbtn:hover { background: rgba(255, 255, 255, .16); }
.dx-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dx-today { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.dx-today:empty { display: none; }
.dx-today-sum { display: flex; align-items: center; gap: 12px; min-width: 180px; color: #fff; }
.dx-today-sum b { display: block; font-size: 15px; }
.dx-today-sum span { font-size: 12.5px; color: #c9c4bd; }
.dx-ring { width: 52px; height: 52px; }
.dx-steps { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.dx-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: #f6f3ef; text-decoration: none; min-width: 0; transition: background .15s, transform .15s; }
.dx-step:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.dx-step-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(251, 146, 60, .18); color: #fdba74; border: 1px dashed rgba(251, 146, 60, .6); }
.dx-step.done .dx-step-ic { background: #22c55e; color: #fff; border: 0; }
.dx-step.done .dx-step-ic .dx-ico { width: 16px; height: 16px; stroke-width: 2.6; }
.dx-step-t { min-width: 0; display: flex; flex-direction: column; }
.dx-step-t b { font-size: 13.5px; }
.dx-step-t small { font-size: 12px; color: #bdb7af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.dx-kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--dx-card-shadow); min-width: 0; transition: transform .15s ease, box-shadow .15s ease; }
.dx-kpi:hover { transform: translateY(-2px); }
.dx-kpi-top { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.dx-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.dx-ic .dx-ico { width: 17px; height: 17px; }
.dx-kpi-label { flex: 1; font-size: 13px; font-weight: 700; color: var(--muted); }
.dx-kpi strong { font-size: clamp(20px, 1.7vw, 26px); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dx-kpi small { font-size: 12px; color: var(--muted); line-height: 1.35; position: relative; z-index: 1; }
.dx-kpi.pos strong { color: var(--good); } .dx-kpi.neg strong { color: var(--bad); }
.dx-kpi.main { background: linear-gradient(160deg, #fff7ed 0%, var(--surface) 60%); border-color: #fed7aa; }
:root[data-theme="dark"] .dx-kpi.main { background: linear-gradient(160deg, #2a1a10 0%, var(--surface) 65%); border-color: #4a2a14; }
.dx-delta { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.dx-delta.good { background: var(--good-bg); color: var(--good); } .dx-delta.bad { background: var(--bad-bg); color: var(--bad); }
.dx-spark { display: block; width: calc(100% + 32px); height: 36px; margin: 6px -16px -14px; color: var(--dx-c1); }
.dx-spark.c2 { color: var(--dx-c2); } .dx-spark.c3 { color: var(--dx-c3); } .dx-spark.c4 { color: var(--dx-c4); } .dx-spark.c6 { color: var(--dx-c6); }
.dx-skel { display: block; height: 24px; width: 70%; border-radius: 8px; background: linear-gradient(90deg, var(--soft), var(--line), var(--soft)); background-size: 200% 100%; animation: dxsk 1.2s infinite linear; }
.dx-skel.w60 { height: 12px; width: 55%; }
@keyframes dxsk { to { background-position: -200% 0; } }

.dx-grid { display: grid; gap: 14px; }
.dx-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dx-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dx-2-1 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) { .dx-1-1 { grid-template-columns: minmax(0, 1fr); } }
.card.dx-card { border-radius: 18px; padding: 18px; box-shadow: var(--dx-card-shadow); gap: 14px; }
.dx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dx-head h2 { font-size: 16px; font-weight: 800; letter-spacing: -.005em; }
.dx-head .sub { margin-top: 2px; }
.dx-link { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.dx-link .dx-ico { width: 14px; height: 14px; }
.dx-sub-h { margin-top: 6px; font-size: 13.5px; font-weight: 800; }

/* grafik */
.dx-chart { position: relative; }
.dx-chart svg { display: block; width: 100%; height: 250px; overflow: visible; touch-action: pan-y; }
.dx-grid line, line.dx-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
line.dx-grid.zero { stroke: var(--muted); stroke-opacity: .4; }
.dx-axis { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.dx-cursor { stroke: var(--muted); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.dx-tip { position: absolute; top: 4px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 10px; background: #1b1c21; color: #fff; font-size: 12px; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45); pointer-events: none; white-space: nowrap; z-index: 2; }
.dx-tip span { display: flex; align-items: center; gap: 6px; color: #d6d3cf; }
.dx-tip i, .dx-keys i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.dx-keys { display: flex; gap: 16px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dx-keys span { display: inline-flex; align-items: center; gap: 6px; }
.dx-keys i.dash { height: 3px; border-radius: 2px; width: 14px; }
.dx-donut { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dx-donut svg { width: min(210px, 100%); height: auto; }
.dx-donut-big { font-size: 17px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.dx-donut-sub { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.dx-donut circle { transition: stroke-width .15s; }
.dx-donut circle:hover { stroke-width: 22; }
.dx-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.dx-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: 13px; }
.dx-legend i { width: 10px; height: 10px; border-radius: 3px; }
.dx-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-legend b { font-variant-numeric: tabular-nums; }
.dx-legend small { grid-column: 2 / -1; color: var(--muted); font-size: 11.5px; margin-top: -3px; }
@media (min-width: 1101px) { .dx-legend small { display: none; } }

/* peringkat */
.dx-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dx-rank li { display: flex; gap: 12px; align-items: center; }
.dx-rank li > div { flex: 1; min-width: 0; }
.dx-no { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--soft); color: var(--muted); }
.dx-rank li:first-child .dx-no { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.dx-rank li:nth-child(2) .dx-no { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.dx-rank li:nth-child(3) .dx-no { background: linear-gradient(135deg, #fdba74, #c2410c); color: #fff; }
.dx-rank-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.dx-rank-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-rank-top b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dx-track { margin-top: 6px; height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.dx-track i { display: block; height: 100%; border-radius: 99px; }

/* per lokasi */
.dx-divs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.dx-div { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); }
.dx-div-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dx-div-top b { font-size: 15px; }
.dx-div-num span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.dx-div-num strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dx-meter { position: relative; height: 8px; border-radius: 99px; background: var(--line); }
.dx-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--dx-c3); }
.dx-meter i.over { background: var(--dx-c2); }
.dx-meter em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.dx-div-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.dx-div-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }

.dx-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.dx-mini > div { padding: 12px; border-radius: 14px; background: var(--soft); display: flex; flex-direction: column; gap: 4px; }
.dx-mini span { font-size: 12px; color: var(--muted); font-weight: 600; }
.dx-mini b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dx-mini .bad b { color: var(--bad); }
.dx-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.dx-tips li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.dx-tips .dx-ico { margin-top: 2px; color: var(--accent); }
@media (max-width: 640px) {
  .dx-hero { padding: 18px 16px; border-radius: 18px; }
  .dx-hero-act { width: 100%; } .dx-seg { flex: 1; } .dx-seg button { flex: 1; padding: 8px 6px; }
  .dx-steps { grid-template-columns: 1fr 1fr; }
  .dx-today-sum { min-width: 0; width: 100%; }
  .dx-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dx-kpi { padding: 13px 13px 12px; border-radius: 16px; }
  .dx-kpi strong { font-size: 18px; white-space: normal; }
  .dx-kpi .dx-delta { display: none; }
  .dx-spark { width: calc(100% + 26px); margin: 4px -13px -12px; }
  .dx-chart svg { height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .dx-kpi, .dx-step { transition: none; } .dx-skel { animation: none; } }
.page a.dx-step:not(.btn), .page a.dx-link:not(.btn) { color: inherit; text-decoration: none; }
.page a.dx-step:not(.btn) { color: #f6f3ef; font-weight: 400; }
.page a.dx-link:not(.btn) { color: var(--accent); font-weight: 700; }
@media (min-width: 641px) and (max-width: 1180px) { .dx-today { align-items: stretch; } .dx-today-sum { min-width: 0; width: 100%; } }
.page .dx-hero a.dx-step:not(.btn):not(.step):not(.nav-link) { color: #f6f3ef; font-weight: 400; text-decoration: none; }
.dx-kpi-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sidebar { overflow: hidden; }
#nav { overflow-y: auto; overflow-x: hidden; min-height: 0; margin: 0 -12px; padding: 0 12px 8px; scrollbar-width: thin; scrollbar-color: rgba(127, 127, 127, .35) transparent; }
.app.side-small #nav { margin: 0 -10px; padding: 0 10px 8px; }
.user-chip .who strong { color: inherit; }
:root[data-theme="brand"] .user-chip .who strong { color: var(--frame-ink); }

/* v128: divisi di Pengeluaran / Pemasukan lain */
.div-sel { min-height: 32px; padding: 2px 8px; font-size: 13px; border-radius: 8px; width: auto; }
#lDivHint { display: block; margin-top: 4px; font-weight: 400; }

/* ================= v129: Beranda gaya Glass + Aurora (hanya Beranda) =================
   Latar aurora = gradasi diam (tanpa efek kabur yang dihitung terus). Kartu kaca blur ringan.
   html.lite (Mode ringan) = tanpa backdrop-filter, kartu krem setengah transparan. */
body.glass-home { --gl-bg: rgba(255, 250, 244, .55); --gl-bg2: rgba(255, 250, 244, .38); --gl-line: rgba(255, 255, 255, .6); --gl-ink: #2a1d14; --gl-mut: #7a6656;
  --gl-sh: 0 10px 30px -10px rgba(90, 52, 20, .22); --gl-a1: #ffb07a; --gl-a2: #ffd9a3; --gl-a3: #8fd3c6; --gl-a4: #f7a5a0; --gl-base: #f6e9da; }
:root[data-theme="dark"] body.glass-home { --gl-bg: rgba(42, 30, 23, .58); --gl-bg2: rgba(42, 30, 23, .38); --gl-line: rgba(255, 255, 255, .1); --gl-ink: #f6ece2; --gl-mut: #bba895;
  --gl-sh: 0 10px 30px -10px rgba(0, 0, 0, .55); --gl-a1: #8a3a12; --gl-a2: #6b4a17; --gl-a3: #0e5a52; --gl-a4: #6d2a2a; --gl-base: #1a120d; }
body.glass-home main.main { position: relative; isolation: isolate; background: transparent; }
body.glass-home main.main::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(42vw 42vw at 4% -6%, var(--gl-a1) 0%, transparent 70%), radial-gradient(38vw 38vw at 96% -4%, var(--gl-a2) 0%, transparent 70%),
    radial-gradient(44vw 44vw at 82% 108%, color-mix(in srgb, var(--gl-a3) 70%, transparent) 0%, transparent 70%), radial-gradient(32vw 32vw at 34% 104%, color-mix(in srgb, var(--gl-a4) 60%, transparent) 0%, transparent 70%), var(--gl-base); }
body.glass-home .topbar { background: transparent !important; border-bottom-color: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
@media (min-width: 901px) { body.glass-home .sidebar { z-index: 3; } } /* v132: hanya desktop — di HP/tablet sidebar = laci (z-index 20/30) di atas scrim */
body.glass-home .topbar .btn.icon { background: var(--gl-bg); border-color: var(--gl-line); color: var(--gl-ink); }
body.glass-home .topbar, body.glass-home .topbar * { color: var(--gl-ink); }
body.glass-home .page-body > .notice { background: var(--gl-bg); }
/* kartu kaca */
body.glass-home .dx-hero, body.glass-home .dx-kpi, body.glass-home .card.dx-card {
  background: var(--gl-bg); border: 1px solid var(--gl-line); box-shadow: var(--gl-sh); color: var(--gl-ink);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); }
body.glass-home .dx-kpi, body.glass-home .card.dx-card { border-radius: 22px; }
body.glass-home .dx-hero { border-radius: 24px; }
body.glass-home .card.dx-card .sub, body.glass-home .dx-kpi small, body.glass-home .dx-kpi-label, body.glass-home .dx-axis, body.glass-home .dx-keys, body.glass-home .dx-legend small { color: var(--gl-mut); fill: var(--gl-mut); }
body.glass-home .dx-donut-big { fill: var(--gl-ink); }
/* hero: dari gelap jadi kaca terang */
body.glass-home .dx-eyebrow { color: #c2410c; }
:root[data-theme="dark"] body.glass-home .dx-eyebrow { color: #fdba74; }
body.glass-home .dx-period, body.glass-home .dx-today-sum span, body.glass-home .dx-step-t small { color: var(--gl-mut); }
body.glass-home .dx-today-sum { color: var(--gl-ink); }
body.glass-home .dx-today { border-top-color: var(--gl-line); }
body.glass-home .dx-seg { background: var(--gl-bg2); border-color: var(--gl-line); }
body.glass-home .dx-seg button { color: var(--gl-mut); }
body.glass-home .dx-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .9); color: #2a1d14; box-shadow: 0 2px 8px rgba(90, 52, 20, .15); }
:root[data-theme="dark"] body.glass-home .dx-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .16); color: #fff; }
body.glass-home .dx-iconbtn { background: var(--gl-bg2); border-color: var(--gl-line); color: var(--gl-ink); }
body.glass-home .page .dx-hero a.dx-step:not(.btn):not(.step):not(.nav-link) { background: var(--gl-bg2); border-color: var(--gl-line); color: var(--gl-ink); }
body.glass-home .dx-step-ic { background: rgba(232, 100, 28, .1); color: #c2410c; border-color: rgba(232, 100, 28, .55); }
body.glass-home .dx-step.done .dx-step-ic { background: #0f9b8e; color: #fff; }
body.glass-home .dx-ring text { fill: var(--gl-ink); }
/* KPI omzet menonjol */
body.glass-home .dx-kpi.main { background: linear-gradient(140deg, rgba(232, 100, 28, .92), rgba(245, 158, 11, .86)); border-color: rgba(255, 255, 255, .35); color: #fff; }
body.glass-home .dx-kpi.main small, body.glass-home .dx-kpi.main .dx-kpi-label { color: rgba(255, 255, 255, .9); }
body.glass-home .dx-kpi.main .dx-ic { background: rgba(255, 255, 255, .22); color: #fff; }
body.glass-home .dx-kpi.main .dx-delta { background: rgba(255, 255, 255, .25); color: #fff; }
body.glass-home .dx-kpi.main .dx-spark { color: #fff; }
body.glass-home .dx-ic { background: rgba(255, 255, 255, .55); }
:root[data-theme="dark"] body.glass-home .dx-ic { background: rgba(255, 255, 255, .08); }
/* isi kartu: kotak dalam ikut transparan */
body.glass-home .dx-div, body.glass-home .dx-mini > div, body.glass-home .dx-tips li { background: var(--gl-bg2); border-color: var(--gl-line); }
body.glass-home .dx-link { background: rgba(232, 100, 28, .12); }
body.glass-home .dx-kpi:hover, body.glass-home .card.dx-card:hover { transform: translateY(-2px); }
body.glass-home .card.dx-card { transition: transform .15s ease; }
/* Mode ringan: tanpa blur, latar tetap */
html.lite body.glass-home .dx-hero, html.lite body.glass-home .dx-kpi, html.lite body.glass-home .card.dx-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 249, 242, .86); }
:root[data-theme="dark"].lite body.glass-home .dx-hero, :root[data-theme="dark"].lite body.glass-home .dx-kpi, :root[data-theme="dark"].lite body.glass-home .card.dx-card { background: rgba(38, 27, 21, .9); }
html.lite body.glass-home .dx-kpi.main { background: linear-gradient(140deg, #e8641c, #f59e0b); }
html.lite body.glass-home .dx-kpi:hover, html.lite body.glass-home .card.dx-card:hover { transform: none; }
@media (prefers-reduced-motion: reduce) { body.glass-home .dx-kpi:hover, body.glass-home .card.dx-card:hover { transform: none; } }
.lite-pick { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 2px; cursor: pointer; }
.lite-pick input { width: 18px; height: 18px; margin: 0; flex: none; }


/* v130: Tanya Lyla di Beranda */
.tl { display: flex; flex-direction: column; gap: 8px; }
.tl-form { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 6px 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 6px 18px -8px rgba(90, 52, 20, .25); }
:root[data-theme="dark"] .tl-form { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); }
.tl-badge { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #0f766e; background: rgba(15, 155, 142, .12); }
.tl-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #0f9b8e; box-shadow: 0 0 0 3px rgba(15, 155, 142, .2); }
.tl-in { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 15px; color: inherit; outline: none; padding: 0 !important; min-height: 0 !important; }
.tl-in::-webkit-search-cancel-button { display: none; }
.tl-go { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: 17px; font-weight: 800; background: linear-gradient(135deg, #e8641c, #f59e0b); box-shadow: 0 4px 12px rgba(232, 100, 28, .35); }
.tl-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tl-chips::-webkit-scrollbar { display: none; }
.tl-chips button { flex: none; border: 1px solid rgba(232, 100, 28, .25); background: rgba(255, 255, 255, .5); color: inherit; font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
:root[data-theme="dark"] .tl-chips button { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.tl-out { position: relative; }
.tl-out:empty { display: none; }
.tl-ans { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); display: flex; flex-direction: column; gap: 6px; }
:root[data-theme="dark"] .tl-ans { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.tl-h { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: #9a3412; padding-right: 26px; }
:root[data-theme="dark"] .tl-h { color: #fdba74; }
.tl-big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.tl-big.good { color: #0f766e; } .tl-big.bad { color: #b91c1c; }
.tl-sub, .tl-text { font-size: 13px; opacity: .8; margin: 0; }
.tl-delta { font-weight: 700; } .tl-delta.good { color: #0f766e; } .tl-delta.bad { color: #b91c1c; }
.tl-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px 14px; margin: 4px 0 0; }
.tl-rows div { display: flex; flex-direction: column; } .tl-rows dt { font-size: 12px; opacity: .7; } .tl-rows dd { margin: 0; font-weight: 700; font-size: 14px; }
.tl-lh { font-size: 12px; font-weight: 800; opacity: .7; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.tl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(120, 90, 60, .2); font-size: 13.5px; }
.tl-list li:last-child { border-bottom: 0; }
.tl-list li span { min-width: 0; } .tl-list li b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-list small { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
.tl-stock .neg { color: #b91c1c; } .tl-stock .low { color: #b45309; }
.tl-link { align-self: flex-start; margin-top: 4px; font-size: 13px; font-weight: 700; color: #c2410c; text-decoration: none; }
.page .dx-hero a.tl-link:not(.btn) { color: #c2410c; }
:root[data-theme="dark"] .page .dx-hero a.tl-link:not(.btn) { color: #fdba74; }
.tl-x { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .06); color: inherit; font-size: 17px; cursor: pointer; }
@media (max-width: 760px) { .tl-form { height: 46px; } .tl-badge { display: none; } .tl-big { font-size: 24px; } }

/* v132: Riwayat barang masuk ringkas — lokasi, metode, catatan di bawah nama bahan */
.ph-cell b { display: block; font-weight: 700; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--muted); align-items: center; }
.ph-meta .pill { font-size: 11px; padding: 1px 8px; }
.ph-note { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.ph-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
td.ph-acts { white-space: nowrap; }
td.ph-acts .btn + .btn { margin-left: 6px; }
@media (min-width: 761px) and (max-width: 1500px) { td.ph-acts { white-space: normal; } td.ph-acts .btn { display: block; width: 100%; margin: 0 0 6px !important; } }
strong.tm-main { font-weight: inherit; }

/* v135: Riwayat closing — status, catatan & tombol Buka lagi di kolom tanggal */
.ch-date { min-width: 190px; max-width: 260px; }
.ch-date .ch-note { margin: 4px 0 6px; font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-date .btn { margin-top: 2px; }

/* ---------- v138 Scudetto (work order teknisi: tombol besar, sedikit ketik) ---------- */
.sc { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.sc h3 { font-size: 16px; margin: 0; }
.sc-h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 4px; }
.sc-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sc-top input[type=search] { flex: 1 1 220px; min-height: 52px; font-size: 16px; }
.btn.sc-big { min-height: 54px; font-size: 16px; padding: 12px 20px; border-radius: 12px; }
.sc-n { opacity: .75; font-weight: 600; }
.sc-merah { color: var(--bad); }
.sc-ingat { display: block; text-decoration: none; }
.sc-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sc-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; box-shadow: var(--shadow-1, none); }
.sc-card:hover { border-color: var(--accent); }
.sc-card-top, .sc-card-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-card-bot { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sc-card-bot b { color: var(--ink); font-size: 15px; }
.sc-plat { font-size: 20px; letter-spacing: .04em; }
.sc-mobil { font-weight: 600; }
.sc-lay { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sc-plat-in { font-size: 22px !important; letter-spacing: .06em; text-transform: uppercase; min-height: 56px; }
.sc .sc-plat-big { font-size: 30px; letter-spacing: .05em; margin: 2px 0; }
.sc-head p { margin: 2px 0; }
.sc-chips { flex-wrap: wrap; overflow: visible; }
.sc-chips button { min-height: 48px; padding: 10px 18px; font-size: 15px; }
.sc-kat { display: flex; flex-direction: column; gap: 6px; }
.sc-kat > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sc-svc { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sc-svc-b { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 60px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer; }
.sc-svc-b:hover, .sc-svc-b:active { border-color: var(--accent); background: var(--accent-soft); }
.sc-svc-b small { font-weight: 600; color: var(--accent); font-size: 13px; }
.sc-items, .sc-pakai, .sc-bahan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sc-items li { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sc-items input { text-align: right; font-size: 16px; font-variant-numeric: tabular-nums; min-height: 46px; }
.sc-it-nama { font-weight: 600; display: flex; flex-direction: column; }
.sc-it-nama small { font-weight: 500; color: var(--muted); font-size: 12px; }
.sc-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; color: var(--muted); }
.sc-total b { font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-save { display: flex; flex-wrap: wrap; gap: 10px; position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 2; }
.sc-save .sc-big { flex: 1 1 150px; }
.sc-alur { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sc-alur button { min-height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.sc-alur button.done { background: var(--good-bg); color: var(--good); border-color: transparent; }
.sc-alur button.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sc-pakai li, .sc-bahan li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sc-pakai li > span:first-child { flex: 1 1 0; min-width: 0; }
.sc-pakai li { flex-wrap: nowrap; }
.sc-bahan li.off { opacity: .55; }
.sc-bahan-act { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-riw { flex-basis: 100%; }
.sc-cek { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
.sc-cek input { width: 20px; height: 20px; }
.sc-dlg { width: min(520px, calc(100vw - 20px)); max-height: calc(100vh - 20px); overflow: auto; }
.sc-models { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.sc-model { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.sc-model span { color: var(--muted); }
.sc-model:disabled { cursor: default; }
@media (max-width: 760px) {
  .sc-cards { grid-template-columns: 1fr; }
  .sc-svc { grid-template-columns: 1fr 1fr; }
  .sc-svc-b { font-size: 13px; }
  .sc-items li { grid-template-columns: 1fr 120px auto; }
  .sc-alur button { min-height: 50px; font-size: 13px; }
  .sc-save { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
}
@media print { .sc-save { display: none; } }

/* v138: penanda warna unit di back office (Scudetto = hijau stabilo, sama dengan kasirnya) */
.nav-link[href^="#/scudetto"] .ico { color: #5ab620; }
.nav-link[href^="#/scudetto"][aria-current="page"] .ico { color: #98ff59; }
.sc-pilih { display: flex; flex-direction: column; gap: 8px; }
.sc-pilih .btn { justify-content: flex-start; text-align: left; }
.sc-save.sc-diam { position: static; background: none; padding: 0; }
.sc-save.sc-diam .btn.danger { flex: 1 1 100%; }
.sc-plg { cursor: pointer; }
.sc-plg-nama { font-size: 17px; }
.sc-riw-k { gap: 8px; }
.sc-subnav { width: fit-content; }
.sc-bulan { font-size: 18px; min-width: 150px; text-align: center; }
.sc-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 120px; align-items: end; }
.sc-bar span { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.sc-bar i { display: block; background: var(--accent-strong, #2f6e0c); border-radius: 3px 3px 0 0; min-height: 2px; }
.sc-bar small { font-size: 10px; color: var(--muted); height: 14px; }

/* Scudetto · pratinjau nota (v142/s6) */
.sc-nota { background: #fff; color: #111; border: 1px solid #d9dde3; border-radius: 8px; max-width: 340px; width: 100%; margin: 0 auto; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.sc-nota-logo { background: #000; text-align: center; padding: 12px 0 8px; }
.sc-nota-logo img { width: 72%; height: auto; display: inline-block; }
.sc-nota-isi { padding: 10px 16px 14px; font-family: Helvetica, Arial, sans-serif; line-height: 1.35; }
.sc-nota-isi > div { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.sc-nota-isi > div > span:last-child:not(:first-child) { white-space: nowrap; text-align: right; }
.sc-nota-isi .b { font-weight: 700; }
.sc-nota-isi .abu { color: #6b7280; }
.sc-nota-isi .hijau { color: #2f6e0c; }
.sc-nota-isi .tengah { justify-content: center; text-align: center; }
.sc-nota-isi hr { border: 0; border-top: 1px solid #c0c0c0; margin: 6px 0; }
.sc-nota-aksi { display: flex; flex-direction: column; gap: 8px; }
.sc-nota-grid { display: flex; flex-direction: column; gap: 14px; }
.sc-nota-sisi { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 720px) {
  dialog.sc-dlg-nota { width: min(760px, calc(100vw - 24px)); }
  .sc-nota-grid { display: grid; grid-template-columns: minmax(0, 340px) 1fr; align-items: start; }
  .sc-nota-sisi { position: sticky; top: 0; }
}

/* v143 Ringkasan usaha (per unit) */
.ru .ru-unit button { font-size: 15px; padding: 8px 16px; }
.ru .ru-minus, .ru .ru-rugi strong { color: var(--bad); }
.ru .ru-untung strong { color: var(--good, #1f8a4c); }
.ru .ru-total td { border-top: 2px solid var(--line); font-weight: 700; }
.ru .ru-periode { margin: 4px 2px 10px; }
.ru .ru-bagi { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin: 14px 0 4px; font-size: 12px; font-weight: 600; }
.ru .ru-bagi > div { display: flex; align-items: center; padding: 0 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.ru .ru-bagi-fnb { background: #f59e0b; color: #111; }
.ru .ru-bagi-sc { background: #98ff59; color: #0b1a03; }

/* v144 Beranda: rentang tanggal bebas */
.dx-seg .dx-custom { white-space: nowrap; }
dialog.dx-tgl { width: min(440px, calc(100vw - 24px)); }
.dx-tgl .dx-tgl-cepat { flex-wrap: wrap; }
@media (max-width: 760px) {
  .dx-seg { flex-wrap: wrap; }
  .dx-seg .dx-custom { flex-basis: 100%; }
}

/* v145 Scudetto · pratinjau invoice A5 */
.scn { background: #fff; color: #121214; border: 1px solid #d9dde3; border-radius: 8px; width: 100%; max-width: 440px; margin: 0 auto; overflow: hidden; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.35; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.scn-kepala { background: #111214; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; }
.scn-kepala img { width: 44%; height: auto; }
.scn-kepala > div { display: flex; flex-direction: column; align-items: flex-end; color: #fff; text-align: right; font-size: 11px; }
.scn-kepala b { font-size: 20px; letter-spacing: .02em; }
.scn-kepala .scn-no { color: #98ff59; font-weight: 700; font-size: 12px; }
.scn-alamat { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: #6b7280; font-size: 11px; padding: 10px 16px 0; }
.scn-dua { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 16px 6px; }
.scn-dua > div { display: flex; flex-direction: column; }
.scn-dua small { color: #6b7280; font-weight: 700; font-size: 10px; letter-spacing: .04em; }
.scn-dua b { font-size: 15px; } .scn-dua .scn-plat { font-size: 16px; }
.scn-tabel { width: calc(100% - 32px); margin: 8px 16px; border-collapse: collapse; }
.scn-tabel th { background: #f2f3f5; color: #6b7280; font-size: 10px; text-align: left; padding: 6px 6px; }
.scn-tabel td { border-bottom: 1px solid #e3e5e8; padding: 7px 6px; vertical-align: top; }
.scn-tabel th:first-child, .scn-tabel td:first-child { width: 28px; color: #6b7280; }
.scn-tabel th:last-child, .scn-tabel td:last-child { text-align: right; white-space: nowrap; }
.scn-total { margin: 4px 16px 8px auto; width: 62%; display: flex; flex-direction: column; gap: 3px; }
.scn-total > div { display: flex; justify-content: space-between; gap: 8px; }
.scn-total .scn-besar { background: #f2f3f5; padding: 6px 8px; font-weight: 700; font-size: 16px; border-radius: 4px; }
.scn-total .scn-abu { color: #6b7280; font-size: 11.5px; padding: 0 8px; }
.scn-total .scn-sisa { color: #bf261f; font-weight: 700; font-size: 15px; padding: 0 8px; }
.scn-total .scn-lunas { align-self: flex-end; background: #2e6e0d; color: #fff; font-weight: 700; font-size: 17px; padding: 5px 22px; border-radius: 4px; margin-top: 6px; }
.scn-ket { margin: 4px 16px; font-size: 12px; color: #121214; }
.scn-rek { margin: 10px 16px; background: #f2f3f5; border-radius: 6px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.scn-rek small { color: #6b7280; font-weight: 700; font-size: 10px; }
.scn-kaki { border-top: 1px solid #d9dde3; margin: 14px 16px 0; padding: 8px 0 14px; text-align: center; display: flex; flex-direction: column; font-size: 11.5px; }
.scn-kaki span { color: #6b7280; font-size: 10.5px; }
.sc-info-nota textarea { width: 100%; font: inherit; }
@media (min-width: 720px) { dialog.sc-dlg-nota { width: min(860px, calc(100vw - 24px)); } .sc-nota-grid { grid-template-columns: minmax(0, 440px) 1fr; } }

/* v148 Scudetto · ubah komisi */
.sc-kom-list { display: flex; flex-direction: column; gap: 8px; }
.sc-kom-baris { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-kom-baris input { width: 150px; text-align: right; }
.sc-kom-total { font-size: 15px; }
