/* Admin web - design system "Oranye Bata" (TD-22). Every color, font and size comes from
   tokens.css (generated from design-tokens/tokens.json; copied to www/ by scripts/build-web.mjs).
   design.css = the classes of the DESIGN_V2 sources (generated, only var(--…)).
   No raw color or font value here: scripts/check-design-tokens.ts rejects them. */
@import url('tokens.css');
@import url('design.css');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--color-bg); color: var(--color-text); font-family: var(--font-sans); font-size: var(--fs-body); -webkit-font-smoothing: antialiased; }

/* ---------- Shell (design .web .desk, made fluid instead of a fixed 1440×900 frame) ---------- */
/* The sidebar fills the viewport and stays put while the page scrolls (sticky, 100vh, its own
   scroll for a long menu, user footer pinned at its bottom). The shell paints the sidebar column
   too, so nothing white shows under it whatever the page height (full-page capture, page taller
   than the sticky box). 248px = .side width in design.css. */
.desk { width: 100%; height: auto; min-height: 100vh; overflow: visible; background: linear-gradient(to right, var(--color-ink) 248px, var(--color-bg) 248px); }
.desk .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 0; }
.desk .wmain { min-height: 100vh; }
.side .side-foot { position: sticky; bottom: 0; margin-top: auto; padding-bottom: 20px; background: var(--color-ink); }
.side .nav { width: 100%; border: none; background: none; text-align: left; cursor: pointer; font-family: var(--font-sans); }
.side .nav.on { background: var(--color-surface); }
.side .nav:hover:not(.on) { background: var(--color-ink-overlay); color: var(--color-on-primary); }
.side .nav:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.side .me > div:nth-child(2) { flex: 1; min-width: 0; }
.side .me-acts { display: flex; gap: 12px; padding: 8px 8px 0 54px; }
.side .me .out, .side .me-acts .out { border: none; background: none; color: var(--color-on-ink-2); font: var(--fw-semibold) var(--fs-xs) var(--font-sans); cursor: pointer; text-decoration: underline; padding: 0; }
.side .soon { margin-left: auto; font-size: var(--fs-2xs); color: var(--color-on-ink-2); font-weight: var(--fw-semibold); }
/* D12 (W6): one-line brand (long business names end in an ellipsis, full name in the tooltip);
   nav labels may shrink; the closed "Lainnya" disclosure. */
.side .brand > .brand-t { min-width: 0; flex: 1; }
.side .brand b, .side .brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .brand .lg { flex: none; }
.side .nav .nav-l { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .nav .n { flex: none; }
.side details.grp-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-2); border-radius: var(--radius-sm); padding: var(--space-1) 0; }
.side details.grp-more > summary::-webkit-details-marker { display: none; }
.side details.grp-more > summary::after { content: '▸'; font-size: var(--fs-xs); margin-left: auto; }
.side details.grp-more[open] > summary::after { content: '▾'; }
.side details.grp-more > summary:hover { color: var(--color-on-primary); }
.side details.grp-more > summary:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* The phone/tablet top bar (menu button) is hidden on a laptop. */
.wmain > .mtop { display: none; }
.side-scrim { display: none; }

