:root {
  --primary:#1E5EFF; --primary-dark:#123C9C; --primary-tint:#EAF1FF; --primary-rgb:30,94,255;
  --bg:#F7F9FC; --surface:#FFFFFF; --surface-2:#F1F5F9; --border:#E2E8F0;
  --text:#1F2937; --muted:#6B7280;
  --success:#16A34A; --success-bg:#ECFDF5; --warning:#B45309; --warning-bg:#FFFBEB; --danger:#DC2626; --danger-bg:#FEF2F2;
  --shadow:0 1px 3px rgba(18,60,156,.04), 0 4px 8px rgba(0,0,0,.02);
  --shadow-2:0 8px 24px rgba(18,60,156,.10);
  --r-card:12px; --r-input:10px;
  --sb-w:260px;
}
:root[data-theme="dark"] {
  --primary:#3B7BFF; --primary-dark:#8FB2FF; --primary-tint:#16264A; --primary-rgb:59,123,255;
  --bg:#0B1220; --surface:#111A2E; --surface-2:#16223B; --border:#22304D;
  --text:#E6EBF5; --muted:#98A5BF;
  --success:#34D399; --success-bg:#0F2A22; --warning:#FBBF24; --warning-bg:#2B2210; --danger:#F87171; --danger-bg:#2E1517;
  --shadow:0 1px 3px rgba(0,0,0,.4); --shadow-2:0 8px 24px rgba(0,0,0,.5);
}
* { box-sizing:border-box; }
.d-none { display:none!important; }
html,body { height:100%; }
body { margin:0; background:var(--bg); color:var(--text); font-family:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif; font-size:.9rem; -webkit-font-smoothing:antialiased; }
.min-w-0 { min-width:0; }
.text-muted { color:var(--muted)!important; }
.text-primary { color:var(--primary)!important; }
a { color:var(--primary); }
:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }

/* Bootstrap overrides */
.btn { border-radius:var(--r-input); font-weight:600; font-size:.875rem; }
.btn-primary { --bs-btn-bg:var(--primary); --bs-btn-border-color:var(--primary); --bs-btn-hover-bg:var(--primary-dark); --bs-btn-hover-border-color:var(--primary-dark); --bs-btn-active-bg:var(--primary-dark); --bs-btn-disabled-bg:var(--primary); --bs-btn-disabled-border-color:var(--primary); }
:root[data-theme="dark"] .btn-primary { --bs-btn-hover-bg:#2D68E0; --bs-btn-hover-border-color:#2D68E0; --bs-btn-active-bg:#2D68E0; --bs-btn-color:#fff; }
.btn-light-x { background:var(--surface); border:1px solid var(--border); color:var(--text); }
.btn-light-x:hover { background:var(--surface-2); color:var(--text); }
.btn-outline-x { background:transparent; border:1px solid var(--primary); color:var(--primary); }
.btn-outline-x:hover { background:var(--primary-tint); color:var(--primary); }
.btn-lg-x { padding:.7rem 1rem; font-size:.95rem; }
.btn-link-x { background:none; border:0; color:var(--muted); font-size:.82rem; padding:.25rem; }
.btn-link-x:hover { color:var(--primary); }
.form-control,.form-select { border-radius:var(--r-input); border-color:var(--border); background-color:var(--surface); color:var(--text); font-size:.9rem; min-height:42px; }
.form-control:focus,.form-select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(var(--primary-rgb),.18); background-color:var(--surface); color:var(--text); }
.form-control::placeholder { color:var(--muted); opacity:.7; }
.form-label { font-weight:600; font-size:.8rem; color:var(--text); margin-bottom:.3rem; }
.form-text { color:var(--muted); font-size:.75rem; }
.req::after { content:" *"; color:var(--danger); }
.modal-content { border:1px solid var(--border); border-radius:16px; background:var(--surface); color:var(--text); box-shadow:var(--shadow-2); }
.modal-header,.modal-footer { border-color:var(--border); }
.modal-title { font-weight:700; font-size:1.05rem; }
.dropdown-menu { border-color:var(--border); background:var(--surface); border-radius:12px; font-size:.875rem; }
.dropdown-item { color:var(--text); }
.dropdown-item:hover { background:var(--surface-2); color:var(--text); }
.nav-tabs { border-color:var(--border); }
.nav-tabs .nav-link { color:var(--muted); font-weight:600; border:0; border-bottom:2px solid transparent; padding:.6rem 1rem; background:none; }
.nav-tabs .nav-link.active { color:var(--primary); border-bottom-color:var(--primary); background:none; }
.progress { background:var(--surface-2); }

