/* =========================================================
   Piket Macan Putih — tampilan
   Navy taruna + kuningan, warna lokasi: POSPAM (tembaga),
   MAINHALL (biru), Diambil (hijau)
   ========================================================= */
:root {
  --bg: #EDF0F5;
  --surface: #FFFFFF;
  --surface-2: #F5F7FA;
  --ink: #17202F;
  --ink-soft: #5A6476;
  --ink-faint: #8B94A5;
  --line: #DAE0E9;
  --line-soft: #E8ECF2;
  --primary: #1B2C52;
  --primary-hover: #24396A;
  --on-primary: #FFFFFF;
  --brass: #B8892B;
  --brass-soft: #F3E8CF;
  --side: #101B35;
  --side-2: #182647;
  --side-ink: #C9D2E4;
  --side-faint: #7D8AA6;
  --pospam: #A9611A;
  --pospam-bg: #FAEBD8;
  --mainhall: #2C58B3;
  --mainhall-bg: #E2EAFA;
  --done: #1F7A55;
  --done-bg: #DAF0E4;
  --danger: #AE3737;
  --danger-bg: #F8E0E0;
  --shadow: 0 1px 2px rgba(16, 27, 53, .06), 0 8px 24px rgba(16, 27, 53, .06);
  --shadow-lg: 0 24px 60px rgba(16, 27, 53, .22);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1222; --surface: #141C30; --surface-2: #19233B; --ink: #E6EAF2; --ink-soft: #A4AEC1; --ink-faint: #75809A;
    --line: #27324D; --line-soft: #1F2942; --primary: #6F8FDF; --primary-hover: #86A2EA; --on-primary: #0C1222;
    --brass: #D7AC55; --brass-soft: #3A2F18; --side: #090F1E; --side-2: #121B32;
    --pospam: #E09A55; --pospam-bg: #3A2716; --mainhall: #7FA2EE; --mainhall-bg: #1A2A4D; --done: #5CC596; --done-bg: #143326;
    --danger: #EC8282; --danger-bg: #3D1C1F; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1222; --surface: #141C30; --surface-2: #19233B; --ink: #E6EAF2; --ink-soft: #A4AEC1; --ink-faint: #75809A;
  --line: #27324D; --line-soft: #1F2942; --primary: #6F8FDF; --primary-hover: #86A2EA; --on-primary: #0C1222;
  --brass: #D7AC55; --brass-soft: #3A2F18; --side: #090F1E; --side-2: #121B32;
  --pospam: #E09A55; --pospam-bg: #3A2716; --mainhall: #7FA2EE; --mainhall-bg: #1A2A4D; --done: #5CC596; --done-bg: #143326;
  --danger: #EC8282; --danger-bg: #3D1C1F; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: var(--primary); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--ink-soft); font-size: 13px; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.req { color: var(--danger); font-style: normal; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }

/* ---------- Crest / logo ---------- */
.crest {
  width: 72px; height: 84px; display: grid; place-items: center; color: var(--brass);
  background: linear-gradient(160deg, #1E3260, #0E1A33); border: 2px solid var(--brass);
  clip-path: polygon(50% 0, 100% 14%, 100% 62%, 50% 100%, 0 62%, 0 14%);
  font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 1px;
}
.crest-sm { width: 40px; height: 46px; font-size: 14px; border-width: 1.5px; }

/* ---------- Shell ---------- */
.app-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--side); color: var(--side-ink); border-right: 1px solid rgba(255,255,255,.04);
}
.app-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-logo { width: 44px; height: 48px; display: grid; place-items: center; flex: none; }
.brand-logo img { max-height: 48px; max-width: 44px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 700; color: #F3E6C4; font-size: 15px; letter-spacing: .4px; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--side-faint); line-height: 1.35; margin-top: 2px; }
.app-nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; scrollbar-width: thin; scrollbar-color: #2A3657 transparent; }
.nav-section { font-size: 11.5px; font-weight: 600; color: var(--side-faint); padding: 16px 10px 6px; letter-spacing: .2px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 10px; margin: 1px 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--side-ink); cursor: pointer; text-align: left; font-size: 13.5px; font-weight: 500; text-decoration: none; position: relative;
}
.nav-item .ic { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: var(--side-2); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); }
.nav-item.active .ic { color: var(--brass); opacity: 1; }
.nav-count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; }
.nav-count:empty { display: none; }
.nav-item[data-count="pospam"] .nav-count { background: rgba(224,154,85,.22); color: #F5C796; }
.nav-item[data-count="mainhall"] .nav-count { background: rgba(127,162,238,.22); color: #BFD0F7; }
.app-sidebar-foot { padding: 12px 10px 14px; border-top: 1px solid rgba(255,255,255,.06); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; }
.user-name { font-weight: 600; color: #fff; font-size: 13.5px; line-height: 1.3; }
.nav-logout { color: var(--side-faint); }
.sidebar-scrim { display: none; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brass-soft); color: var(--brass); font-weight: 700; font-size: 13px; letter-spacing: .3px;
}
.app-sidebar .avatar { background: rgba(184,137,43,.18); color: #E7C77F; }
.avatar-sm { width: 32px; height: 32px; font-size: 11.5px; }

.role-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; white-space: nowrap; background: var(--line-soft); color: var(--ink-soft); }
.role-admin { background: var(--brass-soft); color: var(--brass); }
.role-petugas_pospam { background: var(--pospam-bg); color: var(--pospam); }
.role-petugas_mainhall { background: var(--mainhall-bg); color: var(--mainhall); }
.role-pamong { background: var(--line-soft); color: var(--ink-soft); }
.app-sidebar .role-pill { margin-top: 3px; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.topbar-sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.topbar-sub:empty { display: none; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.clock { text-align: right; line-height: 1.2; }
.clock b { display: block; font-size: 17px; font-weight: 700; }
.clock span { font-size: 11.5px; color: var(--ink-soft); }
.only-mobile, .icon-btn.only-mobile { display: none; }
.app-content { flex: 1; padding: 22px 28px 32px; max-width: 1440px; width: 100%; }
.app-footer {
  padding: 16px 28px 20px; font-size: 12px; color: var(--ink-faint); border-top: 1px solid var(--line-soft); text-align: center;
}
.banner {
  display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 16px 28px 0; padding: 10px 14px;
  background: var(--brass-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brass) 35%, transparent); border-radius: var(--r);
  font-size: 13.5px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; text-decoration: none;
}
.btn .ic { width: 16px; height: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-faint); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-bg); }
.btn-mainhall { background: var(--mainhall); color: #fff; }
.btn-mainhall:hover:not(:disabled) { filter: brightness(1.08); }
.btn-done { background: var(--done); color: #fff; }
.btn-done:hover:not(:disabled) { filter: brightness(1.08); }
:root[data-theme="dark"] .btn-mainhall, :root[data-theme="dark"] .btn-done { color: #0C1222; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-mainhall, :root:not([data-theme="light"]) .btn-done { color: #0C1222; } }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; gap: 5px; }
.btn-xs .ic { width: 14px; height: 14px; }
.btn-block { width: 100%; height: 44px; font-size: 14.5px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.icon-btn-sm { width: 30px; height: 30px; }
.icon-btn-sm .ic { width: 16px; height: 16px; }
.icon-danger:hover { color: var(--danger); background: var(--danger-bg); }
.link-btn { border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 4px 0; }
.link-btn:hover { text-decoration: underline; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px 3px 8px; border-radius: 20px; white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-pospam { background: var(--pospam-bg); color: var(--pospam); }
.badge-mainhall { background: var(--mainhall-bg); color: var(--mainhall); }
.badge-done { background: var(--done-bg); color: var(--done); }
.badge-trash { background: var(--danger-bg); color: var(--danger); }
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.pill-on { background: var(--done-bg); color: var(--done); }
.pill-off { background: var(--line-soft); color: var(--ink-faint); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot-pospam { background: var(--pospam); }
.dot-mainhall { background: var(--mainhall); }
.kode { font-weight: 600; font-size: 12.5px; letter-spacing: .2px; color: var(--ink); white-space: nowrap; }
.n-pospam { color: var(--pospam); font-weight: 700; }
.n-mainhall { color: var(--mainhall); font-weight: 700; }
.age { font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.age-stale { color: var(--danger); }

/* ---------- Dashboard ---------- */
.dash-hello { margin-bottom: 18px; }
.dash-hello h2 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.dash-hello p { margin: 4px 0 0; color: var(--ink-soft); }

.pipeline {
  display: grid; grid-template-columns: minmax(0, 1fr) 136px minmax(0, 1fr) 136px minmax(0, 1fr); align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.stage {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 0; border-radius: 12px; cursor: pointer; text-align: left; background: transparent;
  transition: background .15s;
}
.stage:hover { background: var(--surface-2); }
.stage-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.stage-ic .ic { width: 26px; height: 26px; stroke-width: 1.6; }
.stage-pospam .stage-ic { background: var(--pospam-bg); color: var(--pospam); }
.stage-mainhall .stage-ic { background: var(--mainhall-bg); color: var(--mainhall); }
.stage-done .stage-ic { background: var(--done-bg); color: var(--done); }
.stage-txt { display: flex; flex-direction: column; min-width: 0; }
.stage-name { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.stage-txt b { font-size: 38px; line-height: 1.05; font-weight: 800; letter-spacing: -1px; }
.stage-pospam b { color: var(--pospam); }
.stage-mainhall b { color: var(--mainhall); }
.stage-done b { color: var(--done); }
.stage-txt small { font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 4px; }
.stage-link::before {
  content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 0; border-top: 2px dashed var(--line);
}
.stage-link::after {
  content: ''; position: absolute; right: 4px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 7px solid var(--line); border-right: 0;
}
.stage-link span, .stage-link small { position: relative; background: var(--surface); padding: 0 6px; z-index: 1; }
.stage-link span { font-weight: 700; font-size: 13px; margin-top: -26px; white-space: nowrap; }
.stage-link small { font-size: 11px; color: var(--ink-faint); margin-top: 18px; line-height: 1.25; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.kpi span { font-size: 12.5px; color: var(--ink-soft); }
.kpi-warn b, .kpi-pospam b { color: var(--pospam); }
.kpi-danger b { color: var(--danger); }
.kpi-mainhall b { color: var(--mainhall); }
.kpi-done b { color: var(--done); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-2 > .panel, .grid-3 > .panel { margin-bottom: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-soft); }
.legend-bottom { margin-top: 10px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-in { background: var(--primary); }
.lg-out { background: var(--done); }
.lg-pospam { background: var(--pospam); }
.lg-mainhall { background: var(--mainhall); }

.mini-list { display: flex; flex-direction: column; }
.mini-item { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.mini-item:last-of-type { border-bottom: 0; }
.mini-item:hover { background: var(--surface-2); }
.mi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-main span { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-side { display: flex; align-items: center; gap: 8px; flex: none; }
.mi-more { margin-top: 6px; align-self: flex-start; }
.mini-empty { color: var(--ink-faint); font-size: 13px; padding: 18px 4px; text-align: center; }

.chart { width: 100%; }
.bars { width: 100%; height: auto; display: block; }
.bars .grid { stroke: var(--line-soft); stroke-width: 1; }
.bars .base { stroke: var(--line); stroke-width: 1; }
.bars .axis { fill: var(--ink-faint); font-size: 10px; font-family: var(--font); }
.bars .b-in { fill: var(--primary); }
.bars .b-out { fill: var(--done); }

.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: 120px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; }
.hb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.hb-track { display: flex; height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.hb-track i { display: block; height: 100%; }
.seg-pospam { background: var(--pospam); }
.seg-mainhall { background: var(--mainhall); }
.seg-navy { background: var(--primary); }
.hbar b { text-align: right; }

.feed { display: flex; flex-direction: column; }
.feed-item { display: grid; grid-template-columns: 128px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.feed-item:last-child { border-bottom: 0; }
.feed-time { color: var(--ink-faint); font-size: 12px; }
.feed-item small { display: block; color: var(--ink-soft); font-size: 12px; margin-top: 2px; word-break: break-word; }
.role-mini { font-size: 11px; color: var(--ink-faint); }

/* ---------- Filter & table ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button b { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--line-soft); color: var(--ink-soft); margin-left: 4px; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--brass); }
.tabs button[data-tab="pospam"] b { background: var(--pospam-bg); color: var(--pospam); }
.tabs button[data-tab="mainhall"] b { background: var(--mainhall-bg); color: var(--mainhall); }

.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filterbar .ss { width: auto; min-width: 150px; max-width: 220px; }
.search-box { position: relative; flex: 1 1 260px; max-width: 380px; }
.search-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); width: 16px; height: 16px; }
.search-box input { padding-left: 34px !important; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 9px 12px; resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.mini-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-soft); font-weight: 600; min-width: 0; }
.mini-field.inline { flex-direction: row; align-items: center; gap: 6px; }
.mini-field.inline input { width: 150px; }

.bulkbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r);
  background: var(--mainhall-bg); color: var(--mainhall); font-weight: 600;
}
.bulkbar span { flex: 1; }

.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 11px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-detail] { cursor: pointer; }
.data-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.data-table tr.is-selected td { background: var(--mainhall-bg); }
.data-table tr.is-stale td:first-child, .data-table tr.is-stale td:nth-child(2) { box-shadow: inset 3px 0 0 var(--danger); }
.data-table.with-check tr.is-stale td:nth-child(2) { box-shadow: none; }
.data-table.compact th, .data-table.compact td { padding: 8px 10px; font-size: 12.5px; }
.data-table .num { text-align: right; }
.t-main { display: block; font-weight: 600; }
.t-sub { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.t-warn { color: var(--danger); font-weight: 600; }
.col-check { width: 0; padding-right: 0 !important; }
.data-table:not(.with-check) .col-check { display: none; }
.col-act { width: 1%; white-space: nowrap; }
.acts { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.log-detail { max-width: 420px; font-size: 12.5px; color: var(--ink-soft); word-break: break-word; }
.aksi { font-weight: 600; font-size: 12.5px; }
.aksi-hapus, .aksi-login_gagal { color: var(--danger); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty b { font-size: 15px; color: var(--ink); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; font-size: 12.5px; color: var(--ink-soft); border-top: 1px solid var(--line-soft); }
.pager:empty { display: none; }
.pg-num { font-weight: 600; color: var(--ink); }

/* ---------- Laporan ---------- */
.lap-filter { padding: 16px 18px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--line-soft); }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16,27,53,.12); }
.seg-sm button { padding: 5px 12px; font-size: 12.5px; }
.lap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 14px 0; }
.lap-search { grid-column: span 2; }
.lap-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.lap-periode { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.lap-periode b { font-size: 15px; }
.lap-periode span { font-size: 12.5px; color: var(--ink-soft); }
.lap-export { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; }
.lap-export-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; }
.lap-export-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lap-export-info b { font-size: 14px; }
.lap-export-info span { font-size: 12px; color: var(--ink-soft); }
.lap-export-btns { display: flex; gap: 6px; flex-shrink: 0; }
.lap-export-card.disabled { opacity: .55; }
.rekap { padding: 14px 0 6px; }
.rekap .panel-head { padding: 0 16px; margin-bottom: 8px; }
.rekap-scroll { max-height: 300px; overflow: auto; }
.rekap .data-table th:first-child, .rekap .data-table td:first-child { padding-left: 16px; }
.rekap .data-table td:first-child { min-width: 140px; }
#lpBody td { white-space: nowrap; }
#view-laporan .panel > .table-scroll { margin: 0 -18px; }
#view-laporan .panel > .table-scroll .data-table th:first-child, #view-laporan .panel > .table-scroll .data-table td:first-child { padding-left: 18px; }

/* ---------- Searchable select ---------- */
.ss { position: relative; width: 100%; }
.ss-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; left: 0; bottom: 0; }
.ss-btn {
  width: 100%; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); cursor: pointer; text-align: left; color: var(--ink);
}
.ss-btn:hover { border-color: var(--ink-faint); }
.ss.open .ss-btn { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.ss-btn:disabled { opacity: .6; cursor: not-allowed; }
.ss-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-btn.is-empty .ss-label { color: var(--ink-faint); }
.ss-caret { width: 16px; height: 16px; fill: none; stroke: var(--ink-faint); stroke-width: 2; flex: none; }
.ss.is-filter .ss-btn { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); font-weight: 600; }
.ss-panel {
  position: fixed; z-index: 400; display: none; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.ss-panel.open { display: flex; }
.ss-search { position: relative; padding: 8px; border-bottom: 1px solid var(--line-soft); flex: none; }
.ss-search svg { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: none; stroke: var(--ink-faint); stroke-width: 2; }
.ss-search input { height: 34px !important; padding-left: 32px !important; }
.ss-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; flex: 1; }
.ss-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; }
.ss-list li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-list li small { font-size: 11.5px; color: var(--ink-soft); }
.ss-list li.active { background: var(--surface-2); }
.ss-list li.selected span { font-weight: 700; color: var(--primary); }
.ss-list li.is-empty span { color: var(--ink-faint); font-style: italic; }
.ss-list li.ss-none { color: var(--ink-faint); cursor: default; text-align: center; padding: 16px; }
.ss-foot { font-size: 11.5px; color: var(--ink-faint); padding: 6px 12px; border-top: 1px solid var(--line-soft); flex: none; }
.ss-foot:empty { display: none; }

/* ---------- Drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(9, 15, 30, .45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open { transform: none; }
.drawer-wide { width: min(560px, 100vw); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h2 { font-size: 17px; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(480px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); transform: translateY(8px); transition: transform .2s; }
.modal.open .modal-card { transform: none; }
.modal-sm { width: min(420px, 100%); }
.modal-lg { width: min(720px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 8px 20px 12px; overflow-y: auto; }
.modal-body p { margin: 0 0 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field .hint, .hint { font-size: 12px; color: var(--ink-faint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-error { background: var(--danger-bg); color: var(--danger); padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-top: 4px; }
.note { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 10px 14px; font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.note-ok { background: var(--done-bg); color: var(--done); border-color: transparent; }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.kode-box { background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 16px; }
.kode-box span { font-size: 12px; color: var(--ink-soft); font-weight: 600; display: block; }
.kode-box b { font-size: 18px; letter-spacing: .3px; }
.kode-box small { display: block; font-size: 11.5px; color: var(--ink-faint); }
.ro-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: -4px 0 14px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.ro-grid span { display: block; font-size: 11.5px; color: var(--ink-faint); }
.ro-grid b { font-size: 13px; font-weight: 600; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.kv > span { color: var(--ink-soft); }
.kv > b { font-weight: 600; text-align: right; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.kv-grid .kv { flex-direction: column; align-items: flex-start; gap: 2px; }
.kv-grid .kv > b { text-align: left; word-break: break-word; }
.sub-h { font-size: 13.5px; font-weight: 700; margin: 18px 0 8px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; margin-bottom: 14px; }
.pick { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; }
.pick .kode { grid-row: span 2; align-self: center; }
.pick span:last-child { font-size: 12px; color: var(--ink-soft); }
.steps { margin: 0 0 14px; padding-left: 20px; color: var(--ink-soft); font-size: 13.5px; }
.steps li { margin-bottom: 4px; }
.row-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.import-preview { margin-top: 14px; }
.import-preview p { margin: 0 0 8px; font-size: 13.5px; }
.import-result { margin-top: 12px; }

/* detail paket */
.dt-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dt-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r); margin-bottom: 16px; }
.dt-person b { display: block; font-size: 15.5px; }
.dt-person span { font-size: 12.5px; color: var(--ink-soft); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 16px; }
.timeline li::before { content: ''; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 1px; border: 2px solid var(--line); background: var(--surface); position: relative; z-index: 1; }
.tl-done .tl-dot { background: var(--done); border-color: var(--done); }
.tl-done::before { background: var(--done) !important; }
.tl-current .tl-dot { border-color: var(--brass); box-shadow: 0 0 0 4px var(--brass-soft); }
.tl-todo .tl-body b { color: var(--ink-faint); }
.tl-body { display: flex; flex-direction: column; min-width: 0; }
.tl-body b { font-size: 14px; }
.tl-when { font-size: 12.5px; color: var(--ink-soft); }
.tl-line { font-size: 12.5px; color: var(--ink-soft); }
.tl-line em { color: var(--pospam); font-style: normal; }

/* master chips */
.add-row { display: flex; gap: 8px; margin-bottom: 12px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 11px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 13px; }
.chip button { border: 0; background: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-faint); }
.chip button:hover { background: var(--line-soft); color: var(--ink); }
.chip .ic { width: 13px; height: 13px; }

.role-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.role-guide div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.role-guide b { display: block; font-size: 13px; }
.role-guide span { font-size: 12px; color: var(--ink-soft); }

/* pengaturan */
.settings-grid .panel { margin-bottom: 0; }
.kop-preview {
  display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; gap: 12px; padding: 16px 18px; margin-bottom: 16px;
  background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--r); border-bottom: 4px double #111;
}
.kp-img { height: 70px; display: grid; place-items: center; }
.kp-img img { max-height: 70px; max-width: 80px; object-fit: contain; }
.kp-ph { font-size: 11px; color: #999; border: 1px dashed #ccc; border-radius: 6px; padding: 18px 10px; }
.kp-text { text-align: center; font-family: Arial, Helvetica, sans-serif; }
.kp-1 { font-weight: 700; font-size: 13px; }
.kp-2 { font-weight: 700; font-size: 17px; }
.kp-3 { font-size: 11.5px; }
.img-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.img-slot { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.img-slot > span { font-size: 12px; color: var(--ink-faint); }
.img-box { height: 96px; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; margin-bottom: 6px; color: var(--ink-faint); font-size: 12px; text-align: center; }
.img-box img { max-height: 86px; max-width: 90%; object-fit: contain; }
.img-box .ic { width: 26px; height: 26px; margin: 0 auto; display: block; }
.img-slot .row-btns { margin-top: 6px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 500;
  background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: min(560px, calc(100vw - 32px));
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); color: #fff; }

/* ---------- Login ---------- */
.login-body { background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 18px),
    radial-gradient(120% 90% at 20% 0%, #24396A 0%, #101B35 55%, #0A1226 100%);
  color: #DCE3F1;
}
.login-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
.login-hero-inner { max-width: 440px; width: 100%; }
.login-logo { display: flex; justify-content: flex-start; margin-bottom: 26px; }
.login-logo img { max-height: 110px; max-width: 140px; object-fit: contain; }
.login-logo .crest { width: 92px; height: 106px; font-size: 32px; }
.login-appname { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; color: #F3E6C4; letter-spacing: .5px; }
.login-instansi { margin-top: 10px; font-size: 15px; color: #AEB9D1; }
.login-track { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.login-track li { position: relative; display: flex; flex-direction: column; padding: 0 0 18px 28px; }
.login-track li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--brass); background: #101B35; }
.login-track li::after { content: ''; position: absolute; left: 9px; top: 20px; bottom: 2px; width: 2px; background: rgba(184,137,43,.35); }
.login-track li:last-child::after { display: none; }
.login-track b { color: #fff; font-size: 14px; letter-spacing: .3px; }
.login-track span { font-size: 13px; color: #8F9BB6; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 0; background: var(--surface); }
.login-form { width: 100%; max-width: 360px; margin: auto 0; }
.login-form h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.login-sub { color: var(--ink-soft); margin: 6px 0 24px; }
.login-logo-sm { display: none; }
.login-error { display: none; background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px; }
.login-error.show { display: block; }
.login-form input { height: 44px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 104px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); color: var(--ink-soft); font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.login-panel .app-footer { width: 100%; border-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: 1fr; padding: 6px; }
  .stage-link { flex-direction: row; gap: 8px; justify-content: flex-start; padding: 2px 0 2px 46px; }
  .stage-link::before, .stage-link::after { display: none; }
  .stage-link span, .stage-link small { margin: 0; background: none; padding: 0; }
  .stage-link span::before { content: '↓ '; color: var(--ink-faint); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 80; transform: translateX(-102%); transition: transform .25s; padding-top: env(safe-area-inset-top, 0px); }
  body.nav-open .app-sidebar { transform: none; }
  body.nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(9,15,30,.45); }
  .only-mobile, .icon-btn.only-mobile { display: inline-grid; }
  .app-topbar { padding: 10px 16px; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-sub { display: none; }
  .clock { display: none; }
  .app-content { padding: 16px; }
  .banner { margin: 12px 16px 0; }
  .grid-2, .grid-3, .settings-grid, .img-slots, .form-grid { grid-template-columns: 1fr; }
  .lap-search { grid-column: auto; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-logo-sm { display: flex; justify-content: center; margin-bottom: 18px; }
  .login-form { text-align: left; }
  .login-form h1 { text-align: center; }
  .login-sub { text-align: center; }
}
@media (max-width: 700px) {
  .topbar-right .btn span { display: none; }
  .topbar-right .btn { width: 40px; padding: 0; }
  .filterbar .ss { max-width: none; flex: 1 1 140px; }
  .search-box { max-width: none; flex-basis: 100%; }
  .role-guide { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .feed-item { grid-template-columns: 1fr; gap: 0; }
  .hbar { grid-template-columns: 90px 1fr 30px; }
  /* tabel paket jadi kartu */
  #pkTable thead { display: none; }
  #pkTable, #pkTable tbody, #pkTable tr, #pkTable td { display: block; width: 100%; }
  #pkTable tr { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); position: relative; }
  #pkTable td { padding: 2px 0; border: 0; }
  #pkTable td[data-label="Kode"] { font-size: 12px; }
  #pkTable td.col-check { position: absolute; right: 14px; top: 12px; width: auto; }
  #pkTable td.col-act { width: 100%; margin-top: 8px; }
  #pkTable .acts { justify-content: flex-start; }
  #pkTable tr.is-stale td:first-child, #pkTable tr.is-stale td:nth-child(2) { box-shadow: none; }
  #pkTable tr.is-stale { box-shadow: inset 3px 0 0 var(--danger); }
  .drawer-foot .spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .app-sidebar, .app-topbar, .filterbar, .drawer, .modal, .scrim, .toast { display: none !important; }
  .app-shell { display: block; }
}

/* ---------- v5: scan barcode, isi paket, kondisi ---------- */
.search-box { display: flex; align-items: center; }
.search-box input { padding-right: 44px !important; }
.search-scan {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; border: 0; border-radius: 6px;
  background: var(--surface-2); color: var(--ink-soft); display: grid; place-items: center; cursor: pointer;
}
.search-scan:hover { background: var(--primary); color: var(--on-primary); }
.search-scan .ic { position: static; transform: none; width: 17px; height: 17px; color: currentColor; }
.input-scan { display: flex; gap: 8px; }
.input-scan input { flex: 1; font-weight: 600; letter-spacing: .3px; }
.input-scan .btn { flex: none; }
.modal-scan { width: min(560px, 100%); }
.scan-view { position: relative; background: #05080F; border-radius: 12px; overflow: hidden; min-height: 240px; margin-bottom: 12px; }
#scReader { width: 100%; }
#scReader video { width: 100% !important; display: block; border-radius: 12px; object-fit: cover; }
#scReader img[alt="Info icon"], #scReader > div:not(:first-child) { display: none !important; }
.scan-msg { position: absolute; inset: auto 12px 12px 12px; background: rgba(5,8,15,.82); color: #fff; font-size: 13px; padding: 9px 12px; border-radius: 8px; text-align: center; }
.scan-msg-err { background: rgba(174,55,55,.92); }
.scan-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.scan-tools select { flex: 1; height: 34px; font-size: 13px; }
.scan-manual { display: flex; gap: 8px; margin-bottom: 8px; }
.resi-big { font-size: 16px !important; letter-spacing: .5px; color: var(--primary); word-break: break-all; }
.isi-cell { min-width: 220px; max-width: 420px; }
.isi-chip {
  display: inline-flex; align-items: baseline; gap: 6px; margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 14px;
  background: var(--done-bg); color: var(--ink); font-size: 12.5px; cursor: pointer; line-height: 1.35;
}
.isi-chip small { color: var(--done); font-size: 11px; font-weight: 600; white-space: nowrap; }
.isi-chip:hover { outline: 1px solid var(--done); }
.tl-skip .tl-dot { border-style: dashed; }
.tl-skip .tl-body b { color: var(--ink-faint); }
.akun-list { margin-top: 6px; font-size: 12.5px; }
@media (max-width: 700px) {
  .topbar-right #scanBtn span { display: none; }
  .topbar-right #scanBtn { width: 40px; padding: 0; }
  .input-scan .btn span { display: none; }
}
#view-penerima .data-table td:first-child { min-width: 210px; }