/* Buttons and fields: the design draws them as spans; here they are real controls. */
button.btn2, button.mini, button.bt, button.ib, button.chip, button.flt, button.lnk, button.chipr, button.opt, button.optc, button.optp, button.x, button.del, button.stepx, button.cta { border: none; font-family: var(--font-sans); cursor: pointer; }
button.btn2:disabled, button.mini:disabled, button.bt:disabled, button.cta:disabled { background: var(--color-surface-2); color: var(--color-text-3); box-shadow: none; cursor: default; }
button.btn2:focus-visible, button.mini:focus-visible, button.bt:focus-visible, button.chip:focus-visible, button.flt:focus-visible, button.lnk:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
button.lnk { background: none; padding: 0; }
button.opt, button.optc { width: 100%; text-align: left; color: var(--color-text); }
input.inp, select.inp, textarea.inp, textarea.ta, select.flt { border: none; font-family: var(--font-sans); width: 100%; }
select.flt { width: auto; appearance: none; color: var(--color-text); cursor: pointer; }
input.inp, select.inp { color: var(--color-text); font-weight: var(--fw-semibold); }
input.inp:focus, select.inp:focus, textarea.ta:focus, textarea.inp:focus { outline: none; background: var(--color-surface); box-shadow: var(--shadow-focus); }
textarea.ta { resize: vertical; display: block; }
input.pricein { border: none; font-family: var(--font-sans); width: 110px; text-align: right; }
/* TD-38 W-SU: the design's .inp.su-pw holds a real password input and a real "Tampilkan" button. */
.su-pw input { flex: 1; min-width: 0; height: 100%; border: none; background: none; outline: none; font: var(--fw-heavy) var(--fs-body) var(--font-sans); color: var(--color-text); }
.su-pw:focus-within { background: var(--color-surface); box-shadow: var(--shadow-focus); }
button.su-eye { border: none; background: none; cursor: pointer; font-family: var(--font-sans); padding: 0; }
button.su-eye:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
/* O12 (WP-40): the design's .rp price box holds a real input; the tabs are real buttons. */
.s-o09 .rp input { flex: 1; min-width: 0; height: 100%; border: none; background: none; outline: none; text-align: right; font: var(--fw-heavy) var(--fs-body) var(--font-sans); color: var(--color-text); font-variant-numeric: tabular-nums; }
.s-o09 .rp:focus-within { box-shadow: var(--shadow-focus); }
.s-o09 .rp.err { box-shadow: inset 0 0 0 1.5px var(--color-danger); }
.s-o09 .ptabs button.pt { border: none; background: none; cursor: pointer; font-family: var(--font-sans); }
.s-o09 .ptabs button.pt.on { background: var(--color-primary); }
.s-o09 .ptabs button.pt:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.s-o09 table.po tr.click { cursor: pointer; }
.inp::placeholder, .ta::placeholder { color: var(--color-text-3); font-weight: var(--fw-medium); }
.tg { border: none; cursor: pointer; display: inline-block; }
.tg:disabled { cursor: default; }
.tg:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.scrim { position: fixed; z-index: 10; }
.modal { max-height: 92vh; overflow-y: auto; }
.page-head { margin-bottom: 14px; }
.flash { margin-bottom: 12px; }
.err-line { color: var(--color-danger); font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin-top: 6px; }
.mock-note { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--color-warning-strong); background: var(--color-warning-soft); border-radius: var(--radius-pill); padding: 3px 10px; white-space: nowrap; }
.pending-api { background: var(--color-surface-2); border-radius: var(--radius-card); padding: 18px 20px; color: var(--color-text-2); font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: 1.5; }
.pending-api b { color: var(--color-text); }

/* Login (no design screen of its own: the panel / input / pill button of the design system).
   D12 (W9): one card - the form inside the panel draws no second card; labels 8 px above the
   field, 16 px between fields, a full-width main button; the brand slot is centred on top. */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--space-5); }
.login-wrap .panel { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); }
.login-wrap .brand { color: var(--color-text); margin-bottom: 0; padding: 0; }
.login-wrap .brand small { color: var(--color-text-2); }
.login-wrap .login-brand { flex-direction: column; text-align: center; gap: var(--space-3); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-line); }
.login-wrap .login-brand b { font-size: var(--fs-h3); font-weight: var(--fw-heavy); }
.login-wrap .brand-slot { width: 56px; height: 56px; border-radius: var(--radius-md); font-size: var(--fs-lg); }
.login-wrap .brand-slot img, .login-wrap .brand-slot svg { width: 100%; height: 100%; object-fit: contain; }
.login-wrap form.card { background: none; box-shadow: none; padding: 0; border-radius: 0; margin: 0; max-width: none; display: flex; flex-direction: column; gap: var(--space-4); }
.login-wrap .login-head h2 { font-size: var(--fs-h2); font-weight: var(--fw-heavy); color: var(--color-text); }
.login-wrap .login-sub { margin-top: var(--space-1); font-size: var(--fs-md); color: var(--color-text-2); }
.login-wrap label { gap: var(--space-2); }
.login-wrap input { width: 100%; height: 48px; padding: 0 var(--space-4); }
.login-wrap input::placeholder { color: var(--color-text-3); font-weight: var(--fw-medium); }
.login-wrap button.login-submit { width: 100%; height: 48px; margin-top: var(--space-2); font-size: var(--fs-lg); }
.login-wrap button.login-submit:disabled { opacity: .6; cursor: default; }
.login-wrap button.link { align-self: center; background: none; box-shadow: none; text-decoration: underline; color: var(--color-text-2); }

