
/* Monitoring Inbound (MiJs). Warna status mengikuti mockup canvas "Mockup Monitoring Inbound". */
.mi-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mi-tabs { display: flex; gap: 6px; overflow-x: auto; }
.mi-tab { border: 1px solid var(--gray-300); background: var(--white); border-radius: 999px; padding: 7px 14px; font-family: inherit; font-weight: 600; font-size: .82rem; cursor: pointer; white-space: nowrap; min-height: 36px; }
.mi-tab.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.mi-note { border-radius: 10px; padding: 10px 12px; font-size: .82rem; margin-bottom: 10px; background: var(--blue-light); color: var(--gray-700); }
.mi-note.is-warn { background: #FEF3C7; color: #92400E; }
.mi-note.is-bad { background: #FEE2E2; color: #991B1B; }
.mi-note.is-ok { background: #DCFCE7; color: #166534; }
.mi-rep { display: grid; gap: 12px; }
.mi-issb { border-color: #FCA5A5; background: #FEF2F2; }
.mi-issSn { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mi-issSn input { padding: 2px 6px; font-size: .8rem; }
.mi-repc h3 { margin: 0 0 4px; font-size: 1rem; }
.mi-repc .mi-bar { margin-top: 10px; }
.mi-counted { width: 100%; min-height: 40px; padding: 4px 10px; border-radius: 10px; background: #DCFCE7; color: #166534; font-size: .9rem; }
.mi-hold.mi-counted.is-need { background: #FEF3C7; color: #92400E; }
.mi-ribbon { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FEF3C7; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: .82rem; }
.mi-ribbon[hidden] { display: none; }
.mi-empty { text-align: center; padding: 32px 12px; color: var(--gray-400); }
.mi-pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.mi-st-plan { background: #F3F4F6; color: #374151; } .mi-st-waiting { background: #FEF3C7; color: #92400E; } .mi-st-unloading { background: #DBEAFE; color: #1E40AF; }
.mi-st-confirm { background: #EDE9FE; color: #5B21B6; } .mi-st-returned { background: #FEE2E2; color: #991B1B; } .mi-st-ready { background: #DCFCE7; color: #166534; } .mi-st-hold { background: #B91C1C; color: #FFFFFF; }
.mi-st-putaway { background: #CCFBF1; color: #115E59; } .mi-st-done { background: #E5E7EB; color: #111827; } .mi-st-cancelled { background: #F3F4F6; color: #6B7280; text-decoration: line-through; }
.mi-flag { display: inline-block; border-radius: 6px; padding: 1px 6px; font-size: .68rem; font-weight: 800; margin-left: 4px; white-space: nowrap; }
.mi-flag-out { background: #111827; color: #fff; } .mi-flag-h { background: #FDE68A; color: #78350F; } .mi-flag-hold { background: #B91C1C; color: #fff; }
.mi-flag-sbk { background: #0E7490; color: #fff; } .mi-flag-gap { background: #FEE2E2; color: #B91C1C; } .mi-flag-dmg { background: #EA580C; color: #fff; } .mi-flag-miss { background: #E5E7EB; color: #374151; } .mi-flag-rp { background: #FFEDD5; color: #9A3412; }
.mi-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.mi-bar input, .mi-bar select { min-height: 36px; }
.mi-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.mi-grid.is-detail { grid-template-columns: minmax(440px, 1fr) minmax(0, 1.45fr); }   /* daftar kiri cukup lebar: kolom Status tidak terpotong */
/* 12 Okt 2026: daftar kiri setinggi panel detail kanan (bawahnya sejajar). */
.mi-grid.is-detail { align-items: stretch; }
.mi-grid.is-detail > .mi-list { min-height: 0; }
.mi-grid.is-detail > .mi-list > .mi-tbl-wrap { flex: 1 1 auto; }
.mi-q { position: relative; flex: 1 1 420px; min-width: 300px; max-width: 560px; }
#miBar .mi-q input { width: 100%; box-sizing: border-box; padding: 9px 30px 9px 12px; border: 1px solid var(--gray-300); border-radius: 10px; font: inherit; background: var(--white); color: var(--gray-900); }
.mi-q-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 18px; color: var(--gray-500); cursor: pointer; padding: 2px 6px; }
.mi-range { display: inline-flex; gap: 8px; align-items: center; }
.mi-range label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-600); }
.mi-range.is-off { opacity: .45; }
.mi-bar .btn.is-on { border-color: #2563EB; color: #1D4ED8; background: #EFF6FF; }
.mi-grid:not(.is-detail) > .mi-detail { display: none; }
.mi-grid.is-detail .mi-cx { display: none; }
.mi-time .btn { align-self: flex-start; }
.mi-tbl-wrap { overflow: auto; max-height: calc(100vh - 260px); }
.mi-row { cursor: pointer; } .mi-row.is-on td { background: var(--blue-light); }
.mi-gapc { color: #B91C1C; font-weight: 800; }
.mi-sub { color: var(--gray-500); font-size: .75rem; } .mi-warn { color: #B45309; font-weight: 700; font-size: .75rem; }
.mi-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.mi-r { text-align: right; }
.mi-panel { background: var(--white); border: 1px solid var(--gray-200); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.mi-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 10px; font-size: .82rem; }
.mi-kv span { color: var(--gray-500); }
.mi-kv .mi-kvi { display: contents; }
/* Detail Truk tampilan baru: info truk 2 pasang kolom (kiri-kanan) */
.mi-kv.mi-kv2 { grid-template-columns: 140px minmax(0, 1fr) 140px minmax(0, 1fr); gap: 6px 16px; }
@media (max-width: 900px) { .mi-kv.mi-kv2 { grid-template-columns: 120px minmax(0, 1fr); } }
.mi-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mi-vidbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.mi-cont-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
/* 15 Okt 2026: Mulai Bongkar per langkah (HP Import/STEKO) */
.mi-card.mi-step-sum { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.mi-step-sum > .mi-sub { flex: 1 1 auto; min-width: 0; line-height: 1.5; }
.mi-step-sum > .btn { flex: 0 0 auto; width: auto; }
.mi-cont-step { display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--primary, #2563EB); }
.mi-step-no { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary, #2563EB); }
.mi-step-t { font-size: 1.15rem; }
.mi-step-do { font-size: .95rem; color: var(--gray-700, #374151); line-height: 1.4; }
.mi-sticky.mi-step-bar { flex-direction: row; }
.mi-step-bar .btn { width: auto; min-width: 0; }
.mi-step-bar .btn-outline { flex: 0 0 auto; padding-left: 14px; padding-right: 14px; }
.mi-step-bar .btn-primary { flex: 1 1 0; }
.mi-time { border: 1px solid var(--gray-200); border-radius: 10px; padding: 8px; font-size: .8rem; display: flex; flex-direction: column; gap: 2px; }
.mi-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.mi-sec { font-weight: 800; font-size: .85rem; margin: 10px 0 4px; }
.mi-sec.is-bad { color: #B91C1C; }
.mi-chg { font-size: .75rem; } .mi-chg s { color: var(--gray-400); }
.mi-hp { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.mi-hp-me { display: flex; align-items: center; gap: 8px; background: var(--white); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--gray-200); }
.mi-hp-me select { flex: 1; min-height: 44px; font-size: 1rem; }
.mi-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mi-card.is-bad { border-color: #FCA5A5; background: #FEF2F2; }
.mi-card h3 { margin: 0; font-size: 1rem; }
.mi-big { min-height: 48px; font-size: 1rem; width: 100%; }
.mi-step { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 6px; }
.mi-step button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--gray-300); background: var(--white); font-size: 1.3rem; }
.mi-step input { width: 100%; min-width: 0; height: 44px; text-align: center; font-size: 1.1rem; font-weight: 700; }
.mi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mi-chip { border: 1px solid var(--gray-300); background: var(--white); border-radius: 999px; padding: 8px 12px; min-height: 40px; font-family: inherit; font-weight: 600; font-size: .85rem; }
.mi-chip.is-on { background: var(--blue); color: #fff; border-color: var(--blue); }
.mi-ph { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mi-ph-it { width: 64px; height: 64px; border-radius: 8px; background: var(--gray-100) center / cover no-repeat; position: relative; border: 0; padding: 0; }
.mi-ph-it.is-err { outline: 2px solid #B91C1C; } .mi-ph-it.is-up { opacity: .6; }
.mi-ph-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #111827; color: #fff; font-size: 14px; line-height: 24px; }
.mi-err { color: #B91C1C; font-size: .8rem; font-weight: 700; }
.mi-sticky { position: sticky; bottom: 0; background: var(--gray-50, #F9FAFB); padding: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.mi-form { display: flex; flex-direction: column; gap: 10px; }
.mi-fld { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--gray-700); }
.mi-fld > span { font-weight: 600; }
.mi-fld input, .mi-fld select, .mi-fld textarea, .mi-bar input, .mi-bar select, .mi-lok input, .mi-paste, .mi-hp-me select {
  border: 1px solid var(--gray-300); border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: .9rem; background: var(--white); color: inherit; min-height: 38px; width: 100%; }
.mi-bar input, .mi-bar select { width: auto; }
.mi-fld.mi-inline { flex-direction: row; align-items: center; gap: 6px; }
.mi-fld.mi-inline input, .mi-fld.mi-inline select { width: auto; }
.mi-fld [aria-invalid="true"], .mi-paste[aria-invalid="true"], #miHpGate[aria-invalid="true"], #miStGate[aria-invalid="true"] { border-color: #B91C1C; box-shadow: 0 0 0 2px rgba(185,28,28,.15); }
.mi-paste { width: 100%; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .78rem; white-space: pre; overflow: auto; }
.mi-chk, .mi-hold { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; cursor: pointer; min-height: 36px; }
.mi-hold input, .mi-chk input { width: 20px; height: 20px; }
.mi-sum { gap: 12px; font-size: .8rem; }
.mi-sum > span { display: inline-flex; align-items: center; gap: 4px; }
.mi-back { align-self: flex-start; }
.mi-dh { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.mi-dh h3 { margin: 2px 0 0; font-size: 1.1rem; }
.mi-mini { padding: 4px 9px; min-height: 30px; font-size: .75rem; }
.mi-tbl { font-size: .8rem; }
.mi-tbl td, .mi-tbl th { vertical-align: top; }
.mi-lines .mi-bad-row td { background: #FEF2F2; }
.mi-lines .mi-hold-row td:first-child { box-shadow: inset 4px 0 0 #B91C1C; }
.mi-task-row td { background: var(--gray-50, #F9FAFB); padding-top: 4px; padding-bottom: 8px; }
.mi-task { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 8px; border-radius: 6px; background: #CCFBF1; color: #115E59; font-size: .72rem; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.mi-task.is-void { background: #F3F4F6; color: #6B7280; text-decoration: line-through; }
.mi-pv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mi-pv figure { margin: 0; } .mi-pv img.mi-pv-img { cursor: zoom-in; } .mi-pv img { width: 100%; border-radius: 8px; background: var(--gray-100); min-height: 120px; object-fit: contain; }
.mi-errs { margin: 0 0 8px; padding-left: 18px; color: #991B1B; font-size: .8rem; }
#miPlanRes.is-stale { opacity: .45; }
.mi-plan { display: flex; flex-direction: column; gap: 12px; }
.mi-antarr { margin-left: auto; }
.mi-plan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: stretch; }
.mi-lok { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.mi-lok-r { display: grid; grid-template-columns: 22px 1.2fr 1.2fr 80px 1fr 28px; gap: 6px; align-items: center; }
.mi-lok-x { position: static; }
.mi-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.mi-hp-card { text-align: left; width: 100%; font-family: inherit; font-size: .85rem; cursor: pointer; color: inherit; }
.mi-hp-ch { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mi-hp-top { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem;   /* kolom kanan min 9.5rem (= selebar "Finish Unloaded"): status pendek (HOLD) tetap selebar yang lain -> tinggi kartu sama */ column-gap: 10px; row-gap: 4px; align-items: center; }
.mi-hp-top .mi-hp-ref { overflow-wrap: anywhere; }
.mi-hp-refw { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.mi-hp-refw .mi-flag { margin-left: 0; }
.mi-hp-top .mi-hp-stc { justify-self: stretch; display: flex; align-items: center; gap: 6px; }
/* Kolom kanan selebar yang terpanjang antara status dan nama (nama maks 9.5rem supaya baris Plan/Datang/Gate tetap 1 baris; lebih panjang = "…", ketuk untuk nama lengkap); pill status ikut melebar supaya sama lebar dengan kotak nama. */
.mi-hp-top .mi-hp-stc .mi-pill { flex: 1 1 auto; text-align: center; }
/* 13 Okt 2026: kolom kanan lebar tetap 10.5rem (semua kartu sejajar); status terpanjang ("Dikembalikan ke checker") tetap muat 1 baris. */
#miRoot .mi-hp-top .mi-hp-stc .mi-pill { font-size: 11px; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; }
.mi-hp-top .mi-hp-sub { min-width: 0; }
/* Kartu daftar: kolom kanan = status di atas, kotak nama di dasar (baris 2-3), kiri = no kontainer, keterangan mobil, Baris/Plan/Datang/Gate. */
.mi-hp-top.has-bottom { grid-template-rows: auto auto auto; row-gap: 5px; }
.mi-hp-top.has-bottom .mi-hp-refw { grid-column: 1; grid-row: 1; }
.mi-hp-top.has-bottom .mi-hp-stc { grid-column: 2; grid-row: 1; align-self: start; }
.mi-hp-top.has-bottom .mi-hp-sub { grid-column: 1; grid-row: 2; }
.mi-hp-top.has-bottom .mi-hp-bot { grid-column: 1; grid-row: 3; min-width: 0; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gray-600); }   /* 1 baris (13 Okt 2026: label diringkas supaya Gate tetap muat) */
.mi-hp-top.has-bottom .mi-hp-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-hp-top.has-bottom .mi-hp-chk { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
/* Nama checker: kotak abu-abu selebar kolom status (width 0 + min-width 100% = tidak ikut melebarkan kolom), setinggi pill status. */
/* 15 Okt 2026: kolom kanan sudah lebar tetap (10.5rem) -> kotak cukup stretch + min-width 0. min-width:100% + -webkit-box
   membuat kotak melebar keluar kartu di Safari iPhone (nama di tengah kotak ikut tergeser keluar layar). */
.mi-hp-chk { justify-self: stretch; width: auto; min-width: 0; max-width: 100%; box-sizing: border-box; border: 1px solid var(--gray-300); border-radius: 10px;
  background: var(--gray-50); color: var(--gray-700); padding: 2px 10px; font-size: 12px; line-height: normal; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-hp-chk.is-wrap { white-space: normal; overflow-wrap: anywhere; display: block; line-height: 1.3; max-height: calc(3 * 1.3em + 4px); }
.mi-hp-chk.is-none { border-style: dashed; background: transparent; color: var(--gray-400); }
.mi-hp-chk b { font-weight: 700; }
/* Pop-up nama checker: selalu di tengah layar, juga di HP (dialog lain di HP = lembar dari bawah). */
.mdy-dlg-ov.is-center { align-items: center; padding: 16px; }
.mdy-dlg-ov.is-center .mdy-dlg { width: 360px; max-width: 100%; border-radius: 16px; }
.mdy-dlg-ov.is-center .mdy-dlg-f { padding-bottom: 12px; }
.mi-hp-chkfull { font-size: 1.15rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
[data-theme="dark"] .mi-hp-chk { border-color: rgba(148,163,184,.35); background: rgba(148,163,184,.10); color: var(--gray-800); }
[data-theme="dark"] .mi-hp-chk.is-none { background: transparent; color: var(--gray-500); }
.mi-hp-ref { font-size: 1.05rem; }
.mi-hp-back { align-self: flex-start; min-height: 44px; }
.mi-hp-me label { white-space: nowrap; }
/* Pop-up pilih nama checker (16 Okt 2026) + baris nama di layar truk. */
.mi-name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 55vh; overflow-y: auto; }
.mi-name-grid .mi-chip { min-height: 48px; border-radius: 10px; font-size: 1rem; text-align: left; padding: 10px 12px; overflow-wrap: anywhere; }
.mi-hp-who { flex: 1; min-width: 0; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-qty2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.mi-stepw { display: flex; flex-direction: column; gap: 4px; }
.mi-step input { border: 1px solid var(--gray-300); border-radius: 10px; }
.mi-phb { display: flex; flex-direction: column; gap: 6px; }
.mi-phbtn { min-height: 44px; display: inline-flex; align-items: center; }
.mi-phbtn.is-off { opacity: .45; pointer-events: none; }
.mi-ph-retry { position: absolute; inset: 0; border: 0; background: rgba(185,28,28,.55); color: #fff; font-size: 22px; border-radius: 8px; }
.mi-hp-pc { max-width: none; }
.mi-sticky .mi-big { min-height: 48px; }
@media (max-width: 760px) { .mi-grid { grid-template-columns: 1fr; } .mi-times { grid-template-columns: 1fr; } .mi-tbl-wrap { max-height: none; }
  .mi-grid.is-detail > .mi-list, .mi-grid:not(.is-detail) > .mi-detail { display: none; } .mi-back { display: inline-flex; }
  .mi-kv { grid-template-columns: 110px minmax(0, 1fr); } .mi-lok-r { grid-template-columns: 18px 1fr 1fr; } .mi-lok-r .mi-lok-q { grid-column: 2; }
  .mi-acts .btn { min-height: 44px; } .mi-bar .btn, .mi-chip { min-height: 44px; } }
/* Papan admin (bukan layar HP Checker) disamakan dengan Monitoring Display (11-12 Okt 2026): teks 13px, tab bergaris bawah
   (HP: chip geser satu baris), filter tipe segmented, tombol kecil. Layar HP Checker (.mi-hp, tanpa #miBody) tetap besar. */
#miRoot .mi-top { margin-bottom: 14px; }
#miRoot .mi-tabs { gap: 4px; border-bottom: 1px solid var(--gray-200); flex: 1; min-width: 0; scrollbar-width: none; }
#miRoot .mi-tabs::-webkit-scrollbar { display: none; }
#miRoot .mi-tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; padding: 10px 14px;
  min-height: 0; font: 500 13px var(--font, inherit); color: var(--gray-600); }
#miRoot .mi-tab:hover { color: var(--gray-900); }
#miRoot .mi-tab.is-on { background: none; color: #1D4ED8; font-weight: 600; border-bottom-color: #2563EB; }
#miRoot .mi-top > .btn, #miBody .mi-bar .btn, #miBody .mi-acts .btn, #miBody .mi-time .btn, #miBody .mi-back, #miRibbon .btn { padding: 7px 12px !important; font-size: 13px !important; font-weight: 500 !important; min-height: 0 !important; }
#miBody .mi-bar input, #miBody .mi-bar select { min-height: 32px; padding: 4px 8px; font-size: 13px; color: var(--gray-900); }
#miBody .mi-bar .mi-fld, #miBody .mi-bar .mi-fld > span { font-size: 12px; }
#miBar .mi-chips { gap: 2px; background: var(--gray-100); border-radius: 8px; padding: 3px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
#miBar .mi-chips::-webkit-scrollbar { display: none; }
#miBar .mi-chip { flex: 0 0 auto; border: 0; border-radius: 6px; background: transparent; padding: 6px 12px; min-height: 0; font: 500 13px var(--font, inherit); color: var(--gray-600); }
#miBar .mi-chip.is-on { background: var(--white); color: var(--gray-900); font-weight: 600; box-shadow: 0 1px 2px rgba(15,36,72,.08); }
#miBar .mi-chk { min-height: 0; font-size: 13px; }
#miBar .mi-chk input { width: 16px; height: 16px; }
#miBody .mi-panel { border-radius: 10px; }
#miBody .mi-tbl { font-size: 13px; }
#miBody .mi-dh h3 { font-size: 15px; }
#miBody .mi-sec { font-size: 13px; font-weight: 700; }
#miBody .mi-kv, #miBody .mi-time, #miRoot > .mi-note, #miRibbon, #miBody .mi-note { font-size: 13px; }
#miBody .mi-empty { padding: 24px 12px; font-size: 13px; }
/* Skala 80 % seperti Monitoring Display (#mdyRoot zoom .8; dialog MI sudah ikut .mdy-dlg). Layar HP Checker (.mi-hp) tidak. */
#miRoot > :not(.mi-hp) { zoom: .8; }
#miBody .mi-tbl-wrap { max-height: calc((100vh - 230px) * 1.25); }
#miBody .mi-mlist { display: none; }
#miRoot .mi-pill { font-size: 12px; padding: 3px 10px; }
#miRoot .mi-flag { font-size: 11px; }
[data-theme="dark"] #miRoot input, [data-theme="dark"] #miRoot select { color-scheme: dark; }
@media (min-width: 761px) { #miRoot { font-size: 13px; line-height: 1.45; } }
@media (max-width: 760px) {
  #miRoot { font-size: 13px; line-height: 1.45; }
  #miRoot .mi-top { gap: 8px; margin-bottom: 12px; }
  #miRoot .mi-tabs { flex: 1 1 100%; gap: 6px; border-bottom: 0; padding-bottom: 2px; overflow-x: auto; }
  #miBody .mi-grid, #miBody .mi-grid.is-detail { grid-template-columns: minmax(0, 1fr); }
  #miBody .mi-list { background: none; border: 0; padding: 0; }
  #miBody .mi-list > .mi-tbl-wrap { display: none; }
  #miBody .mi-mlist { display: flex; flex-direction: column; gap: 8px; }
  #miBody .mi-mcard { text-align: left; width: 100%; font: inherit; font-size: 13px; color: inherit; cursor: pointer; background: var(--white); border: 1px solid var(--gray-200);
    border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
  #miBody .mi-mcard.is-bad { border-color: #FCA5A5; }
  #miBody .mi-mcard .mi-mono { font-size: 14px; }
  #miBody .mi-mmeta { color: var(--gray-700); font-size: 12px; }
  #miBody .mi-list .mi-empty { background: var(--white); border: 1px solid var(--gray-200); border-radius: 10px; }
  #miRoot .mi-tab { flex: 0 0 auto; margin: 0; border: 1px solid var(--gray-200); border-radius: 999px; padding: 7px 14px; background: var(--white); color: var(--gray-700); }
  #miRoot .mi-tab.is-on { background: #2563EB; border-color: #2563EB; color: #fff; }
  #miRoot .mi-top > .btn { white-space: nowrap; }
  #miBar .mi-bar { gap: 8px; }
  #miBody .mi-bar input[type="date"] { -webkit-appearance: none; appearance: none; flex: 1 1 140px; min-width: 0; width: auto; min-height: 36px; text-align: left; }
  #miBody .mi-bar input::-webkit-date-and-time-value { text-align: left; }
  #miBody .mi-bar .btn, #miBody .mi-bar input, #miBody .mi-bar select { min-height: 40px !important; }
  #miBar .mi-chips { flex: 1 1 100%; }
  #miBar .mi-q { flex: 1 1 100%; min-width: 0; max-width: none; }
  #miBar .mi-range { flex: 1 1 100%; } #miBar .mi-range label { flex: 1 1 50%; }
  #miBody .mi-bar .mi-inline { flex: 1 1 calc(50% - 4px); min-width: 0; }
  #miBody .mi-bar .mi-inline input, #miBody .mi-bar .mi-inline select { flex: 1 1 auto; min-width: 0; width: auto; }
  #miBar .mi-chip { flex: 1 0 auto; }
  #miBody .mi-acts .btn, #miBody .mi-time .btn, #miBody .mi-back, #miRoot .mi-top > .btn { min-height: 40px !important; }
  #miRoot > .mi-note { padding: 8px 12px; margin-bottom: 12px; }
}
/* tema gelap */
[data-theme="dark"] #miRoot .mi-tab.is-on { color: #93C5FD; }
@media (max-width: 760px) { [data-theme="dark"] #miRoot .mi-tab.is-on { color: #fff; } }
[data-theme="dark"] #miBar .mi-chip.is-on { background: var(--gray-300); box-shadow: none; }
[data-theme="dark"] .mi-note { background: rgba(37,99,235,.12); color: #BFDBFE; }
[data-theme="dark"] .mi-note.is-warn, [data-theme="dark"] .mi-ribbon { background: rgba(245,158,11,.12); color: #FCD34D; }
[data-theme="dark"] .mi-note.is-bad { background: rgba(239,68,68,.12); color: #FCA5A5; }
[data-theme="dark"] .mi-row.is-on td { background: rgba(37,99,235,.15); }
[data-theme="dark"] .mi-card.is-bad, [data-theme="dark"] .mi-lines .mi-bad-row td { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.35); }
[data-theme="dark"] .mi-task-row td, [data-theme="dark"] .mi-sticky { background: var(--gray-50); }
[data-theme="dark"] .mi-st-plan, [data-theme="dark"] .mi-st-cancelled { background: rgba(148,163,184,.16); color: var(--gray-700); }
[data-theme="dark"] .mi-st-waiting { background: rgba(245,158,11,.16); color: #FCD34D; }
[data-theme="dark"] .mi-st-unloading { background: rgba(37,99,235,.18); color: #93C5FD; }
[data-theme="dark"] .mi-st-confirm { background: rgba(124,58,237,.18); color: #C4B5FD; }
[data-theme="dark"] .mi-st-returned { background: rgba(239,68,68,.16); color: #FCA5A5; }
[data-theme="dark"] .mi-st-hold { background: #B91C1C; color: #FFFFFF; }
[data-theme="dark"] .mi-st-ready { background: rgba(16,185,129,.16); color: #6EE7B7; }
[data-theme="dark"] .mi-st-putaway { background: rgba(20,184,166,.16); color: #5EEAD4; }
[data-theme="dark"] .mi-st-done { background: rgba(226,232,240,.2); color: var(--gray-900); }
[data-theme="dark"] .mi-task { background: rgba(20,184,166,.16); color: #5EEAD4; }
[data-theme="dark"] .mi-task.is-void { background: rgba(148,163,184,.16); color: var(--gray-500); }
[data-theme="dark"] .mi-flag-h { background: rgba(245,158,11,.2); color: #FCD34D; }
[data-theme="dark"] .mi-flag-gap { background: rgba(239,68,68,.16); color: #FCA5A5; }
[data-theme="dark"] .mi-flag-miss { background: rgba(148,163,184,.2); color: var(--gray-800); }
[data-theme="dark"] .mi-flag-rp { background: rgba(249,115,22,.16); color: #FDBA74; }
[data-theme="dark"] .mi-flag-out { background: var(--gray-800); color: var(--white); }
[data-theme="dark"] .mi-gapc, [data-theme="dark"] .mi-err, [data-theme="dark"] .mi-sec.is-bad, [data-theme="dark"] .mi-errs { color: #FCA5A5; }
[data-theme="dark"] .mi-warn { color: #FCD34D; }

/* 12 Okt 2026: kartu antrian cetak sedikit lebih besar. */
.mi-cards { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.mi-pcard { padding: 16px 18px; gap: 6px; font-size: .95rem; }
.mi-pcard .mi-mono { font-size: 1.2rem; }
.mi-pcard .mi-pchk { font-size: 1.05rem; color: var(--gray-700); } .mi-pcard .mi-pchk b { font-size: 1.15rem; color: var(--gray-900); }
.mi-tbl th.mi-r { text-align: right !important; }
.mi-hp-remark { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #FFF; border: 1px dashed #F87171; color: #7F1D1D; font-size: .92rem; overflow-wrap: anywhere; }
[data-theme="dark"] .mi-hp-remark { background: rgba(185,28,28,.12); color: #FCA5A5; }
.mi-pcard.is-hold { border-color: #FCA5A5; } #miBody .mi-pcard .mi-acts .btn.mi-btn-hold { background: #B91C1C !important; border-color: #B91C1C !important; color: #fff !important; }
.mi-tbl th.mi-c, .mi-tbl td.mi-c { text-align: center !important; }   /* judul kolom angka lurus dengan isinya */
.mi-pcard .mi-sub { font-size: .88rem; }
#miBody .mi-pcard .mi-acts .btn { padding: 9px 22px !important; font-size: 14px !important; }

/* Jarak antar kartu di layar HP (isi #miHpBody bukan anak langsung .mi-hp). */
#miHpBody { display: flex; flex-direction: column; gap: 10px; }
#miHpBody > .mi-sticky { margin-top: 2px; }
/* 12 Okt 2026: layar HP Checker lebih ringkas (Novan: terlalu besar). Target sentuh tetap >= 36px. */
.mi-hp { gap: 8px; max-width: 480px; }
.mi-hp .mi-card { padding: 10px 12px; gap: 6px; border-radius: 12px; }
.mi-hp-me { padding: 6px 10px; border-radius: 10px; }
.mi-hp-me select { min-height: 36px; font-size: .9rem; padding: 4px 8px; }
.mi-hp-me .btn { padding: 6px 10px; font-size: .78rem; min-height: 36px; }
.mi-hp .mi-hp-back { min-height: 34px; padding: 4px 12px; font-size: .82rem; }
.mi-hp .mi-hp-ref { font-size: .98rem; }
.mi-hp .mi-sub { font-size: .78rem; }
.mi-hp .mi-big, .mi-hp .mi-sticky .mi-big { min-height: 42px; font-size: .95rem; }
.mi-hp .mi-sticky { padding: 8px 0; gap: 6px; }
.mi-hp .mi-step { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 4px; }
.mi-hp .mi-step button { width: 36px; height: 36px; font-size: 1.1rem; border-radius: 8px; }
.mi-hp .mi-step input { height: 36px; font-size: 1rem; border-radius: 8px; }
.mi-hp .mi-qty2 { gap: 8px; }
.mi-hp .mi-fld > span { font-size: .8rem; }
.mi-hp .mi-fld select, .mi-hp .mi-fld input, .mi-hp .mi-fld textarea { min-height: 38px; font-size: .9rem; }
/* Daftar nama di dropdown HP (Saya, Checker, Operator) lebih kecil supaya muat banyak (permintaan Novan 12 Okt 2026). */
.mi-hp-me select, .mi-hp .mi-fld select { font-size: .85rem; }
.mi-hp select option { font-size: 13px; }
.mi-hp .mi-hold { min-height: 32px; font-size: .82rem; }
.mi-hp .mi-hold input { width: 18px; height: 18px; }
.mi-hp .mi-phbtn { min-height: 36px; font-size: .82rem; }
.mi-start { display: flex; flex-direction: column; gap: 10px; }
.mi-start .mi-fld > b { font-size: .95rem; padding: 6px 0; }
.mi-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.mi-ops:empty { display: none; }
.mi-op { display: inline-flex; align-items: center; gap: 4px; background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: .82rem; font-weight: 600; }
.mi-op button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 999px; }
.mi-op button:hover { background: rgba(37,99,235,.12); }
.mi-diff { background: #FEF2F2; color: #B91C1C; border-radius: 8px; padding: 6px 10px; font-size: .82rem; font-weight: 600; }
.mi-hold.is-need { color: #B91C1C; font-weight: 700; }
.mi-hold.is-need input { outline: 2px solid #F87171; outline-offset: 1px; }
.mi-need { color: #B45309; font-size: .8rem; font-weight: 600; }
.mi-need[hidden] { display: none; }
[data-theme="dark"] .mi-op { background: rgba(37,99,235,.18); color: #BFDBFE; border-color: rgba(147,197,253,.3); }
[data-theme="dark"] .mi-diff { background: rgba(185,28,28,.18); color: #FCA5A5; }
[data-theme="dark"] .mi-need { color: #FCD34D; }

/* ===== Tampilan baru Owner (12 Okt 2026): Board penuh, Antrian Truk, halaman.
   Skala & ukuran huruf sama dengan Monitoring Display (zoom .8, tabel 13px) — permintaan Novan 12 Okt malam. ===== */
.mi-v2wrap { max-height: none; }
.mi-v2tbl th { white-space: nowrap; }
.mi-v2tbl td { vertical-align: middle; }
.mi-v2tbl .mi-cbx { width: 34px; }
.mi-v2tbl .mi-cbx input { width: 18px; height: 18px; accent-color: #2563EB; cursor: pointer; }
.mi-v2tbl tr.is-sel td { background: #EFF6FF; }
.mi-v2tbl tr.is-lock td { background: var(--gray-50, #F8FAFC); color: var(--gray-500); }
.mi-v2tbl tr.is-lock .mi-mono { color: var(--gray-600); }
.mi-v2tbl td.mi-bad { color: #B91C1C; font-weight: 600; }
.mi-linkbtn { border: 0; background: none; color: #1D4ED8; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 2px; white-space: nowrap; }
.mi-linkbtn:hover { text-decoration: underline; }
.mi-btn-s { padding: 5px 12px !important; white-space: nowrap; }
.mi-selbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #0B1B3A; color: #FFFFFF; padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; }
.mi-selbar .mi-selrefs { color: #CBD5E1; font-size: 13px; }
.mi-selbar .mi-grow { flex: 1 1 auto; }
.mi-selbar .mi-selghost { background: transparent !important; color: #FFFFFF !important; border: 1px solid #475569 !important; }
.mi-tabn { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: #DBEAFE; color: #1E40AF; font-size: 11px; font-weight: 700; margin-left: 4px; }
.mi-steps { display: inline-flex; gap: 3px; }
.mi-steps i { display: block; width: 18px; height: 6px; border-radius: 3px; background: var(--gray-200); }
.mi-steps i.d { background: #2563EB; } .mi-steps i.n { background: #93C5FD; }
.mi-bsteps { list-style: none; margin: 4px 0 2px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.mi-bsteps li { flex: 1 1 110px; display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 4px solid var(--gray-200); font-size: 13px; }
.mi-bsteps li span { color: var(--gray-500); font-size: 12px; }
.mi-bsteps li.d { border-top-color: #2563EB; } .mi-bsteps li.n { border-top-color: #93C5FD; } .mi-bsteps li.n span { color: #1D4ED8; }
.mi-qcards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mi-qcard { flex: 1 1 160px; background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.mi-qcard span { font-size: 13px; color: var(--gray-600); } .mi-qcard b { font-size: 24px; } .mi-qcard small { font-size: 12px; color: #B45309; min-height: 14px; } .mi-qcard small.is-muted { color: var(--gray-500); }
.mi-v2back { margin-bottom: 12px; }
.mi-v2page .mi-back { display: none !important; }   /* tombol kembali halaman ada di atas */
#miRoot.mi-v2 .mi-q input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--gray-300); border-radius: 10px; font: inherit; background: var(--white); color: var(--gray-900); }
.mi-v2page { max-width: none; width: 100%; }
.mi-v2h { margin: 0 0 12px; font-size: 16px; }
.mi-v2form input, .mi-v2form select { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--gray-300); border-radius: 7px; background: var(--white); color: var(--gray-900); min-width: 120px; }
.mi-v2foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0 2px; margin-top: 12px; border-top: 1px solid var(--gray-200); background: var(--white); }
.mi-v2tbl tr.is-pick { cursor: pointer; }
.mi-v2tbl tr.is-pick:hover td { background: #F1F5F9; }
.mi-v2tbl tr.is-pick.is-sel:hover td { background: #DBEAFE; }
[data-theme="dark"] .mi-v2tbl tr.is-pick:hover td { background: rgba(148,163,184,.12); }
/* Detail Truk tampilan baru: tabel baris barang +2px (terlihat) dari ukuran awal; di bawah zoom .8 berarti +2,5px CSS (Novan 12 Okt 2026) */
#miRoot.mi-v2 .mi-v2page .mi-lines td { font-size: 13.7px; }
#miRoot.mi-v2 .mi-v2page .mi-lines th { font-size: 12.2px; }
#miRoot.mi-v2 .mi-v2page .mi-lines .mi-sub, #miRoot.mi-v2 .mi-v2page .mi-lines .mi-warn { font-size: 13px; }
#miRoot.mi-v2 .mi-v2page .mi-lines .mi-task { font-size: 12.6px; }
#miRoot.mi-v2 .mi-v2page .mi-lines .mi-mini { font-size: 15.5px !important; }
#miRoot.mi-v2 .mi-v2page .mi-lines .mi-pill, #miRoot.mi-v2 .mi-v2page .mi-lines .mi-flag { font-size: 13px; }
[data-theme="dark"] .mi-v2tbl tr.is-sel td { background: rgba(37,99,235,.16); }
[data-theme="dark"] .mi-tabn { background: rgba(37,99,235,.3); color: #BFDBFE; }

/* ================= Shipback (Tahap 3, 13 Okt 2026) ================= */
.mi-sbb { display: flex; flex-direction: column; gap: 8px; border: 1px dashed #F59E0B; border-radius: 10px; padding: 10px; background: #FFFBEB; }
.mi-sbnote { font-size: .8rem; color: #92400E; font-weight: 600; }
.mi-snrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.mi-snrow:not(:has(.mi-snno)) { grid-template-columns: minmax(0, 1fr) auto; }
.mi-snno { width: 22px; text-align: center; font-weight: 700; color: var(--gray-500); font-size: .8rem; }
.mi-snrow input { min-width: 0; min-height: 40px; border: 1px solid var(--gray-300); border-radius: 8px; padding: 6px 10px; font-size: .95rem; background: var(--white); color: var(--gray-900); }
.mi-snscan { min-height: 40px; min-width: 44px; justify-content: center; }
.mi-snw { font-size: .78rem; min-height: 0; padding-left: 28px; }
.mi-snw:empty { display: none; }
.mi-ok { color: #15803D; font-weight: 600; font-size: .78rem; }
.mi-sbvid { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-top: 8px; border-top: 1px dashed #FCD34D; }
.mi-vidchip { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--gray-200); border-radius: 10px; padding: 6px 8px; font-size: .85rem; }
.mi-vidchip span { flex: 1 1 auto; font-weight: 600; }
.mi-vidrec-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mi-vid-t { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: #DC2626; color: #fff; font: 600 .9rem/1 ui-monospace, monospace; padding: 6px 10px; border-radius: 999px; }
.mi-vidrec .mi-scan-v video { object-fit: contain; }
.mi-vidrec .btn-danger { background: #DC2626; border-color: #DC2626; color: #fff; }
.mi-vidplay video { width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
.mi-sbvids { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.mi-sbvids .btn { display: inline-flex; align-items: center; gap: 6px; }
[data-theme="dark"] .mi-vidchip { background: rgba(255,255,255,.04); }
.mi-sbin { display: flex; flex-direction: column; gap: 8px; background: #F0F9FF; border-color: #BAE6FD; }
.mi-sbin.is-row { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.mi-sbin.is-row b { font-size: 13px; }
.mi-sbin.is-row .btn { flex: none; white-space: nowrap; font-size: 12px; padding: 6px 10px; min-height: 0; }
.mi-sbhint { font-size: .8rem; color: #1E40AF; background: #DBEAFE; border-radius: 8px; padding: 6px 8px; }
.mi-sbres.is-ok { border-color: #86EFAC; } .mi-sbres.is-bad { border-color: #FCA5A5; background: #FEF2F2; }
.mi-pill.mi-sb-ok { background: #DCFCE7; color: #166534; } .mi-pill.mi-sb-bad { background: #B91C1C; color: #fff; }
.mi-pill.mi-sb-check { background: #FEF3C7; color: #92400E; } .mi-pill.mi-sb-approved { background: #DBEAFE; color: #1E40AF; }
.mi-pill.mi-sb-held { background: #FFEDD5; color: #9A3412; } .mi-pill.mi-sb-out { background: #EDE9FE; color: #5B21B6; }
.mi-pill.mi-sb-closed { background: #DCFCE7; color: #166534; } .mi-pill.mi-sb-cancelled { background: #E5E7EB; color: #374151; }
.mi-pill.mi-sb-ext { background: #E0F2FE; color: #075985; font-size: .72rem; }
.mi-pill.mi-sb-red { background: #B91C1C; color: #fff; }
.mi-flag-ok { background: #DCFCE7; color: #166534; }
.mi-sbgrid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { .mi-sbgrid { grid-template-columns: minmax(0, 1fr); } }
.mi-sbf { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.mi-sbsj { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mi-sbrad { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--gray-200); border-radius: 10px; cursor: pointer; }
.mi-sbrad:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.mi-sbrad > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mi-sbrad > span > br { display: none; }
.mi-sbacts { align-items: center; margin: 16px 0 0; }
.mi-sbacts .mi-grow { flex: 1 1 auto; }
.mi-sbacts + .mi-sub { margin: 8px 0 16px; }
.mi-sbmail { border: 1px solid var(--gray-200); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.mi-sbmail-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.mi-sbmail-v { font-size: 12px; overflow-wrap: anywhere; max-height: 120px; overflow: auto; }
.mi-sbmail-body { max-height: 260px; overflow: auto; background: #fff; color: #111; padding: 6px; border-radius: 6px; }
.mi-sbmaster { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 6px; }
/* Layar scan SN (layar penuh, HP) */
.mi-scan { position: fixed; inset: 0; z-index: 4000; background: #0B1220; color: #fff; display: flex; flex-direction: column; gap: 10px; padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); overflow: auto; }
.mi-scan-h { display: flex; align-items: center; gap: 10px; }
.mi-scan-h .btn { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.mi-scan-v { position: relative; flex: 1 1 auto; min-height: 240px; max-height: 60vh; border-radius: 14px; overflow: hidden; background: #000; }
.mi-scan-v video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mi-scan-frame { position: absolute; left: 8%; right: 8%; top: 38%; height: 24%; border: 3px solid #22C55E; border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.mi-scan-s { font-size: .85rem; color: #CBD5E1; text-align: center; }
.mi-scan-s.is-bad { color: #FCA5A5; }
.mi-scan-hit { background: #052E16; border: 1px solid #22C55E; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.mi-scan-hit.is-warn { background: #451A03; border-color: #F59E0B; }
.mi-scan-hit span { font-size: .8rem; color: #CBD5E1; } .mi-scan-hit b { font-size: 1.1rem; overflow-wrap: anywhere; }
.mi-scan-a { display: flex; gap: 8px; flex-wrap: wrap; }
.mi-scan-a .btn { flex: 1 1 140px; justify-content: center; min-height: 46px; }
.mi-scan-a .btn-outline { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
[data-theme="dark"] .mi-sbb { background: rgba(245,158,11,.08); }
[data-theme="dark"] .mi-sbnote { color: #FCD34D; }
[data-theme="dark"] .mi-sbin { background: rgba(37,99,235,.10); border-color: rgba(37,99,235,.35); }
[data-theme="dark"] .mi-sbhint { background: rgba(37,99,235,.18); color: #BFDBFE; }
[data-theme="dark"] .mi-sbres.is-bad { background: rgba(239,68,68,.10); }
[data-theme="dark"] .mi-ok { color: #6EE7B7; }
/* Damage Inbound (13 Okt 2026) */
.mi-dmgchoose { display: flex; flex-direction: column; gap: 6px; }
.mi-sbopt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--gray-300, #CBD5E1); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: .85rem; }
.mi-sbopt.is-on { border-color: #2563EB; background: #EFF6FF; }
.mi-sbopt input { margin-top: 3px; }
.mi-dmgb { border-color: #EF4444; background: #FEF2F2; }
.mi-dmgb .mi-sbnote { color: #991B1B; }
.mi-dmgauto { font-size: .8rem; color: #475569; }
.mi-dmgbt { font-size: 1rem !important; }
.mi-dmgket { margin-top: 8px; font-size: .85rem; color: #334155; }
.mi-dmgf { margin-bottom: 0; }
.mi-dmgf .mi-ro { background: #F1F5F9; color: #475569; }
.mi-dmgdh { margin-top: 12px; }
.mi-dmgdocs { display: flex; flex-direction: column; gap: 6px; }
.mi-dmgdoc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.mi-dmgup { margin-top: 8px; flex-wrap: wrap; }
.mi-dmgup label.btn { cursor: pointer; }
[data-theme="dark"] .mi-sbopt.is-on { background: rgba(37,99,235,.15); }
[data-theme="dark"] .mi-dmgb { background: rgba(239,68,68,.08); }
[data-theme="dark"] .mi-dmgb .mi-sbnote { color: #FCA5A5; }
[data-theme="dark"] .mi-dmgauto, [data-theme="dark"] .mi-dmgket { color: #CBD5E1; }
[data-theme="dark"] .mi-dmgf .mi-ro { background: rgba(148,163,184,.12); color: #CBD5E1; }
/* Daftar truk HP: kotak cari + tab Waiting / Proses / Selesai (13 Okt 2026) */
.mi-hp-tools { position: sticky; top: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 6px 0 8px; background: var(--gray-50, #F8FAFC); }
.mi-hp-q { width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: 10px; font: inherit; font-size: .9rem; background: var(--white); color: inherit; }
.mi-hp-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 12px; background: var(--gray-200, #E2E8F0); }
.mi-hp-tab { min-height: 36px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: .85rem; font-weight: 600; color: var(--gray-600); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mi-hp-tab.is-on { background: var(--white); color: var(--gray-900, #0F172A); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.mi-hp-tabn { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gray-300); color: var(--gray-700); font-size: .72rem; font-weight: 700; line-height: 18px; }
.mi-hp-tab.is-on .mi-hp-tabn { background: #2563EB; color: #fff; }
.mi-hp-tabn.is-bad, .mi-hp-tab.is-on .mi-hp-tabn.is-bad { background: #DC2626; color: #fff; }
.mi-hp-list { display: flex; flex-direction: column; gap: 8px; }
.mi-hp-elsewhere { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
[data-theme="dark"] .mi-hp-tools { background: var(--gray-50); }
[data-theme="dark"] .mi-hp-tabs { background: rgba(148,163,184,.15); }
[data-theme="dark"] .mi-hp-tab.is-on { background: rgba(148,163,184,.25); color: var(--gray-900); }
/* Dropdown Monitoring Inbound (13 Okt 2026): panah bawaan browser terlalu mepet kanan -> panah sendiri, jarak 12px dari tepi. */
#miRoot select:not([multiple]), .mi-form select:not([multiple]), .mi-fld select:not([multiple]) { -webkit-appearance: none; appearance: none; padding-right: 34px !important; background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
[data-theme="dark"] #miRoot select:not([multiple]), [data-theme="dark"] .mi-form select:not([multiple]), [data-theme="dark"] .mi-fld select:not([multiple]) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
/* Antrian Truk: tab filter tipe + kolom No (13 Okt 2026) */
.mi-ttabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.mi-ttab { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--gray-300); border-radius: 999px; background: var(--white); font: inherit; font-size: .8rem; font-weight: 600; color: var(--gray-600); cursor: pointer; }
.mi-ttab:hover { border-color: #93C5FD; }
.mi-ttab.is-on { background: #2563EB; border-color: #2563EB; color: #fff; }
.mi-ttabn { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--gray-200); color: var(--gray-700); font-size: .72rem; line-height: 18px; text-align: center; }
.mi-ttab.is-on .mi-ttabn { background: rgba(255,255,255,.25); color: #fff; }
.mi-v2tbl th.mi-no, .mi-v2tbl td.mi-no { width: 36px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .mi-ttab { background: rgba(148,163,184,.08); border-color: rgba(148,163,184,.3); }
[data-theme="dark"] .mi-ttab.is-on { background: #2563EB; border-color: #2563EB; }
/* Tindak lanjut Damage: grid 3 kolom tetap, label 1 baris, keterangan di bawah kotak (13 Okt 2026) */
.mi-sbf.mi-dmgf { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px 12px; }
.mi-dmgf .mi-fld > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-dmgf .mi-fld input, .mi-dmgf .mi-fld select { min-height: 38px; }
.mi-dmgf .mi-span2 { grid-column: span 2; } .mi-dmgf .mi-span3 { grid-column: 1 / -1; }
.mi-dmghint { font-size: .72rem; line-height: 1.3; }
@media (max-width: 700px) { .mi-sbf.mi-dmgf { grid-template-columns: minmax(0, 1fr); } .mi-dmgf .mi-span2, .mi-dmgf .mi-span3 { grid-column: auto; } }
.mi-vidcell { display: flex; flex-wrap: wrap; gap: 4px; }
/* Kartu SN damage (13 Okt 2026): SN + foto + video per unit */
.mi-sncard { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--gray-300); border-radius: 10px; background: var(--white); }
.mi-sncard .mi-snw:empty { display: none; }
.mi-sncard .mi-phb { padding: 0; border: 0; background: transparent; }
.mi-sncard .mi-vidrec-btn, .mi-sncard .mi-vidfile-btn { min-height: 36px; font-size: .82rem; }
.mi-vidfile-btn { display: inline-flex; align-items: center; justify-content: center; }
[data-theme="dark"] .mi-sncard { background: rgba(148,163,184,.06); border-color: rgba(148,163,184,.3); }
/* Revisi data truk (13 Okt 2026) */
.mi-flag-rev { background: #7C3AED; color: #fff; }
.mi-revbox { display: flex; flex-direction: column; gap: 8px; }
.mi-revbox .mi-tbl-wrap { background: var(--white); border-radius: 8px; }
.mi-revtbl td { white-space: pre-line; vertical-align: top; }
.mi-revold { color: var(--gray-500); text-decoration: line-through; }
.mi-revlines .mi-revold { text-decoration: line-through; }
.mi-revlines { font-variant-numeric: tabular-nums; }
.mi-revtbl td.mi-revlines.mi-revold, .mi-revtbl td.mi-revlines { text-decoration: none; color: inherit; }
.mi-revpend { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mi-revrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mi-revrow .mi-linkbtn { margin-left: auto; }
.mi-ttab { position: relative; }
.mi-ttabdot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #DC2626; box-shadow: 0 0 0 2px var(--white); }
/* Tabel MI di layar sempit (15 Okt 2026): aturan global .data-table (<=768px) memecah baris jadi flex tanpa label,
   hasilnya berantakan dan pill status kepotong. Di MI (bukan HP Checker) tabel tetap tabel, geser ke samping di dalam wadahnya. */
@media (max-width: 768px) {
  #miRoot > :not(.mi-hp) .mi-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #miRoot > :not(.mi-hp) .mi-tbl thead { display: table-header-group; }
  #miRoot > :not(.mi-hp) .mi-tbl tr { display: table-row; padding: 0; }
  #miRoot > :not(.mi-hp) .mi-tbl th, #miRoot > :not(.mi-hp) .mi-tbl td { padding: 8px 10px; font-size: 12px; border-bottom: 1px solid var(--gray-100); }
  #miRoot > :not(.mi-hp) .mi-tbl td { white-space: nowrap; }
  #miRoot > :not(.mi-hp) .mi-tbl td .mi-sub, #miRoot > :not(.mi-hp) .mi-tbl td.mi-wrap { white-space: normal; }
}
