/* Shared theme — tokens and core component classes carried over from the
   legacy inventory.html (legacy/inventory-legacy.html) so the new domain
   feels like "the same inventory system" per the Phase D design principle:
   dark theme, navigation, cards, layout, terminology all preserved. */
:root {
    --bg: #0f1117; --bg2: #161b27; --bg3: #1e2535; --card: #1a2030; --border: #2a3348;
    --accent: #3b82f6; --accent2: #6366f1; --green: #10b981; --orange: #f59e0b; --red: #ef4444;
    --text: #e2e8f0; --text2: #94a3b8; --text3: #64748b; --radius: 14px; --radius-sm: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* PHASE V2.14.11.4 — global safety net: never let any single wide
   element force page-level horizontal scroll. Every existing wide table
   already scrolls WITHIN its own wrapper (.table-wrapper/.compact-table-wrap/
   .dt-wrapper all set their own overflow-x/overflow:auto), so this never
   hides content — it only stops something from overflowing the viewport
   itself the way a bare <table> would. */
html { max-width: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', -apple-system, sans-serif; min-height: 100vh; max-width: 100%; overflow-x: hidden; }

.app-header { background: linear-gradient(135deg, #0d1b3e, #1a1040); border-bottom: 1px solid var(--border); padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.app-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.logo-text h1 { font-size: 1rem; font-weight: 800; }
.logo-text span { font-size: 0.7rem; color: var(--text3); }
.header-badge { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: var(--accent); padding: 4px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-chip { font-size: 0.78rem; color: var(--text2); }
.user-chip b { color: var(--text); }

.tabs-wrapper { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.tabs { display: flex; gap: 4px; min-width: max-content; padding: 10px 0; }
.tab-btn { background: transparent; border: none; padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.82rem; cursor: pointer; color: var(--text3); transition: 0.2s; white-space: nowrap; }
.tab-btn:hover { background: var(--bg3); color: var(--text2); }
.tab-btn.active { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(99,102,241,0.2)); color: var(--accent); border: 1px solid rgba(59,130,246,0.3); }

.app-main { max-width: 1400px; margin: 0 auto; padding: 20px 16px 40px; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.card-title { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 14px; }
label { font-weight: 600; font-size: 0.78rem; color: var(--text2); display: block; margin-bottom: 6px; text-transform: uppercase; }
input, select, textarea { width: 100%; padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.9rem; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 20px; border: none; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: white; }
.btn-primary:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: white; }
.btn-warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: white; }
.btn-danger { background: linear-gradient(135deg, #b91c1c, #ef4444); color: white; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; border-left: 3px solid; margin-bottom: 14px; }
.alert-success { background: rgba(16,185,129,0.1); border-color: var(--green); color: #34d399; }
.alert-warning { background: rgba(245,158,11,0.1); border-color: var(--orange); color: #fbbf24; }
.alert-error { background: rgba(239,68,68,0.1); border-color: var(--red); color: #f87171; }
.alert-info { background: rgba(59,130,246,0.1); border-color: var(--accent); color: #93c5fd; }

.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(42,51,72,0.5); font-size: 0.85rem; }
th { background: var(--bg3); color: var(--text3); font-weight: 700; text-transform: uppercase; font-size: 0.73rem; }
tbody tr:hover { background: rgba(59,130,246,0.04); }

.kpi-card { border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; background: var(--card); }
.kpi-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; }
.kpi-value { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.kpi-sub { font-size: 0.7rem; color: var(--text3); margin-top: 6px; }
.kpi-value.pos { color: var(--green); }
.kpi-value.neg { color: var(--red); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.badge-pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-received { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-cancelled { background: rgba(100,116,139,0.15); color: var(--text3); }
.badge-open { background: rgba(59,130,246,0.15); color: #93c5fd; }
.badge-finalized { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-posted { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-void { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-reversed { background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-locked { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-pass { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-error { background: rgba(239,68,68,0.15); color: #f87171; }

.mono { font-family: 'JetBrains Mono', monospace; }

/* PHASE V2.5: above the drawer (z-index 1101) — Void/Reverse Transfer
   confirmations open FROM an already-open transaction/transfer drawer, and
   a blocking confirmation must never render underneath it. */
.modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); justify-content: center; align-items: center; z-index: 1200; }
.modal.open { display: flex; }
.modal-content { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; max-width: 560px; width: 90%; max-height: 85vh; overflow-y: auto; }
.modal-content h3 { margin-bottom: 16px; }

.role-only { display: none; }
.banner-lock { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.35); color: #f87171; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 14px; text-align: center; }
.banner-historical { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.4); color: #fbbf24; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 14px; }

.toast-container { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; box-shadow: 0 8px 20px rgba(0,0,0,0.35); animation: slideIn 0.2s; }
.toast-success { background: #10b981; color: #06281d; }
.toast-error { background: #ef4444; color: #2a0505; }
.toast-info { background: #3b82f6; color: #06122a; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.connection-banner { background: var(--red); color: white; text-align: center; padding: 10px; font-weight: 700; font-size: 0.85rem; display: none; }
.connection-banner.show { display: block; }

footer { text-align: center; font-size: 0.73rem; color: var(--text3); padding: 20px; border-top: 1px solid var(--border); margin-top: 30px; }

@media (max-width: 640px) {
    .app-header { padding: 12px 16px; }
    .card { padding: 14px; }
    .kpi-value { font-size: 1.3rem; }
    th, td { padding: 8px; font-size: 0.78rem; }
}

/* ============================================================
   PHASE V2 — sidebar layout, drawer, data-table extras, status
   pills. Reuses the existing dark-navy tokens above (--bg/--bg2/
   --bg3/--card/--accent/--accent2/--green/--orange/--red) rather
   than introducing a new palette, so the V2 look is a structural
   change (sidebar instead of a tab bar, drawers instead of full
   page navigation) on the SAME visual system, not a new theme.
   ============================================================ */

.app-shell-v2 { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    transition: transform 0.2s, width 0.2s;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.sidebar-group { padding: 6px 10px; }
.sidebar-group-static { padding: 14px 10px 4px; }
.sidebar-group-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--text3); padding: 0 10px 6px; letter-spacing: 0.04em; }
.sidebar-link {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text2); font-weight: 600; font-size: 0.85rem; cursor: pointer; text-decoration: none;
    white-space: nowrap; transition: 0.15s; border: 1px solid transparent;
}
.sidebar-link:hover { background: var(--bg3); color: var(--text); }
.sidebar-link.active { background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(99,102,241,0.18)); color: var(--accent); border-color: rgba(59,130,246,0.3); }
.sidebar-link .icon { width: 18px; text-align: center; flex-shrink: 0; }

/* PHASE V2.6A — accordion groups. Each collapsible group's header is a real
   <button> (native keyboard + focus support) toggling a .sidebar-submenu
   sibling; JS (sidebar.js) owns open/close state, this file only owns the
   visual transition. Visibility of individual links is still decided
   entirely by Auth.applyRoleVisibility() via data-require-* — this never
   overrides that; a hidden link stays hidden whether its group is open or
   collapsed. */
.sidebar-group-header {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    background: none; border: none; cursor: pointer; padding: 8px 10px; border-radius: var(--radius-sm);
    font: inherit; text-align: left;
}
.sidebar-group-header:hover { background: var(--bg3); }
.sidebar-group-header:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sidebar-group-header .sidebar-group-label { padding: 0; margin: 0; }
.sidebar-group-header .accordion-arrow { color: var(--text3); font-size: 0.9rem; flex-shrink: 0; }
.sidebar-group-collapsible.has-active > .sidebar-group-header .sidebar-group-label { color: var(--accent); }
.sidebar-submenu { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 2px; overflow: hidden; }
.sidebar-submenu[hidden] { display: none; }

.sidebar-toggle { display: none; }
.app-content-v2 { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-main-v2 { max-width: 1500px; width: 100%; margin: 0 auto; padding: 20px 20px 40px; flex: 1; }

@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; z-index: 900; transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: inline-flex; }
    .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 890; }
    .sidebar-backdrop.open { display: block; }
}

/* breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text3); margin-bottom: 14px; }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* KPI "need attention" row + quick actions, shared by the dashboard */
.attention-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg3); margin-bottom: 8px; font-size: 0.82rem; }
.attention-item .count { font-weight: 800; color: var(--orange); }
.attention-item-clickable { cursor: pointer; transition: 0.15s; }
.attention-item-clickable:hover, .attention-item-clickable:focus-visible { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.4); outline: none; }
.attention-chevron { color: var(--text3); font-size: 1rem; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* status pills — SAFE/LOW/CRITICAL/OUT_OF_STOCK/REVIEW, reusing .badge's shape */
.badge-status-safe { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-status-low { background: rgba(245,158,11,0.15); color: var(--orange); }
.badge-status-critical { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-status-out_of_stock { background: rgba(100,116,139,0.2); color: var(--text2); }
.badge-status-migration_negative_review { background: rgba(168,85,247,0.15); color: #c084fc; }
.buffer-unconfigured-note { font-size: 0.68rem; color: var(--text3); font-style: italic; margin-top: 2px; }

/* PHASE V2.6D — Laporan Stok: clickable "Stok Tersedia" value (opens
   Kartu Stok / warehouse breakdown) and clickable Kartu Stok movement
   rows (opens TraceDrawer). Reuses --accent, no new hardcoded colors. */
.stock-qty-link { color: var(--accent); cursor: pointer; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 2px; }
.stock-qty-link:hover { color: var(--accent2, var(--accent)); }
.stock-card-row-clickable { cursor: pointer; }
.stock-card-row-clickable:hover { background: rgba(59,130,246,0.08); }
.stock-counter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.stock-counter-chip { cursor: pointer; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg2); font-size: 0.8rem; font-weight: 600; transition: 0.15s; }
.stock-counter-chip:hover { border-color: var(--accent); }
.stock-counter-chip.active { border-color: var(--accent); background: rgba(59,130,246,0.12); }
.stock-counter-chip .stock-counter-value { font-size: 1.05rem; font-weight: 800; margin-left: 6px; }

/* data-table: sticky header, column-picker, toolbar */
.dt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-filters input, .dt-filters select { width: auto; min-width: 140px; }
.dt-wrapper { overflow: auto; max-height: 68vh; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.dt-wrapper table { width: 100%; }
.dt-wrapper thead th { position: sticky; top: 0; z-index: 5; background: var(--bg3); }
.dt-wrapper tbody tr { cursor: pointer; }
.dt-wrapper tbody tr:hover { background: rgba(59,130,246,0.06); }
.dt-sort-icon { opacity: 0.5; font-size: 0.7rem; margin-left: 4px; }
.dt-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 0.8rem; color: var(--text2); }
.dt-pagination .btn { padding: 6px 12px; }
.dt-column-picker { position: relative; }
.dt-column-picker-panel {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 200px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4); max-height: 320px; overflow-y: auto;
}
.dt-column-picker-panel.open { display: block; }
.dt-column-picker-panel label { display: flex; align-items: center; gap: 8px; font-weight: 500; text-transform: none; font-size: 0.8rem; padding: 4px 0; color: var(--text2); }
.dt-column-picker-panel input[type="checkbox"] { width: auto; }
.dt-skeleton-row td { background: linear-gradient(90deg, var(--bg3) 25%, rgba(255,255,255,0.03) 37%, var(--bg3) 63%); background-size: 400% 100%; animation: dtSkeleton 1.4s ease infinite; height: 18px; }
@keyframes dtSkeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.dt-empty, .dt-error { text-align: center; padding: 40px 20px; color: var(--text3); }

/* PHASE V2.1: master-data actions menu (⋮) — reuses the dt-column-picker
   dropdown shell, swaps checkbox rows for clickable action buttons. */
.master-actions-menu { display: inline-block; }
.master-actions-menu .dt-column-picker-panel { min-width: 170px; padding: 6px; }
.master-action-item {
    display: block; width: 100%; text-align: left; padding: 8px 10px; background: none; border: none;
    color: var(--text1); font-size: 0.82rem; border-radius: 6px; cursor: pointer;
}
.master-action-item:hover { background: rgba(59,130,246,0.12); }
.master-action-item.danger { color: #f87171; }
.master-action-item.danger:hover { background: rgba(248,113,113,0.12); }
.master-action-item:disabled { opacity: 0.4; cursor: not-allowed; }
.master-action-item:disabled:hover { background: none; }

/* drawer: slide-over detail panel */
.drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1100; }
.drawer-backdrop.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(560px, 100vw); background: var(--card); border-left: 1px solid var(--border); z-index: 1101; transform: translateX(100%); transition: transform 0.25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer.drawer-wide { width: min(1120px, 100vw); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-title { font-size: 1rem; font-weight: 800; }
.drawer-close { background: transparent; border: none; color: var(--text3); font-size: 1.2rem; cursor: pointer; padding: 4px 8px; }
.drawer-close:hover { color: var(--text); }
.drawer-tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.drawer-tab { background: transparent; border: none; padding: 8px 14px; color: var(--text3); font-weight: 600; font-size: 0.8rem; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.drawer-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-section { margin-bottom: 18px; }
.drawer-section-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; }
.drawer-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.drawer-kv .k { font-size: 0.72rem; color: var(--text3); }
.drawer-kv .v { font-size: 0.9rem; font-weight: 600; }

/* Jejak Stock Opname drawer + KPI drill-down modal. Wide-drawer modifier
   (.drawer-xl) and self-contained .jejak-* rules — uses only long-standing
   vars/classes (.card, .modal, .hpp-kpi-*, .drawer-*), never .so-report-*
   (V2.16.4, absent from production's app.css). Everything is scoped to
   .drawer-xl / .jejak-*: no other drawer is affected.
   SCROLL: .drawer is height:100vh. On iPad/mobile browsers with a dynamic
   toolbar 100vh is TALLER than the visible area, so the bottom of the
   drawer (end of content, action footer) sits under the browser chrome and
   cannot be scrolled into view. .drawer-xl is therefore pinned with
   top:0/bottom:0 (the visible viewport) instead of a fixed height, the
   body scrolls on its own (min-height:0 + overscroll-behavior), tables
   scroll horizontally only (no nested vertical scroller to get trapped in),
   and the page behind (html AND body — html carries its own overflow) is
   locked while the drawer is open. */
.drawer.drawer-xl { width: min(1200px, 94vw); height: auto; top: 0; bottom: 0; max-height: 100%; }
@media (max-width: 900px) { .drawer.drawer-xl { width: 100vw; } }
.drawer.drawer-xl .drawer-header, .drawer.drawer-xl .drawer-tabs { flex: 0 0 auto; }
.drawer.drawer-xl .drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html.jejak-scroll-lock, body.jejak-scroll-lock { overflow: hidden; }
.jejak-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 20px; }
.jejak-info-cell .k { font-size: 0.68rem; color: var(--text3); }
.jejak-info-cell .v { font-size: 0.82rem; font-weight: 600; overflow-wrap: anywhere; }
.jejak-kpi { position: relative; cursor: pointer; padding: 10px 12px; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease; }
.jejak-kpi .hpp-kpi-value { white-space: nowrap; font-size: 0.95rem; margin-bottom: 0; }
.jejak-kpi::after { content: '\203A'; position: absolute; top: 6px; right: 9px; color: var(--text3); font-size: 1rem; line-height: 1; }
.jejak-kpi:hover { background: var(--bg3); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.jejak-kpi:hover::after { color: var(--accent); }
.jejak-kpi:active { transform: translateY(0); }
.jejak-kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jejak-table-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.jejak-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; white-space: nowrap; }
.jejak-table th, .jejak-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.jejak-table th { background: var(--bg3); color: var(--text2); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.jejak-table .text-right { text-align: right; }
.jejak-table tbody tr:hover { background: var(--bg3); }
.jejak-total-row td { background: var(--bg2); font-weight: 700; border-top: 1px solid var(--border); }
.jejak-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 2px 0; color: var(--text2); font-size: 0.8rem; }
.modal-content.jejak-drill { max-width: 1040px; width: 94%; max-height: 85vh; max-height: min(85vh, calc(100dvh - 32px)); overflow-y: auto; overscroll-behavior: contain; }
.jejak-drill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.jejak-actions { position: sticky; bottom: -16px; z-index: 3; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin: 16px -20px -16px; padding: 12px 20px; background: var(--card); border-top: 1px solid var(--border); }

/* PHASE V2.2 — trace timeline (TraceDrawer, Trace Center) */
.trace-timeline-row { border-left: 2px solid var(--border); padding: 4px 0 14px 14px; margin-left: 4px; position: relative; }
.trace-timeline-row::before { content: ''; position: absolute; left: -5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.trace-timeline-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.trace-timeline-date { font-size: 0.75rem; color: var(--text3); font-weight: 600; }
.trace-timeline-actor { font-size: 0.78rem; color: var(--text2); margin-bottom: 4px; }
.trace-timeline-changes { font-size: 0.78rem; color: var(--text); background: var(--bg3); border-radius: 6px; padding: 6px 10px; margin-bottom: 4px; }
.trace-timeline-reason { font-size: 0.76rem; color: var(--text3); font-style: italic; }
.trace-search-result { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg3); margin-bottom: 8px; cursor: pointer; transition: 0.15s; }
.trace-search-result:hover { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.4); }
.trace-search-result .type-badge { font-size: 0.68rem; text-transform: uppercase; font-weight: 700; color: var(--text3); background: var(--bg2); padding: 2px 8px; border-radius: 10px; margin-right: 8px; }

/* stepper (Stock IN/OUT) */
.stepper { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.stepper-step { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 20px; background: var(--bg3); color: var(--text3); font-size: 0.78rem; font-weight: 700; }
.stepper-step.active { background: rgba(59,130,246,0.18); color: var(--accent); }
.stepper-step.done { background: rgba(16,185,129,0.15); color: var(--green); }
.stepper-sep { color: var(--text3); font-size: 0.75rem; }

/* ============================================================
   PHASE V2.10 — ItemSelector (searchable item/barcode component,
   Stock IN/OUT "Barang" step). Reuses existing tokens/.form-group/
   .modal conventions — no new color palette. Dropdown is absolutely
   positioned inside a relatively-positioned input wrapper so it is
   never clipped by the surrounding .card/.grid-3 (neither has
   overflow:hidden) and sits above nearby fields via z-index.
   ============================================================ */
.item-selector-input-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.item-selector-input { flex: 1; }
.item-selector-scan-btn {
    flex-shrink: 0; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 1.1rem; cursor: pointer; padding: 0;
}
.item-selector-scan-btn:hover { border-color: var(--accent); }
.item-selector-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 52px; z-index: 60;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    max-height: 280px; overflow-y: auto; box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
/* PHASE V2.14.8 — body-reparented variant (see item-selector.js): JS sets
   left/top-or-bottom/width inline per-open against the input's live
   bounding rect, so only position/z-index/visual chrome belong here.
   z-index must clear .modal (1200 — the Cutover resolve modal mounts an
   ItemSelector) and .drawer (1101). */
.item-selector-dropdown-floating {
    position: fixed; right: auto; z-index: 1300;
}
.item-selector-option { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.item-selector-option:last-child { border-bottom: none; }
.item-selector-option:hover, .item-selector-option.active { background: rgba(59,130,246,0.14); }
.item-selector-option-sku { font-weight: 700; color: var(--accent); white-space: nowrap; }
.item-selector-option-name { color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-selector-empty { padding: 12px; color: var(--text3); font-size: 0.82rem; text-align: center; }
.item-selector-error { color: var(--red); font-size: 0.78rem; margin-top: 6px; }
.item-selector-camera-modal { max-width: 420px; }
.item-selector-camera-video { width: 100%; border-radius: var(--radius-sm); background: #000; max-height: 320px; object-fit: cover; }
.item-selector-camera-status { color: var(--text3); font-size: 0.82rem; margin-top: 8px; text-align: center; }
.price-reference-hint { font-size: 0.78rem; color: var(--text3); margin-top: 6px; }

/* PHASE V2.14.8 — ItemSelector embedded inside a compact table cell
   (showLabel:false, compact:true): no label text, no .form-group bottom
   margin, smaller input/select/scan-button so the row stays within the
   ~44-56px target height. */
.form-group-compact { margin-bottom: 0; }
.item-selector-compact .item-selector-input { padding: 4px 8px; font-size: 0.85rem; height: 32px; }
.item-selector-compact .item-selector-scan-btn { width: 32px; height: 32px; font-size: 0.95rem; }
.item-selector-compact .item-selector-unit { padding: 4px 6px; font-size: 0.85rem; height: 32px; }
.item-selector-compact .item-selector-error { position: absolute; }

/* ============================================================
   PHASE V2.14.8 — shared compact operational table (Transfer item entry,
   Production materials, DO Receive, Stock Opname blind count). Bulk
   operational data (20-1000+ rows) reads as a real table, not a stack of
   vertical cards: sticky header, a bounded scrollable body (55-65vh), and
   a target row height of ~44-56px so an iPad shows many rows at once
   without either giant cards or a page-length scroll.
   ============================================================ */
.compact-table-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.compact-table-wrap {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    max-height: 62vh; overflow: auto; position: relative;
}
.compact-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 640px; }
.compact-table thead th {
    position: sticky; top: 0; z-index: 5; background: var(--bg3);
    padding: 8px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border);
}
.compact-table tbody td { padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.compact-table tbody tr:hover { background: rgba(59,130,246,0.04); }
.compact-table .compact-col-no { color: var(--text3); width: 36px; text-align: center; }
.compact-table .compact-col-item { min-width: 240px; }
.compact-table .compact-col-qty { width: 130px; }
.compact-table .compact-col-stock { width: 120px; text-align: right; color: var(--text2); }
.compact-table .compact-col-action { width: 90px; text-align: center; }
.compact-table input[type="number"], .compact-table input[type="text"], .compact-table select {
    width: 100%; padding: 4px 8px; font-size: 0.85rem; height: 32px;
}
.compact-row-discrepancy { background: rgba(239, 68, 68, 0.1) !important; }
.compact-row-duplicate { background: rgba(245, 158, 11, 0.14) !important; }
.compact-row-btn { padding: 4px 10px; font-size: 0.8rem; min-height: 32px; }
.compact-summary { display: flex; gap: 24px; margin-top: 10px; font-size: 0.85rem; color: var(--text2); flex-wrap: wrap; }
.compact-summary b { color: var(--text); }
.compact-inline-warning { color: var(--orange); font-size: 0.76rem; margin-top: 2px; }

@media (max-width: 900px) {
    .compact-table-wrap { max-height: 58vh; }
}
.price-reference-hint.price-diff { color: var(--orange); }

/* ============================================================
   PHASE V2.14.10 — Stock Opname counter screen: desktop/tablet
   two-pane split (list left, count panel right, panel sticky) per the
   "left: SKU list/search/filter, right: selected-item counting panel"
   requirement; collapses to a single stacked column on phones (the
   panel replaces the list visually via a "Kembali" back action, never
   both a giant list AND a giant panel competing for a narrow viewport).
   ============================================================ */
.opname-counter-split { display: flex; gap: 16px; align-items: flex-start; }
.opname-counter-list { flex: 1 1 55%; min-width: 0; }
.opname-counter-panel { flex: 1 1 45%; min-width: 0; position: sticky; top: 12px; }
/* A flex item's default min-width:auto sizes it to its content's
   min-content width (here, .compact-table's own min-width:640px),
   overriding the flex-basis/min-width:0 above and forcing the WHOLE
   page wider on a narrow viewport instead of letting .compact-table-wrap
   scroll internally as it does everywhere else this class is used. Scoped
   to inside this screen only — never touches the shared .card/
   .compact-table-wrap classes' behavior on any other feature. */
.opname-counter-list .card, .opname-counter-list .compact-table-wrap { min-width: 0; }
@media (max-width: 900px) {
    /* align-items: flex-start (set above for the desktop ROW layout,
       where it controls HEIGHT so the shorter pane doesn't stretch to
       match the taller one) becomes a WIDTH directive once
       flex-direction flips to column here — "don't stretch" then means
       "shrink to content", which let .compact-table's own min-width:640px
       win and force the whole page wider than the phone viewport.
       Explicitly restoring stretch for the column layout so each pane
       fills the available width and .compact-table-wrap's own
       overflow:auto is what handles the wide table, exactly as it does
       everywhere else this class is used. */
    .opname-counter-split { flex-direction: column; align-items: stretch; }
    .opname-counter-panel { position: static; }
}
.opname-unit-input-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.opname-unit-input-row label { flex: 0 0 140px; font-size: 0.85rem; color: var(--text2); }
.opname-unit-input-row input { flex: 1 1 auto; }
.opname-finding-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 0.85rem; flex-wrap: wrap; }
.opname-finding-row.is-voided { text-decoration: line-through; color: var(--text3); }
.opname-total-otomatis { padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(59,130,246,0.08); font-weight: 600; margin: 8px 0; }
.opname-sticky-actions { position: sticky; bottom: 0; background: var(--bg2); padding: 10px 0 4px; display: flex; gap: 10px; }
/* PHASE V2.14.11 */
.opname-zero-confirm { padding: 8px 12px; border-radius: var(--radius-sm); background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); font-size: 0.82rem; margin-bottom: 10px; }
.opname-zero-confirm input[type="checkbox"] { width: auto; }
/* PHASE V2.14.11.5 item 18 — SISA SATUAN TERKECIL */
.opname-remainder-block { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.25); margin: 10px 0; }
.opname-remainder-block .opname-remainder-qty { flex: 1 1 auto; }
.opname-remainder-block .opname-remainder-unit-label { flex: 0 0 auto; font-weight: 600; color: var(--text2); padding: 0 4px; }
.opname-remainder-hint { font-size: 0.72rem; color: var(--text3); margin-top: 6px; }
.opname-condition-block { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; background: var(--bg3); }
.opname-photo-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.opname-photo-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.opname-photo-hint { font-size: 0.72rem; color: var(--text3); margin-top: 4px; }
@media (max-width: 640px) {
    .opname-unit-input-row label { flex-basis: 110px; font-size: 0.8rem; }
    .opname-sticky-actions { flex-direction: column; }
    .opname-condition-block { padding: 8px; }
    /* Large touch targets on phone — buttons/selects/inputs never below
       a 44px hit target, per mobile-first accessibility convention. */
    .opname-condition-block select, .opname-condition-block input[type="number"] { min-height: 42px; }
    .opname-condition-block .btn-sm { min-height: 40px; padding: 8px 14px; }
}

/* ============================================================
   PHASE V2.14.11.4 — mobile UX hotfix for the Stock Opname counter
   screen ("Stock Opname Saya"). Frontend-only, no data model change:
   desktop/tablet (>768px) keeps the existing two-pane list+table
   layout untouched; everything below only takes effect at <=768px,
   where the item list becomes a stack of cards instead of the wide
   table, the filter toolbar stacks to one full-width control per row,
   the item-status filter becomes a 3-button segmented control (the
   underlying <select> stays the single source of truth — see
   syncItemStatusSeg() in stock-opname.js), and touch targets/font
   sizes are raised to avoid iOS auto-zoom and mis-taps.
   ============================================================ */
.opname-counter-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.opname-toolbar-item-status { width: 160px; }
.opname-toolbar-category { width: 180px; }
.opname-toolbar-progress-filter { width: 170px; }
.opname-status-segmented { display: none; }

/* ============================================================
   PHASE V2.14.11.5 — autocomplete/typeahead search: the PRIMARY counting
   workflow (type -> suggestions -> select -> count form), full-width and
   prominent, with the browse list/filters demoted to a collapsed
   secondary section below (see .opname-browse-section /
   .opname-filter-section further down).
   ============================================================ */
.opname-search-wrap { position: relative; }
.opname-blind-search { min-height: 48px; font-size: 16px; }
.opname-suggest-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm);
    max-height: 50vh; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    display: none;
}
.opname-suggest-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; min-height: 44px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.opname-suggest-row:last-child { border-bottom: none; }
.opname-suggest-row:hover, .opname-suggest-row.active { background: rgba(59,130,246,0.14); }
.opname-suggest-identity { min-width: 0; overflow: hidden; }
.opname-suggest-sku { font-weight: 700; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opname-suggest-name { color: var(--text2); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opname-suggest-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.opname-suggest-empty { padding: 12px; text-align: center; color: var(--text3); font-size: 0.85rem; }

.opname-toolbar-next .btn { width: 100%; }
.opname-browse-toggle { align-self: flex-start; }
.opname-browse-section { margin-top: 10px; }
.opname-filter-toggle { margin-bottom: 8px; }
.opname-filter-section { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.opname-mobile-cards { display: none; }
.opname-item-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg3); padding: 12px; margin-bottom: 10px; }
.opname-item-card-sku { font-weight: 700; font-size: 0.95rem; }
.opname-item-card-name { color: var(--text2); font-size: 0.85rem; margin-top: 2px; }
.opname-item-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.opname-item-card-category { color: var(--text3); font-size: 0.8rem; }
.opname-item-card-count-status { margin-bottom: 10px; }
.opname-item-card-btn { width: 100%; min-height: 48px; font-size: 1rem; }
.opname-empty-state { padding: 16px; text-align: center; color: var(--text3); }
.opname-history-list { border-top: 1px solid var(--border); }

@media (max-width: 768px) {
    .opname-counter-screen { max-width: 100%; overflow-x: hidden; }

    /* Requirement 1/2 — no table wider than the viewport: the table is
       simply not shown at all on mobile, replaced by the card list.
       Scoped to THIS screen only — .compact-table-wrap/.compact-table are
       shared with Transfer/Production/DO Receive bulk entry (PHASE
       V2.14.8), which must keep their existing (table + internal
       horizontal scroll) mobile behavior untouched. */
    .opname-counter-screen .compact-table-wrap { display: none; }
    .opname-mobile-cards { display: block; }

    /* Requirement 3/4/11 — filter controls stack to one full-width
       control per row inside the collapsed [Filter] section; the
       item-status filter becomes a 3-button segmented control there
       (the underlying <select> stays the single source of truth — see
       syncItemStatusSeg() in stock-opname.js). */
    .opname-toolbar-item-status, .opname-toolbar-category, .opname-toolbar-progress-filter { width: 100%; }
    .opname-toolbar-item-status select { display: none; }
    .opname-status-segmented { display: flex; gap: 6px; }
    .opname-status-seg-btn { flex: 1 1 0; min-height: 44px; }
    .opname-status-seg-btn.active { background: var(--accent); color: #fff; }
    .opname-toolbar-next .btn { min-height: 48px; font-size: 1rem; }
    .opname-toolbar-scan .btn { width: 100%; min-height: 44px; }
    .opname-browse-toggle, .opname-filter-toggle { width: 100%; justify-content: center; }

    /* Requirement 10 — touch targets + iOS zoom avoidance (>=16px input
       font-size), scoped to this screen only — never a global input/
       button size change elsewhere in the app. */
    .opname-counter-screen input, .opname-counter-screen select { min-height: 44px; font-size: 16px; }
    .opname-counter-screen .btn { min-height: 44px; }

    /* Requirement 8 — save (and Ambil Item Berikutnya) full-width,
       sticky bottom, safe-area-aware so it's never hidden behind the
       browser toolbar/home indicator. */
    .opname-sticky-actions { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
    .opname-sticky-actions .btn { width: 100%; min-height: 48px; font-size: 1rem; }
}

@media (max-width: 640px) {
    .drawer { width: 100vw; }
    .app-main-v2 { padding: 14px 12px 30px; }
    .item-selector-dropdown { right: 0; }
}

/* ============================================================
   PHASE V2.2 — Login redesign: dark navy enterprise WMS style,
   warehouse blueprint background, FA mascot beside the login card.
   ============================================================ */
.login-page {
    position: relative; min-height: 100vh; overflow-x: hidden;
    background: radial-gradient(ellipse at 30% 0%, #14224a 0%, var(--bg) 55%);
    display: flex; flex-direction: column;
}
.login-bg-blueprint {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(59,130,246,0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.09) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 75%);
}
.login-topbar {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid rgba(59,130,246,0.15);
}
.login-topbar-left { display: flex; align-items: center; gap: 10px; }
.login-topbar-icon {
    width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); font-size: 17px;
    box-shadow: 0 0 16px rgba(59,130,246,0.5);
}
.login-topbar-title { font-size: 0.92rem; font-weight: 800; color: var(--text); }
.login-topbar-sub { font-size: 0.66rem; color: var(--text3); }
.login-topbar-right { display: flex; align-items: center; gap: 10px; }
.badge-production {
    background: rgba(59,130,246,0.18); border: 1px solid rgba(59,130,246,0.4); color: #93c5fd;
    padding: 3px 10px; border-radius: 20px; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.04em;
}
.login-topbar-tagline { font-size: 0.72rem; color: var(--text3); }

.login-side-text {
    position: absolute; left: 40px; top: 50%; transform: translateY(-50%); z-index: 1;
    font-size: 1.3rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1.6;
    color: rgba(147,197,253,0.16); text-transform: uppercase; white-space: nowrap;
}

.login-main {
    position: relative; z-index: 2; flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 0; padding: 40px 24px; flex-wrap: wrap;
}

.login-card {
    position: relative; z-index: 1; width: 100%; max-width: 400px; background: rgba(20,30,58,0.72);
    backdrop-filter: blur(10px); border: 1px solid rgba(59,130,246,0.25); border-radius: var(--radius);
    padding: 34px 30px; box-shadow: 0 0 60px rgba(59,130,246,0.12), 0 20px 50px rgba(0,0,0,0.4);
    text-align: center;
}
.login-card-logo {
    width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: flex; align-items: center;
    justify-content: center; font-size: 24px; background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 0 24px rgba(59,130,246,0.55);
}
.login-card-title { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.login-card-tagline { font-size: 0.8rem; color: var(--text3); margin-bottom: 22px; line-height: 1.5; }
.login-card #login-alert:empty { display: none; }
.login-card form { text-align: left; }
.login-card form label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.66rem; font-weight: 700; color: var(--text3); }
.login-password-wrap { position: relative; }
.login-password-wrap input { padding-right: 40px; }
.login-password-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none;
    color: var(--text3); cursor: pointer; font-size: 0.95rem; padding: 6px 8px; line-height: 1;
}
.login-password-toggle:hover { color: var(--text2); }
.login-submit-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; font-weight: 700; font-size: 0.92rem;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}
.login-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--text3); font-size: 0.7rem; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-trust-row { display: flex; gap: 10px; }
.login-trust-card {
    flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: rgba(255,255,255,0.02); text-align: left;
}
.login-trust-icon { font-size: 1.1rem; }
.login-trust-card b { display: block; font-size: 0.72rem; color: var(--text); }
.login-trust-card small { font-size: 0.64rem; color: var(--text3); }

/* The mascot overlaps the card's right edge (negative margin pulls it
   behind/against the card, higher z-index keeps it drawn in front) so it
   reads as "standing right next to / leaning on" the card, not as a
   separate column with a gap — matches the approved mockup. */
.login-mascot-wrap {
    position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center;
    margin-left: -90px; pointer-events: none;
}
.login-mascot { width: 100%; max-width: 380px; height: auto; object-fit: contain; filter: drop-shadow(0 0 30px rgba(59,130,246,0.4)); }
.login-speech-bubble {
    position: absolute; top: 6%; right: -4%; background: rgba(20,30,58,0.92); border: 1px solid rgba(59,130,246,0.4);
    color: var(--text); border-radius: 14px; padding: 10px 14px; font-size: 0.8rem; font-weight: 700;
    box-shadow: 0 0 20px rgba(59,130,246,0.3); max-width: 170px; line-height: 1.4; pointer-events: auto;
}
.login-speech-bubble small { display: block; font-weight: 500; color: var(--text2); font-size: 0.7rem; margin-top: 2px; }

.login-footer {
    position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between;
    padding: 16px 24px; flex-wrap: wrap; gap: 8px; font-size: 0.72rem; color: var(--text3);
}
.login-footer-left small { display: block; margin-top: 2px; }
.login-footer-right { letter-spacing: 0.03em; }

/* ------------------------------------------------------------------
   PHASE V2.2 (revision) — "image-exact" desktop mode. The owner's
   approved mockup is used as-is (public/assets/images/login-bg.png,
   1672x941, never redrawn/cropped/stretched) and only the real,
   functional controls (username/password inputs, toggle, submit,
   error alert) are overlaid on top, positioned at the image's own
   measured coordinates as percentages of the card region — so they
   scale exactly with the image at any width down to this breakpoint.
   Below 960px the image's card stops being legible/tappable, so the
   hand-built .login-card (default styles above) is used instead; see
   the max-width rules further below.
   ------------------------------------------------------------------ */
.login-image-frame { display: none; }
@media (min-width: 960px) {
    .login-bg-blueprint, .login-topbar, .login-side-text, .login-mascot-wrap, .login-footer { display: none; }

    .login-page { min-height: 0; }
    .login-main {
        display: block; position: relative; width: 100%; max-width: 1672px; margin: 0 auto;
        aspect-ratio: 1672 / 941; padding: 0;
    }
    .login-image-frame { display: block; position: absolute; inset: 0; z-index: 1; }
    .login-bg-image { width: 100%; height: 100%; display: block; object-fit: contain; }

    /* The card region measured directly off the approved mockup image
       (left 478px/1672, top 142px/941, width 537px/1672, height 688px/941). */
    .login-card {
        position: absolute; z-index: 2; left: 28.59%; top: 15.09%; width: 32.12%; height: 73.11%;
        background: none; backdrop-filter: none; border: none; box-shadow: none; padding: 0; text-align: left; max-width: none;
    }
    .login-card-logo, .login-card-title, .login-card-tagline, .login-divider, .login-trust-row { display: none; }
    .login-card form { text-align: left; height: 100%; }
    .login-card form label { display: none; }

    /* Each control positioned as a % of the CARD box (not the full image)
       — coordinates measured the same way as the card region above. */
    .login-card .form-group { position: absolute; left: 7.82%; width: 84.17%; margin: 0; }
    .login-card .form-group:nth-of-type(1) { top: 38.23%; height: 6.25%; }
    .login-card .form-group:nth-of-type(2) { top: 52.76%; height: 6.69%; }
    .login-card .form-group input,
    .login-card .login-password-wrap { height: 100%; }
    .login-card input {
        /* Transparent over the icon printed in the image (left ~13%), solid
           from there rightward so typed text has a clean background instead
           of ghosting against the image's own placeholder text/dots. */
        height: 100%; border: none; border-radius: 0; padding: 0 14px 0 15%;
        color: #dbeafe; font-size: 0.95vw;
        background: linear-gradient(to right, transparent 0%, transparent 13%, rgb(15,28,61) 13%, rgb(15,28,61) 100%);
    }
    .login-card input:focus { outline: 1px solid rgba(147,197,253,0.5); outline-offset: 2px; }
    .login-card .login-password-toggle { color: transparent; }
    .login-card .login-password-toggle:hover, .login-card .login-password-toggle:focus-visible { color: transparent; }
    .login-submit-btn {
        position: absolute; left: 7.82%; width: 84.17%; top: 64.1%; height: 7.56%;
        background: transparent; box-shadow: none; color: transparent; padding: 0;
    }
    .login-submit-btn:hover { background: rgba(255,255,255,0.06); }
    #login-alert { position: absolute; left: 7.82%; width: 84.17%; top: 30%; z-index: 3; }
    #login-alert .alert { font-size: 0.78rem; padding: 8px 12px; }
}

/* Tablet (below the image-exact breakpoint): shrink mascot, keep it overlapping the card but by less */
@media (max-width: 1024px) {
    .login-side-text { display: none; }
    .login-mascot-wrap { margin-left: -50px; }
    .login-mascot { max-width: 240px; }
    .login-speech-bubble { font-size: 0.72rem; padding: 8px 10px; max-width: 140px; }
}

/* Mobile: stack — card first, smaller mascot below; no overlap, no horizontal scroll */
@media (max-width: 640px) {
    .login-page { overflow-x: hidden; }
    .login-topbar { padding: 12px 16px; }
    .login-topbar-right { display: none; }
    .login-main { flex-direction: column-reverse; gap: 18px; padding: 20px 16px 30px; }
    .login-mascot-wrap { margin-left: 0; }
    .login-card { padding: 26px 20px; max-width: 100%; }
    .login-mascot { max-width: 140px; }
    .login-mascot-wrap { width: 100%; }
    .login-speech-bubble { position: static; margin: 8px auto 0; max-width: 220px; text-align: center; }
    .login-footer { flex-direction: column; align-items: center; text-align: center; padding: 14px 16px 20px; }
}

/* ============================================================
   PHASE V2.3 — Laporan Nilai Stok & HPP (Inventory Value & HPP
   Reconciliation). Reuses every existing token/component (.card,
   .btn, .badge, .table-wrapper, .alert, .form-group) — this block only
   adds the layout/visual pieces this report needed that nothing else
   in the app already had (KPI cards, formula strip, warehouse panels,
   sparklines, the Trace Detail side panel).
   ============================================================ */
.btn-icon { background: transparent; border: none; color: var(--text2); font-size: 1rem; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); }
.btn-icon:hover { background: var(--bg3); color: var(--text); }

.hpp-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.hpp-title { margin: 0; font-size: 1.5rem; color: var(--text); }
.hpp-subtitle { color: var(--text2); font-size: 0.85rem; margin-top: 2px; }

.hpp-filter-card { padding: 16px 20px; }
.hpp-filter-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: end; }
@media (max-width: 1200px) { .hpp-filter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hpp-filter-grid { grid-template-columns: 1fr; } }
.hpp-date-range { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hpp-date-range input { flex: 1; min-width: 0; width: 0; }
.hpp-period-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.hpp-filter-actions { display: flex; gap: 10px; margin-top: 14px; justify-content: flex-end; flex-wrap: wrap; }

.hpp-kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1300px) { .hpp-kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .hpp-kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .hpp-kpi-row { grid-template-columns: 1fr; } }
.hpp-kpi-card { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin-bottom: 0; }
.hpp-kpi-icon { font-size: 1.3rem; }
.hpp-kpi-label { color: var(--text2); font-size: 0.72rem; margin-bottom: 4px; }
.hpp-kpi-value { color: var(--text); font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.hpp-kpi-delta { font-size: 0.72rem; font-weight: 700; }
.hpp-kpi-delta.up { color: var(--green); }
.hpp-kpi-delta.down { color: var(--red); }
.hpp-kpi-delta.neutral { color: var(--text3); }
.hpp-kpi-delta-note { color: var(--text3); font-size: 0.68rem; }
.hpp-variance-ok { border-color: rgba(16,185,129,0.4); }
.hpp-variance-warn { border-color: rgba(245,158,11,0.5); }

.hpp-formula-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; }
.hpp-formula-icon { font-size: 1.2rem; }
.hpp-formula-label { color: var(--text2); font-size: 0.8rem; font-weight: 600; margin-right: 8px; }
.hpp-formula-chip { background: var(--bg3); border-radius: var(--radius-sm); padding: 8px 14px; min-width: 130px; }
.hpp-formula-chip-label { color: var(--text3); font-size: 0.65rem; }
.hpp-formula-chip-value { color: var(--text); font-size: 0.85rem; font-weight: 700; }
.hpp-formula-result { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.4); }
.hpp-formula-op { color: var(--text3); font-size: 1.1rem; font-weight: 700; }
.hpp-formula-note { color: var(--text3); font-size: 0.7rem; margin-left: auto; }

.hpp-body-row { display: flex; gap: 16px; align-items: flex-start; }
.hpp-main-col { flex: 1; min-width: 0; }
.hpp-trace-panel { width: 340px; flex-shrink: 0; position: sticky; top: 12px; }
@media (max-width: 1100px) { .hpp-body-row { flex-direction: column; align-items: stretch; } .hpp-trace-panel { width: 100%; position: static; } }

.hpp-warehouse-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .hpp-warehouse-row { grid-template-columns: 1fr; } }
.hpp-warehouse-panel-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.hpp-warehouse-panel { min-width: 0; }
.hpp-main-col, .hpp-body-row, .hpp-trace-panel { min-width: 0; }
.hpp-warehouse-panel-title { color: var(--text); font-weight: 700; font-size: 0.95rem; }
.hpp-warehouse-panel-subtitle { color: var(--text3); font-size: 0.72rem; margin-top: 2px; }
.hpp-warehouse-panel-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
@media (max-width: 480px) { .hpp-warehouse-panel-grid { grid-template-columns: 1fr 1fr; } }
.hpp-mini-stat-label { color: var(--text3); font-size: 0.68rem; }
.hpp-mini-stat-value { color: var(--text); font-size: 0.82rem; font-weight: 600; }
.hpp-sparkline { display: flex; align-items: flex-end; gap: 2px; height: 44px; }
.hpp-sparkline-bar { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; opacity: 0.85; }

.hpp-legend { color: var(--text3); font-size: 0.72rem; margin-top: 12px; line-height: 1.6; }

.hpp-trace-date-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); border-radius: var(--radius-sm); padding: 6px 12px; font-size: 0.8rem; color: var(--text2); margin-bottom: 12px; }
.hpp-trace-total-chip { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.35); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.hpp-trace-total-label { color: var(--text3); font-size: 0.7rem; }
.hpp-trace-total-value { color: var(--text); font-size: 1.2rem; font-weight: 700; }
.hpp-trace-section-label { color: var(--text2); font-size: 0.75rem; font-weight: 600; margin: 10px 0 8px; }
.hpp-trace-breakdown-row { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; margin-bottom: 8px; }
.hpp-trace-breakdown-label { width: 110px; color: var(--text2); flex-shrink: 0; }
.hpp-trace-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hpp-trace-breakdown-bar-wrap { flex: 1; height: 6px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.hpp-trace-breakdown-bar { height: 100%; background: var(--accent); }
.hpp-trace-breakdown-value { color: var(--text3); white-space: nowrap; font-size: 0.68rem; }
.hpp-trace-detail-table table { font-size: 0.72rem; }
.hpp-trace-detail-row:hover { background: var(--bg3); }

/* PHASE V2.3B — costing audit sign-off: clickable Variance card + bridge */
.hpp-kpi-subnote { color: var(--text3); font-size: 0.66rem; margin-top: 4px; line-height: 1.4; }
.hpp-kpi-clickable { cursor: pointer; transition: border-color 0.15s; }
.hpp-kpi-clickable:hover { border-color: var(--accent); }
.hpp-bridge-table { display: flex; flex-direction: column; gap: 8px; }
.hpp-bridge-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--text2); }
.hpp-bridge-row .mono { color: var(--text); }
.hpp-bridge-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.hpp-bridge-total { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.hpp-bridge-total .mono { font-weight: 700; }
.hpp-bridge-warn, .hpp-bridge-warn .mono { color: var(--orange); }

/* PHASE V2.3D — cutover-aware UX: effective-period banner + pre-go-live rows */
.hpp-cutover-banner { margin-bottom: 14px; font-size: 0.8rem; line-height: 1.5; }
.hpp-pre-go-live-badge {
    display: inline-block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.02em;
    color: var(--text3); background: var(--bg2); border: 1px solid var(--border);
    border-radius: 4px; padding: 1px 6px; margin-left: 4px; text-transform: uppercase;
}
.hpp-pre-go-live-value { color: var(--text3); }

/* Dashboard redesign (dashboard.js) — self-contained .dash-* rules, appended
   at EOF so no existing rule is touched. Visual language follows the approved
   mockup: tinted full-colour cards with a solid icon tile, white bold figures,
   sentence-case labels, uppercase section titles. Every Rupiah figure is
   nowrap and JS-fitted (fitValues) so it can never overflow a card on iPad /
   mobile. The detail drawer (.drawer-dash) mirrors .drawer-xl's pinned-height
   + page scroll-lock behaviour.
   UI2 refinement: every size below comes from the --dz-* scale on .dash-page, stepped by
   breakpoint (desktop / laptop / iPad / portrait / phone) — no zoom or transform. Cards are
   shorter (padding -20 %), type is 10-25 % smaller on tablets, the 4-up rows stack tile+label
   over a full-width figure so a Rupiah value gets the whole card width. */
.dash-page {
    --dz-kpi: 1.8rem; --dz-mv: 1.4rem; --dz-label: 0.95rem; --dz-sub: 0.78rem; --dz-title: 1.1rem; --dz-attn: 1.6rem; --dz-act: 1.1rem;
    --dz-tile: 40px; --dz-tile-sm: 34px; --dz-pad: 11px 13px; --dz-gap: 10px; --dz-ctl: 0.85rem;
    display: flex; flex-direction: column; gap: var(--dz-gap); min-width: 0;
}
.dash-stack { display: flex; flex-direction: column; gap: var(--dz-gap); min-width: 0; }
.dash-loading { opacity: 0.55; pointer-events: none; transition: opacity 0.15s ease; }
.dash-ico { display: inline-flex; align-items: center; justify-content: center; width: 1.1em; height: 1.1em; flex: 0 0 auto; vertical-align: -0.18em; }
.dash-ico svg { width: 100%; height: 100%; }
/* top bar */
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.dash-filter { display: flex; align-items: center; gap: 8px; }
.dash-filter label { font-size: var(--dz-ctl); color: var(--text); font-weight: 700; letter-spacing: 0.02em; }
.dash-select { position: relative; }
.dash-select .dash-select-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #4c8dff; font-size: 0.95rem; pointer-events: none; }
.dash-select select { width: auto; min-width: 210px; padding: 6px 12px 6px 34px; font-size: var(--dz-ctl); border-color: #3b82f6; border-radius: 9px; font-weight: 500; }
.dash-updated { display: flex; align-items: center; gap: 6px; font-size: calc(var(--dz-ctl) - 0.06rem); color: var(--text2); flex-wrap: wrap; }
.dash-refresh { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 9px; font-weight: 700; font-size: var(--dz-ctl); margin-left: 6px; }
/* base card + colour tones */
.dash-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: var(--dz-pad); min-width: 0; position: relative; }
.dash-click { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease; }
.dash-click:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.4); filter: brightness(1.12); }
.dash-click:active { transform: translateY(0); }
.dash-click:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
tr.dash-click:hover { transform: none; box-shadow: none; filter: none; }
.dash-label { font-size: var(--dz-label); color: #dbe3f5; font-weight: 600; line-height: 1.25; }
.dash-sub { font-size: var(--dz-sub); color: var(--text2); overflow-wrap: anywhere; line-height: 1.25; }
.dash-value { display: block; min-width: 0; overflow: hidden; font-weight: 800; white-space: nowrap; color: #fff; font-size: var(--dz-mv); line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.neg { color: var(--red); } .pos { color: var(--green); }
.dash-tile { flex: 0 0 auto; width: var(--dz-tile); height: var(--dz-tile); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: calc(var(--dz-tile) * 0.5); color: #fff; background: #2563eb; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.dash-tile.tone-blue { background: #1d4ed8; }
.dash-tile.tone-gold { background: #5b4614; color: #f6b61c; }
.dash-tile.tone-green, .dash-tile.tone-in { background: #15803d; }
.dash-tile.tone-open { background: #1d4ed8; }
.dash-tile.tone-out, .dash-tile.tone-red { background: #c8283f; }
.dash-tile.tone-close, .dash-tile.tone-purple { background: #6d3fe0; }
.dash-tile.tone-orange, .dash-tile.tone-trfin { background: #b45309; }
.dash-tile.tone-pink { background: #be185d; }
.dash-tile.tone-trf { background: #1d4ed8; }
.dash-chev-ico { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--text2); font-size: 0.95rem; }
.c-gold { color: #f6b61c; } .c-green { color: #34d399; } .c-orange { color: #f59e0b; } .c-red { color: #f87171; }
/* KPI row */
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--dz-gap); }
.dash-kpi { display: flex; align-items: center; gap: 10px; padding-right: 28px; }
.dash-kpi-main { min-width: 0; flex: 1 1 auto; }
.dash-kpi .dash-value { font-size: var(--dz-kpi); }
/* sections */
.dash-section { background: rgba(26,32,48,0.72); border: 1px solid var(--border); border-radius: 12px; padding: var(--dz-pad); min-width: 0; }
.dash-section-head { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 9px; }
.dash-section-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: var(--dz-title); font-weight: 800; letter-spacing: 0.02em; margin-bottom: 9px; color: #fff; }
.dash-section-title .dash-title-l { display: inline-flex; align-items: center; gap: 8px; }
.dash-section-head .dash-section-title { margin-bottom: 0; }
.dash-title-ico { font-size: 1.05em; }
.dash-section-title .dash-link { margin-left: auto; }
.dash-period-label { font-size: calc(var(--dz-title) - 0.22rem); font-weight: 400; color: var(--text2); }
.dash-period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-seg { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 8px; padding: 5px 12px; font-size: calc(var(--dz-ctl) - 0.05rem); font-weight: 600; cursor: pointer; }
.dash-seg.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.dash-range { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text3); flex-wrap: wrap; }
.dash-range input { width: auto; padding: 5px 8px; }
.dash-note { font-size: 0.78rem; margin-bottom: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(245,158,11,0.1); border-left: 3px solid var(--orange); color: #fbbf24; }
/* movement: 4 tinted cards joined by arrows */
.dash-mv-cards { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 6px; align-items: stretch; }
.dash-mv { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-width: 1.5px; }
.dash-mv .dash-chev-ico { top: auto; bottom: 9px; transform: none; }
.dash-mv-main { min-width: 0; flex: 1 1 auto; }
.dash-mv-value { font-size: var(--dz-mv); margin: 1px 0; }
.dash-mv.is-open { background: linear-gradient(135deg, rgba(37,99,235,0.30), rgba(15,23,42,0.85)); border-color: #2f6df6; }
.dash-mv.is-in { background: linear-gradient(135deg, rgba(16,185,129,0.24), rgba(15,23,42,0.85)); border-color: #1fae6f; }
.dash-mv.is-out { background: linear-gradient(135deg, rgba(220,38,38,0.30), rgba(15,23,42,0.85)); border-color: #d6334f; }
.dash-mv.is-close { background: linear-gradient(135deg, rgba(109,63,224,0.34), rgba(15,23,42,0.85)); border-color: #7c5cf5; }
.dash-mv.is-in .dash-label { color: #3ddc97; } .dash-mv.is-out .dash-label { color: #ff8a73; } .dash-mv.is-close .dash-label { color: #cbbcff; }
.dash-mv-arrow { display: flex; align-items: center; color: #dbe3f5; font-size: 1.1rem; }
.dash-other { margin-top: 8px; font-size: var(--dz-sub); }
.dash-other-toggle { background: transparent; border: none; color: var(--text2); cursor: pointer; padding: 3px 0; font-size: var(--dz-sub); text-align: left; }
.dash-other-hint { color: var(--text3); }
.dash-other-list { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.dash-other-list[hidden] { display: none; }
.dash-other-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(120px, auto); gap: 8px; padding: 6px 10px; background: var(--bg2); border-radius: 8px; align-items: center; }
.dash-other-row.is-zero { opacity: 0.6; }
.dash-other-row strong { text-align: right; white-space: nowrap; }
.dash-other-tx { color: var(--text3); font-size: 0.7rem; }
.dash-recon .alert { margin: 10px 0 0; }
/* attention: 5 tinted cards */
.dash-attn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--dz-gap); }
.dash-attn { display: flex; align-items: center; gap: 10px; padding-right: 28px; border-width: 1.5px; }
.dash-attn-main { min-width: 0; flex: 1 1 auto; }
.dash-attn-count { font-size: var(--dz-attn); font-weight: 800; color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dash-attn-val { font-size: var(--dz-sub); color: #fff; opacity: 0.85; overflow-wrap: anywhere; line-height: 1.25; }
.dash-attn.tone-card-red { background: rgba(220,38,38,0.18); border-color: rgba(239,68,68,0.55); } .tone-card-red .dash-label { color: #ff7a8a; }
.dash-attn.tone-card-orange { background: rgba(217,119,6,0.20); border-color: rgba(245,158,11,0.55); } .tone-card-orange .dash-label { color: #fbbf24; }
.dash-attn.tone-card-purple { background: rgba(109,63,224,0.22); border-color: rgba(139,92,246,0.55); } .tone-card-purple .dash-label { color: #b9a3ff; }
.dash-attn.tone-card-pink { background: rgba(190,24,93,0.20); border-color: rgba(236,72,153,0.5); } .tone-card-pink .dash-label { color: #f472b6; }
.dash-attn.tone-card-blue { background: rgba(37,99,235,0.20); border-color: rgba(59,130,246,0.55); } .tone-card-blue .dash-label { color: #7fb0ff; }
/* two-column lower area */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--dz-gap); align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: var(--dz-gap); min-width: 0; }
.dash-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dash-table { width: 100%; border-collapse: collapse; font-size: var(--dz-sub); }
.dash-table th, .dash-table td { padding: 6px 6px; border-bottom: 1px solid rgba(42,51,72,0.7); text-align: left; white-space: nowrap; }
.dash-table thead th { color: #dbe3f5; font-weight: 600; font-size: var(--dz-sub); background: rgba(10,14,24,0.55); border-bottom: 1px solid var(--border); }
.dash-table .text-right { text-align: right; }
.dash-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.dash-table td.wrap { white-space: normal; min-width: 140px; }
.dash-table td.wrap-sm { white-space: normal; min-width: 56px; overflow-wrap: anywhere; }
.dash-section .dash-table th:nth-child(2), .dash-section .dash-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; min-width: 60px; }
.dash-drawer-wrap .dash-table th, .dash-drawer-wrap .dash-table td { padding: 6px 8px; white-space: normal; overflow-wrap: anywhere; }
.dash-drawer-wrap .dash-table th.text-right, .dash-drawer-wrap .dash-table td.text-right { white-space: nowrap; overflow-wrap: normal; }
.dash-empty { text-align: center; color: var(--text3); padding: 14px; }
/* activity */
.dash-act-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 9px; }
.dash-act { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-width: 1.5px; }
.dash-act .dash-tile { width: var(--dz-tile-sm); height: var(--dz-tile-sm); font-size: calc(var(--dz-tile-sm) * 0.5); border-radius: 9px; }
.dash-act-main { min-width: 0; }
.dash-act .dash-label { font-size: calc(var(--dz-label) - 0.1rem); }
.dash-act-count { font-size: var(--dz-act); font-weight: 800; color: #fff; white-space: nowrap; line-height: 1.1; }
.dash-act .dash-sub { line-height: 1.2; }
.dash-act-val { font-size: var(--dz-sub); font-weight: 700; white-space: nowrap; }
.dash-act.is-in { background: rgba(16,185,129,0.14); border-color: rgba(16,185,129,0.5); } .dash-act.is-in .dash-label, .dash-act.is-in .dash-act-val { color: #3ddc97; }
.dash-act.is-out { background: rgba(220,38,38,0.16); border-color: rgba(239,68,68,0.5); } .dash-act.is-out .dash-label, .dash-act.is-out .dash-act-val { color: #ff8a73; }
.dash-act.is-trf { background: rgba(37,99,235,0.16); border-color: rgba(59,130,246,0.5); } .dash-act.is-trf .dash-label, .dash-act.is-trf .dash-act-val { color: #7fb0ff; }
.dash-act.is-trfin { background: rgba(217,119,6,0.16); border-color: rgba(245,158,11,0.5); } .dash-act.is-trfin .dash-label, .dash-act.is-trfin .dash-act-val { color: #fbbf24; }
.dash-type { font-size: var(--dz-sub); font-weight: 600; }
.dash-type.t-in { color: #3ddc97; } .dash-type.t-out { color: #ff6b6b; } .dash-type.t-transfer_out { color: #60a5fa; } .dash-type.t-transfer_in { color: #fbbf24; }
.dash-status { font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
.dash-status.ok { background: rgba(16,185,129,0.16); color: #34d399; border: 1px solid rgba(16,185,129,0.35); }
.dash-status.warn { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.dash-gap { display: inline-block; min-width: 44px; text-align: center; background: rgba(239,68,68,0.18); color: #ff6b6b; font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.dash-link { background: transparent; border: none; color: #4c8dff; font-size: 0.8rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.dash-more { margin: 10px 0 0 auto; display: flex; }
/* quick actions */
.dash-quick-row { display: flex; flex-direction: column; gap: 8px; }
.dash-quick-row .dash-section-title { margin: 0; }
.dash-qa { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: var(--dz-ctl); }
/* detail drawer */
.drawer.drawer-dash { width: min(1240px, 96vw); height: auto; top: 0; bottom: 0; max-height: 100%; }
@media (max-width: 900px) { .drawer.drawer-dash { width: 100vw; } }
.drawer.drawer-dash .drawer-header { flex: 0 0 auto; }
.drawer.drawer-dash .drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html.dash-scroll-lock, body.dash-scroll-lock { overflow: hidden; }
.dash-drawer-title { font-size: 1rem; font-weight: 800; }
.dash-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.dash-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 2px; color: var(--text2); font-size: 0.78rem; }
.dash-grand { position: sticky; bottom: -16px; margin: 0 -20px -16px; padding: 12px 20px; background: var(--bg2); border-top: 2px solid var(--accent); }
.dash-grand-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dash-grand-label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.03em; }
.dash-grand-value { font-size: 1.15rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* type + density scale by viewport (iPad Pro landscape ~1366 and Air landscape ~1180 are the targets) */
@media (max-width: 1400px) {
    .dash-page { --dz-kpi: 1.65rem; --dz-mv: 1.28rem; --dz-label: 0.9rem; --dz-sub: 0.75rem; --dz-title: 1.05rem; --dz-attn: 1.5rem; --dz-tile: 36px; --dz-tile-sm: 32px; --dz-pad: 10px 12px; }
}
@media (max-width: 1300px) {
    .dash-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1200px) {
    .dash-page { --dz-kpi: 1.5rem; --dz-mv: 1.15rem; --dz-label: 0.85rem; --dz-sub: 0.72rem; --dz-title: 1rem; --dz-attn: 1.35rem; --dz-act: 1rem; --dz-tile: 32px; --dz-tile-sm: 30px; --dz-pad: 9px 11px; --dz-gap: 8px; --dz-ctl: 0.8rem; }
}
/* 4-up rows below ~1500px: tile + label on top, the full-width figure below (a Rupiah value gets the whole card) */
@media (min-width: 901px) and (max-width: 1500px) {
    .dash-mv, .dash-kpi, .dash-attn { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-items: center; }
    .dash-mv-main, .dash-kpi-main, .dash-attn-main { display: contents; }
    .dash-mv .dash-tile, .dash-kpi .dash-tile, .dash-attn .dash-tile { grid-column: 1; grid-row: 1; }
    .dash-mv .dash-label, .dash-kpi .dash-label { grid-column: 2; grid-row: 1; align-self: center; }
    .dash-mv .dash-value, .dash-kpi .dash-value { grid-column: 1 / -1; grid-row: 2; }
    .dash-mv .dash-sub, .dash-kpi .dash-sub { grid-column: 1 / -1; grid-row: 3; padding-right: 16px; }
    .dash-kpi { padding-right: 12px; }
    .dash-kpi .dash-label, .dash-attn .dash-label { padding-right: 14px; }
    .dash-kpi .dash-chev-ico { top: 12px; transform: none; }
    .dash-attn .dash-tile { grid-row: 1 / span 2; }
    .dash-attn .dash-label { grid-column: 2; grid-row: 1; align-self: end; }
    .dash-attn .dash-attn-count { grid-column: 2; grid-row: 2; align-self: start; }
    .dash-attn .dash-sub, .dash-attn .dash-attn-val { grid-column: 1 / -1; }
    .dash-attn { padding-right: 12px; }
    .dash-attn .dash-chev-ico { top: 12px; transform: none; }
}
@media (max-width: 900px) {
    .dash-page { --dz-kpi: 1.4rem; --dz-mv: 1.2rem; --dz-label: 0.85rem; --dz-attn: 1.4rem; }
    .dash-mv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--dz-gap); }
    .dash-mv-arrow { display: none; }
    .dash-act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-attn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 761px) and (max-width: 900px) {
    .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dash-kpi { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-items: center; padding-right: 12px; }
    .dash-kpi-main { display: contents; }
    .dash-kpi .dash-tile { grid-column: 1; grid-row: 1; }
    .dash-kpi .dash-label { grid-column: 2; grid-row: 1; }
    .dash-kpi .dash-value { grid-column: 1 / -1; grid-row: 2; }
    .dash-kpi .dash-sub { grid-column: 1 / -1; grid-row: 3; }
    .dash-kpi .dash-label { padding-right: 14px; }
    .dash-kpi .dash-chev-ico { top: 12px; transform: none; }
}
@media (max-width: 760px) {
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* tablets held in portrait (incl. 1024px-wide iPad Pro): movement cards 2x2, attention cards 2x2 */
@media (min-width: 901px) and (max-width: 1100px) and (orientation: portrait) {
    .dash-mv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--dz-gap); }
    .dash-mv-arrow { display: none; }
    .dash-attn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .dash-page { --dz-kpi: 1.3rem; --dz-mv: 1.1rem; --dz-label: 0.82rem; --dz-sub: 0.72rem; --dz-title: 0.98rem; --dz-attn: 1.3rem; --dz-tile: 30px; --dz-pad: 9px 10px; }
    .dash-mv-cards { grid-template-columns: minmax(0, 1fr); }
    .dash-filter { width: 100%; } .dash-select { flex: 1; } .dash-select select { width: 100%; min-width: 0; }
    .dash-other-row { grid-template-columns: minmax(0, 1fr) auto; } .dash-other-tx { display: none; }
}

/* Stock IN / OUT V2 (transactions.js, stock-in-sheet.js, stock-out-sheet.js) —
   self-contained .tx2-* rules appended at EOF; no existing rule is touched. The palette
   below follows the approved mockups (navy surfaces, blue primary, green status) and is
   scoped to .tx2 / .drawer-tx so no other screen is affected. */
.tx2 { --tx-card: #0f1a2f; --tx-card2: #0b1527; --tx-border: #1d2c48; --tx-input: #091223; --tx-line: #16243d; --tx-text: #e8eefb; --tx-muted: #8fa3c4; --tx-blue: #2f7bff; --tx-blue2: #1e5ee6; --tx-green: #22c55e; --tx-red: #f0556a; --tx-amber: #f59e0b; color: var(--tx-text); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tx2 label { text-transform: none; letter-spacing: 0; }
.tx2-host { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tx2-top { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; }
.tx2-titlebox { display: flex; align-items: center; gap: 14px; flex: 1 1 280px; min-width: 0; }
.tx2-titleico { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, #2f7bff, #1346b5); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff; flex: 0 0 auto; box-shadow: 0 6px 18px rgba(47,123,255,0.35); }
.tx2-title { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; }
.tx2-subtitle { font-size: 0.85rem; color: var(--tx-muted); margin-top: 2px; }
.tx2-tabs { display: inline-flex; background: var(--tx-card2); border: 1px solid var(--tx-border); border-radius: 12px; padding: 4px; gap: 4px; }
.tx2-tab { background: transparent; border: none; color: #c9d6ee; padding: 10px 26px; border-radius: 9px; font-weight: 700; font-size: 0.92rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tx2-tab.on { background: linear-gradient(180deg, #3b86ff, #1f62ea); color: #fff; box-shadow: 0 4px 14px rgba(47,123,255,0.4); }
.tx2-steps { display: flex; gap: 22px; align-items: flex-start; }
.tx2-step { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--tx-muted); }
.tx2-stepno { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--tx-border); display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--tx-card2); }
.tx2-step.on { color: var(--tx-blue); font-weight: 700; } .tx2-step.on .tx2-stepno { background: var(--tx-blue); border-color: var(--tx-blue); color: #fff; }
.tx2-step.done .tx2-stepno { background: rgba(34,197,94,0.18); border-color: var(--tx-green); color: var(--tx-green); } .tx2-step.done { color: var(--tx-green); }
.tx2-card { background: var(--tx-card); border: 1px solid var(--tx-border); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.tx2-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.tx2-head-out { grid-template-columns: 1.1fr 1.2fr 1.1fr 0.9fr 1.5fr auto; align-items: end; }
.tx2-span3 { grid-column: span 3; }
.tx2-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tx2-field > label { font-size: 0.82rem; color: #cdd9ef; font-weight: 600; }
.tx2-req { color: var(--tx-red); }
.tx2-in, .tx2-sel, .tx2-pick, .tx2 .tx2-num { width: 100%; height: 38px; background: var(--tx-input); border: 1px solid #243653; border-radius: 9px; color: var(--tx-text); font-size: 0.88rem; padding: 0 12px; font-family: inherit; }
.tx2-sel { padding-right: 8px; }
.tx2-in:focus, .tx2-sel:focus, .tx2-pick:focus, .tx2 .tx2-num:focus { outline: none; border-color: var(--tx-blue); box-shadow: 0 0 0 2px rgba(47,123,255,0.25); }
.tx2-sel:disabled { opacity: 0.6; }
.tx2-static { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #243653; border-radius: 9px; background: rgba(47,123,255,0.1); color: #6aa2ff; font-weight: 700; }
.tx2-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 12px; }
.tx2-cardtitle { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.tx2-chip { font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(47,123,255,0.15); color: #7fb0ff; border: 1px solid rgba(47,123,255,0.4); }
.tx2-opt { font-size: 0.8rem; font-weight: 500; color: var(--tx-muted); }
.tx2-hintline { font-size: 0.76rem; color: var(--tx-muted); margin-top: 3px; }
.tx2-cardtools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tx2-quick { width: 270px; max-width: 100%; }
.tx2 .btn-primary { background: linear-gradient(180deg, #3b86ff, #1f62ea); border-color: #2f7bff; }
.tx2-add { white-space: nowrap; padding: 9px 16px; border-radius: 9px; font-weight: 700; }
.tx2-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.tx2-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 1100px; table-layout: fixed; }
.tx2-table-out { min-width: 1200px; } .tx2-table.tx2-table-out .w-mk { width: 160px; } .tx2-table.tx2-table-out select.tx2-mk-mini { width: 56px; flex: 0 0 56px; } .tx2-table-out .tx2-mk-val { flex: 1 1 64px; min-width: 64px; }
.tx2-reviewtable { table-layout: auto; }
.tx2-table thead th { background: var(--tx-card2); color: #b7c6e2; font-weight: 600; font-size: 0.78rem; text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--tx-border); white-space: nowrap; }
.tx2-table td { padding: 8px 6px; border-bottom: 1px solid var(--tx-line); vertical-align: top; }
.tx2 .c { text-align: center; } .tx2 .r { text-align: right; } .tx2 .strong { font-weight: 700; }
.tx2-table tbody tr.filled { background: rgba(47,123,255,0.05); } .tx2-table tbody tr.bad { box-shadow: inset 3px 0 0 var(--tx-red); }
.tx2-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.tx2-table .w-no { width: 42px; } .tx2-table .w-name { min-width: 205px; } .tx2-table .w-unit { width: 106px; } .tx2-table .w-qty { width: 98px; } .tx2-table .w-price { width: 152px; }
.tx2-table .w-ppn { width: 126px; } .tx2-table .w-disc { width: 174px; } .tx2-table .w-total { width: 126px; } .tx2-table .w-act { width: 76px; } .tx2-table .w-cat { width: 112px; }
.tx2-table .w-stock { width: 112px; } .tx2-table .w-money { width: 106px; } .tx2-table .w-mk { width: 88px; }
.tx2-table-out .w-act { width: 56px; } .tx2-table-out .w-total { width: 118px; } .tx2-table-out .w-unit { width: 100px; } .tx2-table-out .w-qty { width: 92px; }
.tx2-table td:first-child { color: var(--tx-muted); padding-top: 16px; } .tx2-table td.r, .tx2-table td.c { padding-top: 16px; }
.tx2-total { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx2-stock { font-variant-numeric: tabular-nums; white-space: nowrap; } .tx2-stock.low { color: var(--tx-red); font-weight: 700; }
.tx2-pickcell { min-width: 0; }
.tx2-pickwrap { position: relative; } .tx2-pick { padding-left: 30px; } .tx2-pick-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--tx-muted); font-size: 1rem; pointer-events: none; }
.tx2-pick-hint, .tx2-rowerr { font-size: 0.72rem; color: var(--tx-red); margin-top: 3px; line-height: 1.25; } .tx2-pick-hint:empty, .tx2-rowerr:empty, .tx2-refhint:empty { display: none; }
.tx2-refhint { font-size: 0.7rem; color: var(--tx-muted); margin-top: 3px; text-align: right; } .tx2-refhint.diff { color: var(--tx-amber); }
.tx2-numwrap { position: relative; display: flex; align-items: center; min-width: 0; }
.tx2-numwrap .tx2-num { text-align: right; font-variant-numeric: tabular-nums; }
.tx2-pre { position: absolute; left: 10px; color: var(--tx-muted); font-size: 0.8rem; pointer-events: none; } .tx2-pre + .tx2-num { padding-left: 32px; }
.tx2-suf { position: absolute; right: 10px; color: var(--tx-muted); font-size: 0.8rem; pointer-events: none; } .tx2-num + .tx2-suf { }
.tx2-numwrap:has(.tx2-suf) .tx2-num { padding-right: 26px; }
.tx2-inline { display: flex; gap: 6px; align-items: center; min-width: 0; } .tx2-inline.wrap { flex-wrap: wrap; } .tx2-inline.c { justify-content: center; }
.tx2-mini { width: 64px; flex: 0 0 64px; } .tx2-ppncustom { width: 78px; flex: 0 0 78px; }
.tx2-iconbtn { width: 32px; height: 32px; border-radius: 8px; background: transparent; border: 1px solid transparent; color: var(--tx-muted); cursor: pointer; font-size: 0.95rem; }
.tx2-iconbtn:hover { background: rgba(255,255,255,0.06); } .tx2-iconbtn.danger { color: var(--tx-red); }
.tx2-dd { position: fixed; z-index: 1300; background: #0e1930; border: 1px solid #2a3d5f; border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,0.55); max-height: 270px; overflow-y: auto; }
.tx2-dd-opt { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 0.86rem; } .tx2-dd-opt.active, .tx2-dd-opt:hover { background: rgba(47,123,255,0.22); }
.tx2-dd-name { font-weight: 600; } .tx2-dd-cat { color: var(--tx-muted); font-size: 0.74rem; white-space: nowrap; } .tx2-dd-empty { padding: 12px; color: var(--tx-muted); font-size: 0.8rem; }
.tx2-bottom { display: grid; grid-template-columns: 1fr 1fr 330px; gap: 22px; align-items: start; }
.tx2-bcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-right: 8px; border-right: 1px solid var(--tx-line); }
.tx2-btitle { font-weight: 700; font-size: 0.9rem; } .tx2-btitle.sm { font-size: 0.8rem; color: #cdd9ef; margin-top: 4px; }
.tx2-seg { display: inline-flex; border: 1px solid #243653; border-radius: 9px; overflow: hidden; background: var(--tx-input); }
.tx2-segbtn { background: transparent; color: #c9d6ee; border: none; padding: 9px 14px; font-size: 0.8rem; font-weight: 700; cursor: pointer; white-space: nowrap; } .tx2-segbtn.on { background: linear-gradient(180deg, #3b86ff, #1f62ea); color: #fff; }
.tx2-check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8rem; color: #cdd9ef; cursor: pointer; } .tx2-check input { width: auto; margin-top: 2px; }
.tx2-sumbox { border: 1px solid var(--tx-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--tx-card2); }
.tx2-sumrow { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; color: #cdd9ef; font-variant-numeric: tabular-nums; } .tx2-sumrow.strong { font-weight: 700; }
.tx2-grand { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; padding: 11px 14px; border-radius: 10px; background: linear-gradient(180deg, rgba(47,123,255,0.28), rgba(30,94,230,0.18)); border: 1px solid #2f6df6; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tx2-grand span:last-child { white-space: nowrap; }
.tx2-barslot { min-width: 0; }
.tx2-bar.pinned { position: fixed; bottom: 0; z-index: 30; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.tx2-bar { z-index: 20; display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; background: var(--tx-card); border: 1px solid var(--tx-border); border-radius: 14px; padding: 12px 16px; box-shadow: 0 -6px 22px rgba(0,0,0,0.35); }
.tx2-status { display: flex; gap: 12px; align-items: center; flex: 1 1 280px; min-width: 0; } .tx2-status-ico { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
.tx2-status.ok .tx2-status-ico { background: rgba(34,197,94,0.18); color: var(--tx-green); } .tx2-status.bad .tx2-status-ico { background: rgba(240,85,106,0.18); color: var(--tx-red); }
.tx2-status-t { font-weight: 800; } .tx2-status.ok .tx2-status-t { color: var(--tx-green); } .tx2-status.bad .tx2-status-t { color: var(--tx-red); } .tx2-status-s { font-size: 0.78rem; color: var(--tx-muted); }
.tx2-status-line { font-size: 0.85rem; font-weight: 700; flex: 1 1 200px; min-width: 0; } .tx2-status-line.ok { color: var(--tx-green); } .tx2-status-line.bad { color: var(--tx-red); font-weight: 600; }
.tx2-bar-kv { display: flex; flex-direction: column; } .tx2-bar-k { font-size: 0.74rem; color: var(--tx-muted); } .tx2-bar-v { font-weight: 800; font-size: 1.05rem; } .tx2-bar-g { font-weight: 800; font-size: 1.35rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx2-bar-sp { flex: 1 1 10px; }
.tx2-next { padding: 11px 22px; border-radius: 10px; font-weight: 800; }
.tx2-markups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tx2-markup-empty { color: var(--tx-muted); font-size: 0.84rem; padding: 10px 2px; }
.tx2-mk { border: 1.5px solid; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.tx2-mk-head { display: flex; align-items: center; gap: 8px; font-weight: 800; } .tx2-mk-ico { font-size: 1.2rem; } .tx2-mk-src { margin-left: auto; font-size: 0.66rem; font-weight: 600; opacity: 0.8; border: 1px solid currentColor; border-radius: 999px; padding: 1px 7px; }
.tx2-mk.tone-blue { border-color: #2f7bff; background: rgba(47,123,255,0.1); } .tx2-mk.tone-blue .tx2-mk-head { color: #6aa2ff; }
.tx2-mk.tone-purple { border-color: #8b5cf6; background: rgba(139,92,246,0.1); } .tx2-mk.tone-purple .tx2-mk-head { color: #b79cff; }
.tx2-mk.tone-orange { border-color: #f59e0b; background: rgba(245,158,11,0.1); } .tx2-mk.tone-orange .tx2-mk-head { color: #fbbf24; }
.tx2-mk.tone-green { border-color: #22c55e; background: rgba(34,197,94,0.1); } .tx2-mk.tone-green .tx2-mk-head { color: #4ade80; }
.tx2-mk.tone-pink { border-color: #ec4899; background: rgba(236,72,153,0.1); } .tx2-mk.tone-pink .tx2-mk-head { color: #f472b6; }
.tx2-mk .tx2-seg { display: flex; } .tx2-mk .tx2-segbtn { flex: 1 1 0; }
.tx2-table td select.tx2-sel { min-width: 92px; }
.tx2-badge { display: inline-block; padding: 3px 11px; border-radius: 7px; font-size: 0.74rem; font-weight: 700; color: #fff; }
.tx2-badge.tone-blue { background: #2457c9; } .tx2-badge.tone-purple { background: #5b34b8; } .tx2-badge.tone-orange { background: #b86a09; } .tx2-badge.tone-green { background: #17803f; } .tx2-badge.tone-pink { background: #b0246f; }
.tx2-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 1.5fr; gap: 12px; margin-top: 10px; align-items: stretch; }
.tx2-tile { border: 1px solid var(--tx-border); border-radius: 12px; padding: 10px 14px; background: var(--tx-card2); min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.tx2-tile-k { font-size: 0.76rem; color: var(--tx-muted); } .tx2-tile-v { font-weight: 800; font-size: 1.05rem; white-space: nowrap; font-variant-numeric: tabular-nums; } .tx2-tile-s { font-size: 0.68rem; color: var(--tx-muted); }
.tx2-grandtile { border: 1.5px solid #2f6df6; border-radius: 12px; padding: 10px 16px; background: linear-gradient(180deg, rgba(47,123,255,0.28), rgba(30,94,230,0.15)); display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.tx2-grandtile .tx2-tile-k { color: #8fb8ff; font-weight: 700; } .tx2-grand-v { font-weight: 800; font-size: 1.6rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx2-bar-out .btn { white-space: nowrap; }
.tx2-histbtn { height: 38px; }
.tx2-reviewhead { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 18px; margin-bottom: 14px; }
.tx2-kv-k { font-size: 0.74rem; color: var(--tx-muted); } .tx2-kv-v { font-weight: 700; overflow-wrap: anywhere; }
.tx2-reviewtable { min-width: 0; } .tx2-reviewtable td, .tx2-reviewtable th { padding: 9px 10px; }
.tx2-reviewsum { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-top: 14px; } .tx2-reviewsum .tx2-sumbox { width: 340px; max-width: 100%; }
.tx2-rules { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; } .tx2-rules-k { font-size: 0.8rem; color: var(--tx-muted); } .tx2-rule { background: rgba(47,123,255,0.14); border: 1px solid rgba(47,123,255,0.4); border-radius: 999px; padding: 3px 12px; font-size: 0.78rem; font-weight: 700; }
.tx2-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.tx2-done .alert { margin-bottom: 14px; }
/* document drawer */
.drawer.drawer-tx { width: min(900px, 96vw); height: auto; top: 0; bottom: 0; max-height: 100%; }
@media (max-width: 900px) { .drawer.drawer-tx { width: 100vw; } }
.drawer.drawer-tx .drawer-header { flex: 0 0 auto; }
.drawer.drawer-tx .drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 10px; }
html.tx2-scroll-lock, body.tx2-scroll-lock { overflow: hidden; }
.tx2-dochead { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.tx2-doctabs { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.tx2-doctab { background: transparent; border: none; color: var(--text2); padding: 8px 16px; font-weight: 700; cursor: pointer; } .tx2-doctab.on { background: #2f7bff; color: #fff; }
.tx2-docframe { flex: 1 1 auto; min-height: 560px; width: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.tx2-docstatus { font-size: 0.8rem; color: var(--text2); } .tx2-docstatus.err { color: var(--tx-red, #f0556a); }
@media (max-width: 1400px) {
    .tx2-head-out { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .tx2-head { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tx2-head-out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx2-span3 { grid-column: span 2; }
    .tx2-bottom { grid-template-columns: 1fr 1fr; } .tx2-bottom .tx2-sumbox { grid-column: span 2; } .tx2-bcol { border-right: none; }
    .tx2-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tx2-grandtile { grid-column: span 2; }
    .tx2-steps { gap: 14px; }
}
@media (max-width: 640px) {
    .tx2-head, .tx2-head-out { grid-template-columns: minmax(0, 1fr); } .tx2-span3 { grid-column: span 1; }
    .tx2-bottom { grid-template-columns: minmax(0, 1fr); } .tx2-bottom .tx2-sumbox { grid-column: span 1; }
    .tx2-tiles { grid-template-columns: minmax(0, 1fr); } .tx2-grandtile { grid-column: span 1; }
    .tx2-tab { padding: 9px 16px; } .tx2-bar { gap: 10px; } .tx2-next { width: 100%; }
}

/* UI2 — collapsible sidebar rail (sidebar.js). Presentation only: .sidebar-collapsed is toggled by the
   header button (and by default <=1100px); links, groups, role visibility and routing are untouched.
   Expanded: 232px (216px <=1200px). Rail: 68px, icons only, tooltips on hover/focus, group headers
   open a flyout. Width animates 180ms; the content area is a flex:1 sibling so it follows. */
.sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 34px; font-size: 1.1rem; line-height: 1; }
.sidebar { width: 232px; overflow-x: hidden; transition: width 0.18s ease, transform 0.2s; }
.sidebar-link, .sidebar-group-header { transition: background 0.15s, color 0.15s, padding 0.18s; }
.sidebar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sidebar-tip { position: fixed; z-index: 1000; transform: translateY(-50%); pointer-events: none; background: #0b1020; color: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,0.45); }
.sidebar-tip[hidden] { display: none; }
@media (max-width: 1200px) { .sidebar { width: 216px; } }
@media (max-width: 900px) { .sidebar { width: min(280px, 86vw); } }

@media (min-width: 901px) {
    .sidebar { z-index: 40; } /* the flyout lives inside the sidebar's stacking context and must paint over the page cards */
    .sidebar.sidebar-collapsed { width: 68px; }
    .sidebar-collapsed .sidebar-group, .sidebar-collapsed .sidebar-group-static { padding: 4px 8px; }
    .sidebar-collapsed .sidebar-group-static { padding-top: 10px; }
    .sidebar-collapsed .sidebar-group-static > .sidebar-group-label { display: none; }
    .sidebar-collapsed .sidebar-link { justify-content: center; padding: 10px 0; font-size: 0; gap: 0; }
    .sidebar-collapsed .sidebar-link .icon { width: auto; font-size: 1.2rem; }
    .sidebar-collapsed .sidebar-link.active { box-shadow: inset 3px 0 0 var(--accent); }
    .sidebar-collapsed .sidebar-group-header { justify-content: center; padding: 10px 0; position: relative; }
    .sidebar-collapsed .sidebar-group-header .sidebar-group-label, .sidebar-collapsed .sidebar-group-header .accordion-arrow { display: none; }
    .sidebar-collapsed .sidebar-group-header::before { font-size: 1.2rem; line-height: 1; content: "\1F4C1"; }
    .sidebar-collapsed .sidebar-group-header::after { content: "\203A"; position: absolute; right: 7px; bottom: 5px; font-size: 0.8rem; line-height: 1; color: var(--text3); }
    .sidebar-collapsed [data-group="laporan"] > .sidebar-group-header::before { content: "\1F4CA"; }
    .sidebar-collapsed [data-group="inventory"] > .sidebar-group-header::before { content: "\1F4E6"; }
    .sidebar-collapsed [data-group="transactions"] > .sidebar-group-header::before { content: "\1F504"; }
    .sidebar-collapsed [data-group="transfers"] > .sidebar-group-header::before { content: "\1F69A"; }
    .sidebar-collapsed [data-group="distribusi-bakery"] > .sidebar-group-header::before { content: "\1F69B"; }
    .sidebar-collapsed [data-group="production"] > .sidebar-group-header::before { content: "\1F3ED"; }
    .sidebar-collapsed [data-group="opname"] > .sidebar-group-header::before { content: "\1F4CB"; }
    .sidebar-collapsed [data-group="master-data"] > .sidebar-group-header::before { content: "\1F5C2\FE0F"; }
    .sidebar-collapsed [data-group="audit-control"] > .sidebar-group-header::before { content: "\1F6E1\FE0F"; }
    .sidebar-collapsed [data-group="settings"] > .sidebar-group-header::before { content: "\2699\FE0F"; }
    /* parent that contains the active page, and the parent whose flyout is open */
    .sidebar-collapsed .sidebar-group.has-active > .sidebar-group-header,
    .sidebar-collapsed .sidebar-group.flyout > .sidebar-group-header { background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(99,102,241,0.18)); box-shadow: inset 3px 0 0 var(--accent); }
    /* nested menus never expand inline in the rail; they open as a flyout next to it */
    .sidebar-collapsed .sidebar-group-collapsible:not(.flyout) > .sidebar-submenu { display: none; }
    .sidebar-collapsed .sidebar-group.flyout > .sidebar-submenu,
    .sidebar-collapsed .sidebar-group.flyout > .sidebar-submenu[hidden] {
        display: flex; position: fixed; z-index: 950; min-width: 240px; max-width: 300px; max-height: calc(100vh - 16px); overflow-y: auto;
        background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 6px; gap: 2px; box-shadow: 0 10px 34px rgba(0,0,0,0.55);
    }
    .sidebar-collapsed .sidebar-group.flyout > .sidebar-submenu .sidebar-link { justify-content: flex-start; padding: 9px 12px; font-size: 0.85rem; gap: 10px; }
    .sidebar-collapsed .sidebar-group.flyout > .sidebar-submenu .sidebar-link .icon { font-size: 1rem; width: 18px; }
    .sidebar-collapsed .sidebar-group.flyout > .sidebar-submenu .sidebar-link.active { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .sidebar-link, .sidebar-group-header { transition: none; } }

/* Master Data compact create modal (master-common.js: pageHeader + recordModal) — presentation only. Page header with a
   compact primary button top-right; a small centered modal (internal scroll only when long) with 2-column compact fields,
   field-level errors, a green/gray switch for Status, Batal / Simpan footer. Uses the existing tokens, no new palette. */
.mdm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mdm-head-text { min-width: 0; }
.mdm-title { font-size: 1.35rem; font-weight: 800; line-height: 1.2; margin: 0; }
.mdm-desc { margin: 4px 0 0; font-size: 0.85rem; color: var(--text2); }
.mdm-add { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
body.mdm-lock { overflow: hidden; }
.mdm-overlay { padding: 12px; }
.modal-content.mdm-modal { padding: 0; width: 100%; max-width: 480px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.55); }
.modal-content.mdm-modal.mdm-wide { max-width: 640px; }
.mdm-modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.mdm-modal-head h3 { margin: 0; font-size: 1.02rem; font-weight: 800; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.mdm-modal-ico { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #f59e0b, #ea7a12); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; flex: 0 0 auto; }
.mdm-x { background: transparent; border: none; color: var(--text2); font-size: 1.5rem; line-height: 1; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.mdm-x:hover { background: var(--bg3); color: var(--text); }
.mdm-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.mdm-body { padding: 12px 16px 4px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.mdm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.mdm-field { min-width: 0; }
.mdm-field:has(textarea), .mdm-field.mdm-full { grid-column: 1 / -1; }
.mdm-label { display: block; font-size: 0.74rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); margin-bottom: 4px; }
.mdm-req { color: #ff6b6b; }
.mdm-modal input[type="text"], .mdm-modal input[type="email"], .mdm-modal select, .mdm-modal textarea { width: 100%; padding: 7px 10px; font-size: 0.85rem; border-radius: 8px; min-height: 34px; }
.mdm-modal textarea { resize: vertical; min-height: 64px; }
.mdm-modal .invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239,68,68,0.18); }
.mdm-err { margin-top: 4px; font-size: 0.74rem; color: #ff7b7b; }
.mdm-hint { margin-top: 4px; font-size: 0.72rem; color: var(--text3); }
.mdm-form-error { margin: 10px 0 4px; font-size: 0.82rem; }
.mdm-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--border); flex: 0 0 auto; }
.mdm-btn { min-width: 88px; padding: 8px 18px; font-size: 0.85rem; font-weight: 700; }
.mdm-switch { display: inline-flex; align-items: center; gap: 8px; position: relative; min-height: 34px; cursor: pointer; }
.mdm-switch-input { position: absolute; opacity: 0; width: 38px; height: 22px; margin: 0; cursor: pointer; z-index: 1; }
.mdm-switch-track { width: 38px; height: 22px; border-radius: 22px; background: #3a4562; position: relative; transition: background 0.15s; flex: 0 0 auto; }
.mdm-switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.mdm-switch-input:checked + .mdm-switch-track { background: #2f7bff; }
.mdm-switch-input:checked + .mdm-switch-track::after { transform: translateX(16px); }
.mdm-switch-input:focus-visible + .mdm-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.mdm-switch-text { font-size: 0.85rem; color: var(--text); }
@media (max-width: 560px) {
    .mdm-grid { grid-template-columns: minmax(0, 1fr); }
    .mdm-title { font-size: 1.15rem; }
    .mdm-head { align-items: center; }
    .mdm-overlay { padding: 8px; align-items: flex-end; }
    .modal-content.mdm-modal { border-radius: 14px 14px 10px 10px; }
}

/* Pergerakan Stok Harian redesign (report-movement.js) — presentation only. Same refined type scale as the Dashboard
   (KPI 1.5-1.8rem, body 0.82-0.9rem), dark Inventory Pro tokens, tone colours: blue = opening, green = in, red = out,
   amber = adjustment, purple = closing. Wide item table scrolls horizontally with a sticky header + two sticky identity columns. */
.mvr { --mvr-kpi: 1.55rem; --mvr-gap: 10px; display: flex; flex-direction: column; gap: var(--mvr-gap); min-width: 0; }
.mvr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mvr-title { font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.2; }
.mvr-desc { margin: 4px 0 0; font-size: 0.82rem; color: var(--text2); max-width: 70ch; }
.mvr-export { position: relative; }
.mvr-export-btn { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; }
.mvr-export-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 300px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); padding: 6px; display: flex; flex-direction: column; }
.mvr-export-menu[hidden] { display: none; }
.mvr-export-item { background: none; border: none; color: var(--text); text-align: left; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 0.82rem; }
.mvr-export-item:hover { background: var(--bg3); }
.mvr-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.mvr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.mvr-card-title { font-size: 1.02rem; font-weight: 800; }
.mvr-card-sub { font-size: 0.8rem; font-weight: 400; color: var(--text2); }
.mvr-hint { font-size: 0.76rem; color: var(--text3); }
.mvr-filters { display: flex; flex-direction: column; gap: 10px; }
.mvr-filter-grid { display: grid; grid-template-columns: minmax(250px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.mvr-f label { display: block; font-size: 0.74rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); margin-bottom: 4px; }
.mvr-f input, .mvr-f select, .mvr-input { width: 100%; padding: 7px 10px; font-size: 0.85rem; min-height: 34px; border-radius: 8px; }
.mvr-dates { display: flex; align-items: center; gap: 8px; }
.mvr-dates input { flex: 1 1 0; min-width: 0; }
.mvr-filter-row2 { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.mvr-toggle-wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.mvr-toggle-label { font-size: 0.8rem; font-weight: 600; }
.mvr-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--bg2); }
.mvr-seg-btn { background: transparent; border: none; color: var(--text2); padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.mvr-seg-btn.on { background: linear-gradient(180deg, #3b86ff, #1f62ea); color: #fff; }
.mvr-quick { display: inline-flex; gap: 6px; }
.mvr-quick-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 8px; padding: 5px 11px; font-size: 0.76rem; cursor: pointer; }
.mvr-quick-btn:hover { color: var(--text); border-color: #3b82f6; }
.mvr-filter-actions { display: flex; gap: 8px; }
.mvr-filter-actions .btn { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; }
.mvr-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--mvr-gap); }
.mvr-kpi { border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 13px; min-width: 0; background: var(--card); position: relative; }
.mvr-kpi.click { cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.mvr-kpi.click:hover { transform: translateY(-1px); }
.mvr-kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mvr-kpi-label { font-size: 0.9rem; font-weight: 700; }
.mvr-kpi-value { font-size: var(--mvr-kpi); font-weight: 800; line-height: 1.2; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mvr-kpi-sub { font-size: 0.74rem; color: var(--text2); overflow-wrap: anywhere; line-height: 1.3; }
.mvr-kpi.tone-blue { background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(23,35,70,0.9)); border-color: rgba(59,130,246,0.7); } .mvr-kpi.tone-blue .mvr-kpi-label { color: #7fb1ff; }
.mvr-kpi.tone-green { background: linear-gradient(135deg, rgba(22,163,74,0.22), rgba(16,45,40,0.9)); border-color: rgba(34,197,94,0.6); } .mvr-kpi.tone-green .mvr-kpi-label { color: #4ade80; }
.mvr-kpi.tone-red { background: linear-gradient(135deg, rgba(220,38,38,0.24), rgba(56,22,32,0.9)); border-color: rgba(239,68,68,0.65); } .mvr-kpi.tone-red .mvr-kpi-label { color: #ff7b7b; }
.mvr-kpi.tone-amber { background: linear-gradient(135deg, rgba(217,119,6,0.24), rgba(58,40,20,0.9)); border-color: rgba(245,158,11,0.6); } .mvr-kpi.tone-amber .mvr-kpi-label { color: #fbbf24; }
.mvr-kpi.tone-purple { background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(36,24,70,0.9)); border-color: rgba(139,92,246,0.65); } .mvr-kpi.tone-purple .mvr-kpi-label { color: #b794ff; }
.mvr-loading, .mvr-empty { padding: 18px; text-align: center; color: var(--text2); font-size: 0.85rem; grid-column: 1 / -1; }
.mvr-chart-wrap { position: relative; }
.mvr-svg { width: 100%; height: auto; max-height: 300px; display: block; }
.mvr-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; }
.mvr-axis { fill: var(--text3); font-size: 11px; }
.mvr-bar-in { fill: #22c55e; } .mvr-bar-out { fill: #ef4444; }
.mvr-line-open { stroke: #2f7bff; stroke-width: 2; opacity: 0.8; } .mvr-line-close { stroke: #8b5cf6; stroke-width: 2; } .mvr-dot-close { fill: #8b5cf6; }
.mvr-hit { cursor: pointer; } .mvr-hit:hover { fill: rgba(255,255,255,0.05); }
.mvr-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #0b1020; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.74rem; pointer-events: none; z-index: 5; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.mvr-tip[hidden] { display: none; }
.mvr-chart-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 0.76rem; color: var(--text2); margin-top: 4px; }
.mvr-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.mvr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.mvr-scroll.mvr-wide { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.mvr-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.mvr-table th, .mvr-table td { padding: 7px 9px; border-bottom: 1px solid rgba(42,51,72,0.7); text-align: left; white-space: nowrap; }
.mvr-table th { color: #dbe3f5; font-weight: 600; font-size: 0.76rem; background: #131a2b; position: sticky; top: 0; z-index: 3; }
.mvr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mvr-table tbody tr.click { cursor: pointer; } .mvr-table tbody tr.click:hover { background: rgba(255,255,255,0.04); }
.mvr-table tr.sel { background: rgba(37,99,235,0.28); outline: 1px solid rgba(59,130,246,0.7); }
.mvr-table tr.pre td { color: var(--text3); } .mvr-table tr.bad td { box-shadow: inset 3px 0 0 #ef4444; }
.mvr-table .in { color: #4ade80; } .mvr-table .out { color: #ff7b7b; } .mvr-table .adj { color: #fbbf24; }
.mvr-table tr.internal td { opacity: 0.65; }
.mvr-trail-table { font-size: 0.77rem; }
.mvr-trail-table th, .mvr-trail-table td { white-space: normal; padding: 6px 5px; vertical-align: top; }
.mvr-trail-table td:first-child, .mvr-trail-table td.num { white-space: nowrap; }
.mvr-trail-table td:last-child { min-width: 120px; }
.mvr-table tfoot td { position: sticky; bottom: 0; background: #17213a; font-weight: 800; border-top: 2px solid var(--border); z-index: 2; }
.mvr-items th.sticky1, .mvr-items td.sticky1 { position: sticky; left: 0; z-index: 4; background: #0f1626; min-width: 92px; }
.mvr-items th.sticky2, .mvr-items td.sticky2 { position: sticky; left: 92px; z-index: 4; background: #0f1626; min-width: 170px; box-shadow: 2px 0 0 rgba(255,255,255,0.06); }
.mvr-items th.sticky1, .mvr-items th.sticky2 { z-index: 5; background: #131a2b; }
.mvr-items tfoot td.sticky1, .mvr-items tfoot td.sticky2 { background: #17213a; z-index: 5; }
.mvr-items th[data-sort] { cursor: pointer; }
.mvr-eye { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; width: 34px; height: 28px; cursor: pointer; color: var(--text); }
.mvr-eye:disabled { opacity: 0.35; cursor: default; }
.mvr-warn { color: #ef4444; }
.mvr-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 0.78rem; color: var(--text2); }
.mvr-pager-nav { display: inline-flex; gap: 4px; align-items: center; }
.mvr-pg { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 7px; min-width: 30px; height: 28px; cursor: pointer; font-size: 0.78rem; }
.mvr-pg.on { background: #2f7bff; border-color: #2f7bff; color: #fff; } .mvr-pg:disabled { opacity: 0.4; cursor: default; }
.mvr-pg-gap { color: var(--text3); padding: 0 4px; }
.mvr-item-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.mvr-item-filters .mvr-input { width: auto; min-width: 170px; flex: 0 1 220px; }
.mvr-check { font-size: 0.8rem; color: var(--text2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-transform: none; letter-spacing: 0; margin: 0; }
.mvr-check input { width: auto; }
.mvr-unitline { font-size: 0.76rem; color: var(--text2); margin-top: 8px; overflow-wrap: anywhere; }
.mvr-legend { font-size: 0.74rem; color: var(--text3); line-height: 1.5; padding: 2px 4px 10px; }
.mvr-drawer-sum, .mvr-trail-head { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.82rem; padding: 8px 2px 12px; color: var(--text2); }
.drawer.mvr-drawer { width: min(1180px, 100vw); }
@media (max-width: 1400px) { .mvr { --mvr-kpi: 1.4rem; } }
@media (max-width: 1200px) { .mvr { --mvr-kpi: 1.25rem; --mvr-gap: 8px; } .mvr-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mvr-kpi-label { font-size: 0.82rem; } .mvr-kpi-sub { font-size: 0.7rem; } }
@media (max-width: 900px) { .mvr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mvr-kpi:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .mvr { --mvr-kpi: 1.15rem; } .mvr-filter-grid { grid-template-columns: minmax(0, 1fr); } .mvr-title { font-size: 1.15rem; } .mvr-filter-actions { width: 100%; } .mvr-filter-actions .btn { flex: 1; } .mvr-export-menu { min-width: 250px; } }

/* === SOA V2 AUDIT REPORT UI 20261007 === */

/* ---------------------------------------------------------
   Laporan Stock Opname — Audit Redesign
   Presentation only. Tidak mengubah data / API / calculation.
   --------------------------------------------------------- */

#tab-laporan-opname {
    width: 100%;
    max-width: 100%;
}

/* PAGE / HEADER */
#tab-laporan-opname [class^="soa-"],
#tab-laporan-opname [class*=" soa-"] {
    box-sizing: border-box;
}

#tab-laporan-opname .soa-title {
    margin: 0;
    font-size: clamp(24px, 2vw, 32px);
    line-height: 1.18;
    font-weight: 750;
    letter-spacing: -0.02em;
}

#tab-laporan-opname .soa-sub {
    margin-top: 6px;
    color: var(--text2, #94a3b8);
    line-height: 1.5;
    max-width: 980px;
}

/* GENERIC SOA CARDS */
#tab-laporan-opname [class*="soa-card"],
#tab-laporan-opname [class*="soa-panel"],
#tab-laporan-opname [class*="soa-filter"] {
    border: 1px solid var(--border, #273449);
    background: var(--surface, #131c2b);
    border-radius: 14px;
}

/* FILTER AREA */
#tab-laporan-opname [class*="soa-filter"] {
    margin-top: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

#tab-laporan-opname [class*="soa-filter"] > * {
    min-width: 0;
}

#tab-laporan-opname [class*="soa-field"],
#tab-laporan-opname [class*="soa-filter"] label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#tab-laporan-opname [class*="soa-filter"] label,
#tab-laporan-opname [class*="soa-label"] {
    color: var(--text2, #94a3b8);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .035em;
}

#tab-laporan-opname input,
#tab-laporan-opname select {
    width: 100%;
    min-height: 42px;
    border-radius: 9px;
    border: 1px solid var(--border, #2c3a50);
    background: var(--surface2, #1b2638);
    color: var(--text, #e5e7eb);
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
}

#tab-laporan-opname input:focus,
#tab-laporan-opname select:focus {
    border-color: #5577ff;
    box-shadow: 0 0 0 3px rgba(85,119,255,.13);
}

/* BUTTONS */
#tab-laporan-opname button {
    font: inherit;
}

#tab-laporan-opname .soa-viewbar {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* SEGMENTED CONTROL */
#tab-laporan-opname .soa-seg {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    gap: 4px;
    background: var(--surface2, #1b2638);
    border: 1px solid var(--border, #2c3a50);
    border-radius: 10px;
}

#tab-laporan-opname .soa-seg-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text2, #94a3b8);
    border-radius: 7px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

#tab-laporan-opname .soa-seg-btn:hover {
    color: var(--text, #f8fafc);
    background: rgba(255,255,255,.04);
}

#tab-laporan-opname .soa-seg-btn.on {
    background: #3f66f3;
    color: #fff;
    box-shadow: 0 2px 8px rgba(63,102,243,.22);
}

/* KPI GRID */
#tab-laporan-opname [class*="soa-kpis"],
#tab-laporan-opname [class*="soa-kpi-grid"],
#tab-laporan-opname [class*="soa-summary"] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

#tab-laporan-opname [class*="soa-kpi"] {
    min-width: 0;
    min-height: 108px;
    padding: 15px 16px;
    border-radius: 12px;
    border: 1px solid var(--border, #273449);
    background: linear-gradient(
        180deg,
        rgba(255,255,255,.025),
        rgba(255,255,255,.008)
    ), var(--surface, #131c2b);
}

#tab-laporan-opname [class*="soa-kpi"] > :first-child {
    color: var(--text2, #94a3b8);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
}

#tab-laporan-opname [class*="soa-kpi"] > :nth-child(2) {
    margin-top: 8px;
    font-size: clamp(21px, 2vw, 28px);
    line-height: 1.1;
    font-weight: 750;
    color: var(--text, #f8fafc);
}

#tab-laporan-opname [class*="soa-kpi"] > :nth-child(n+3) {
    margin-top: 5px;
    color: var(--text2, #94a3b8);
    font-size: 12px;
    line-height: 1.4;
}

/* CONDITION CARDS */
#tab-laporan-opname [class*="soa-condition"],
#tab-laporan-opname [class*="soa-cond"] {
    padding: 14px 15px;
    border-radius: 12px;
    border: 1px solid var(--border, #273449);
    background: var(--surface, #131c2b);
}

/* TABLE WRAPPER */
#tab-laporan-opname .soa-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
    border: 1px solid var(--border, #273449);
    border-radius: 12px;
    background: var(--surface, #131c2b);
}

#tab-laporan-opname .soa-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

#tab-laporan-opname .soa-table.soa-wide {
    min-width: 1500px;
}

#tab-laporan-opname .soa-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 11px 12px;
    text-align: left;
    background: var(--surface2, #1b2638);
    color: var(--text2, #94a3b8);
    border-bottom: 1px solid var(--border, #273449);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .035em;
    white-space: nowrap;
}

#tab-laporan-opname .soa-table td {
    padding: 11px 12px;
    color: var(--text, #e5e7eb);
    border-bottom: 1px solid rgba(148,163,184,.10);
    vertical-align: top;
    line-height: 1.4;
}

#tab-laporan-opname .soa-table tbody tr {
    transition: background .15s ease;
}

#tab-laporan-opname .soa-table tbody tr:hover {
    background: rgba(85,119,255,.055);
}

#tab-laporan-opname .soa-table tbody tr:last-child td {
    border-bottom: 0;
}

/* ITEM DETAIL */
#tab-laporan-opname .soa-items {
    margin-top: 14px;
}

#tab-laporan-opname .soa-unitline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--text2, #94a3b8);
    font-size: 12px;
    line-height: 1.45;
}

/* EVIDENCE / THUMBNAILS */
#tab-laporan-opname .soa-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#tab-laporan-opname .soa-thumb {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border, #273449);
    background: var(--surface2, #1b2638);
}

#tab-laporan-opname .soa-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BADGES / STATUS */
#tab-laporan-opname [class*="soa-badge"],
#tab-laporan-opname [class*="soa-status"] {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(85,119,255,.12);
    border: 1px solid rgba(85,119,255,.25);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* DRAWER / OVERLAY */
#tab-laporan-opname [class*="soa-drawer"] {
    background: var(--surface, #131c2b);
}

#tab-laporan-opname [class*="soa-overlay"] {
    backdrop-filter: blur(3px);
}

/* EMPTY / MUTED */
#tab-laporan-opname [class*="soa-muted"],
#tab-laporan-opname [class*="soa-empty"] {
    color: var(--text2, #94a3b8);
}

/* LONG TEXT */
#tab-laporan-opname td,
#tab-laporan-opname [class*="soa-note"] {
    overflow-wrap: anywhere;
}

/* RESPONSIVE */
@media (max-width: 1180px) {
    #tab-laporan-opname [class*="soa-kpis"],
    #tab-laporan-opname [class*="soa-kpi-grid"],
    #tab-laporan-opname [class*="soa-summary"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tab-laporan-opname [class*="soa-filter"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    #tab-laporan-opname [class*="soa-kpis"],
    #tab-laporan-opname [class*="soa-kpi-grid"],
    #tab-laporan-opname [class*="soa-summary"],
    #tab-laporan-opname [class*="soa-filter"] {
        grid-template-columns: 1fr;
    }

    #tab-laporan-opname [class*="soa-kpi"] {
        min-height: 92px;
    }

    #tab-laporan-opname .soa-viewbar {
        align-items: stretch;
        flex-direction: column;
    }

    #tab-laporan-opname .soa-seg {
        width: 100%;
    }

    #tab-laporan-opname .soa-seg-btn {
        flex: 1 1 0;
        text-align: center;
    }
}
/* === END SOA V2 AUDIT REPORT UI === */

/* ===== RV3 BLOCK pur 20261008 BEGIN ===== */
/* Laporan Pembelian redesign (report-purchase.js) — presentation only. Same refined type scale as the Dashboard / Pergerakan Stok reports (KPI 1.4-1.6rem, body 0.8-0.9rem),
   dark Inventory Pro tokens. Invoice + item tables scroll horizontally inside their own container with a sticky header and a sticky GRAND TOTAL row. */
.pur { --pur-kpi: 1.55rem; --pur-gap: 10px; display: flex; flex-direction: column; gap: var(--pur-gap); min-width: 0; }
.pur-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pur-title { font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.2; }
.pur-desc { margin: 4px 0 0; font-size: 0.82rem; color: var(--text2); max-width: 70ch; }
.pur-export { position: relative; }
.pur-export-btn { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; }
.pur-export-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 300px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); padding: 6px; display: flex; flex-direction: column; }
.pur-export-menu[hidden] { display: none; }
.pur-export-item { background: none; border: none; color: var(--text); text-align: left; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 0.82rem; }
.pur-export-item:hover { background: var(--bg3); }
.pur-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.pur-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.pur-card-title { font-size: 1.02rem; font-weight: 800; }
.pur-card-sub { font-size: 0.8rem; font-weight: 400; color: var(--text2); }
.pur-hint { font-size: 0.76rem; color: var(--text3); }
.pur-filters { display: flex; flex-direction: column; gap: 10px; }
.pur-filter-grid { display: grid; grid-template-columns: minmax(250px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.pur-f label { display: block; font-size: 0.74rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); margin-bottom: 4px; }
.pur-f input, .pur-f select, .pur-input { width: 100%; padding: 7px 10px; font-size: 0.85rem; min-height: 34px; border-radius: 8px; }
.pur-dates { display: flex; align-items: center; gap: 8px; }
.pur-dates input { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 6px; font-size: 13px; }
.pur-filter-row2 { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.pur-toggle-wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.pur-toggle-label { font-size: 0.8rem; font-weight: 600; }
.pur-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--bg2); }
.pur-seg-btn { background: transparent; border: none; color: var(--text2); padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.pur-seg-btn.on { background: linear-gradient(180deg, #3b86ff, #1f62ea); color: #fff; }
.pur-quick { display: inline-flex; gap: 6px; }
.pur-quick-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 8px; padding: 5px 11px; font-size: 0.76rem; cursor: pointer; }
.pur-quick-btn:hover { color: var(--text); border-color: #3b82f6; }
.pur-filter-actions { display: flex; gap: 8px; }
.pur-filter-actions .btn { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; }
.pur-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--pur-gap); }
.pur-kpi { border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 13px; min-width: 0; background: var(--card); position: relative; }
.pur-kpi.click { cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.pur-kpi.click:hover { transform: translateY(-1px); }
.pur-kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pur-kpi-label { font-size: 0.9rem; font-weight: 700; }
.pur-kpi-value { font-size: var(--pur-kpi); font-weight: 800; line-height: 1.2; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pur-kpi-sub { font-size: 0.74rem; color: var(--text2); overflow-wrap: anywhere; line-height: 1.3; }
.pur-kpi.tone-blue { background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(23,35,70,0.9)); border-color: rgba(59,130,246,0.7); } .pur-kpi.tone-blue .pur-kpi-label { color: #7fb1ff; }
.pur-kpi.tone-green { background: linear-gradient(135deg, rgba(22,163,74,0.22), rgba(16,45,40,0.9)); border-color: rgba(34,197,94,0.6); } .pur-kpi.tone-green .pur-kpi-label { color: #4ade80; }
.pur-kpi.tone-red { background: linear-gradient(135deg, rgba(220,38,38,0.24), rgba(56,22,32,0.9)); border-color: rgba(239,68,68,0.65); } .pur-kpi.tone-red .pur-kpi-label { color: #ff7b7b; }
.pur-kpi.tone-amber { background: linear-gradient(135deg, rgba(217,119,6,0.24), rgba(58,40,20,0.9)); border-color: rgba(245,158,11,0.6); } .pur-kpi.tone-amber .pur-kpi-label { color: #fbbf24; }
.pur-kpi.tone-purple { background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(36,24,70,0.9)); border-color: rgba(139,92,246,0.65); } .pur-kpi.tone-purple .pur-kpi-label { color: #b794ff; }
.pur-loading, .pur-empty { padding: 18px; text-align: center; color: var(--text2); font-size: 0.85rem; grid-column: 1 / -1; }
.pur-chart-wrap { position: relative; }
.pur-svg { width: 100%; height: auto; max-height: 300px; display: block; }
.pur-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; }
.pur-axis { fill: var(--text3); font-size: 11px; }
.pur-bar-in { fill: #22c55e; } .pur-bar-out { fill: #ef4444; }
.pur-line-open { stroke: #2f7bff; stroke-width: 2; opacity: 0.8; } .pur-line-close { stroke: #8b5cf6; stroke-width: 2; } .pur-dot-close { fill: #8b5cf6; }
.pur-hit { cursor: pointer; } .pur-hit:hover { fill: rgba(255,255,255,0.05); }
.pur-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #0b1020; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.74rem; pointer-events: none; z-index: 5; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.pur-tip[hidden] { display: none; }
.pur-chart-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 0.76rem; color: var(--text2); margin-top: 4px; }
.pur-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.pur-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.pur-scroll.pur-wide { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.pur-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.pur-table th, .pur-table td { padding: 7px 9px; border-bottom: 1px solid rgba(42,51,72,0.7); text-align: left; white-space: nowrap; }
.pur-table th { color: #dbe3f5; font-weight: 600; font-size: 0.76rem; background: #131a2b; position: sticky; top: 0; z-index: 3; }
.pur-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pur-table tbody tr.click { cursor: pointer; } .pur-table tbody tr.click:hover { background: rgba(255,255,255,0.04); }
.pur-table tr.sel { background: rgba(37,99,235,0.28); outline: 1px solid rgba(59,130,246,0.7); }
.pur-table tr.pre td { color: var(--text3); } .pur-table tr.bad td { box-shadow: inset 3px 0 0 #ef4444; }
.pur-table .in { color: #4ade80; } .pur-table .out { color: #ff7b7b; } .pur-table .adj { color: #fbbf24; }
.pur-table tr.internal td { opacity: 0.65; }
.pur-trail-table { font-size: 0.77rem; }
.pur-trail-table th, .pur-trail-table td { white-space: normal; padding: 6px 5px; vertical-align: top; }
.pur-trail-table td:first-child, .pur-trail-table td.num { white-space: nowrap; }
.pur-trail-table td:last-child { min-width: 120px; }
.pur-table tfoot td { position: sticky; bottom: 0; background: #17213a; font-weight: 800; border-top: 2px solid var(--border); z-index: 2; }
.pur-items th.sticky1, .pur-items td.sticky1 { position: sticky; left: 0; z-index: 4; background: #0f1626; min-width: 92px; }
.pur-items th.sticky2, .pur-items td.sticky2 { position: sticky; left: 92px; z-index: 4; background: #0f1626; min-width: 170px; box-shadow: 2px 0 0 rgba(255,255,255,0.06); }
.pur-items th.sticky1, .pur-items th.sticky2 { z-index: 5; background: #131a2b; }
.pur-items tfoot td.sticky1, .pur-items tfoot td.sticky2 { background: #17213a; z-index: 5; }
.pur-items th[data-sort] { cursor: pointer; }
.pur-eye { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; width: 34px; height: 28px; cursor: pointer; color: var(--text); }
.pur-eye:disabled { opacity: 0.35; cursor: default; }
.pur-warn { color: #ef4444; }
.pur-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 0.78rem; color: var(--text2); }
.pur-pager-nav { display: inline-flex; gap: 4px; align-items: center; }
.pur-pg { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 7px; min-width: 30px; height: 28px; cursor: pointer; font-size: 0.78rem; }
.pur-pg.on { background: #2f7bff; border-color: #2f7bff; color: #fff; } .pur-pg:disabled { opacity: 0.4; cursor: default; }
.pur-pg-gap { color: var(--text3); padding: 0 4px; }
.pur-item-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pur-item-filters .pur-input { width: auto; min-width: 170px; flex: 0 1 220px; }
.pur-check { font-size: 0.8rem; color: var(--text2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-transform: none; letter-spacing: 0; margin: 0; }
.pur-check input { width: auto; }
.pur-unitline { font-size: 0.76rem; color: var(--text2); margin-top: 8px; overflow-wrap: anywhere; }
.pur-legend { font-size: 0.74rem; color: var(--text3); line-height: 1.5; padding: 2px 4px 10px; }
.pur-drawer-sum, .pur-trail-head { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.82rem; padding: 8px 2px 12px; color: var(--text2); }
.drawer.pur-drawer { width: min(1180px, 100vw); }
@media (max-width: 1400px) { .pur { --pur-kpi: 1.4rem; } }
@media (max-width: 1200px) { .pur { --pur-kpi: 1.25rem; --pur-gap: 8px; } .pur-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pur-kpi-label { font-size: 0.82rem; } .pur-kpi-sub { font-size: 0.7rem; } }
@media (max-width: 900px) { .pur-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pur-kpi:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .pur { --pur-kpi: 1.15rem; } .pur-filter-grid { grid-template-columns: minmax(0, 1fr); } .pur-title { font-size: 1.15rem; } .pur-filter-actions { width: 100%; } .pur-filter-actions .btn { flex: 1; } .pur-export-menu { min-width: 250px; } }

.pur-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } .pur-kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pur-kpi.teal { background: linear-gradient(135deg, rgba(13,148,136,0.22), rgba(14,42,48,0.9)); border-color: rgba(45,212,191,0.55); } .pur-kpi.teal .pur-kpi-label { color: #5eead4; }
.pur-kpi.indigo { background: linear-gradient(135deg, rgba(99,102,241,0.24), rgba(30,32,72,0.9)); border-color: rgba(129,140,248,0.6); } .pur-kpi.indigo .pur-kpi-label { color: #a5b4fc; }
.pur-kpi.blue { background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(23,35,70,0.9)); border-color: rgba(59,130,246,0.7); } .pur-kpi.blue .pur-kpi-label { color: #7fb1ff; }
.pur-kpi.green { background: linear-gradient(135deg, rgba(22,163,74,0.22), rgba(16,45,40,0.9)); border-color: rgba(34,197,94,0.6); } .pur-kpi.green .pur-kpi-label { color: #4ade80; }
.pur-kpi.amber { background: linear-gradient(135deg, rgba(217,119,6,0.24), rgba(58,40,20,0.9)); border-color: rgba(245,158,11,0.6); } .pur-kpi.amber .pur-kpi-label { color: #fbbf24; }
.pur-kpi.purple { background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(36,24,70,0.9)); border-color: rgba(139,92,246,0.65); } .pur-kpi.purple .pur-kpi-label { color: #b794ff; }
.pur-filter-grid { grid-template-columns: minmax(250px, 1.3fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr) minmax(0, 0.8fr); }
.pur-seg-sm .pur-seg-btn { padding: 5px 12px; font-size: 0.78rem; }
.pur-card-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pur-search { min-width: 260px; padding: 6px 10px; font-size: 0.82rem; min-height: 32px; border-radius: 8px; }
.pur-note { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.45); border-radius: 10px; padding: 8px 12px; font-size: 0.78rem; color: #fcd9a0; margin-bottom: 6px; }
.pur-src { display: inline-block; background: rgba(255,255,255,0.1); border-radius: 999px; padding: 0 7px; font-size: 0.68rem; color: var(--text2); vertical-align: 1px; } .pur-src.partial { background: rgba(245,158,11,0.2); color: #fbbf24; }
.pur-table tr.void td { text-decoration: line-through; color: var(--text3); } .pur-table tr.void td .badge { text-decoration: none; }
.pur-table tfoot td { position: sticky; bottom: 0; background: #17213a; font-weight: 800; border-top: 2px solid var(--border); z-index: 2; }
.pur-wide .pur-table { min-width: 1500px; }
.pur-scroll.pur-wide { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.pur-badge-success { background: rgba(34,197,94,0.18); color: #4ade80; } .pur-badge-danger { background: rgba(239,68,68,0.2); color: #ff8a8a; } .pur-badge-warning { background: rgba(245,158,11,0.2); color: #fbbf24; } .pur-badge-muted { background: rgba(255,255,255,0.08); color: var(--text2); }
.pur-colmenu-wrap { position: relative; } .pur-col-btn { padding: 5px 12px; font-size: 0.78rem; }
.pur-colmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: 270px; max-height: 340px; overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); padding: 8px; }
.pur-colmenu[hidden] { display: none; }
.pur-colopt { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 0; font-size: 0.8rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text); cursor: pointer; }
.pur-colopt input { width: auto; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; }
.pur-bar { fill: #2f7bff; } .pur-bar-qty { fill: #22c55e; } .pur-line { stroke: #f59e0b; stroke-width: 2; } .pur-dot { fill: #f59e0b; }
.pur-tip { text-align: left; }
.pur-hint { font-size: 0.74rem; color: var(--text3); margin-top: 6px; line-height: 1.45; }
.drawer.pur-drawer { width: min(1180px, 100vw); }
.pur-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; margin-bottom: 12px; }
.pur-kv-row { display: flex; gap: 10px; justify-content: space-between; border-bottom: 1px solid rgba(42,51,72,0.6); padding: 5px 0; font-size: 0.82rem; }
.pur-kv-k { color: var(--text2); } .pur-kv-v { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pur-arith { margin-top: 14px; max-width: 520px; margin-left: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.pur-arith-title { font-weight: 800; font-size: 0.86rem; margin-bottom: 6px; }
.pur-eq { display: flex; justify-content: space-between; padding: 3px 0; font-size: 0.84rem; font-variant-numeric: tabular-nums; } .pur-eq.sub { border-top: 1px solid var(--border); font-weight: 700; margin-top: 2px; padding-top: 5px; }
.pur-eq.grand { border-top: 2px solid var(--border); font-weight: 800; font-size: 0.95rem; margin-top: 4px; padding-top: 6px; color: #7fb1ff; }
.pur-arith-note { font-size: 0.74rem; color: var(--text2); margin-top: 6px; line-height: 1.45; }
@media (max-width: 1400px) { .pur-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pur-kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pur-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .pur-kpis, .pur-kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pur-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pur-kv { grid-template-columns: minmax(0, 1fr); } .pur-search { min-width: 0; width: 100%; } }
@media (max-width: 560px) { .pur-kpis, .pur-kpis.four, .pur-filter-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== RV3 BLOCK pur 20261008 END ===== */

/* ===== RV3 BLOCK val 20261008 BEGIN ===== */
/* Nilai Stok & HPP dual valuation (report-valuation.js) — presentation only. Same refined type scale as the Dashboard / Pergerakan Stok / Pembelian reports (KPI 1.4-1.6rem, body 0.8-0.9rem),
   dark Inventory Pro tokens. Item + history + daily tables scroll horizontally inside their own container with a sticky header and a sticky TOTAL row. */
.val { --val-kpi: 1.55rem; --val-gap: 10px; display: flex; flex-direction: column; gap: var(--val-gap); min-width: 0; }
.val-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.val-title { font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.2; }
.val-desc { margin: 4px 0 0; font-size: 0.82rem; color: var(--text2); max-width: 70ch; }
.val-export { position: relative; }
.val-export-btn { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; }
.val-export-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 300px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); padding: 6px; display: flex; flex-direction: column; }
.val-export-menu[hidden] { display: none; }
.val-export-item { background: none; border: none; color: var(--text); text-align: left; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 0.82rem; }
.val-export-item:hover { background: var(--bg3); }
.val-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.val-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.val-card-title { font-size: 1.02rem; font-weight: 800; }
.val-card-sub { font-size: 0.8rem; font-weight: 400; color: var(--text2); }
.val-hint { font-size: 0.76rem; color: var(--text3); }
.val-filters { display: flex; flex-direction: column; gap: 10px; }
.val-filter-grid { display: grid; grid-template-columns: minmax(250px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.val-f label { display: block; font-size: 0.74rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); margin-bottom: 4px; }
.val-f input, .val-f select, .val-input { width: 100%; padding: 7px 10px; font-size: 0.85rem; min-height: 34px; border-radius: 8px; }
.val-dates { display: flex; align-items: center; gap: 8px; }
.val-dates input { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 6px; font-size: 13px; }
.val-filter-row2 { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.val-toggle-wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.val-toggle-label { font-size: 0.8rem; font-weight: 600; }
.val-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--bg2); }
.val-seg-btn { background: transparent; border: none; color: var(--text2); padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.val-seg-btn.on { background: linear-gradient(180deg, #3b86ff, #1f62ea); color: #fff; }
.val-quick { display: inline-flex; gap: 6px; }
.val-quick-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 8px; padding: 5px 11px; font-size: 0.76rem; cursor: pointer; }
.val-quick-btn:hover { color: var(--text); border-color: #3b82f6; }
.val-filter-actions { display: flex; gap: 8px; }
.val-filter-actions .btn { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; }
.val-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--val-gap); }
.val-kpi { border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 13px; min-width: 0; background: var(--card); position: relative; }
.val-kpi.click { cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.val-kpi.click:hover { transform: translateY(-1px); }
.val-kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.val-kpi-label { font-size: 0.9rem; font-weight: 700; }
.val-kpi-value { font-size: var(--val-kpi); font-weight: 800; line-height: 1.2; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.val-kpi-sub { font-size: 0.74rem; color: var(--text2); overflow-wrap: anywhere; line-height: 1.3; }
.val-kpi.tone-blue { background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(23,35,70,0.9)); border-color: rgba(59,130,246,0.7); } .val-kpi.tone-blue .val-kpi-label { color: #7fb1ff; }
.val-kpi.tone-green { background: linear-gradient(135deg, rgba(22,163,74,0.22), rgba(16,45,40,0.9)); border-color: rgba(34,197,94,0.6); } .val-kpi.tone-green .val-kpi-label { color: #4ade80; }
.val-kpi.tone-red { background: linear-gradient(135deg, rgba(220,38,38,0.24), rgba(56,22,32,0.9)); border-color: rgba(239,68,68,0.65); } .val-kpi.tone-red .val-kpi-label { color: #ff7b7b; }
.val-kpi.tone-amber { background: linear-gradient(135deg, rgba(217,119,6,0.24), rgba(58,40,20,0.9)); border-color: rgba(245,158,11,0.6); } .val-kpi.tone-amber .val-kpi-label { color: #fbbf24; }
.val-kpi.tone-purple { background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(36,24,70,0.9)); border-color: rgba(139,92,246,0.65); } .val-kpi.tone-purple .val-kpi-label { color: #b794ff; }
.val-loading, .val-empty { padding: 18px; text-align: center; color: var(--text2); font-size: 0.85rem; grid-column: 1 / -1; }
.val-chart-wrap { position: relative; }
.val-svg { width: 100%; height: auto; max-height: 300px; display: block; }
.val-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; }
.val-axis { fill: var(--text3); font-size: 11px; }
.val-bar-in { fill: #22c55e; } .val-bar-out { fill: #ef4444; }
.val-line-open { stroke: #2f7bff; stroke-width: 2; opacity: 0.8; } .val-line-close { stroke: #8b5cf6; stroke-width: 2; } .val-dot-close { fill: #8b5cf6; }
.val-hit { cursor: pointer; } .val-hit:hover { fill: rgba(255,255,255,0.05); }
.val-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #0b1020; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.74rem; pointer-events: none; z-index: 5; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.val-tip[hidden] { display: none; }
.val-chart-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 0.76rem; color: var(--text2); margin-top: 4px; }
.val-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.val-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.val-scroll.val-wide { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.val-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.val-table th, .val-table td { padding: 7px 9px; border-bottom: 1px solid rgba(42,51,72,0.7); text-align: left; white-space: nowrap; }
.val-table th { color: #dbe3f5; font-weight: 600; font-size: 0.76rem; background: #131a2b; position: sticky; top: 0; z-index: 3; }
.val-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.val-table tbody tr.click { cursor: pointer; } .val-table tbody tr.click:hover { background: rgba(255,255,255,0.04); }
.val-table tr.sel { background: rgba(37,99,235,0.28); outline: 1px solid rgba(59,130,246,0.7); }
.val-table tr.pre td { color: var(--text3); } .val-table tr.bad td { box-shadow: inset 3px 0 0 #ef4444; }
.val-table .in { color: #4ade80; } .val-table .out { color: #ff7b7b; } .val-table .adj { color: #fbbf24; }
.val-table tr.internal td { opacity: 0.65; }
.val-trail-table { font-size: 0.77rem; }
.val-trail-table th, .val-trail-table td { white-space: normal; padding: 6px 5px; vertical-align: top; }
.val-trail-table td:first-child, .val-trail-table td.num { white-space: nowrap; }
.val-trail-table td:last-child { min-width: 120px; }
.val-table tfoot td { position: sticky; bottom: 0; background: #17213a; font-weight: 800; border-top: 2px solid var(--border); z-index: 2; }
.val-items th.sticky1, .val-items td.sticky1 { position: sticky; left: 0; z-index: 4; background: #0f1626; min-width: 92px; }
.val-items th.sticky2, .val-items td.sticky2 { position: sticky; left: 92px; z-index: 4; background: #0f1626; min-width: 170px; box-shadow: 2px 0 0 rgba(255,255,255,0.06); }
.val-items th.sticky1, .val-items th.sticky2 { z-index: 5; background: #131a2b; }
.val-items tfoot td.sticky1, .val-items tfoot td.sticky2 { background: #17213a; z-index: 5; }
.val-items th[data-sort] { cursor: pointer; }
.val-eye { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; width: 34px; height: 28px; cursor: pointer; color: var(--text); }
.val-eye:disabled { opacity: 0.35; cursor: default; }
.val-warn { color: #ef4444; }
.val-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 0.78rem; color: var(--text2); }
.val-pager-nav { display: inline-flex; gap: 4px; align-items: center; }
.val-pg { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 7px; min-width: 30px; height: 28px; cursor: pointer; font-size: 0.78rem; }
.val-pg.on { background: #2f7bff; border-color: #2f7bff; color: #fff; } .val-pg:disabled { opacity: 0.4; cursor: default; }
.val-pg-gap { color: var(--text3); padding: 0 4px; }
.val-item-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.val-item-filters .val-input { width: auto; min-width: 170px; flex: 0 1 220px; }
.val-check { font-size: 0.8rem; color: var(--text2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-transform: none; letter-spacing: 0; margin: 0; }
.val-check input { width: auto; }
.val-unitline { font-size: 0.76rem; color: var(--text2); margin-top: 8px; overflow-wrap: anywhere; }
.val-legend { font-size: 0.74rem; color: var(--text3); line-height: 1.5; padding: 2px 4px 10px; }
.val-drawer-sum, .val-trail-head { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.82rem; padding: 8px 2px 12px; color: var(--text2); }
.drawer.val-drawer { width: min(1180px, 100vw); }
@media (max-width: 1400px) { .pur { --val-kpi: 1.4rem; } }
@media (max-width: 1200px) { .pur { --val-kpi: 1.25rem; --val-gap: 8px; } .val-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .val-kpi-label { font-size: 0.82rem; } .val-kpi-sub { font-size: 0.7rem; } }
@media (max-width: 900px) { .val-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .val-kpi:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .pur { --val-kpi: 1.15rem; } .val-filter-grid { grid-template-columns: minmax(0, 1fr); } .val-title { font-size: 1.15rem; } .val-filter-actions { width: 100%; } .val-filter-actions .btn { flex: 1; } .val-export-menu { min-width: 250px; } }

.val-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } .val-kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } .val-kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.val-kpi.teal { background: linear-gradient(135deg, rgba(13,148,136,0.22), rgba(14,42,48,0.9)); border-color: rgba(45,212,191,0.55); } .val-kpi.teal .val-kpi-label { color: #5eead4; }
.val-kpi.indigo { background: linear-gradient(135deg, rgba(99,102,241,0.24), rgba(30,32,72,0.9)); border-color: rgba(129,140,248,0.6); } .val-kpi.indigo .val-kpi-label { color: #a5b4fc; }
.val-kpi.blue { background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(23,35,70,0.9)); border-color: rgba(59,130,246,0.7); } .val-kpi.blue .val-kpi-label { color: #7fb1ff; }
.val-kpi.green { background: linear-gradient(135deg, rgba(22,163,74,0.22), rgba(16,45,40,0.9)); border-color: rgba(34,197,94,0.6); } .val-kpi.green .val-kpi-label { color: #4ade80; }
.val-kpi.amber { background: linear-gradient(135deg, rgba(217,119,6,0.24), rgba(58,40,20,0.9)); border-color: rgba(245,158,11,0.6); } .val-kpi.amber .val-kpi-label { color: #fbbf24; }
.val-kpi.purple { background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(36,24,70,0.9)); border-color: rgba(139,92,246,0.65); } .val-kpi.purple .val-kpi-label { color: #b794ff; }
.val-filter-grid { grid-template-columns: minmax(250px, 1.4fr) repeat(3, minmax(0, 1fr)); }
.val-seg-sm .val-seg-btn { padding: 5px 12px; font-size: 0.78rem; }
.val-card-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.val-search { min-width: 260px; padding: 6px 10px; font-size: 0.82rem; min-height: 32px; border-radius: 8px; }
.val-note { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.45); border-radius: 10px; padding: 8px 12px; font-size: 0.78rem; color: #fcd9a0; margin-bottom: 6px; }
.val-src { display: inline-block; background: rgba(255,255,255,0.1); border-radius: 999px; padding: 0 7px; font-size: 0.68rem; color: var(--text2); vertical-align: 1px; } .val-src.partial { background: rgba(245,158,11,0.2); color: #fbbf24; }
.val-table tr.void td { text-decoration: line-through; color: var(--text3); } .val-table tr.void td .badge { text-decoration: none; }
.val-table tfoot td { position: sticky; bottom: 0; background: #17213a; font-weight: 800; border-top: 2px solid var(--border); z-index: 2; }
.val-wide .val-table { min-width: 1500px; }
.val-scroll.val-wide { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.val-badge-success { background: rgba(34,197,94,0.18); color: #4ade80; } .val-badge-danger { background: rgba(239,68,68,0.2); color: #ff8a8a; } .val-badge-warning { background: rgba(245,158,11,0.2); color: #fbbf24; } .val-badge-muted { background: rgba(255,255,255,0.08); color: var(--text2); }
.val-colmenu-wrap { position: relative; } .val-col-btn { padding: 5px 12px; font-size: 0.78rem; }
.val-colmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: 270px; max-height: 340px; overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); padding: 8px; }
.val-colmenu[hidden] { display: none; }
.val-colopt { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 0; font-size: 0.8rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text); cursor: pointer; }
.val-colopt input { width: auto; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; }
.val-bar { fill: #2f7bff; } .val-bar-qty { fill: #22c55e; } .val-line { stroke: #f59e0b; stroke-width: 2; } .val-dot { fill: #f59e0b; }
.val-tip { text-align: left; }
.val-hint { font-size: 0.74rem; color: var(--text3); margin-top: 6px; line-height: 1.45; }
.drawer.val-drawer { width: min(1180px, 100vw); }
.val-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; margin-bottom: 12px; }
.val-kv-row { display: flex; gap: 10px; justify-content: space-between; border-bottom: 1px solid rgba(42,51,72,0.6); padding: 5px 0; font-size: 0.82rem; }
.val-kv-k { color: var(--text2); } .val-kv-v { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.val-arith { margin-top: 14px; max-width: 520px; margin-left: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.val-arith-title { font-weight: 800; font-size: 0.86rem; margin-bottom: 6px; }
.val-eq { display: flex; justify-content: space-between; padding: 3px 0; font-size: 0.84rem; font-variant-numeric: tabular-nums; } .val-eq.sub { border-top: 1px solid var(--border); font-weight: 700; margin-top: 2px; padding-top: 5px; }
.val-eq.grand { border-top: 2px solid var(--border); font-weight: 800; font-size: 0.95rem; margin-top: 4px; padding-top: 6px; color: #7fb1ff; }
.val-arith-note { font-size: 0.74rem; color: var(--text2); margin-top: 6px; line-height: 1.45; }
@media (max-width: 1400px) { .val-kpis, .val-kpis.five, .val-kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } .val-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .val-kpis, .val-kpis.five, .val-kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .val-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .val-kv { grid-template-columns: minmax(0, 1fr); } .val-search { min-width: 0; width: 100%; } }
@media (max-width: 560px) { .val-kpis, .val-kpis.five, .val-kpis.six, .val-filter-grid { grid-template-columns: minmax(0, 1fr); } }

/* valuation-specific */
.val-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.val-badge { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: 0.74rem; font-weight: 700; }
.val-hint { font-size: 0.74rem; color: var(--text3); margin-top: 6px; line-height: 1.45; }
.val-sub { font-size: 0.7rem; color: var(--text3); }
.val-empty { padding: 16px; text-align: center; color: var(--text2); font-size: 0.84rem; }
.val-compare .val-cmp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.val-cmp { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.val-cmp span { font-size: 0.74rem; color: var(--text2); } .val-cmp b { font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.val-cmp.hl { border-color: rgba(245,158,11,0.6); background: rgba(245,158,11,0.1); } .val-cmp.hl b { color: #fbbf24; }
.val-pick { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: end; margin-bottom: 10px; }
.val-info { background: rgba(37,99,235,0.12); border: 1px solid rgba(59,130,246,0.45); border-radius: 10px; padding: 8px 12px; font-size: 0.78rem; color: #cfe0ff; line-height: 1.45; }
.val-detail-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 12px; align-items: start; }
.val-detail-left, .val-detail-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.val-subcard { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.val-card-title.sm { font-size: 0.92rem; margin-bottom: 6px; }
.val-pill { background: rgba(59,130,246,0.25); color: #9ec5ff; border-radius: 999px; padding: 2px 10px; font-size: 0.72rem; font-weight: 700; } .val-pill.red { background: rgba(239,68,68,0.22); color: #ff9a9a; }
.val-st { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 0.7rem; font-weight: 700; } .val-st.ok { background: rgba(34,197,94,0.2); color: #4ade80; } .val-st.gone { background: rgba(239,68,68,0.22); color: #ff8a8a; }
.val-layers { white-space: pre-line; font-variant-numeric: tabular-nums; }
.val-history th, .val-history td { vertical-align: top; }
.val-history td:last-child { white-space: normal; min-width: 180px; }
.val-wide .val-history { min-width: 1500px; } .val-wide .val-items { min-width: 1500px; } .val-wide .val-days { min-width: 980px; }
.val-wide .val-table th, .val-wide .val-table td { padding: 6px 8px; }
.val-table tr.chg td { background: rgba(245,158,11,0.06); }
.val-avgchg { background: #2563eb; color: #fff; border-radius: 6px; padding: 1px 8px; font-weight: 800; display: inline-block; }
.val-unknown { color: #fbbf24; font-weight: 700; font-size: 0.74rem; }
.val-queue { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 8px 2px; }
.val-q-wrap { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.val-q { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; min-width: 128px; font-size: 0.76rem; } .val-q.ok { border-color: rgba(34,197,94,0.7); background: rgba(34,197,94,0.1); } .val-q.gone { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.08); opacity: 0.85; }
.val-q-date { color: var(--text2); } .val-q-qty { font-weight: 800; font-size: 0.9rem; } .val-q-cost { color: var(--text2); } .val-q-st { margin-top: 3px; font-weight: 700; } .val-q.ok .val-q-st { color: #4ade80; } .val-q.gone .val-q-st { color: #ff8a8a; }
.val-q-arrow { color: var(--text3); }
.val-formula { display: flex; align-items: center; gap: 12px; background: rgba(37,99,235,0.12); border: 1.5px solid rgba(59,130,246,0.6); border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px; font-weight: 700; }
.val-frac { display: flex; flex-direction: column; align-items: center; } .val-frac > div:first-child { border-bottom: 1.5px solid var(--text2); padding: 0 8px 3px; } .val-frac > div:last-child { padding: 3px 8px 0; }
.val-ul, .val-ol { margin: 6px 0 8px; padding-left: 20px; font-size: 0.78rem; color: var(--text2); line-height: 1.5; } .val-ol li { margin-bottom: 5px; color: var(--text); }
.val-example { background: rgba(22,163,74,0.12); border: 1px solid rgba(34,197,94,0.5); border-radius: 10px; padding: 8px 12px; font-size: 0.78rem; line-height: 1.5; }
.val-math { font-variant-numeric: tabular-nums; margin-top: 4px; color: #d7f5e0; }
.val-layer-table th, .val-layer-table td { padding: 5px 7px; }
.val-layer-table tfoot td { position: static; background: rgba(37,99,235,0.18); }
.val-cmp-table { margin-top: 8px; }
.val-export-btn { padding: 8px 16px; font-size: 0.85rem; font-weight: 700; }
@media (max-width: 1200px) { .val-detail-grid, .val-pick { grid-template-columns: minmax(0, 1fr); } .val-compare .val-cmp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .val-compare .val-cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== RV3 BLOCK val 20261008 END ===== */

/* ===== RV3 BLOCK io 20261008 BEGIN ===== */
/* Laporan IN / OUT / Transfer (report-io.js) — presentation only. Same refined type scale as the Dashboard / Pembelian / Nilai Stok reports, dark Inventory Pro tokens. Tables scroll
   horizontally inside their own container with a sticky header and a sticky TOTAL row; the three tabs always fit ONE row (iPad landscape included). */
.io { --io-kpi: 1.3rem; --io-gap: 10px; display: flex; flex-direction: column; gap: var(--io-gap); min-width: 0; }
.io-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.io-title { font-size: 1.45rem; font-weight: 800; margin: 0; line-height: 1.2; }
.io-desc { margin: 4px 0 0; font-size: 0.85rem; color: var(--text2); }
.io-export-btn { padding: 9px 18px; font-size: 0.85rem; font-weight: 700; }
.io-tabs { display: flex; gap: 8px; flex-wrap: nowrap; }
.io-tab { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-top: 3px solid transparent; border-radius: 12px; color: var(--text2); font-size: 0.95rem; font-weight: 700; cursor: pointer; text-align: left; }
.io-tab:hover { color: var(--text); border-color: #3b82f6; }
.io-tab.on { color: #fff; background: linear-gradient(180deg, rgba(37,99,235,0.18), var(--card)); }
.io-tab-in.on { border-top-color: #22c55e; } .io-tab-out.on { border-top-color: #ef4444; } .io-tab-transfer.on { border-top-color: #3b82f6; }
.io-tab-ic { font-size: 1.25rem; flex: 0 0 auto; }
.io-tab-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.io-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.io-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.io-card-title { font-size: 1.05rem; font-weight: 800; }
.io-card-sub { font-size: 0.8rem; font-weight: 400; color: var(--text2); }
.io-card-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.io-filter-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.io-filter-ic { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; background: rgba(37,99,235,0.25); color: #7fb1ff; }
.io-filter-grid { display: grid; gap: 10px 12px; grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(0, 1fr)); }
.io-f label { display: block; font-size: 0.76rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); margin-bottom: 4px; }
.io-f input, .io-f select { width: 100%; padding: 7px 10px; font-size: 0.85rem; min-height: 34px; border-radius: 8px; }
.io-dates { display: flex; align-items: center; gap: 8px; }
.io-dates input { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 6px; font-size: 13px; }
.io-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.io-chip { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 8px; padding: 4px 10px; font-size: 0.74rem; cursor: pointer; }
.io-chip:hover { color: var(--text); border-color: #3b82f6; }
.io-chip.on { background: #2f7bff; border-color: #2f7bff; color: #fff; }
.io-filter-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.io-filter-actions .btn { padding: 8px 18px; font-size: 0.85rem; font-weight: 700; }
.io-loading, .io-empty { padding: 18px; text-align: center; color: var(--text2); font-size: 0.88rem; grid-column: 1 / -1; }
.io-note { background: rgba(37,99,235,0.12); border: 1px solid rgba(59,130,246,0.4); color: #bcd3ff; border-radius: 10px; padding: 8px 12px; font-size: 0.8rem; margin-bottom: 6px; }
.io-hint { font-size: 0.76rem; color: var(--text3); margin-top: 6px; }
.io-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--io-gap); }
.io-kpi { display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 12px; min-width: 0; background: var(--card); }
.io-kpi-ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #fff; background: #2f7bff; }
.io-kpi-body { min-width: 0; flex: 1 1 auto; }
.io-kpi-label { font-size: 0.8rem; font-weight: 600; color: var(--text2); line-height: 1.25; }
.io-kpi-value { font-size: var(--io-kpi); font-weight: 800; line-height: 1.2; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.io-kpi-sub { font-size: 0.72rem; color: var(--text2); overflow-wrap: anywhere; line-height: 1.3; }
.io-kpi-delta { font-size: 0.72rem; margin-top: 3px; color: var(--text3); } .io-kpi-delta.up b { color: #4ade80; } .io-kpi-delta.down b { color: #ff7b7b; }
.io-kpi.tone-green { background: linear-gradient(135deg, rgba(22,163,74,0.22), rgba(16,45,40,0.9)); border-color: rgba(34,197,94,0.6); } .io-kpi.tone-green .io-kpi-ic { background: #22c55e; } .io-kpi.tone-green .io-kpi-value { color: #86efac; }
.io-kpi.tone-blue { background: linear-gradient(135deg, rgba(37,99,235,0.22), rgba(23,35,70,0.9)); border-color: rgba(59,130,246,0.7); } .io-kpi.tone-blue .io-kpi-ic { background: #2f7bff; }
.io-kpi.tone-red { background: linear-gradient(135deg, rgba(220,38,38,0.24), rgba(56,22,32,0.9)); border-color: rgba(239,68,68,0.65); } .io-kpi.tone-red .io-kpi-ic { background: #ef4444; } .io-kpi.tone-red .io-kpi-value { color: #fca5a5; }
.io-kpi.tone-amber { background: linear-gradient(135deg, rgba(217,119,6,0.24), rgba(58,40,20,0.9)); border-color: rgba(245,158,11,0.6); } .io-kpi.tone-amber .io-kpi-ic { background: #f59e0b; }
.io-kpi.tone-purple { background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(36,24,70,0.9)); border-color: rgba(139,92,246,0.65); } .io-kpi.tone-purple .io-kpi-ic { background: #8b5cf6; }
.io-kpi.tone-teal { background: linear-gradient(135deg, rgba(13,148,136,0.22), rgba(14,42,48,0.9)); border-color: rgba(45,212,191,0.55); } .io-kpi.tone-teal .io-kpi-ic { background: #14b8a6; }
.io-kpi.tone-indigo { background: linear-gradient(135deg, rgba(79,70,229,0.24), rgba(28,30,70,0.9)); border-color: rgba(129,140,248,0.6); } .io-kpi.tone-indigo .io-kpi-ic { background: #6366f1; }
.io-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--bg2); }
.io-seg-btn { background: transparent; border: none; color: var(--text2); padding: 6px 14px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.io-seg-btn.on { background: linear-gradient(180deg, #3b86ff, #1f62ea); color: #fff; }
.io-chart-wrap { position: relative; }
.io-svg { width: 100%; height: auto; max-height: 280px; display: block; }
.io-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; }
.io-axis { fill: var(--text3); font-size: 11px; }
.io-bar-in { fill: #22c55e; } .io-bar-out { fill: #ef4444; } .io-bar-transfer { fill: #8b5cf6; } .io-bar-sell { fill: #38bdf8; }
.io-line { stroke: #2f7bff; stroke-width: 2; } .io-dot { fill: #2f7bff; }
.io-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #0b1020; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.74rem; pointer-events: none; z-index: 5; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.io-tip[hidden] { display: none; }
.io-chart-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 0.76rem; color: var(--text2); margin-top: 4px; }
.io-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.io-search { min-width: 230px; padding: 7px 10px; font-size: 0.82rem; border-radius: 8px; }
.io-scroll { overflow: auto; -webkit-overflow-scrolling: touch; max-width: 100%; max-height: 520px; border: 1px solid var(--border); border-radius: 10px; }
.io-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.io-table th, .io-table td { padding: 7px 9px; border-bottom: 1px solid rgba(42,51,72,0.7); text-align: left; white-space: nowrap; }
.io-table th { color: #dbe3f5; font-weight: 600; font-size: 0.76rem; background: #131a2b; position: sticky; top: 0; z-index: 3; }
.io-table th.sortable { cursor: pointer; } .io-table th.sortable:hover { color: #7fb1ff; }
.io-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.io-table tbody tr.click { cursor: pointer; } .io-table tbody tr.click:hover { background: rgba(255,255,255,0.04); }
.io-table tr.sel { background: rgba(37,99,235,0.28); outline: 1px solid rgba(59,130,246,0.7); }
.io-table tr.void td { text-decoration: line-through; color: var(--text3); }
.io-table tr.void td .io-badge { text-decoration: none; }
.io-table tr.diff td { box-shadow: inset 3px 0 0 #f59e0b; } .io-table td.io-diff { color: #fbbf24; font-weight: 800; }
.io-table tfoot td { position: sticky; bottom: 0; background: #17213a; font-weight: 800; border-top: 2px solid var(--border); z-index: 2; }
.io-eye { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; width: 34px; height: 28px; cursor: pointer; color: var(--text); }
.io-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; border: 1px solid transparent; }
.io-badge-success { background: rgba(34,197,94,0.16); color: #4ade80; border-color: rgba(34,197,94,0.5); }
.io-badge-danger { background: rgba(239,68,68,0.16); color: #ff7b7b; border-color: rgba(239,68,68,0.5); }
.io-badge-warning { background: rgba(245,158,11,0.16); color: #fbbf24; border-color: rgba(245,158,11,0.5); }
.io-badge-info { background: rgba(59,130,246,0.16); color: #7fb1ff; border-color: rgba(59,130,246,0.5); }
.io-badge-muted { background: rgba(148,163,184,0.14); color: var(--text2); border-color: rgba(148,163,184,0.4); }
.io-src { font-size: 0.68rem; padding: 1px 6px; border-radius: 6px; background: rgba(148,163,184,0.18); color: var(--text2); } .io-src.partial { background: rgba(245,158,11,0.18); color: #fbbf24; }
.io-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 0.78rem; color: var(--text2); }
.io-pager-nav { display: inline-flex; gap: 4px; align-items: center; }
.io-pg { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 7px; min-width: 30px; height: 28px; cursor: pointer; font-size: 0.78rem; }
.io-pg.on { background: #2f7bff; border-color: #2f7bff; color: #fff; } .io-pg:disabled { opacity: 0.4; cursor: default; }
.io-pg-gap { color: var(--text3); padding: 0 4px; }
.io-per { padding: 4px 8px; font-size: 0.78rem; border-radius: 7px; width: auto; }
.io-colmenu-wrap { position: relative; }
.io-colmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; max-height: 320px; overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.5); padding: 6px; }
.io-colmenu[hidden] { display: none; }
.io-colopt { display: flex; align-items: center; gap: 6px; padding: 5px 8px; font-size: 0.8rem; text-transform: none; letter-spacing: 0; margin: 0; color: var(--text); cursor: pointer; }
.io-colopt input { width: auto; }
.io-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 18px; margin-bottom: 10px; }
.io-kv-row { display: flex; flex-direction: column; min-width: 0; }
.io-kv-k { font-size: 0.72rem; color: var(--text3); } .io-kv-v { font-size: 0.85rem; font-weight: 600; overflow-wrap: anywhere; }
.io-arith { margin-top: 10px; max-width: 420px; margin-left: auto; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: rgba(15,22,38,0.7); }
.io-arith-title { font-weight: 800; font-size: 0.85rem; margin-bottom: 6px; }
.io-eq { display: flex; justify-content: space-between; gap: 12px; font-size: 0.82rem; padding: 2px 0; } .io-eq.sub { border-top: 1px solid var(--border); margin-top: 3px; padding-top: 5px; } .io-eq.grand { border-top: 2px solid var(--border); margin-top: 4px; padding-top: 6px; font-size: 0.92rem; color: #86efac; }
.io-checks { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.io-check { font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; } .io-check.ok { background: rgba(34,197,94,0.16); color: #4ade80; } .io-check.bad { background: rgba(239,68,68,0.16); color: #ff7b7b; }
.io-layer-tr > td { padding: 6px 10px 12px; background: rgba(15,22,38,0.8); }
.io-layer-wrap { position: sticky; left: 10px; width: max-content; max-width: min(960px, 86vw); overflow-x: auto; border-left: 3px solid #3b82f6; padding-left: 10px; }
.io-sub th { position: static; background: #1a2440; }
.io-sub tfoot td { position: static; }
@media (max-width: 1700px) { .io-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .io-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .io-kv { grid-template-columns: repeat(3, minmax(0, 1fr)); } .io-tab { padding: 10px 10px; font-size: 0.85rem; gap: 6px; } .io-kpi-ic { width: 36px; height: 36px; font-size: 1.05rem; } .io-kpi { padding: 9px 10px; gap: 8px; } }
@media (max-width: 900px) { .io-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .io-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .io-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } .io-tab-ic { display: none; } }
@media (max-width: 640px) { .io-tab { padding: 9px 6px; font-size: 0.72rem; text-align: center; justify-content: center; } .io-tab-tx { white-space: normal; } .io-title { font-size: 1.2rem; } .io-filter-grid { grid-template-columns: minmax(0, 1fr); } .io-kpis { grid-template-columns: minmax(0, 1fr); } .io-search { min-width: 0; width: 100%; } .io-filter-actions .btn { flex: 1; } .io-kv { grid-template-columns: minmax(0, 1fr); } }

/* ===== RV3 BLOCK io 20261008 END ===== */

/* ===== RV3 REPORT FAMILY 20261008 BEGIN =====
   Shared look of the five reports (Pergerakan, IN / OUT, Pembelian, Nilai HPP, Stock Opname): one compact filter card, one KPI grid (no card-in-card),
   segmented toggles / tabs, sticky-header tables, a wide drawer, and the Cetak / Download Excel buttons (report-tools.js). Tokens come from :root above. */
.rp-page { display: flex; flex-direction: column; gap: 12px; }
.rp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rp-title { font-size: 1.3rem; font-weight: 800; line-height: 1.2; margin: 0; }
.rp-desc { margin: 3px 0 0; font-size: 0.8rem; color: var(--text2); max-width: 760px; }
.rp-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: relative; }
.rp-btn { padding: 7px 14px; font-size: 0.8rem; }
.rp-split { display: inline-flex; position: relative; }
.rp-split .rp-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rp-split .rp-caret { padding: 7px 9px; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid rgba(255,255,255,0.3); }
.rp-menu { position: absolute; top: calc(100% + 4px); right: 0; min-width: 210px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; z-index: 40; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
.rp-menu[hidden] { display: none; }
.rp-menu-item { display: block; width: 100%; text-align: left; background: transparent; border: none; color: var(--text); font-size: 0.8rem; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.rp-menu-item:hover { background: rgba(59,130,246,0.18); }

.rp-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.rp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rp-card-title { font-size: 0.88rem; font-weight: 700; }
.rp-sub { font-size: 0.72rem; font-weight: 500; color: var(--text3); }
.rp-hint { font-size: 0.72rem; color: var(--text3); }

.rp-filter { padding: 10px 12px; }
.rp-fgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.rp-f { grid-column: span 3; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rp-f.s2 { grid-column: span 2; } .rp-f.s4 { grid-column: span 4; } .rp-f.s5 { grid-column: span 5; } .rp-f.s6 { grid-column: span 6; } .rp-f.s7 { grid-column: span 7; } .rp-f.s8 { grid-column: span 8; } .rp-f.s12 { grid-column: span 12; }
.rp-f > label, .rp-lab { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3); }
.rp-f input, .rp-f select, .rp-input { height: 32px; width: 100%; background: var(--bg2); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 0 9px; font-size: 0.8rem; font-family: inherit; }
.rp-f input:focus, .rp-f select:focus, .rp-input:focus { outline: none; border-color: var(--accent); }
.rp-dates { display: flex; align-items: center; gap: 6px; } .rp-dates span { color: var(--text3); }
.rp-factions { display: flex; gap: 6px; align-items: flex-end; justify-content: flex-end; }
.rp-factions .btn { height: 32px; padding: 0 14px; font-size: 0.78rem; }
.rp-row2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.rp-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.rp-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg2); }
.rp-seg button { background: transparent; border: none; color: var(--text2); font-size: 0.76rem; font-weight: 600; padding: 6px 12px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.rp-seg button + button { border-left: 1px solid var(--border); }
.rp-seg button.on { background: linear-gradient(135deg, rgba(59,130,246,0.28), rgba(99,102,241,0.28)); color: #fff; }
.rp-seg button:disabled { opacity: 0.45; cursor: not-allowed; }
.rp-quick { display: flex; gap: 4px; }
.rp-quick button { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 14px; font-size: 0.7rem; padding: 3px 10px; cursor: pointer; font-family: inherit; }
.rp-quick button:hover { color: var(--text); border-color: var(--accent); }
.rp-check { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; color: var(--text2); cursor: pointer; }

.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 10px; }
.rp-kpi { --tone: var(--accent); background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--tone); border-radius: 10px; padding: 8px 12px; min-width: 0; text-align: left; font-family: inherit; color: var(--text); }
.rp-kpi.click { cursor: pointer; } .rp-kpi.click:hover { border-color: var(--tone); }
.rp-kpi.t-blue { --tone: #3b82f6; } .rp-kpi.t-green { --tone: #22c55e; } .rp-kpi.t-red { --tone: #ef4444; } .rp-kpi.t-amber { --tone: #f59e0b; } .rp-kpi.t-purple { --tone: #8b5cf6; } .rp-kpi.t-gray { --tone: #64748b; } .rp-kpi.t-cyan { --tone: #06b6d4; }
.rp-kpi-l { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3); }
.rp-kpi-v { font-size: 1.1rem; font-weight: 800; margin-top: 1px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-kpi-s { font-size: 0.68rem; color: var(--text3); margin-top: 1px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.rp-kpis.dense { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.rp-kpis.dense .rp-kpi { padding: 6px 10px; } .rp-kpis.dense .rp-kpi-v { font-size: 1rem; }

.rp-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; }
.rp-tabs button { background: transparent; border: none; color: var(--text2); font-size: 0.8rem; font-weight: 600; padding: 6px 16px; border-radius: 7px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.rp-tabs button.on { background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(99,102,241,0.3)); color: #fff; }
.rp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.rp-scroll { overflow: auto; max-height: 62vh; border: 1px solid var(--border); border-radius: 8px; }
.rp-scroll.free { max-height: none; }
.rp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.77rem; }
.rp-table th { position: sticky; top: 0; z-index: 2; background: var(--bg3); color: var(--text2); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rp-table th[data-sort] { cursor: pointer; } .rp-table th[data-sort]:hover { color: var(--text); }
.rp-table td { padding: 6px 8px; border-bottom: 1px solid rgba(42,51,72,0.7); white-space: nowrap; color: var(--text); }
.rp-table td.wrap, .rp-table th.wrap { white-space: normal; min-width: 150px; }
.rp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-table tbody tr.click { cursor: pointer; } .rp-table tbody tr.click:hover td { background: rgba(59,130,246,0.09); }
.rp-table tbody tr.sel td { background: rgba(59,130,246,0.16); }
.rp-table tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--bg3); font-weight: 800; border-top: 1px solid var(--border); border-bottom: none; }
.rp-table .sticky1 { position: sticky; left: 0; z-index: 1; background: var(--card); } .rp-table th.sticky1 { z-index: 3; background: var(--bg3); }
.rp-table td.dim, .rp-dim { color: var(--text3); }
.rp-pos { color: #34d399; } .rp-neg { color: #f87171; } .rp-warn { color: #fbbf24; }
.rp-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.68rem; font-weight: 700; border: 1px solid var(--border); }
.rp-pill.ok { color: #34d399; border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.1); } .rp-pill.bad { color: #f87171; border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.1); }
.rp-pill.warn { color: #fbbf24; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.1); } .rp-pill.info { color: #60a5fa; border-color: rgba(96,165,250,0.4); background: rgba(96,165,250,0.1); }
.rp-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 0.75rem; color: var(--text2); }
.rp-pager-nav { display: flex; gap: 3px; align-items: center; }
.rp-pg { min-width: 28px; height: 26px; padding: 0 7px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; color: var(--text2); font-size: 0.74rem; cursor: pointer; font-family: inherit; }
.rp-pg.on { background: var(--accent); color: #fff; border-color: var(--accent); } .rp-pg:disabled { opacity: 0.4; cursor: not-allowed; }
.rp-empty { padding: 26px 12px; text-align: center; color: var(--text3); font-size: 0.82rem; }
.rp-loading { padding: 18px 12px; color: var(--text2); font-size: 0.82rem; }
.rp-note { font-size: 0.72rem; color: var(--text3); line-height: 1.5; }
.rp-banner { border: 1px solid var(--border); border-radius: 8px; padding: 7px 11px; font-size: 0.78rem; background: rgba(59,130,246,0.1); color: #bfdbfe; }
.rp-banner.bad { background: rgba(239,68,68,0.12); color: #fecaca; border-color: rgba(239,68,68,0.4); } .rp-banner.ok { background: rgba(16,185,129,0.1); color: #a7f3d0; }

.rp-chart { position: relative; } .rp-chart svg { width: 100%; height: auto; max-height: 230px; display: block; }
.rp-chart .g { stroke: rgba(148,163,184,0.14); stroke-width: 1; } .rp-chart .ax { fill: #94a3b8; font-size: 10px; }
.rp-chart .b-in { fill: #22c55e; } .rp-chart .b-out { fill: #ef4444; } .rp-chart .l-close { stroke: #8b5cf6; stroke-width: 2; fill: none; } .rp-chart .l-open { stroke: #3b82f6; stroke-width: 1.4; fill: none; stroke-dasharray: 4 3; }
.rp-chart .dot { fill: #8b5cf6; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.7rem; color: var(--text2); margin-top: 4px; } .rp-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.rp-tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; font-size: 0.72rem; pointer-events: none; z-index: 5; white-space: nowrap; } .rp-tip[hidden] { display: none; }

.drawer.rp-drawer { width: min(1180px, 100vw); }
.rp-dsum { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.8rem; padding: 4px 2px 10px; color: var(--text2); }
.rp-split2 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; } .rp-split2 > .c8 { grid-column: span 8; } .rp-split2 > .c4 { grid-column: span 4; } .rp-split2 > .c12 { grid-column: span 12; } .rp-split2 > .c6 { grid-column: span 6; }
.rp-colpick { position: relative; } .rp-colpanel { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; width: 280px; max-height: 340px; overflow: auto; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.45); } .rp-colpanel[hidden] { display: none; }
.rp-colpanel label { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; padding: 3px 4px; cursor: pointer; border-radius: 4px; } .rp-colpanel label:hover { background: rgba(59,130,246,0.14); }

@media (max-width: 1100px) { .rp-f, .rp-f.s2, .rp-f.s4 { grid-column: span 4; } .rp-f.s5, .rp-f.s6, .rp-f.s7, .rp-f.s8 { grid-column: span 6; } .rp-split2 > .c8, .rp-split2 > .c4, .rp-split2 > .c6 { grid-column: span 12; } }
@media (max-width: 760px) { .rp-f, .rp-f.s2, .rp-f.s4, .rp-f.s5, .rp-f.s6, .rp-f.s7, .rp-f.s8 { grid-column: span 12; } .rp-factions { justify-content: stretch; } .rp-factions .btn { flex: 1; } .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-scroll { max-height: 70vh; } }
/* --- Laporan IN / OUT brought to the family look (compact tabs / filter / KPI grid in ONE row; same markup, tighter presentation) --- */
.io { --io-gap: 10px; --io-kpi: 1.1rem; }
.io-head { margin-bottom: 0; } .io-title { font-size: 1.3rem; } .io-desc { font-size: 0.8rem; margin-top: 3px; }
.io-tabs { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; flex-wrap: nowrap; }
.io-tab { flex: 0 0 auto; padding: 6px 16px; border: none; border-radius: 7px; background: transparent; font-size: 0.8rem; gap: 6px; }
.io-tab.on, .io-tab-in.on, .io-tab-out.on, .io-tab-transfer.on { background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(99,102,241,0.3)); color: #fff; border: none; }
.io-tab-ic { font-size: 0.95rem; }
.io-card { padding: 10px 12px; } .io-card-head { margin-bottom: 8px; } .io-card-title { font-size: 0.88rem; } .io-card-sub { font-size: 0.72rem; color: var(--text3); }
.io-filter-title { display: none; }
.io-filter-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px 10px; align-items: end; }
.io-f { grid-column: span 3; min-width: 0; } .io-f.s2 { grid-column: span 2; } .io-f.s3 { grid-column: span 3; } .io-f.s4 { grid-column: span 4; }
.io-f label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3); margin-bottom: 3px; }
.io-f input, .io-f select { min-height: 32px; height: 32px; padding: 0 9px; font-size: 0.8rem; border-radius: 7px; }
.io-f-period .io-dates { max-width: 420px; }
.io-chips { margin-top: 5px; gap: 4px; } .io-chip { padding: 2px 9px; font-size: 0.7rem; border-radius: 14px; }
.io-f-actions .io-filter-actions { margin-top: 0; justify-content: flex-end; } .io-filter-actions .btn { height: 32px; padding: 0 16px; font-size: 0.78rem; }
.io-kpis { grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 10px; }
.io-kpi { gap: 8px; padding: 7px 10px; border-width: 1px; border-left-width: 3px; border-radius: 10px; background: var(--card) !important; align-items: center; }
.io-kpi-ic { width: 30px; height: 30px; border-radius: 8px; font-size: 0.95rem; }
.io-kpi-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3); }
.io-kpi .io-kpi-value { font-size: 1.05rem; margin: 0; color: var(--text); }
.io-kpi-sub { font-size: 0.68rem; color: var(--text3); } .io-kpi-delta { font-size: 0.66rem; margin-top: 1px; }
.io-kpi.tone-green { border-color: var(--border); border-left-color: #22c55e; } .io-kpi.tone-blue { border-color: var(--border); border-left-color: #3b82f6; } .io-kpi.tone-red { border-color: var(--border); border-left-color: #ef4444; } .io-kpi.tone-amber { border-color: var(--border); border-left-color: #f59e0b; }
.io-kpi.tone-purple { border-color: var(--border); border-left-color: #8b5cf6; } .io-kpi.tone-teal { border-color: var(--border); border-left-color: #14b8a6; } .io-kpi.tone-indigo { border-color: var(--border); border-left-color: #6366f1; }
.io-kpi.tone-green .io-kpi-value, .io-kpi.tone-red .io-kpi-value { color: var(--text); }
.io-svg { max-height: 240px; }
.io-table th, .io-table td { padding: 6px 8px; } .io-table th { font-size: 0.66rem; letter-spacing: 0.02em; text-transform: uppercase; } .io-table { font-size: 0.77rem; }
.io-seg-btn { padding: 5px 12px; font-size: 0.76rem; }
@media (max-width: 1100px) { .io-f, .io-f.s2, .io-f.s3, .io-f.s4 { grid-column: span 6; } .io-f-period { grid-column: span 12; } }
@media (max-width: 760px) { .io-tabs { display: flex; align-self: stretch; } .io-tab { flex: 1 1 0; min-width: 0; padding: 7px 4px; justify-content: center; text-align: center; font-size: 0.74rem; } .io-tab-ic { display: none; } .io-tab-tx { white-space: normal; } }
@media (max-width: 640px) { .io-f, .io-f.s2, .io-f.s3, .io-f.s4 { grid-column: span 12; } .io-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* --- Laporan Pembelian + Nilai HPP: same compact family look (flat KPI cards with a tone edge, one-row filter grid, tighter tables) --- */
.pur-title, .val-title { font-size: 1.3rem; } .pur-desc, .val-desc { font-size: 0.8rem; }
.pur-card, .val-card { padding: 10px 12px; } .pur-card-title, .val-card-title { font-size: 0.88rem; } .pur-card-sub, .val-card-sub { font-size: 0.72rem; color: var(--text3); }
.pur-filter-grid { grid-template-columns: minmax(250px, 1.7fr) repeat(5, minmax(0, 1fr)); gap: 6px 10px; } .val-filter-grid { gap: 6px 10px; }
.pur-f label, .val-f label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3); margin-bottom: 3px; }
.pur-f input, .pur-f select, .val-f input, .val-f select { min-height: 32px; height: 32px; padding: 0 9px; font-size: 0.8rem; border-radius: 7px; }
.pur-filter-actions .btn, .val-filter-actions .btn { height: 32px; padding: 0 16px; font-size: 0.78rem; }
.pur-filters, .val-filters { gap: 8px; }
.pur-kpi, .val-kpi { padding: 7px 12px; border: 1px solid var(--border); border-left-width: 3px; border-radius: 10px; background: var(--card) !important; }
.pur-kpi-label, .val-kpi-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3) !important; }
.pur-kpi-value, .val-kpi-value { font-size: 1.1rem; margin: 0; }
.pur-kpi-sub, .val-kpi-sub { font-size: 0.68rem; color: var(--text3); }
.pur-kpi.tone-blue, .val-kpi.tone-blue { border-left-color: #3b82f6; } .pur-kpi.tone-green, .val-kpi.tone-green { border-left-color: #22c55e; } .pur-kpi.tone-red, .val-kpi.tone-red { border-left-color: #ef4444; }
.pur-kpi.tone-amber, .val-kpi.tone-amber { border-left-color: #f59e0b; } .pur-kpi.tone-purple, .val-kpi.tone-purple { border-left-color: #8b5cf6; } .pur-kpi.tone-teal, .val-kpi.tone-teal { border-left-color: #14b8a6; } .pur-kpi.tone-indigo, .val-kpi.tone-indigo { border-left-color: #6366f1; }
.pur-kpi.blue, .val-kpi.blue { border-left-color: #3b82f6; } .pur-kpi.green, .val-kpi.green { border-left-color: #22c55e; } .pur-kpi.amber, .val-kpi.amber { border-left-color: #f59e0b; } .pur-kpi.purple, .val-kpi.purple { border-left-color: #8b5cf6; }
.pur-kpi.teal, .val-kpi.teal { border-left-color: #14b8a6; } .pur-kpi.indigo, .val-kpi.indigo { border-left-color: #6366f1; } .pur-kpi.red, .val-kpi.red { border-left-color: #ef4444; }
.pur-svg, .val-svg { max-height: 240px; }
.pur-table th, .pur-table td, .val-table th, .val-table td { padding: 6px 8px; } .pur-table, .val-table { font-size: 0.77rem; }
.pur-note { padding: 6px 11px; font-size: 0.76rem; }
.val-cmp { background: transparent !important; border: 0 !important; border-left: 2px solid var(--border) !important; border-radius: 0 !important; padding: 2px 12px !important; } .val-cmp.hl { border-left-color: #f59e0b !important; }
@media (max-width: 1100px) { .pur-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pur-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ===== RV3 REPORT FAMILY 20261008 END ===== */

/* ===== SOA3 AUDIT UI 20261008 BEGIN =====
   Laporan Stock Opname (report-opname-audit.js): only what the shared .rp-* report family does not already provide — filter-grid spans that keep the card at
   TWO rows on desktop AND iPad, the KPI row, the session context strip, the Rincian Item filter row, the column chooser grid, evidence thumbnails, the wide
   iPad-safe drawer and the evidence lightbox. Everything is scoped to .soa3 / .soa3-* (the retired .soa-* rules are not used). */
.soa3 .rp-page { gap: 10px; }
.soa3 .rp-filter { padding: 8px 12px; } .soa3-fgrid { gap: 6px 10px; }
.soa3 .rp-page > * { min-width: 0; }
.soa3 .rp-title { font-size: 1.2rem; }
.soa3-fgrid .rp-f.c3 { grid-column: span 3; } .soa3-fgrid .rp-f.c8 { grid-column: span 8; }
.soa3-fgrid .soa3-fa { grid-column: span 4; display: flex; gap: 6px; align-items: flex-end; justify-content: flex-end; }
/* Filter ringkas satu baris (flex, bungkus otomatis hanya bila layar sempit): Bulan · Gudang · Status · Pencarian · Terapkan/Reset */
.soa3-fgrid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; }
.soa3-fgrid .rp-f { grid-column: auto; flex: 0 0 auto; }
.soa3-fgrid .rp-f.c2 { width: 148px; } .soa3-fgrid .rp-f.c4 { flex: 1 1 190px; min-width: 160px; width: auto; }
.soa3-fgrid .soa3-fa { grid-column: auto; flex: 0 0 auto; margin-left: auto; }
.soa3-fgrid .rp-f > label { font-size: 0.6rem; line-height: 1; }
.soa3-fgrid .rp-f input, .soa3-fgrid .rp-f select { height: 30px; }
.soa3-acts { display: inline-flex; gap: 6px; white-space: nowrap; }
@media (max-width: 640px) { .soa3-fgrid .rp-f.c2 { width: calc(50% - 5px); } .soa3-fgrid .rp-f.c4, .soa3-fgrid .soa3-fa { flex: 1 1 100%; } .soa3-fgrid .soa3-fa .btn { flex: 1; } }

.soa3-banners:empty { display: none; } .soa3-banners { display: flex; flex-direction: column; gap: 6px; }
.soa3-kpirow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 1440px) { .soa3-kpirow { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 10px; } }
.soa3 .rp-kpis.soa3-k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.soa3 .rp-kpis.soa3-k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.soa3 .rp-kpi { padding: 6px 10px; } .soa3 .rp-kpi-v { font-size: 1.02rem; } .soa3 .rp-kpi-s { overflow-wrap: anywhere; }
@media (max-width: 700px) { .soa3 .rp-kpis.soa3-k3 { grid-template-columns: minmax(0, 1fr); } .soa3 .rp-kpis.soa3-k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.soa3 .rp-bar { gap: 8px; min-height: 36px; } .soa3-scope { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex: 1 1 260px; }
.soa3-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 11px; border: 1px solid rgba(59,130,246,0.45); background: rgba(59,130,246,0.12); border-radius: 14px; font-size: 0.74rem; color: #bfdbfe; max-width: 100%; }
.soa3-chip-x { background: transparent; border: none; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 0.7rem; line-height: 1; } .soa3-chip-x:hover { background: rgba(255,255,255,0.15); }

.soa3-panel { padding: 8px 10px; }
.soa3-busy { opacity: 0.55; pointer-events: none; transition: opacity 0.12s; }
.soa3-head.rp-card-head { margin-bottom: 6px; }
.soa3 .rp-pager .soa3-pp { width: 112px; height: 26px; padding: 0 6px; font-size: 0.72rem; }
.soa3-units { margin-top: 6px; }
.soa3-legend { margin-top: 2px; }

.soa3-ctx { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.soa3-ctxlab { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3); }
.soa3 .soa3-ctxsel { width: min(430px, 100%); flex: 0 1 430px; }
.soa3-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 14px; font-size: 0.76rem; flex: 1 1 260px; min-width: 0; }
.soa3-fact { white-space: nowrap; } .soa3-fact i { font-style: normal; color: var(--text3); }
.soa3-ifilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.soa3-ifq { flex: 1 1 240px; min-width: 180px; }
.soa3 .soa3-ifilter select.rp-input { width: auto; flex: 0 0 auto; min-width: 128px; }
.soa3 .soa3-ifilter .rp-btn { height: 32px; padding: 0 12px; }
.soa3 .soa3-colpanel { width: 460px; max-width: 86vw; max-height: 360px; }
.soa3-colhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.74rem; padding: 0 4px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.soa3 .rp-colpanel label { text-transform: none; letter-spacing: 0; justify-content: flex-start; text-align: left; font-weight: 500; color: var(--text); margin: 0; }
.soa3 .rp-colpanel input[type=checkbox] { width: auto; flex: 0 0 auto; margin: 0; }
.soa3-colgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6px; }
.soa3-link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.74rem; font-family: inherit; padding: 0; } .soa3-link:hover { text-decoration: underline; }

.soa3 .rp-table tfoot td.sticky1 { background: var(--bg3); }
.soa3 .rp-table tbody tr.click:hover td.sticky1 { background: #1b2840; } .soa3 .rp-table tbody tr.sel td.sticky1 { background: #1a2a49; }
.soa3 .rp-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.soa3-nowrap { white-space: nowrap; }
.soa3 .rp-table th, .soa3 .rp-table td { padding-left: 7px; padding-right: 7px; }
.soa3-ppl { display: inline-block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.soa3 .rp-table td.soa3-name, .soa3 .rp-table th.soa3-name { min-width: 150px; max-width: 280px; }
.soa3-thumbs { display: inline-flex; align-items: center; gap: 4px; }
.soa3-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border); cursor: zoom-in; background: #0b1020; display: block; } .soa3-thumb.broken { outline: 2px solid #ef4444; }
.soa3-more { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); border-radius: 5px; font-size: 0.68rem; padding: 3px 6px; cursor: pointer; font-family: inherit; }

.drawer.rp-drawer.soa3-drawer { width: min(1180px, 100vw); height: auto; top: 0; bottom: 0; max-height: 100%; }
.drawer.soa3-drawer .drawer-header, .drawer.soa3-drawer .drawer-tabs { flex: 0 0 auto; }
.drawer.soa3-drawer .drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.soa3-dsub { padding: 8px 20px 0; font-size: 0.78rem; color: var(--text2); }
.soa3-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 22px; }
.soa3-kv-row { display: flex; flex-direction: column; min-width: 0; padding: 4px 0 5px; border-bottom: 1px solid rgba(42,51,72,0.6); }
.soa3-kv-k { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text3); }
.soa3-kv-v { font-size: 0.84rem; font-weight: 600; overflow-wrap: anywhere; } .soa3-kv-v .soa3-ppl { max-width: 100%; white-space: normal; }
.soa3-dhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.soa3-pills, .soa3-dact { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.soa3-gap { margin-bottom: 10px; }
.soa3-dq { font-size: 0.78rem; color: var(--text2); margin-top: 14px; } .soa3-dq ul { margin: 6px 0 0 18px; line-height: 1.5; }
.soa3-evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.soa3-fig { margin: 0; cursor: zoom-in; } .soa3-fig-img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #0b1020; display: block; }
.soa3-fig figcaption { font-size: 0.72rem; color: var(--text2); margin-top: 4px; overflow-wrap: anywhere; }

.soa3-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(5,8,16,0.93); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; overflow: auto; }
.soa3-lb-close { position: absolute; top: 12px; right: 16px; background: rgba(255,255,255,0.12); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; z-index: 2; }
.soa3-lb-main { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 1100px; flex: 1 1 auto; min-height: 0; }
.soa3-lb-stage { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; min-width: 0; }
.soa3-lb-img { max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: 8px; background: #0b1020; }
.soa3-lb-nav { background: rgba(255,255,255,0.12); border: none; color: #fff; width: 42px; height: 64px; border-radius: 10px; font-size: 1.6rem; cursor: pointer; }
.soa3-lb-strip { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 2px; }
.soa3-lb-th { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; opacity: 0.6; } .soa3-lb-th.on { border-color: #3b86ff; opacity: 1; }
.soa3-lb-info { width: 100%; max-width: 900px; color: #dbe3f5; font-size: 0.82rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
@media (max-width: 700px) { .soa3-lb-info { grid-template-columns: minmax(0, 1fr); } .soa3-lb-nav { width: 34px; } }
/* ===== SOA3 AUDIT UI 20261008 END ===== */

/* ===== RV3 UI CORRECTION 20261019 BEGIN =====
   Production UI correction — the five reports share ONE shell (compact header · ≤2-row filter card · KPI row · chart · table card) in the Inventory Pro dashboard language
   (dark panels, thin borders, tinted KPI cards with an icon tile — the approved "Pergerakan Stok Harian" mockup). Frontend only; loaded after every earlier report block. */

/* 1. an inactive page is never displayed. .rp-page / .io / .pur / .val / .mvr / .soa3 put display:flex on the .tab-content container itself, which beat .tab-content{display:none}:
      a report opened earlier stayed rendered ABOVE every page opened afterwards. */
.tab-content:not(.active) { display: none !important; }
/* 2. sidebar safety net: the old report links are never shown (index.html keeps them only inside .sidebar-legacy-routes; report-tools.js marks any stray one with data-rv3-hide) */
.sidebar-legacy-routes, .sidebar-legacy-routes * { display: none !important; }
.sidebar-link[data-rv3-hide] { display: none !important; }

/* 3. page rhythm: one gap, one header, one title size */
.rp-page, .io, .pur, .val, .soa3 { gap: 10px; min-width: 0; max-width: 100%; }
.rp-head, .io-head, .pur-head, .val-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 2px; }
.rp-title, .io-title, .pur-title, .val-title { font-size: 1.3rem; font-weight: 800; line-height: 1.2; margin: 0; }
.rp-desc, .io-desc, .pur-desc, .val-desc { margin: 3px 0 0; font-size: 0.8rem; color: var(--text2); max-width: 78ch; line-height: 1.4; }
.io-tabs { margin: 0; }

/* 4. KPI cards: ONE row, same card on every report (tone = --rgb) */
.rp-kpis, .io-kpis, .pur-kpis, .val-kpis { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none !important; gap: 10px; align-items: stretch; }
.rp-kpi, .io-kpi, .pur-kpi, .val-kpi {
  --rgb: 59,130,246; --lt: #93c5fd;
  position: relative; display: grid !important; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; align-content: center;
  min-width: 0; min-height: 66px; padding: 9px 12px !important; margin: 0; border-radius: 12px !important; text-align: left; color: var(--text); font-family: inherit;
  border: 1px solid rgba(var(--rgb), 0.5) !important;
  background: linear-gradient(135deg, rgba(var(--rgb), 0.22), rgba(var(--rgb), 0.05) 72%), var(--card) !important;
  container-type: inline-size;
}
.rp-kpi.click:hover { border-color: rgb(var(--rgb)) !important; cursor: pointer; }
.rp-kpi.t-blue, .io-kpi.tone-blue, .pur-kpi.tone-blue, .pur-kpi.blue, .val-kpi.tone-blue, .val-kpi.blue { --rgb: 59,130,246; --lt: #93c5fd; }
.rp-kpi.t-green, .io-kpi.tone-green, .pur-kpi.tone-green, .pur-kpi.green, .val-kpi.tone-green, .val-kpi.green { --rgb: 34,197,94; --lt: #86efac; }
.rp-kpi.t-red, .io-kpi.tone-red, .pur-kpi.tone-red, .pur-kpi.red, .val-kpi.tone-red, .val-kpi.red { --rgb: 239,68,68; --lt: #fca5a5; }
.rp-kpi.t-amber, .io-kpi.tone-amber, .pur-kpi.tone-amber, .pur-kpi.amber, .val-kpi.tone-amber, .val-kpi.amber { --rgb: 245,158,11; --lt: #fcd34d; }
.rp-kpi.t-purple, .io-kpi.tone-purple, .pur-kpi.tone-purple, .pur-kpi.purple, .val-kpi.tone-purple, .val-kpi.purple { --rgb: 139,92,246; --lt: #c4b5fd; }
.rp-kpi.t-cyan, .rp-kpi.t-teal, .io-kpi.tone-teal, .pur-kpi.tone-teal, .pur-kpi.teal, .val-kpi.tone-teal, .val-kpi.teal { --rgb: 20,184,166; --lt: #5eead4; }
.rp-kpi.t-indigo, .io-kpi.tone-indigo, .pur-kpi.tone-indigo, .pur-kpi.indigo, .val-kpi.tone-indigo, .val-kpi.indigo { --rgb: 99,102,241; --lt: #a5b4fc; }
.rp-kpi.t-gray, .io-kpi.tone-gray, .pur-kpi.tone-gray, .val-kpi.tone-gray { --rgb: 100,116,139; --lt: #cbd5e1; }
.rp-kpi-ic, .io-kpi-ic { grid-column: 1; grid-row: 1 / span 3; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 1rem; line-height: 1; color: #fff; background: rgba(var(--rgb), 0.92) !important; box-shadow: 0 2px 8px rgba(var(--rgb), 0.35); }
.rp-kpi > :not(.rp-kpi-ic), .pur-kpi > :not(.rp-kpi-ic), .val-kpi > :not(.rp-kpi-ic) { grid-column: 2; min-width: 0; }
.io-kpi-body { grid-column: 2; min-width: 0; display: block; }
.rp-kpi-l, .io-kpi-label, .pur-kpi-label, .val-kpi-label { font-size: 0.7rem !important; font-weight: 700; letter-spacing: 0.02em; text-transform: none !important; color: var(--lt) !important; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-kpi-v, .io-kpi .io-kpi-value, .pur-kpi-value, .val-kpi-value { font-size: clamp(0.92rem, 10.5cqw, 1.12rem) !important; font-weight: 800; margin: 1px 0 0 !important; color: var(--text) !important; font-variant-numeric: tabular-nums; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-kpi-s, .io-kpi-sub, .pur-kpi-sub, .val-kpi-sub, .io-kpi-delta { font-size: 0.68rem !important; color: var(--text3) !important; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
@container (max-width: 128px) { .rp-kpi-ic, .io-kpi-ic { display: none; } .rp-kpi, .io-kpi, .pur-kpi, .val-kpi { grid-template-columns: minmax(0, 1fr); } .rp-kpi > :not(.rp-kpi-ic), .pur-kpi > :not(.rp-kpi-ic), .val-kpi > :not(.rp-kpi-ic), .io-kpi-body { grid-column: 1; } }
@media (max-width: 1100px) { .rp-kpis, .io-kpis, .pur-kpis, .val-kpis { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; } }
@media (max-width: 760px) { .rp-kpis, .io-kpis, .pur-kpis, .val-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* 5. cards: one radius / padding; chart compact */
.rp-card, .io-card, .pur-card, .val-card { padding: 10px 12px; border-radius: 12px; }
.rp-chart svg, .io-svg, .pur-svg, .val-svg { width: 100%; height: auto; max-height: 260px; }

/* 6. table card toolbar: title left, controls right on ONE row (wraps on narrow widths) */
.io-card-tools, .pur-card-tools, .val-card-tools, .rp-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.io-search, .pur-search { flex: 0 1 240px; width: 240px; min-width: 150px; height: 32px; padding: 0 10px; font-size: 0.8rem; border-radius: 8px; }
.io-col-btn, .pur-col-btn { height: 32px; padding: 0 12px; font-size: 0.78rem; }
.io-card-head, .pur-card-head, .val-card-head { margin-bottom: 8px; }
/* Stock Opname: the 3 session KPIs + the 4 condition KPIs are ONE row of seven equal cards */
.soa3-kpirow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; gap: 10px; }
.soa3-kpirow > .rp-kpis { display: contents !important; }
@media (max-width: 1100px) { .soa3-kpirow { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
@media (max-width: 760px) { .soa3-kpirow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.io-kpi-body { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.io-kpi-body > .io-kpi-sub, .io-kpi-body > .io-kpi-delta { display: inline; } .io-kpi-body > .io-kpi-delta::before { content: ' · '; color: var(--text3); }
.io-kpi-label { display: block; }
.val-titlerow { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.val-titlerow .val-badges { margin: 0; display: inline-flex; gap: 6px; flex-wrap: wrap; } .val-badge { padding: 2px 9px; font-size: 0.68rem; }
.val-detail-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.val-subcard { background: transparent; border: 0; border-radius: 0; padding: 0; min-width: 0; overflow-x: auto; }
.val-detail-left > .val-subcard + .val-subcard, .val-detail-right > .val-subcard + .val-subcard { border-top: 1px solid var(--border); padding-top: 10px; }
.val-pick { align-items: end; gap: 10px 14px; margin-bottom: 8px; }
@media (max-width: 1200px) { .val-detail-grid { grid-template-columns: minmax(0, 1fr); } }
.rp-tools .rp-input, .rp-tools .mv-search { flex: 0 1 220px; width: 220px; min-width: 140px; height: 32px; }
.rp-tools .rp-tabs { flex: 0 0 auto; padding: 2px; } .rp-tools .rp-tabs button { padding: 5px 14px; }
.rp-tools .btn { height: 32px; padding: 0 12px; white-space: nowrap; }
#val-bucket-wrap[hidden] { display: none !important; }
@media (min-width: 761px) and (max-width: 1100px) { .val-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .val-filter-grid > .val-f:first-child { grid-column: span 2; } .val-filter-row2 { flex-wrap: nowrap; align-items: center; gap: 8px; } .val-filter-row2 .val-toggle-wrap { flex: 1 1 auto; min-width: 0; gap: 6px 10px; } .val-filter-actions { flex: 0 0 auto; margin-left: auto; } .val-filter-actions .btn { padding: 0 10px; } }
@media (max-width: 1280px) { .rp-kpi-l, .io-kpi-label, .pur-kpi-label, .val-kpi-label { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
/* ===== RV3 UI CORRECTION 20261019 END ===== */

/* ===== RV3 DASHBOARD MOVEMENT 20261020 BEGIN =====
   Dashboard "Ringkasan Pergerakan Stok": five cards (Stok Awal + Stock IN − Stock OUT + Adjustment = Stok Akhir) with the arithmetic operators between them, the arithmetic line,
   the transfer strip (supporting detail) and the Adjustment breakdown named by ledger type. Loaded after the earlier dashboard rules. */
@media (min-width: 1101px) { .dash-mv-cards { display: flex; gap: 6px; align-items: stretch; } .dash-mv-cards > .dash-mv { flex: 1 1 0; min-width: 0; } .dash-mv-cards > .dash-mv-op { flex: 0 0 auto; } }
.dash-mv.is-tin { background: linear-gradient(135deg, rgba(20,184,166,0.24), rgba(15,23,42,0.85)); border-color: #14b8a6; } .dash-mv.is-tin .dash-label { color: #5eead4; }
.dash-mv.is-tout { background: linear-gradient(135deg, rgba(249,115,22,0.24), rgba(15,23,42,0.85)); border-color: #f97316; } .dash-mv.is-tout .dash-label { color: #fdba74; }
.dash-mv-cards.has-transfer .dash-mv { padding: 10px 8px; gap: 6px; } .dash-mv-cards.has-transfer .dash-tile { width: 28px; height: 28px; }
.dash-mv-op { justify-content: center; font-weight: 800; font-size: 1.15rem; padding: 0 2px; color: #dbe3f5; }
.dash-mv.is-adj { background: linear-gradient(135deg, rgba(245,158,11,0.26), rgba(15,23,42,0.85)); border-color: #d99a1f; }
.dash-mv.is-adj .dash-label { color: #fcd34d; }
.dash-mv-value.neg { color: #ff8a73; } .dash-mv-value.pos { color: #3ddc97; }
.dash-arith { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; padding: 7px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; font-size: var(--dz-sub); line-height: 1.5; }
.dash-arith-l { color: var(--text3); } .dash-arith-t strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-arith-eq { border-left: 1px solid var(--border); padding-left: 14px; }
.dash-transfer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 6px; font-size: var(--dz-sub); color: var(--text2); }
.dash-tr-title { font-weight: 700; color: var(--text); } .dash-tr-n { color: var(--text3); }
.dash-tr-item.dash-click { cursor: pointer; } .dash-tr-item.is-zero { opacity: 0.65; }
.dash-tr-net.ok { color: #3ddc97; } .dash-tr-net.warn { color: #fbbf24; }
@media (max-width: 1100px) { .dash-mv-op { display: none; } }
.dash-tile.tone-adj { background: #b45309; } .dash-tile.tone-tin { background: #0f766e; } .dash-tile.tone-tout { background: #c2410c; }
/* ===== RV3 DASHBOARD MOVEMENT 20261020 END ===== */

/* Money KPIs must never be cut off with an ellipsis ("Rp 253.872.5…"): wrap instead of hiding digits. */
.rp-kpi-v, .io-kpi .io-kpi-value, .pur-kpi-value, .val-kpi-value, .mvr-kpi-value {
    white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere;
}

/* ===== SO LINE MODE (30 Okt 2026): layar petugas ringkas ramah HP, hanya gudang yang punya Line (SCM) ===== */
.opname-line-mode { max-width: 760px; margin: 0 auto; padding-bottom: 92px; }
.opname-line-mode .opname-counter-split { display: block; }
.opname-lm-head { background: linear-gradient(180deg, #121a2c, rgba(11,14,20,0)); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px 10px; margin-bottom: 10px; }
.opname-lm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.opname-lm-so { font-size: 0.8rem; color: var(--text2); }
.opname-lm-so b { color: var(--text); }
.opname-lm-lock { font-size: 0.7rem; background: rgba(239,68,68,0.14); color: #fca5a5; border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.opname-lm-bar { height: 6px; background: #222c44; border-radius: 6px; overflow: hidden; margin: 8px 0 3px; }
.opname-lm-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4f8cff, #7c5cff); border-radius: 6px; transition: width .3s; }
.opname-lm-pt { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text2); }
.opname-line-mode .opname-line-picker { background: none; border: 0; padding: 0; margin: 0 0 8px; box-shadow: none; }
.opname-lm-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.opname-lm-chips::-webkit-scrollbar { display: none; }
.opname-lm-chip { flex: 0 0 auto; min-width: 104px; text-align: left; background: var(--bg3); color: var(--text); border: 1.5px solid var(--border); border-radius: 14px; padding: 8px 11px; cursor: pointer; scroll-snap-align: start; font-family: inherit; }
.opname-lm-chip b { display: block; font-size: 0.85rem; white-space: nowrap; }
.opname-lm-chip span { font-size: 0.72rem; color: var(--text2); white-space: nowrap; }
.opname-lm-mb { height: 4px; background: #222c44; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.opname-lm-mb i { display: block; height: 100%; background: #34d399; }
.opname-lm-chip.on { border-color: #4f8cff; background: linear-gradient(135deg, rgba(79,140,255,.24), rgba(124,92,255,.18)); }
.opname-lm-chip.done { border-color: rgba(52,211,153,.55); }
.opname-lm-chip.done b::before { content: "✓ "; color: #34d399; }
.opname-lm-chip.un { border-style: dashed; }
.opname-line-mode .opname-counter-toolbar { background: none; border: 0; padding: 0; box-shadow: none; display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.opname-line-mode .opname-search-wrap { grid-column: 1; }
.opname-line-mode .opname-toolbar-scan { grid-column: 2; }
.opname-line-mode .opname-blind-search { width: 100%; min-height: 46px; border-radius: 12px; }
.opname-line-mode .opname-toolbar-scan .btn { min-height: 46px; padding: 0 14px; border-radius: 12px; font-size: 0; }
.opname-line-mode .opname-toolbar-scan .btn::before { content: "📷"; font-size: 1.2rem; }
.opname-line-mode .opname-toolbar-next { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; max-width: 736px; margin: 0 auto; }
.opname-line-mode .opname-next-item-btn { width: 100%; border: 0; border-radius: 15px; padding: 15px; font-size: 1rem; font-weight: 700; color: #fff; background: linear-gradient(90deg, #4f8cff, #7c5cff); box-shadow: 0 6px 20px rgba(79,140,255,.38); }
.opname-line-mode .opname-browse-toggle, .opname-line-mode .opname-filter-toggle, .opname-line-mode .opname-filter-section { display: none !important; }
.opname-line-mode .opname-browse-section { display: block !important; }
.opname-line-mode .compact-table-wrap { display: none; }
.opname-line-mode .opname-mobile-cards { display: block; }
.opname-lm-filters { display: none; }
.opname-line-mode .opname-lm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.opname-lm-seg { display: flex; align-items: center; background: var(--bg3); border-radius: 11px; padding: 3px; gap: 2px; flex: 1 1 200px; }
.opname-lm-seglabel { font-size: 0.72rem; color: var(--text3); padding: 0 6px 0 8px; }
.opname-lm-seg button { flex: 1; border: 0; background: none; color: var(--text2); padding: 7px 4px; border-radius: 9px; font-weight: 600; font-size: 0.8rem; cursor: pointer; font-family: inherit; }
.opname-lm-seg button.on { background: var(--bg2, #1c2438); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.opname-item-card--lm { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 8px; border-radius: 14px; cursor: pointer; }
.opname-item-card--lm:active { background: var(--bg2, #1c2438); }
.opname-lm-dot { width: 10px; height: 10px; border-radius: 50%; background: #fbbf24; flex: 0 0 auto; }
.opname-item-card--lm.is-done .opname-lm-dot { background: #34d399; }
.opname-item-card--lm.is-excluded { opacity: .6; cursor: default; }
.opname-lm-name { flex: 1; min-width: 0; }
.opname-lm-name b { display: block; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opname-lm-name small { color: var(--text3); font-size: 0.74rem; }
.opname-lm-inactive { background: rgba(148,163,184,.2); color: #cbd5e1; border-radius: 6px; padding: 0 6px; font-size: 0.68rem; font-weight: 700; }
.opname-lm-go { font-size: 0.8rem; font-weight: 700; color: #fff; background: #4f8cff; border-radius: 9px; padding: 7px 13px; }
.opname-lm-q { text-align: right; color: #34d399; font-size: 0.9rem; white-space: nowrap; }
.opname-lm-q small { color: var(--text2); }
/* Form hitung = bottom sheet */
.opname-line-mode .opname-counter-panel { display: none; }
.opname-line-mode.opname-sheet-open .opname-counter-panel { display: block; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 90vh; overflow-y: auto; border-radius: 22px 22px 0 0; margin: 0 auto; max-width: 760px; padding-bottom: max(18px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.55); }
.opname-sheet-backdrop { display: none; }
.opname-line-mode.opname-sheet-open .opname-sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 55; }
.opname-line-mode.opname-sheet-open .opname-toolbar-next { display: none; }
@media (min-width: 900px) { .opname-line-mode { max-width: 760px; } }

/* ===== SO LINE MODE: form hitung ringkas (30 Okt 2026) ===== */
.opname-line-mode .opname-counter-panel { padding: 12px 14px 0; }
.opname-line-mode .opname-counter-panel .card-title { font-size: 1rem; margin: 0 40px 2px 0; }
.opname-line-mode .opname-counter-panel > div[style*="color:var(--text3)"] { margin-bottom: 4px !important; font-size: 0.78rem !important; }
.opname-line-mode .opname-lm-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 1rem; line-height: 1; }
.opname-line-mode .opname-counter-panel .alert-info { padding: 6px 10px; margin: 4px 0; font-size: 0.8rem; }
.opname-line-mode .opname-unit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; margin-top: 8px !important; }
.opname-line-mode .opname-unit-input-row { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.opname-line-mode .opname-unit-input-row label { font-size: 0.7rem; letter-spacing: .04em; color: var(--text2); text-align: center; margin: 0; }
.opname-line-mode .opname-unit-input-row input { width: 100%; min-height: 46px; padding: 6px 4px; font-size: 1.25rem; text-align: center; border-radius: 12px; }
.opname-line-mode .opname-total-otomatis { margin: 8px 0 0; padding: 6px 12px; font-size: 0.82rem; border-radius: 10px; background: rgba(52,211,153,.1); color: #6ee7b7; }
.opname-line-mode .opname-remainder-block { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opname-line-mode .opname-remainder-block label { font-size: 0.7rem; margin: 0; }
.opname-line-mode .opname-remainder-block input { width: 90px; min-height: 40px; }
.opname-line-mode .opname-remainder-hint { display: none; }
.opname-line-mode .opname-zero-confirm { font-size: 0.78rem; margin-top: 6px; }
.opname-line-mode .opname-history-toggle { padding: 2px 8px; font-size: 0.75rem; }
.opname-lm-more { margin-top: 10px; border: 1px dashed var(--border); border-radius: 12px; padding: 0 10px; }
.opname-lm-more > summary { cursor: pointer; padding: 10px 2px; font-size: 0.82rem; font-weight: 600; color: var(--text2); list-style: none; }
.opname-lm-more > summary::-webkit-details-marker { display: none; }
.opname-lm-more[open] > summary { color: var(--text); }
.opname-lm-more .grid-3 { grid-template-columns: 1fr !important; gap: 8px; }
.opname-line-mode .opname-lm-save { position: sticky; bottom: 0; width: 100%; margin: 12px 0 0; padding: 14px; border: 0; border-radius: 14px; font-size: 1rem; font-weight: 700; color: #fff; background: linear-gradient(90deg, #4f8cff, #7c5cff); box-shadow: 0 -8px 16px rgba(0,0,0,.35); }
.opname-line-mode .opname-unit-input-row label { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; }
.opname-line-mode .opname-unit-input-row input { flex: 0 0 auto !important; }