/* ---------- Legacy views (reports, stock, transfers, history, staff, setup), kept inside the shell ---------- */
.legacy h2 { margin: 0 0 8px; font-size: var(--fs-h2); font-weight: var(--fw-heavy); }
.legacy h3 { margin: 24px 0 8px; font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.legacy .card { background: var(--color-surface); border-radius: var(--radius-card); padding: 16px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 12px; }
.legacy .card.narrow { max-width: 420px; margin: 24px auto; }
.legacy label, .login-wrap label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--color-text-2); }
.legacy label.check { flex-direction: row; align-items: center; gap: 8px; width: auto; height: auto; background: none; border-radius: 0; color: var(--color-text-2); }
.legacy input, .legacy select, .login-wrap input { font-family: var(--font-sans); font-size: var(--fs-body); color: var(--color-text); padding: 8px 12px; border: none; border-radius: var(--radius-input); background: var(--color-surface-2); }
.legacy input:focus, .legacy select:focus, .login-wrap input:focus { outline: none; background: var(--color-surface); box-shadow: var(--shadow-focus); }
.legacy input::placeholder { color: var(--color-text-3); }
.legacy input.small { width: 110px; }
.legacy button, .login-wrap button { font-family: var(--font-sans); font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--color-text); padding: 8px 16px; border-radius: var(--radius-pill); border: none; box-shadow: inset 0 0 0 1.5px var(--color-line-strong); background: var(--color-surface); cursor: pointer; }
.legacy button:focus-visible, .login-wrap button:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.legacy button.primary, .login-wrap button.primary { background: var(--color-primary); color: var(--color-on-primary); font-weight: var(--fw-bold); box-shadow: var(--shadow-primary); }
.legacy button.primary:hover, .login-wrap button.primary:hover { background: var(--color-primary-hover); }
.legacy button.danger { color: var(--color-danger); box-shadow: inset 0 0 0 1.5px var(--color-danger-line); }
.legacy button:disabled { opacity: .5; cursor: default; }
.legacy button.link { background: none; box-shadow: none; color: inherit; text-decoration: underline; padding: 0 4px; font-size: inherit; }
.legacy .controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.legacy form.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.legacy .kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.legacy .kpi { background: var(--color-surface); border-radius: var(--radius-card); padding: 12px; box-shadow: var(--shadow-1); }
.legacy .kpi-title { font-size: var(--fs-sm); color: var(--color-text-2); }
.legacy .kpi-value { font-size: var(--fs-h2); font-weight: var(--fw-heavy); margin: 4px 0; font-variant-numeric: tabular-nums; }
.legacy .kpi-sub { font-size: var(--fs-xs); color: var(--color-text-3); }
.legacy .scroll { overflow-x: auto; background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.legacy td { white-space: nowrap; }
.legacy .num { text-align: right; font-variant-numeric: tabular-nums; }
.legacy .sub { color: var(--color-text-2); font-size: var(--fs-md); margin: 0 0 8px; }
.legacy .note { color: var(--color-text-3); font-size: var(--fs-sm); }
.legacy .warn { color: var(--color-danger); }
.legacy .empty { color: var(--color-text-3); font-style: italic; }
.legacy .badge { padding: 2px 10px 2px 8px; }
.legacy .badge::before { content: ''; width: 14px; height: 14px; flex: none; background: var(--color-text-3); -webkit-mask: var(--ico-neutral) center / contain no-repeat; mask: var(--ico-neutral) center / contain no-repeat; }
.legacy .badge.warn::before, .legacy .badge.s-CANCELLED::before { background: var(--color-danger); -webkit-mask-image: var(--ico-danger); mask-image: var(--ico-danger); }
.legacy .badge.s-IN_TRANSIT::before { background: var(--color-info); -webkit-mask-image: var(--ico-info); mask-image: var(--ico-info); }
.legacy .badge.s-RECEIVED::before { background: var(--color-success); -webkit-mask-image: var(--ico-ok); mask-image: var(--ico-ok); }
.legacy .badge.warn { color: var(--color-text); }
.legacy .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.legacy .timeline { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.legacy .timeline li { color: var(--color-text-3); }
.legacy .timeline li.done { color: var(--color-text); }
.legacy .tabs { display: flex; gap: 4px; align-self: flex-start; margin-bottom: 12px; padding: 4px; background: var(--color-surface-2); border-radius: var(--radius-pill); overflow-x: auto; }

/* The design's danger buttons (.btn2.red / .redfill) under color-neutral class names: the guard
   reads a bare color word as a raw color, so the app names them by their role. */
.btn2.danger { background: var(--color-surface); color: var(--color-danger); box-shadow: inset 0 0 0 1.5px var(--color-danger-line); }
.btn2.dangerfill { background: var(--color-danger); color: var(--color-on-primary); box-shadow: none; }

/* O09: the design's duration pills (.dur span) as real buttons (keyboard + disabled state). */
.r-owner .dur button { font-family: var(--font-sans); height: 36px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: inset 0 0 0 1.5px var(--color-line); display: inline-flex; align-items: center; font-weight: var(--fw-bold); font-size: var(--fs-sm); white-space: nowrap; color: var(--color-text); }
.r-owner .dur button.on { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-selected); }
.r-owner .dur button.dis { background: var(--color-surface-2); color: var(--color-text-3); box-shadow: none; }

/* Codes typed by people (MC06b pairing code, a temporary password): monospace. */
.mono { font-family: var(--font-mono); }

/* MG05 (from DESIGN_V2/_source/mg01_setujui-permintaan_hifi.html <style>, scoped). */
.s-mg05 .req { background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-1); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; font-family: var(--font-sans); color: var(--color-text); }
.s-mg05 .req.on { box-shadow: var(--shadow-focus); }
.s-mg05 .req .t2 { margin-top: 4px; }
.s-mg05 .kpi { background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-1); padding: 14px 18px; }
.s-mg05 .kpi .v { font-size: var(--fs-h1); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; margin-top: 2px; }
.s-mg05 .cell { height: 44px; border-radius: var(--radius-sm); background: var(--color-surface-2); display: flex; align-items: center; justify-content: flex-end; padding: 0 12px; font-weight: var(--fw-heavy); font-size: var(--fs-body); gap: 4px; }
.s-mg05 .cell small { font-weight: var(--fw-bold); color: var(--color-text-2); font-size: var(--fs-xs); }
.s-mg05 .cell.f { background: var(--color-surface); box-shadow: var(--shadow-focus); }
.s-mg05 .rs { height: 44px; border-radius: var(--radius-sm); background: var(--color-surface-2); display: flex; align-items: center; padding: 0 12px; font-size: var(--fs-sm); color: var(--color-text-3); font-weight: var(--fw-medium); }
.s-mg05 .rs.val { color: var(--color-text); font-weight: var(--fw-semibold); background: var(--color-warning-soft); }
.s-mg05 td:first-child { white-space: nowrap; }
.s-mg05 .low { color: var(--color-danger); font-weight: var(--fw-bold); }