/* Komponen umum */
.card-x { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-card); box-shadow:var(--shadow); }
.card-x .card-h { padding:.9rem 1.1rem; border-bottom:1px solid var(--border); font-weight:700; display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.card-x .card-b { padding:1.1rem; }
.badge-x { display:inline-flex; align-items:center; gap:.25rem; padding:.2rem .65rem; border-radius:999px; font-size:.72rem; font-weight:700; white-space:nowrap; background:var(--surface-2); color:var(--muted); }
.badge-x.ok { background:var(--success-bg); color:var(--success); }
.badge-x.warn { background:var(--warning-bg); color:var(--warning); }
.badge-x.bad { background:var(--danger-bg); color:var(--danger); }
.badge-x.info { background:var(--primary-tint); color:var(--primary); }
.alert-x { border-radius:var(--r-input); padding:.65rem .85rem; font-size:.85rem; margin-bottom:1rem; }
.alert-x.danger { background:var(--danger-bg); color:var(--danger); }
.alert-x.info { background:var(--primary-tint); color:var(--primary); }
.alert-x.warn { background:var(--warning-bg); color:var(--warning); }
.alert-x.ok { background:var(--success-bg); color:var(--success); }
.icon-btn { width:40px; height:40px; border-radius:10px; border:0; background:transparent; color:var(--text); display:inline-flex; align-items:center; justify-content:center; font-size:1.2rem; flex:none; }
.icon-btn:hover { background:var(--surface-2); }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--primary-tint); color:var(--primary); display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; flex:none; }
.brand-mark { width:56px; height:56px; border-radius:16px; background:var(--primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.7rem; overflow:hidden; flex:none; }
.brand-mark.sm { width:38px; height:38px; border-radius:11px; font-size:1.15rem; }
.brand-mark img { width:100%; height:100%; object-fit:contain; background:#fff; }
.impor-selesai { display:flex; gap:14px; align-items:center; padding:16px; border-radius:12px; background:rgba(25,135,84,.12); border:1px solid rgba(25,135,84,.45); }
.impor-selesai > i { font-size:2.2rem; color:#198754; }
.impor-selesai.sebagian { background:rgba(255,193,7,.14); border-color:rgba(255,193,7,.6); }
.impor-selesai.sebagian > i { color:#d39e00; }
.brand-mark.logo { background:transparent; border-radius:0; }
.brand-mark.logo img { background:transparent; }
.brand-mark.logo.sm { width:44px; height:44px; }
.brand-mark.logo.xl { width:96px; height:96px; }
.empty { text-align:center; color:var(--muted); padding:2.5rem 1rem; }
.empty i { font-size:2.2rem; display:block; margin-bottom:.5rem; opacity:.6; }
.skeleton { background:linear-gradient(90deg,var(--surface-2),var(--border),var(--surface-2)); background-size:200% 100%; animation:sk 1.2s infinite; border-radius:8px; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Pemuat */
.boot { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:var(--bg); z-index:3000; }
.boot-box { text-align:center; }

/* Login */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:1.25rem 16px; background:radial-gradient(circle at 20% 0,var(--primary-tint),transparent 55%),var(--bg); }
.login-card { width:100%; max-width:400px; padding:2rem 1.6rem; }
.input-icon { position:relative; }
.input-icon > i { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.input-icon .form-control { padding-left:38px; }
.pw-row { display:flex; gap:.5rem; align-items:stretch; }
.pw-row .input-icon { flex:1; min-width:0; }
.btn-eye { flex:none; width:44px; border:1px solid var(--border); border-radius:var(--r-input); background:var(--surface); color:var(--muted); display:inline-flex; align-items:center; justify-content:center; font-size:1.1rem; }
.btn-eye:hover { color:var(--primary); background:var(--surface-2); }
input[type=password]::-ms-reveal, input[type=password]::-ms-clear { display:none; }
input::-webkit-credentials-auto-fill-button { visibility:hidden; position:absolute; right:0; }

/* Pilih modul setelah login */
.pilih-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-top:1.5rem; }
.pilih-card { text-align:left; border:1px solid var(--border); background:var(--surface); border-radius:var(--r-card); padding:1.4rem 1.2rem; color:var(--text); box-shadow:var(--shadow); transition:transform .15s, border-color .15s, box-shadow .15s; }
.pilih-card:hover { border-color:var(--primary); transform:translateY(-2px); box-shadow:var(--shadow-2); }
.pilih-card .ic { width:52px; height:52px; border-radius:14px; background:var(--primary-tint); color:var(--primary); display:flex; align-items:center; justify-content:center; font-size:1.6rem; margin-bottom:.9rem; }
.pilih-card .t { font-weight:800; font-size:1rem; margin-bottom:.25rem; }
.pilih-card .d { color:var(--muted); font-size:.82rem; }
@media (max-width:575.98px) { .pilih-grid { grid-template-columns:1fr; } }

/* Dashboard layout */
.dash { display:flex; min-height:100vh; }
.sidebar { width:var(--sb-w); background:var(--surface); border-right:1px solid var(--border); display:flex; flex-direction:column; position:fixed; inset:0 auto 0 0; z-index:1040; transition:transform .25s; }
.sb-brand { display:flex; align-items:center; gap:.7rem; padding:1.1rem 1.1rem .9rem; }
.sb-nav { flex:1; overflow-y:auto; padding:.4rem .8rem; display:flex; flex-direction:column; gap:.2rem; }
.sb-sec { font-size:.68rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:.9rem .7rem .3rem; font-weight:700; }
.sb-item { display:flex; align-items:center; gap:.7rem; width:100%; border:0; background:transparent; color:var(--text); padding:.65rem .8rem; border-radius:999px; font-weight:600; font-size:.875rem; text-align:left; }
.sb-item i { font-size:1.1rem; width:1.3rem; text-align:center; color:var(--muted); }
.sb-item:hover:not(:disabled):not(.active) { background:var(--surface-2); color:var(--text); }
.sb-item:hover:not(:disabled):not(.active) i { color:var(--primary); }
.sb-item.active, .sb-item.active:hover, .sb-item.active:focus { background:var(--primary); color:#fff; box-shadow:0 4px 12px rgba(var(--primary-rgb),.28); }
.sb-item.active i, .sb-item.active:hover i, .sb-item.active:focus i { color:#fff; }
.sb-item:disabled { opacity:.55; cursor:not-allowed; }
.sb-item .soon { margin-left:auto; font-size:.62rem; font-weight:700; padding:.1rem .45rem; border-radius:999px; background:var(--surface-2); color:var(--muted); }
.sb-foot { border-top:1px solid var(--border); padding:.6rem .8rem; }
.sb-backdrop { display:none; }
.dash-main { margin-left:var(--sb-w); flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar { position:sticky; top:0; z-index:1020; height:64px; display:flex; align-items:center; gap:.6rem; padding:0 1.25rem; background:color-mix(in srgb,var(--surface) 92%,transparent); backdrop-filter:blur(8px); border-bottom:1px solid var(--border); }
.topbar-title { font-weight:800; font-size:1.1rem; }
.user-chip { display:flex; align-items:center; gap:.6rem; border:1px solid var(--border); background:var(--surface); border-radius:999px; padding:.25rem .7rem .25rem .3rem; color:var(--text); }
.page { padding:1.4rem 1.25rem 3rem; max-width:1400px; width:100%; }
.page-head { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; margin-bottom:1.1rem; }
.page-head h2 { font-size:1.25rem; font-weight:800; margin:0; }
@media (max-width:991.98px) {
  .sidebar { transform:translateX(-100%); box-shadow:var(--shadow-2); }
  .sidebar.open { transform:none; }
  .sb-backdrop.open { display:block; position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:1030; }
  .dash-main { margin-left:0; }
  .page { padding:1rem 16px 3rem; }
  .topbar { padding:0 .6rem; }
}

/* KPI */
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; margin-bottom:1.25rem; }
.kpi { padding:1rem 1.1rem; display:flex; gap:.9rem; align-items:center; }
.kpi .ic { width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; background:var(--primary-tint); color:var(--primary); flex:none; }
.kpi .ic.ok { background:var(--success-bg); color:var(--success); }
.kpi .ic.warn { background:var(--warning-bg); color:var(--warning); }
.kpi .ic.bad { background:var(--danger-bg); color:var(--danger); }
.kpi .v { font-size:1.6rem; font-weight:800; line-height:1.1; }
.kpi .l { color:var(--muted); font-size:.78rem; font-weight:600; }
.chart-box { position:relative; height:250px; }
.grid-2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:1rem; margin-bottom:1.25rem; }

/* Toolbar & tabel */
.toolbar { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; padding:.9rem 1.1rem; border-bottom:1px solid var(--border); }
.toolbar .form-control,.toolbar .form-select { min-height:38px; font-size:.85rem; }
.toolbar .grow { flex:1 1 220px; }
.toolbar .fsel { flex:0 1 170px; }
.tbl-wrap { overflow-x:auto; }
table.tbl { width:100%; border-collapse:collapse; font-size:.85rem; }
.tbl th { text-align:left; font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:700; padding:.7rem .9rem; border-bottom:1px solid var(--border); white-space:nowrap; background:var(--surface); position:sticky; top:0; }
.tbl td { padding:.7rem .9rem; border-bottom:1px solid var(--border); vertical-align:middle; }
.tbl tbody tr:hover { background:var(--surface-2); }
.tbl .nm { font-weight:600; }
.tbl .sub { color:var(--muted); font-size:.75rem; }
.tbl .acts { white-space:nowrap; text-align:right; }
.thumb { width:42px; height:42px; border-radius:8px; object-fit:cover; background:var(--surface-2); border:1px solid var(--border); flex:none; }
.thumb.ph { display:inline-flex; align-items:center; justify-content:center; color:var(--muted); }
.pager { display:flex; align-items:center; gap:.5rem; justify-content:space-between; flex-wrap:wrap; padding:.75rem 1.1rem; font-size:.82rem; color:var(--muted); }
@media (max-width:767.98px) {
  table.tbl.stack thead { display:none; }
  table.tbl.stack, table.tbl.stack tbody, table.tbl.stack tr, table.tbl.stack td { display:block; width:100%; }
  table.tbl.stack tr { border-bottom:1px solid var(--border); padding:.7rem .9rem; }
  table.tbl.stack td { border:0; padding:.15rem 0; }
  table.tbl.stack td[data-l]::before { content:attr(data-l)": "; color:var(--muted); font-size:.72rem; font-weight:700; }
  table.tbl.stack td.acts { text-align:left; margin-top:.4rem; }
}
.chk { width:18px; height:18px; accent-color:var(--primary); }

/* Detail */
.dl { display:grid; grid-template-columns:140px 1fr; gap:.45rem .9rem; margin:0; font-size:.86rem; }
.dl dt { color:var(--muted); font-weight:600; }
.dl dd { margin:0; word-break:break-word; }
@media (max-width:520px) { .dl { grid-template-columns:1fr; gap:0; } .dl dt { margin-top:.5rem; font-size:.74rem; } }
.foto-box { position:relative; border-radius:12px; overflow:hidden; background:var(--surface-2); border:1px solid var(--border); aspect-ratio:4/3; display:flex; align-items:center; justify-content:center; color:var(--muted); }
.foto-box img { width:100%; height:100%; object-fit:cover; cursor:zoom-in; }
.qr-box { background:#fff; padding:10px; border-radius:10px; display:inline-block; border:1px solid var(--border); }
.qr-box svg { display:block; width:150px; height:150px; }

/* Impor */
.drop { border:2px dashed var(--border); border-radius:12px; padding:1.5rem; text-align:center; color:var(--muted); background:var(--surface-2); }
.prev-scroll { max-height:280px; overflow:auto; border:1px solid var(--border); border-radius:10px; }

/* Lightbox, konfirmasi, toast */
.lightbox { position:fixed; inset:0; z-index:2500; background:rgba(2,6,23,.92); display:flex; align-items:center; justify-content:center; padding:56px 12px 12px; }
.lightbox img { max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; }
.lb-bar { position:absolute; top:10px; right:10px; display:flex; gap:.5rem; }
.konfirm { position:fixed; inset:0; z-index:2600; background:rgba(15,23,42,.5); display:flex; align-items:center; justify-content:center; padding:16px; }
.konfirm-box { width:100%; max-width:420px; padding:1.3rem; }
.toasts { position:fixed; z-index:2700; right:16px; bottom:16px; display:flex; flex-direction:column; gap:.5rem; max-width:calc(100vw - 32px); width:360px; pointer-events:none; }
.toast-x { pointer-events:auto; display:flex; gap:.6rem; align-items:flex-start; padding:.75rem .9rem; border-radius:12px; background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow-2); border-left:4px solid var(--primary); font-size:.85rem; animation:tin .2s ease-out; }
.toast-x.ok { border-left-color:var(--success); } .toast-x.bad { border-left-color:var(--danger); } .toast-x.warn { border-left-color:#F59E0B; }
@keyframes tin { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@media (max-width:575.98px) { .toasts { right:16px; left:16px; width:auto; bottom:84px; } }

/* ═════ Kartu Pemeliharaan (mobile-first) ═════ */
.kartu { max-width:480px; margin:0 auto; min-height:100vh; background:var(--bg); position:relative; padding-bottom:calc(84px + env(safe-area-inset-bottom)); }
@media (min-width:481px) { #v-kartu { background:var(--surface-2); } .kartu { box-shadow:0 0 40px rgba(0,0,0,.08); } }
.k-head { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.7rem 16px; background:var(--surface); border-bottom:1px solid var(--border); }
.k-main { padding:16px; }
.k-nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; z-index:30; display:grid; grid-template-columns:repeat(5,1fr); align-items:end; background:var(--surface); border-top:1px solid var(--border); padding:.35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
.k-nav button { border:0; background:none; color:var(--muted); display:flex; flex-direction:column; align-items:center; gap:2px; font-size:.64rem; font-weight:600; padding:.3rem 0; min-height:48px; }
.k-nav button i { font-size:1.3rem; }
.k-nav button.active { color:var(--primary); }
.k-nav button.k-scan { position:relative; color:var(--primary); }
.k-nav button.k-scan i { width:56px; height:56px; border-radius:50%; background:var(--primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.5rem; margin-top:-26px; box-shadow:0 6px 16px rgba(var(--primary-rgb),.35); border:4px solid var(--surface); }
.k-card { padding:1rem; margin-bottom:.8rem; }
.k-hero { background:linear-gradient(135deg,var(--primary),var(--primary-dark)); color:#fff; border-radius:16px; padding:1.1rem; margin-bottom:1rem; }
:root[data-theme="dark"] .k-hero { background:linear-gradient(135deg,#2D68E0,#1B3F8F); }
.darurat-card { background:#FEF2F2; border:2px solid #DC2626; border-radius:14px; padding:.9rem; margin-bottom:.8rem; color:#7F1D1D; }
.pm-besok { background:#EFF6FF; border:1.5px solid #3B82F6; border-radius:14px; padding:.9rem; margin-bottom:.8rem; color:#1E3A8A; }
.pm-besok-ic { font-size:1.6rem; color:#2563EB; line-height:1; }
:root[data-theme="dark"] .pm-besok { background:#13233F; color:#BFDBFE; border-color:#60A5FA; }
:root[data-theme="dark"] .pm-besok .text-muted { color:#93C5FD !important; }
.darurat-card.lewat { animation:daruratKedip 1.6s ease-in-out infinite; }
.darurat-ic { font-size:1.8rem; color:#DC2626; line-height:1; }
.darurat-t { font-size:.72rem; font-weight:800; letter-spacing:.06em; color:#B91C1C; }
.darurat-card.oranye { background:#FFF7ED; border-color:#EA580C; color:#7C2D12; }
.darurat-card.oranye .darurat-ic { color:#EA580C; }
.darurat-card.oranye .darurat-t { color:#C2410C; }
:root[data-theme="dark"] .darurat-card.oranye { background:#3A1F0B; color:#FED7AA; border-color:#FB923C; }
:root[data-theme="dark"] .darurat-card.oranye .darurat-t { color:#FDBA74; }
:root[data-theme="dark"] .darurat-card { background:#3B1111; color:#FECACA; border-color:#F87171; }
:root[data-theme="dark"] .darurat-t { color:#FCA5A5; }
@keyframes daruratKedip { 50% { box-shadow:0 0 0 4px rgba(220,38,38,.25); } }
@media (prefers-reduced-motion: reduce) { .darurat-card.lewat { animation:none; } }
.k-hero .small { opacity:.85; }
.k-btn { width:100%; min-height:48px; font-size:.95rem; }
.k-aset { display:flex; gap:.75rem; align-items:center; padding:.8rem; margin-bottom:.6rem; cursor:pointer; text-align:left; width:100%; border:1px solid var(--border); background:var(--surface); border-radius:var(--r-card); color:var(--text); box-shadow:var(--shadow); }
.k-aset:active { background:var(--surface-2); }
.k-tabs { display:flex; gap:.4rem; overflow-x:auto; margin:0 -16px 1rem; padding:0 16px; scrollbar-width:none; }
.k-tabs button { border:1px solid var(--border); background:var(--surface); color:var(--muted); border-radius:999px; padding:.45rem .95rem; font-weight:700; font-size:.8rem; white-space:nowrap; min-height:38px; }
.k-tabs button.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.scan-view { position:relative; border-radius:16px; overflow:hidden; background:#000; min-height:280px; }
#qrReader video { width:100%!important; border-radius:16px; }
#qrReader { border:0!important; }

/* ═════ Label QR ═════ */
.lbl-preview { background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:1rem; overflow:auto; }
.lbl-sheet { --mt:10mm; --mx:8mm; --gap:3mm; width:210mm; height:297mm; background:#fff; color:#000; padding:var(--mt) var(--mx); display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(6,1fr); gap:var(--gap); page-break-after:always; break-after:page; margin:0 auto 1rem; box-shadow:0 2px 10px rgba(0,0,0,.15); }
.lbl { border:.25mm dashed #999; border-radius:2mm; display:flex; align-items:center; gap:2.5mm; padding:2.5mm; overflow:hidden; font-family:Arial,Helvetica,sans-serif; }
.lbl .q { flex:none; width:26mm; height:26mm; }
.lbl .q svg { width:100%; height:100%; display:block; }
.lbl .t { min-width:0; flex:1; }
.lbl .t b { display:block; font-size:9pt; line-height:1.15; word-break:break-word; }
.lbl .t .id { font-family:'Courier New',monospace; font-weight:700; font-size:10pt; margin-bottom:1mm; }
.lbl .t small { display:block; font-size:7pt; color:#333; line-height:1.2; }
@media screen and (max-width:900px) { .lbl-preview .lbl-sheet { zoom:.5; } }
#printRoot { display:none; }
@media print {
  @page { size:A4; margin:0; }
  html,body { background:#fff!important; height:auto; }
  body > *:not(#printRoot) { display:none!important; }
  #printRoot { display:block!important; }
  #printRoot .lbl-sheet { box-shadow:none; margin:0; zoom:1!important; }
}


/* ═════ Label QR — printer ZT411 (satu label = satu halaman, ukuran dari pengaturan) ═════ */
.zl { box-sizing:border-box; background:#fff; color:#000; font-family:'Poppins',Arial,Helvetica,sans-serif; font-weight:700; overflow:hidden; position:relative; page-break-after:always; break-after:page; }
.zl:last-child { page-break-after:auto; break-after:auto; }
.zl-in { width:100%; height:100%; display:flex; align-items:stretch; gap:1.5mm; }
.zl-t { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:space-between; }
.zl-h { display:flex; align-items:flex-start; gap:1.1mm; }
.zl-h img { height:6.9mm; margin-top:-.1mm; image-rendering:auto; width:auto; flex:none; display:block; }
.zl-ht { margin-top:.3mm; }
.zl-ht b { display:block; font-weight:700; font-size:8pt; line-height:1; letter-spacing:0; white-space:nowrap; }
.zl-ht small { display:block; font-size:4.7pt; line-height:1.07; font-weight:700; margin-top:.7mm; white-space:nowrap; }
.zl-id { font-family:'Bebas Neue','Oswald','Barlow Condensed','Arial Narrow',Arial,sans-serif; font-weight:400; font-size:12pt; line-height:1; letter-spacing:0; white-space:nowrap; overflow:hidden; }
.zl-m { transform:translateY(.15mm); }
.zl-nm { font-size:5.75pt; line-height:1.15; font-weight:700; margin-top:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.zl-gd { margin-bottom:-.4mm; transform:translateY(.2mm); font-size:5.75pt; line-height:1.15; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zl-q { flex:none; height:100%; aspect-ratio:1/1; }
.zl-q svg { width:100%; height:100%; display:block; }
.zl-prev { display:flex; flex-wrap:wrap; gap:.8rem; }
.zl-prev .zl { zoom:1.6; outline:1px dashed #9ca3af; box-shadow:0 1px 4px rgba(0,0,0,.12); page-break-after:auto; break-after:auto; }
@media screen and (max-width:900px) { .zl-prev .zl { zoom:1.1; } }
/* Kotak foto: ketuk = kamera, tombol Galeri = pilih dari galeri */
.foto-slot .lbl-s { pointer-events:none; }
.foto-slot .gal-btn { position:absolute; right:6px; bottom:6px; z-index:3; background:rgba(15,23,42,.8); color:#fff; font-size:.68rem; padding:.2rem .55rem; border-radius:6px; overflow:hidden; cursor:pointer; display:inline-flex; align-items:center; }
.foto-slot .gal-btn input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }

/* ═════ Work Order ═════ */
.tl { list-style:none; margin:0; padding:0; }
.tl li { position:relative; padding:0 0 1rem 1.5rem; border-left:2px solid var(--border); margin-left:.4rem; }
.tl li:last-child { border-left-color:transparent; padding-bottom:0; }
.tl li::before { content:""; position:absolute; left:-7px; top:3px; width:12px; height:12px; border-radius:50%; background:var(--primary); border:2px solid var(--surface); box-shadow:0 0 0 2px var(--primary); }
.tl li.ok::before { background:var(--success); box-shadow:0 0 0 2px var(--success); }
.tl li.warn::before { background:#F59E0B; box-shadow:0 0 0 2px #F59E0B; }
.tl li.bad::before { background:var(--danger); box-shadow:0 0 0 2px var(--danger); }
.tl li.note::before { width:8px; height:8px; left:-5px; top:5px; background:var(--muted); box-shadow:none; }
.tl .t1 { font-weight:700; }
.tl .t2 { color:var(--muted); font-size:.76rem; }
.tl .t3 { font-size:.82rem; margin-top:.15rem; word-break:break-word; }
.steps { display:flex; align-items:flex-start; margin:.25rem 0 1rem; }
.steps .st { flex:1; text-align:center; position:relative; font-size:.72rem; color:var(--muted); }
.steps .st::before { content:""; position:absolute; top:11px; left:-50%; width:100%; height:3px; background:var(--border); z-index:0; }
.steps .st:first-child::before { display:none; }
.steps .st .dot { width:24px; height:24px; border-radius:50%; background:var(--surface); border:3px solid var(--border); margin:0 auto .25rem; position:relative; z-index:1; display:flex; align-items:center; justify-content:center; font-size:.7rem; }
.steps .st.done { color:var(--text); } .steps .st.done::before { background:var(--success); }
.steps .st.done .dot { background:var(--success); border-color:var(--success); color:#fff; }
.steps .st.aktif .dot { border-color:var(--primary); } .steps .st.warn .dot { background:#F59E0B; border-color:#F59E0B; color:#fff; } .steps .st.bad .dot { background:var(--danger); border-color:var(--danger); color:#fff; }
.steps .st b { display:block; font-size:.76rem; }
.wo-sec { border:1px solid var(--border); border-radius:12px; margin-bottom:.8rem; overflow:hidden; background:var(--surface); }
.wo-sec-h { padding:.55rem .9rem; font-weight:700; font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); background:var(--surface-2); }
.wo-sec-b { padding:.8rem .9rem; }
.sp-item { display:flex; gap:.6rem; align-items:flex-start; margin-bottom:.7rem; }
.sp-item .foto-th { width:96px; flex:none; }
.foto-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:.6rem; }
.foto-th { position:relative; aspect-ratio:4/3; border-radius:10px; overflow:hidden; border:1px solid var(--border); background:var(--surface-2); }
.foto-th img { width:100%; height:100%; object-fit:cover; cursor:zoom-in; display:block; }
.foto-th span { position:absolute; left:6px; bottom:6px; background:rgba(15,23,42,.75); color:#fff; font-size:.68rem; padding:.1rem .45rem; border-radius:6px; }
.foto-slot { position:relative; aspect-ratio:4/3; border:2px dashed var(--border); border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:var(--muted); font-size:.74rem; background:var(--surface-2); cursor:pointer; overflow:hidden; padding:.3rem; }
.foto-slot.terisi { border-style:solid; border-color:var(--success); }
.foto-slot i { font-size:1.4rem; }
.foto-slot img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.foto-slot input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.foto-slot .lbl-s { position:absolute; left:6px; bottom:6px; z-index:1; background:rgba(15,23,42,.75); color:#fff; font-size:.66rem; padding:.1rem .45rem; border-radius:6px; }
.foto-slot.naik::after { content:"Mengunggah…"; position:absolute; inset:0; background:rgba(255,255,255,.8); color:#111; display:flex; align-items:center; justify-content:center; font-weight:700; z-index:2; }
.ap { border:1px solid var(--border); border-radius:12px; padding:.8rem; background:var(--surface-2); }
.ap-res { max-height:240px; overflow:auto; margin-top:.5rem; }
.ap-item { display:flex; gap:.6rem; align-items:center; width:100%; text-align:left; border:1px solid var(--border); background:var(--surface); border-radius:10px; padding:.5rem .6rem; margin-bottom:.4rem; color:var(--text); }
.ap-item:hover { border-color:var(--primary); }
.ap-sel { display:flex; gap:.7rem; align-items:center; }
.peng-item { border:1px solid var(--border); border-radius:12px; padding:.8rem .9rem; margin-bottom:.6rem; background:var(--surface); }
.peng-item .desk { color:var(--muted); font-size:.84rem; margin:.3rem 0 .6rem; }
.tbl td.cat { background:var(--warning-bg); border-left:3px solid #F59E0B; min-width:220px; font-weight:600; }
.tbl th.th-cat { color:var(--warning); }
.panel-menunggu { border-color:#F59E0B; }
.wo-card { display:block; width:100%; text-align:left; border:1px solid var(--border); background:var(--surface); border-radius:var(--r-card); padding:.85rem; margin-bottom:.7rem; color:var(--text); box-shadow:var(--shadow); }
.wo-card:active { background:var(--surface-2); }
.wo-card .u { color:var(--muted); font-size:.82rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:.3rem; }
.seg { display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:.4rem; }
.seg button { border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:10px; min-height:46px; font-weight:700; font-size:.85rem; }
.seg button.on { background:var(--primary); color:#fff; border-color:var(--primary); }
.seg button.on.s-ok { background:var(--success); border-color:var(--success); } .seg button.on.s-bad { background:var(--danger); border-color:var(--danger); } .seg button.on.s-warn { background:#F59E0B; border-color:#F59E0B; }
.k-form .form-control,.k-form .form-select { min-height:48px; }

/* ── Revisi 11 Okt 2026 ── */
.th-sort { border:0; background:none; padding:0; font:inherit; color:inherit; text-transform:inherit; letter-spacing:inherit; display:inline-flex; align-items:center; gap:.35rem; cursor:pointer; }
.th-sort:hover { color:var(--primary); }
.th-sort i { font-size:.85rem; opacity:.75; }
.nbadge { display:inline-flex; align-items:center; justify-content:center; min-width:1.25rem; height:1.25rem; padding:0 .35rem; border-radius:999px; background:var(--danger); color:#fff; font-size:.68rem; font-weight:800; line-height:1; }
.sb-item.active .nbadge { background:#fff; color:var(--danger); }
.notif-n { position:absolute; top:2px; right:2px; min-width:1.05rem; height:1.05rem; padding:0 .25rem; border-radius:999px; background:var(--danger); color:#fff; font-size:.62rem; font-weight:800; display:flex; align-items:center; justify-content:center; }
.notif-row { display:flex; align-items:center; gap:.75rem; width:100%; text-align:left; border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:12px; padding:.7rem .8rem; }
.notif-row:hover { border-color:var(--primary); }
.notif-row.kosong { opacity:.6; }
.notif-row .ic, .usul-card .ic { width:40px; height:40px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; font-size:1.15rem; flex:none; background:var(--primary-tint); color:var(--primary); }
.notif-row .ic.bad { background:var(--danger-bg); color:var(--danger); }
.usul-card { border:1px solid var(--border); border-radius:12px; padding:.8rem .9rem; background:var(--surface); }
.foto-th.kosong { display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:.75rem; }
.foto-th.kosong span { position:static; background:none; color:var(--muted); }
.usul-card .foto-th { width:120px; flex:none; }
.drag-cell { white-space:nowrap; }
.drag-h { cursor:grab; color:var(--muted); font-size:1.1rem; margin-right:.25rem; touch-action:none; }
.drag-h:active { cursor:grabbing; }
.drag-no { font-weight:700; }
#msBody tr.dragging { opacity:.4; }
#msBody tr.drop-atas td { box-shadow:inset 0 2px 0 var(--primary); }
#msBody tr.drop-bawah td { box-shadow:inset 0 -2px 0 var(--primary); }
.riw-judul { font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:.7rem 0 .4rem; }
.riw-card { display:block; width:100%; text-align:left; border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:12px; padding:.65rem .8rem; margin-bottom:.5rem; }
.kal { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.kal-h { text-align:center; font-size:.7rem; font-weight:700; color:var(--muted); padding:.2rem 0; }
.kal-d { position:relative; border:1px solid transparent; background:var(--surface-2); color:var(--text); border-radius:8px; min-height:38px; font-size:.82rem; font-weight:600; }
.kal-d:hover { border-color:var(--primary); }
.kal-d.hari { border-color:var(--primary); color:var(--primary); }
.kal-d.pilih { background:var(--primary); color:#fff; }
.dot-pm { display:block; width:6px; height:6px; border-radius:50%; background:var(--primary); margin:1px auto 0; }
.kal-d.pilih .dot-pm { background:#fff; }
.hm { display:grid; grid-template-columns:24px repeat(5,1fr); gap:4px; align-items:stretch; max-width:460px; margin:0 auto; }
.hm-ax { display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; color:var(--muted); }
.hm-c { position:relative; border:2px solid transparent; border-radius:8px; min-height:52px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#fff; font-weight:800; cursor:pointer; }
.hm-kecil .hm-c { min-height:34px; cursor:pointer; }
.hm-c.kosong { opacity:.55; color:rgba(0,0,0,.55); }
.hm-c.pilih { border-color:var(--text); box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.hm-n { font-size:1.05rem; line-height:1; }
.hm-s { font-size:.62rem; font-weight:600; opacity:.85; }
.hm0 { background:#16A34A; } .hm1 { background:#CA8A04; } .hm2 { background:#EA580C; } .hm3 { background:#DC2626; }
.hm-leg { display:flex; flex-wrap:wrap; gap:.4rem .9rem; justify-content:center; font-size:.72rem; color:var(--muted); margin-top:.6rem; }
.hm-k { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:4px; }
.rk-skor { border:1px dashed var(--border); border-radius:10px; padding:.5rem .75rem; min-height:44px; display:flex; align-items:center; gap:.5rem; }
button.riw-card:hover { border-color:var(--primary); }
button.riw-card:active { background:var(--surface-2); }
.riw-uraian { font-size:.84rem; margin-top:.25rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.riw-meta { display:flex; align-items:center; font-size:.76rem; color:var(--muted); margin-top:.3rem; }
.riw-statis { cursor:default; }
.peng-item .peng-f { margin:.35rem 0 0; }
.peng-item .peng-l { font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--text); }
.peng-item .peng-f .desk { margin:.1rem 0 .2rem; }
.chk-list { display:grid; gap:.35rem; max-height:220px; overflow:auto; border:1px solid var(--border); border-radius:var(--r-input); padding:.4rem; background:var(--surface); }
.chk-item { display:flex; align-items:center; gap:.6rem; min-height:44px; padding:.2rem .5rem; border-radius:8px; margin:0; cursor:pointer; font-weight:600; font-size:.88rem; }
.chk-item:hover { background:var(--surface-2); }
.chk-item input { width:1.15rem; height:1.15rem; flex:none; accent-color:var(--primary); }

/* Kartu di HP: ikuti tinggi layar dinamis agar tidak ada ruang kosong di bawah */
html { background:var(--bg); }
.kartu { min-height:100vh; min-height:100dvh; }
@media (max-width:480px) { #v-kartu { min-height:100vh; min-height:100dvh; background:var(--bg); } }

/* Gerak berkurang */
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }
.k3-fotos{display:flex;flex-wrap:wrap;gap:.5rem}
.k3-th{position:relative;width:72px;height:72px}
.k3-th img{width:100%;height:100%;object-fit:cover;border-radius:8px;border:1px solid var(--garis,#ddd)}
.k3-x{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:0;background:#c0392b;color:#fff;font-size:12px;line-height:20px;padding:0;cursor:pointer}
.kpi-k{padding:1rem 1.1rem;border-left:4px solid var(--border)}
.kpi-k.hijau{border-left-color:var(--success)}.kpi-k.kuning{border-left-color:#F59E0B}.kpi-k.merah{border-left-color:var(--danger)}
.kpi-k-n{font-size:.8rem;font-weight:700;color:var(--muted)}.kpi-k-v{font-size:1.65rem;font-weight:800;line-height:1.3}
.kpi-grid-k{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.an-alert{max-height:340px;overflow:auto}
.an-al{display:flex;gap:.75rem;align-items:center;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--border);padding:.7rem 1rem;color:var(--text)}
.an-al:hover{background:var(--surface-2)}.an-al.static{cursor:default}.an-al.static:hover{background:transparent}
.an-al-ic{width:34px;height:34px;border-radius:10px;background:var(--danger-bg);color:var(--danger);display:inline-flex;align-items:center;justify-content:center;flex:none}
.an-al-t{flex:1;min-width:0}.an-al-t .small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-al-s{text-align:right;flex:none}
.an-kpi-r{display:grid;grid-template-columns:12px 1fr auto;gap:.1rem .6rem;align-items:center;padding:.5rem 0;border-bottom:1px solid var(--border)}
.an-kpi-r:last-child{border-bottom:0}
.an-dot{width:10px;height:10px;border-radius:50%;background:var(--border);grid-column:1;grid-row:1/3}
.an-kpi-r.hijau .an-dot{background:var(--success)}.an-kpi-r.kuning .an-dot{background:#F59E0B}.an-kpi-r.merah .an-dot{background:var(--danger)}
.an-kpi-n{font-size:.85rem;font-weight:600;grid-column:2;grid-row:1}.an-kpi-v{font-weight:800;grid-row:1/3;grid-column:3}.an-kpi-l{grid-column:2;grid-row:2}