/* MG06: the design's .seg / .optc / .ta as real buttons and a textarea (keep the design font). */
.r-mg .seg button, .r-mg button.optc, .r-mg textarea.ta, .s-mc06 textarea.ta { font-family: var(--font-sans); }
.r-mg .seg button { height: 36px; padding: 0 16px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 6px; font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--color-text-2); white-space: nowrap; background: transparent; }
.r-mg .seg button.on { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-1); }
.r-mg .seg button b { font-variant-numeric: tabular-nums; }

/* Sprint D3 Developer console (r-dev): real controls inside the design's pills and links. */
.r-dev .d-flt { padding: 0 6px 0 10px; }
.r-dev .d-flt select { border: none; background: transparent; font: var(--fw-semibold) var(--fs-sm) var(--font-sans); color: var(--color-text); height: 38px; cursor: pointer; }
.r-dev button.link-act { background: transparent; border: none; padding: 0; font: var(--fw-bold) var(--fs-sm) var(--font-sans); color: var(--color-primary); cursor: pointer; }
.r-dev .stp button.stp-b { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--color-surface); display: grid; place-items: center; font: var(--fw-heavy) var(--fs-h2) var(--font-sans); color: var(--color-text); box-shadow: var(--shadow-1); cursor: pointer; }
.r-dev .stp button.stp-b.p { background: var(--color-primary); color: var(--color-on-primary); }
.r-dev textarea.inp.area { height: 72px; padding: 12px 16px; line-height: 1.4; display: block; }
.r-dev .modal .h2 { margin: 0; }
.r-dev input.inp, .r-dev textarea.inp, .r-dev select.inp { color: var(--color-text); outline: none; }
.r-dev input.inp:focus, .r-dev textarea.inp:focus { background: var(--color-surface); box-shadow: var(--shadow-focus); }
.r-dev td .code { white-space: normal; overflow-wrap: anywhere; display: inline-block; max-width: 100%; }

/* ---------- D12: layout polish of the console screens (Owner first), tokens only ----------
   Sidebar items never squeeze each other (a long menu scrolls); KPI labels stay on one line
   (full text in the tooltip), values use tabular figures and never overflow their card; a panel
   title keeps its line while the muted note on the right wraps; tables keep money right-aligned
   on one line and their header in view while a long list scrolls. */
.desk .side > * { flex-shrink: 0; }
.kp { min-width: 0; display: flex; flex-direction: column; }
.kp .sec { display: block; font-size: var(--fs-2xs); letter-spacing: .06em; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp .v { overflow: hidden; text-overflow: ellipsis; margin-top: var(--space-1); font-variant-numeric: tabular-nums; }
.kp .d { line-height: 1.4; margin-top: var(--space-1); }
.r-owner .kp .v, .r-mc .kp .v, .r-mg .kp .v { font-size: clamp(var(--fs-h3), 1.5vw, var(--fs-h1)); }
.panel-head { align-items: baseline; gap: var(--space-3); }
.panel-head > .h3 { flex: 1 1 auto; min-width: 0; }
.panel-head > .ph-r { flex: 0 1 auto; max-width: 55%; text-align: right; }
.page-head { flex-wrap: wrap; row-gap: var(--space-3); align-items: flex-end; margin-bottom: var(--space-4); }
.page-head > div:first-child { min-width: 0; }
.wmain .h1 { line-height: 1.2; }
.wmain .crumb { margin-bottom: var(--space-1); }
.wmain td.r, .wmain th.r { white-space: nowrap; font-variant-numeric: tabular-nums; }
.wmain thead th { position: sticky; top: 0; z-index: 1; }
.wmain .li .grow, .wmain .row > .grow { min-width: 0; }
/* Kasus Selisih list: the description column wraps instead of pushing the table out of its panel. */
.s-cases #case-list td:nth-child(4) { white-space: normal; min-width: 160px; }
.s-cases #case-list td:first-child { white-space: normal; }
.s-cases #case-list td:first-child b, .s-cases #case-list td:nth-child(3), .s-cases #case-list td:last-child { white-space: nowrap; }
/* MG03 (W10): a PO number never breaks over two lines (list and detail title). */
.r-mg .s-mg03 td:first-child b, .s-mg03 .po-no { white-space: nowrap; }
.s-mg03 #po-expected-text { margin-top: var(--space-1); }
/* O00 Rekap bisnis: a narrower right column on a 1366 px laptop; the two small panels stack
   below 1400 px instead of squeezing their titles. */
.s-o00 .o00-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--space-4); }
.s-o00 .o00-sub { gap: var(--space-4); }
.s-o00 #o00-adjust > .row, .s-o00 #o00-queue > .row:last-child { flex-wrap: wrap; row-gap: var(--space-2); }
.s-o00 .cb .row .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-o00 .cb .row .m { flex: none; font-variant-numeric: tabular-nums; }
@media (max-width: 1400px) { .s-o00 .o00-sub { grid-template-columns: minmax(0, 1fr); } .kp .sec { letter-spacing: .03em; } }
@media (max-width: 1280px) { .s-o00 .o00-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- D12 (W15): basic breakpoint, no phone redesign (the demo is on a laptop) ----------
   Below 900 px the sidebar becomes a drawer behind the "Menu" button, the content takes the full
   width, multi-column grids stack, and a wide table scrolls inside its block instead of
   stretching the page. */
@media (max-width: 900px) {
  .desk { display: block; background: var(--color-bg); }
  .desk .side { position: fixed; z-index: 20; top: 0; left: 0; bottom: 0; width: 272px; max-width: 86vw; height: 100vh; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-ink); }
  .desk.nav-open .side { transform: none; }
  .desk.nav-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 15; background: var(--color-scrim); }
  .wmain { padding: var(--space-4) !important; min-width: 0; overflow-x: hidden; }
  .wmain > .mtop { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
  .wmain > .mtop .mtop-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-lg); }
  button.menu-btn { flex: none; height: 40px; padding: 0 var(--space-4); border: none; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-on-primary); font: var(--fw-bold) var(--fs-md) var(--font-sans); cursor: pointer; }
  button.menu-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
  .wmain [style*="grid-template-columns"], .wmain .grid2 { grid-template-columns: 1fr !important; }
  .wmain .row { flex-wrap: wrap; }
  .wmain table { display: block; overflow-x: auto; }
  .wmain .h1 { font-size: var(--fs-h2); }
}

/* ---------- X1: product brand (design-tokens/brand/brand.json) ---------- */
.login-wrap .brand-login { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-login .brand-logo { height: 48px; width: auto; display: block; }
.side .powered { display: flex; align-items: center; gap: 6px; padding: 12px 8px 0; font-size: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--color-on-ink-2); }
.side .powered img { flex: none; padding: 2px; border-radius: var(--radius-sm); background: var(--color-surface); }

/* X4: the landing page at / (web/masuk.html): one link per sign-in path, optional APK downloads. */
.masuk-list { display: flex; flex-direction: column; gap: var(--space-3); }
.masuk-list a { display: block; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-line); border-radius: var(--radius-md); color: var(--color-text); font-weight: var(--fw-semibold); text-decoration: none; }
.masuk-list a:hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.masuk-list a:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.masuk-apk { font-size: var(--fs-sm); color: var(--color-text-2); }
/* ---------- D15 (WP-42): Asisten Owner, anti-korupsi (O13, AO01/AO02, O14, O15, MC09 offline) ----------
   Only var(--…) values. The Asisten console wears the Owner's role styles (.r-owner). */
.ph-th { position: relative; width: 52px; height: 52px; flex: none; border: none; padding: 0; border-radius: var(--radius-sm); background: var(--color-surface-3); color: var(--color-text-2); display: grid; place-items: center; cursor: pointer; overflow: visible; }
.ph-th img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.ph-th:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.ph-th .ph-n { position: absolute; right: -6px; bottom: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-on-primary); font: var(--fw-bold) var(--fs-2xs) var(--font-sans); display: grid; place-items: center; }
.ph-th.none { cursor: default; background: var(--color-danger-soft); color: var(--color-danger); }
.photo-view { display: flex; flex-direction: column; gap: var(--space-3); }
.photo-view img { max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--radius-md); background: var(--color-surface-3); }
.photo-view .strip { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.photo-view .strip button { border: none; padding: 0; background: none; cursor: pointer; border-radius: var(--radius-sm); }
.photo-view .strip button.on { box-shadow: var(--shadow-focus); }
.rb { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-pill); padding: 3px 10px 3px 4px; font: var(--fw-bold) var(--fs-xs) var(--font-sans); white-space: nowrap; }
.rb b { min-width: 26px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); display: grid; place-items: center; color: var(--color-on-primary); font-size: var(--fs-xs); }
.rb.LOW { background: var(--color-surface-3); color: var(--color-text-2); } .rb.LOW b { background: var(--color-text-2); }
.rb.MID { background: var(--color-warning-soft); color: var(--color-warning-strong); } .rb.MID b { background: var(--color-warning-strong); }
.rb.HIGH { background: var(--color-danger-soft); color: var(--color-danger); } .rb.HIGH b { background: var(--color-danger); }
.sig { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--radius-pill); padding: 2px 8px; background: var(--color-danger-soft); color: var(--color-danger); font: var(--fw-semibold) var(--fs-xs) var(--font-sans); white-space: nowrap; }
.kindt { display: inline-block; border-radius: var(--radius-sm); padding: 2px 8px; background: var(--color-surface-2); font: var(--fw-bold) var(--fs-2xs) var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--color-text); white-space: nowrap; }
.tierb { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-pill); padding: 4px 12px 4px 8px; font: var(--fw-semibold) var(--fs-xs) var(--font-sans); white-space: nowrap; }
.tierb.IN { background: var(--color-info-soft); color: var(--color-info); }
.tierb.OVER { background: var(--color-warning-soft); color: var(--color-warning-strong); }
.tierb.TASK, .tierb.UNKNOWN { background: var(--color-surface-2); color: var(--color-text); }
.s-ao01 table.aoq td, .s-o14 table.wk td, .s-o15 table.rk td { vertical-align: middle; padding-top: 12px; padding-bottom: 12px; }
.s-ao01 table.aoq tr.wait td { background: var(--color-surface-2); }
.s-ao01 table.aoq td.acts { white-space: nowrap; text-align: right; }
.s-ao01 table.aoq td.acts .btn2 + .btn2 { margin-left: 8px; }
.s-ao01 .cellrow { display: flex; align-items: center; gap: 12px; min-width: 0; }
.s-ao01 .cellrow .grow { min-width: 0; }
.s-ao01 .chipsrow { display: flex; gap: 8px; flex-wrap: wrap; }
.s-ao01 .chipsrow .kindt { font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; padding: 4px 10px; border-radius: var(--radius-pill); }
.s-o13 .lim { display: grid; grid-template-columns: minmax(0, 1fr) auto 220px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-line); }
.s-o13 .lim:last-of-type { border-bottom: none; }
.s-o13 .lim .rp { display: flex; align-items: center; gap: 8px; height: 48px; border-radius: var(--radius-input); box-shadow: inset 0 0 0 1.5px var(--color-line-strong); padding: 0 14px; background: var(--color-surface); }
.s-o13 .lim .rp input { flex: 1; min-width: 0; border: none; outline: none; background: none; text-align: right; font: var(--fw-bold) var(--fs-md) var(--font-sans); color: var(--color-text); }
.s-o13 .lim .rp.err { box-shadow: inset 0 0 0 1.5px var(--color-danger); }
.s-o13 .lim .rp small { color: var(--color-text-3); font-weight: var(--fw-semibold); }
.s-o13 .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.s-o13 .facts > div { background: var(--color-surface-2); border-radius: var(--radius-md); padding: 12px 16px; min-width: 0; }
.s-o13 .facts b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-o13 .pw { font: var(--fw-bold) var(--fs-h3) var(--font-mono); letter-spacing: .06em; background: var(--color-surface-2); border-radius: var(--radius-md); padding: 12px 16px; user-select: all; }
.s-o15 .gauge { display: grid; grid-template-columns: 4fr 3fr 3fr; gap: 6px; margin-top: 10px; }
.s-o15 .gauge i { height: 10px; border-radius: var(--radius-pill); background: var(--color-surface-3); }
.s-o15 .gauge i.MID { background: var(--color-warning-soft); } .s-o15 .gauge i.HIGH { background: var(--color-danger-soft); }
.s-o15 .gauge i.on { box-shadow: inset 0 0 0 2px var(--color-text); }
.s-mc09 .ofl { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--color-line); }
.s-mc09 .ofl:first-of-type { border-top: none; }
@media (max-width: 1440px) { .s-o13 .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1366px) { .s-ao01 .kp .sec { letter-spacing: .03em; } .s-o13 .lim { grid-template-columns: minmax(0, 1fr) 200px; } .s-o13 .lim > .t2.sampai { display: none; } }
/* D15 layout at 1280-1440: the queue / report / findings tables wrap their text and, when still too
   wide, scroll inside their panel - the page itself never scrolls sideways. */
.tscroll { overflow-x: auto; max-width: 100%; }
.s-ao01 table.aoq td, .s-o14 table.wk td, .s-o15 table.rk td { white-space: normal; }
.s-ao01 table.aoq td .tierb, .s-o14 table.wk td .rb, .s-o15 table.rk td .rb, .s-o14 table.wk td .kindt { white-space: nowrap; }
.s-ao01 table.aoq th, .s-ao01 table.aoq td { padding-left: 8px; padding-right: 8px; }
.s-o14 table.wk th, .s-o14 table.wk td, .s-o15 table.rk th, .s-o15 table.rk td { padding-left: 8px; padding-right: 8px; }
.s-ao01 table.aoq td.acts { display: table-cell; }
.s-o15 td.acts .stack { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.s-ao01 #ao01-limits .chipsrow .kindt { white-space: nowrap; }
.r-asisten .side .rule { margin: 14px 8px 0; padding: 12px 14px; border-radius: var(--radius-md); background: var(--color-ink-overlay); color: var(--color-on-ink-2); font-size: var(--fs-xs); line-height: 1.45; font-weight: var(--fw-medium); }
.s-ao01 table.aoq td.r b, .s-o14 table.wk td.r b, .s-o14 table.wk td.r s { white-space: nowrap; }
.s-o14 #o14-total .kv > span:last-child { white-space: nowrap; }
/* D17 (T24): O16 kredit retur supplier - the O14 table rules */
.s-o16 table.wk td { vertical-align: middle; padding: 12px 8px; white-space: normal; }
.s-o16 table.wk th { padding-left: 8px; padding-right: 8px; }
.s-o16 table.wk td.r, .s-o16 table.wk td .badge, .s-o16 table.wk td .kindt { white-space: nowrap; }
.s-o16 table.wk td.acts { white-space: nowrap; text-align: right; }
