:root{
  --bg:#f5f7fb;--card:#fff;--text:#172033;--muted:#6b7280;--line:#e5e7eb;
  --primary:#2563eb;--primarySoft:#eaf1ff;--green:#16a34a;--orange:#f59e0b;--red:#dc2626;
  --shadow:0 14px 34px rgba(15,23,42,.08);--radius:18px;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text)}
button,input,select,textarea{font-family:inherit}
button{cursor:pointer}
.hidden{display:none!important}
.layout{display:flex;min-height:100vh}
.sidebar{width:270px;background:white;border-right:1px solid var(--line);padding:18px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.logo{width:44px;height:44px;border-radius:15px;background:linear-gradient(135deg,#2563eb,#22d3ee);color:white;display:grid;place-items:center;font-weight:900}
.brand h1{font-size:16px;margin:0}.brand p{font-size:12px;color:var(--muted);margin:3px 0 0}
.nav button{width:100%;border:0;background:transparent;padding:12px;border-radius:14px;text-align:left;color:var(--muted);font-weight:800;margin-bottom:7px}
.nav button.active,.nav button:hover{background:var(--primarySoft);color:var(--primary)}
.main{flex:1;padding:22px;max-width:1500px;margin:auto;width:100%}
.top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:18px}
.top h2{font-size:24px;margin:0}.top p{margin:5px 0 0;color:var(--muted)}
.card{background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}
.grid{display:grid;gap:14px}.stats{grid-template-columns:repeat(4,1fr);margin-bottom:16px}.form{grid-template-columns:repeat(2,1fr)}
.stat h3{font-size:25px;margin:0}.stat p{margin:5px 0 0;color:var(--muted);font-weight:800;font-size:13px}
.btn{border:0;border-radius:13px;padding:10px 13px;font-weight:900;background:var(--primary);color:white}
.btn.secondary{background:white;color:var(--text);border:1px solid var(--line)}
.btn.green{background:var(--green);color:#fff!important}.btn.orange{background:var(--orange)}.btn.red{background:var(--red);color:#fff!important}
.btn.small{font-size:12px;padding:8px 10px;border-radius:11px}
input,select,textarea{width:100%;border:1px solid var(--line);border-radius:13px;padding:11px 12px;background:white;outline:none}
textarea{min-height:82px;resize:vertical}
.label{font-size:12px;color:var(--muted);font-weight:900;margin-bottom:6px;display:block}
.toolbar{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:10px;margin-bottom:14px}
.tableWrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:white}
table{border-collapse:collapse;width:100%;min-width:1050px}th,td{border-bottom:1px solid var(--line);padding:12px;text-align:left;font-size:13px;vertical-align:top}
th{background:#f9fafb;color:var(--muted);font-size:12px}.finished{opacity:.6;background:#fafafa}
.small{font-size:12px;color:var(--muted)}.bold{font-weight:900}.actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.badge{display:inline-flex;border-radius:999px;padding:6px 9px;font-size:11px;font-weight:900;white-space:nowrap}
.s0{background:#e0f2fe;color:#0369a1}.s1{background:#fef3c7;color:#92400e}.s2{background:#dcfce7;color:#166534}
.s3{background:#fee2e2;color:#991b1b}.s4{background:#f3e8ff;color:#6b21a8}.s5{background:#dbeafe;color:#1d4ed8}
.s6{background:#ecfdf5;color:#047857}.s7{background:#f1f5f9;color:#334155}.s8{background:#e5e7eb;color:#111827}
.loginBox{max-width:430px;margin:8vh auto}
.modal{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:50;padding:20px;overflow:auto}
.modal.show{display:block}.modalBox{max-width:1050px;background:white;margin:20px auto;border-radius:24px;padding:20px;box-shadow:var(--shadow)}
.modalHead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}.close{border:0;background:#f3f4f6;border-radius:12px;padding:8px 12px}
.pendingMedia{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.pendingBox{width:116px;border:1px solid var(--line);border-radius:14px;background:#f8fafc;overflow:hidden;position:relative}
.pendingBox .mediaPreview{width:100%;height:86px;background:#e5e7eb;display:grid;place-items:center;overflow:hidden}
.pendingBox img,.pendingBox video{width:100%;height:100%;object-fit:cover}
.pendingBox .pendingName{font-size:10px;color:var(--muted);padding:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pendingBox .removePending{position:absolute;right:5px;top:5px;border:0;background:#dc2626;color:white;border-radius:999px;width:24px;height:24px;font-size:12px;font-weight:900}
@media(max-width:900px){
  .layout{display:block}.sidebar{height:auto;width:auto;position:static}.main{padding:14px}.stats{grid-template-columns:repeat(2,1fr)}.form,.toolbar{grid-template-columns:1fr}.top{display:block}
}


/* =========================================================
   HOTFIX STEP 8 - PREVIEW LAMPIRAN FOTO/VIDEO
   Tambahkan di bagian bawah assets/ap_style.css
   ========================================================= */

.pendingMedia{
  display:flex!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  margin-top:10px!important;
  align-items:flex-start!important;
}

.pendingBox{
  width:118px!important;
  border:1px solid var(--line, #e5e7eb)!important;
  border-radius:14px!important;
  background:#f8fafc!important;
  overflow:hidden!important;
  position:relative!important;
  box-shadow:0 6px 16px rgba(15,23,42,.06)!important;
}

.pendingBox .mediaPreview{
  width:100%!important;
  height:88px!important;
  background:#e5e7eb!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
}

.pendingBox img,
.pendingBox video{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}

.pendingBox .pendingName{
  font-size:10px!important;
  line-height:1.2!important;
  color:var(--muted, #6b7280)!important;
  padding:6px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  background:#fff!important;
}

.pendingBox .removePending{
  position:absolute!important;
  right:5px!important;
  top:5px!important;
  border:0!important;
  background:#dc2626!important;
  color:#fff!important;
  border-radius:999px!important;
  width:24px!important;
  height:24px!important;
  font-size:14px!important;
  line-height:24px!important;
  font-weight:900!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  z-index:2!important;
}

.pendingBox .removePending:hover{
  filter:brightness(.92)!important;
}


.sparepartRow{align-items:center}
.timelineBox .pendingBox{width:96px}
.timelineBox .pendingBox .mediaPreview{height:72px}
@media(max-width:900px){
  .sparepartRow{grid-template-columns:1fr!important}
}


/* CUSTOMER TRACKING STEP 10 */
.customerShell{max-width:640px;margin:0 auto;padding:14px}
.customerHero{background:linear-gradient(135deg,#2563eb,#22d3ee);border-radius:26px;color:white;padding:20px;margin-bottom:14px;box-shadow:var(--shadow)}
.customerHero h1{margin:0;font-size:22px}.customerHero p{margin:6px 0 0;opacity:.92}
.customerCard{background:white;border:1px solid var(--line);border-radius:22px;padding:16px;margin-bottom:12px;box-shadow:0 8px 22px rgba(15,23,42,.06)}
.customerItem{border:1px solid var(--line);border-radius:18px;padding:14px;margin-top:10px;background:#fff}
.customerItemTop{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.customerStats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}
.customerStats div{background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:10px;text-align:center}
.customerStats b{display:block;font-size:18px}.customerStats span{font-size:11px;color:var(--muted);font-weight:900}
.detailPage{display:none}.detailPage.show{display:block}
.mediaOverlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.86);z-index:99999;padding:10px;align-items:center;justify-content:center}
.mediaOverlay.show{display:flex}
.mediaPanel{width:min(720px,100%);max-height:94vh;background:#0f172a;border-radius:22px;padding:12px;box-shadow:0 20px 50px rgba(0,0,0,.38);display:flex;flex-direction:column;gap:10px}
.mediaPanelTop{display:flex;justify-content:space-between;align-items:center;gap:10px;color:white}
.mediaPanelTop b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mediaPanelActions{display:flex;gap:8px;align-items:center}
.mediaPanelActions button,.mediaPanelActions a{border:0;text-decoration:none;background:white;color:#111827;border-radius:12px;padding:9px 12px;font-weight:900;font-size:13px}
.mediaPanelActions .danger{background:#ef4444;color:white}
.mediaStage{min-height:220px;max-height:78vh;border-radius:16px;overflow:hidden;background:#020617;display:grid;place-items:center}
.mediaStage img{max-width:100%;max-height:78vh;object-fit:contain}
.mediaStage video{width:100%;max-height:78vh;background:#020617}
.timelineItem{background:#fbfdff;border:1px solid var(--line);border-radius:16px;padding:12px;margin-bottom:10px}
.timelineDot{font-weight:900}.mediaClick{cursor:pointer}
@media(max-width:700px){
  .customerShell{padding:10px}.customerStats{grid-template-columns:repeat(3,1fr)}
  .customerItemTop{display:block}.mediaOverlay{padding:7px}.mediaPanel{border-radius:18px;padding:9px}
  .mediaStage{min-height:200px;max-height:76vh}.mediaStage img,.mediaStage video{max-height:76vh}
}


/* FRONTEND TAHAP 11 - PRINT RECEIPT & QR */
.printArea{display:none}
.printTemplateRow{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;margin-top:10px}
.receiptPreviewBox{background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:12px;margin-top:12px}
@media(max-width:900px){.printTemplateRow{grid-template-columns:1fr}}
@media print{
 body{background:white!important}
 .layout,.modal,.mediaOverlay,.sidebar,.main,.loginBox{display:none!important}
 .printArea{display:block!important}
 .receiptDoc{font-family:Arial,sans-serif;color:#111;padding:10mm}
 .receiptHeader{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:2px solid #111;padding-bottom:8px;margin-bottom:10px}
 .receiptHeader h2{margin:0;font-size:18px}
 .receiptHeader p{margin:4px 0 0;font-size:12px}
 .receiptQr{text-align:center;font-size:10px}
 .receiptQr img{width:92px;height:92px}
 .receiptInfo{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:12px;margin-bottom:10px}
 .receiptInfo div{border:1px solid #222;padding:6px}
 .receiptDoc table{width:100%;border-collapse:collapse;font-size:11px;min-width:auto!important}
 .receiptDoc th,.receiptDoc td{border:1px solid #222;padding:6px;text-align:left;vertical-align:top}
 .receiptFooter{display:grid;grid-template-columns:1fr 1fr;gap:25mm;margin-top:18mm;font-size:12px;text-align:center}
 .receiptSign{border-top:1px solid #111;padding-top:5px}
}


/* FRONTEND TAHAP 12 - ITEM QR LABEL */
.itemQrPrintArea{display:none}
.labelConfigGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.labelConfigGrid label{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:800;color:var(--text)}
.labelConfigGrid input[type="checkbox"]{width:auto}
.labelSizeGrid{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;margin-top:10px}
.labelPreviewBox{margin-top:12px;background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:12px}
.itemLabelPreview{background:white;border:1px dashed #94a3b8;border-radius:10px;padding:6px;display:flex;align-items:center;gap:6px;overflow:hidden;color:#111}
.itemLabelPreview .qr{width:40%;max-width:70px;display:grid;place-items:center}
.itemLabelPreview .qr img{width:100%;height:auto}
.itemLabelPreview .labelText{flex:1;font-size:9px;line-height:1.15;overflow:hidden}
.itemLabelPreview .labelText b{font-size:10px}
@media(max-width:900px){.labelConfigGrid,.labelSizeGrid{grid-template-columns:1fr}}
@media print{
 .itemQrPrintArea{display:block!important}
 .itemQrLabel{font-family:Arial,sans-serif;color:#111;box-sizing:border-box;overflow:hidden;display:flex;align-items:center;gap:1.2mm;padding:1.4mm}
 .itemQrLabel .qrPart{flex:0 0 auto;display:grid;place-items:center}
 .itemQrLabel .qrPart img{display:block}
 .itemQrLabel .txtPart{flex:1;min-width:0;font-size:7pt;line-height:1.05;overflow:hidden}
 .itemQrLabel .txtPart .code{font-weight:700;font-size:8pt;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .itemQrLabel .txtPart div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}


/* FRONTEND TAHAP 14 - CUSTOMER QR SCANNER */
.codeInputRow{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}
.qrBtn{width:auto;margin-top:0;border:1px solid var(--line);background:#fff;color:var(--primary);box-shadow:none;padding:12px 14px;white-space:nowrap}
.scannerOverlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.86);z-index:999999;padding:14px;align-items:center;justify-content:center}
.scannerOverlay.show{display:flex}
.scannerPanel{width:min(520px,100%);background:#0f172a;border-radius:24px;padding:14px;box-shadow:0 20px 50px rgba(0,0,0,.35);color:white}
.scannerTop{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}
.scannerTop h3{margin:0;font-size:16px}
.scannerClose{border:0;background:#ef4444;color:white;border-radius:12px;padding:9px 12px;font-weight:900}
.scannerVideoWrap{position:relative;border-radius:18px;overflow:hidden;background:#020617;border:1px solid rgba(255,255,255,.12)}
#qrVideo{width:100%;max-height:70vh;display:block;background:#020617}
.scanFrame{position:absolute;inset:18%;border:3px solid #22d3ee;border-radius:18px;box-shadow:0 0 0 999px rgba(0,0,0,.25)}
#cameraStatus{position:absolute;left:10px;top:10px;background:rgba(15,23,42,.75);color:white;font-size:11px;font-weight:900;padding:6px 9px;border-radius:999px}
.scannerHint{font-size:12px;color:#cbd5e1;line-height:1.5;margin:10px 0 0}
.scannerFallback{margin-top:10px;background:#111827;border:1px solid rgba(255,255,255,.1);border-radius:16px;padding:10px}
.scannerFallback input{text-transform:none}
@media(max-width:700px){.codeInputRow{grid-template-columns:1fr}.qrBtn{width:100%}}


/* STEP 16 - ADMIN MEDIA OVERLAY */
.adminMediaOverlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.86);z-index:999999;padding:12px;align-items:center;justify-content:center}
.adminMediaOverlay.show{display:flex}
.adminMediaPanel{width:min(820px,100%);max-height:94vh;background:#0f172a;border-radius:22px;padding:12px;box-shadow:0 20px 50px rgba(0,0,0,.38);display:flex;flex-direction:column;gap:10px}
.adminMediaTop{display:flex;justify-content:space-between;align-items:center;gap:10px;color:white}
.adminMediaTop b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.adminMediaActions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.adminMediaActions button,.adminMediaActions a{border:0;text-decoration:none;background:white;color:#111827;border-radius:12px;padding:9px 12px;font-weight:900;font-size:13px}
.adminMediaActions .danger{background:#ef4444;color:white}
.adminMediaStage{min-height:240px;max-height:78vh;border-radius:16px;overflow:hidden;background:#020617;display:grid;place-items:center}
.adminMediaStage img{max-width:100%;max-height:78vh;object-fit:contain}
.adminMediaStage video{width:100%;max-height:78vh;background:#020617}
.pendingBox.mediaClickable{cursor:pointer}
.pendingBox.mediaClickable:hover{outline:2px solid var(--primary);outline-offset:2px}
.pendingBox.mediaClickable .mediaPreview:after{content:'Preview';position:absolute;left:6px;bottom:6px;background:rgba(15,23,42,.72);color:white;font-size:10px;font-weight:900;padding:3px 6px;border-radius:999px}
.pendingBox .mediaPreview{position:relative}
@media(max-width:700px){
 .adminMediaOverlay{padding:7px}
 .adminMediaPanel{border-radius:18px;padding:9px}
 .adminMediaStage{min-height:200px;max-height:76vh}
 .adminMediaStage img,.adminMediaStage video{max-height:76vh}
}


/* STEP 18 - GLOBAL OVERLAY LOADER */
.globalOverlayLoader{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,.50);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.globalOverlayLoader.show{display:flex}
.loaderCard{
  width:min(340px,calc(100% - 32px));
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(240,249,255,.96));
  border:1px solid rgba(148,163,184,.35);
  border-radius:28px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  padding:24px;
  text-align:center;
  position:relative;
  overflow:hidden;
}
.loaderCard:before{
  content:"";
  position:absolute;
  inset:-80px;
  background:conic-gradient(from 120deg,transparent,#22d3ee,transparent,#2563eb,transparent);
  animation:loaderGlow 2.4s linear infinite;
  opacity:.20;
}
.loaderInner{position:relative;z-index:1}
.loaderRing{
  width:62px;
  height:62px;
  border-radius:999px;
  margin:0 auto 14px;
  border:5px solid rgba(37,99,235,.12);
  border-top-color:#2563eb;
  border-right-color:#22d3ee;
  animation:loaderSpin .85s linear infinite;
}
.loaderTitle{
  font-weight:950;
  color:#172033;
  font-size:17px;
  letter-spacing:.2px;
}
.loaderWaiting{
  margin-top:5px;
  color:#64748b;
  font-size:13px;
  font-weight:800;
}
.loaderWaiting .dots:after{
  content:"";
  animation:waitingDots 1.25s infinite steps(4,end);
}
.loaderSub{
  margin-top:10px;
  font-size:12px;
  line-height:1.45;
  color:#64748b;
}
@keyframes loaderSpin{to{transform:rotate(360deg)}}
@keyframes loaderGlow{to{transform:rotate(360deg)}}
@keyframes waitingDots{
  0%{content:""}
  25%{content:"."}
  50%{content:".."}
  75%,100%{content:"..."}
}
.iconBtn{
  min-width:36px;
  width:36px;
  height:34px;
  padding:0!important;
  display:inline-grid;
  place-items:center;
  font-size:16px!important;
  line-height:1;
}
.actions.compactActions{gap:5px}
@media(max-width:700px){
  .loaderCard{border-radius:24px;padding:20px}
}


/* STEP 19 - DATE FILTER + EXPORT */
.toolbar.dashboardToolbar{
  grid-template-columns:2fr 1fr 1fr 1fr 1fr 1fr auto auto;
}
@media(max-width:1200px){
  .toolbar.dashboardToolbar{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .toolbar.dashboardToolbar{grid-template-columns:1fr}
}


/* STEP 20 - DASHBOARD CARDS UX */
.stats.statsFive{grid-template-columns:repeat(5,1fr)}
.customerStats.customerStatsFour{grid-template-columns:repeat(4,1fr)}
.customerItem.clickableItem{cursor:pointer;transition:.16s ease}
.customerItem.clickableItem:hover{border-color:#2563eb;box-shadow:0 12px 30px rgba(37,99,235,.10);transform:translateY(-1px)}
.customerItem .actions{margin-top:8px}
@media(max-width:1100px){.stats.statsFive{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){
  .stats.statsFive{grid-template-columns:repeat(2,1fr)}
  .customerStats.customerStatsFour{grid-template-columns:repeat(2,1fr)}
}


/* STEP 21 - NOTIFICATION REMINDER */
.followupGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
.followupCard{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 8px 22px rgba(15,23,42,.06)}
.followupCard h3{margin:0;font-size:22px}
.followupCard p{margin:4px 0 10px;color:var(--muted);font-size:12px;font-weight:800}
.followupCard.approval{border-color:#fecaca;background:#fff7f7}
.followupCard.ready{border-color:#bbf7d0;background:#f7fff9}
.followupCard.progress{border-color:#bfdbfe;background:#f8fbff}
.quickWaBtn{background:#22c55e!important;color:#fff!important}
@media(max-width:900px){.followupGrid{grid-template-columns:1fr}}


/* STEP 22 - FOLLOWUP BUTTON FIX */
.followupCard .btn{
  background:#ffffff!important;
  color:#0f172a!important;
  border:1px solid rgba(15,23,42,.12)!important;
  font-weight:900!important;
}
.followupCard .btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(15,23,42,.10);
}


/* STEP 22 - BACKUP & RECOVERY */
.backupGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.backupCard{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.backupCard h3{margin:0 0 6px}
.backupCard p{margin:0 0 12px;color:var(--muted);font-size:13px;line-height:1.5}
.backupDanger{border-color:#fecaca;background:#fff7f7}
.backupSuccess{border-color:#bbf7d0;background:#f7fff9}
.backupInfo{border-color:#bfdbfe;background:#f8fbff}
.backupActions{display:flex;gap:8px;flex-wrap:wrap}
.backupFileInput{display:none}
@media(max-width:900px){.backupGrid{grid-template-columns:1fr}}


/* STEP 24 - UPLOAD OPTIMIZATION */
.uploadHint{
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  padding:9px 10px;
  font-size:12px;
  color:#64748b;
  margin-top:8px;
  line-height:1.45;
}
.uploadHint b{color:#0f172a}
.pendingBox .compressBadge{
  position:absolute;
  left:5px;
  top:5px;
  background:rgba(37,99,235,.88);
  color:white;
  border-radius:999px;
  font-size:9px;
  font-weight:900;
  padding:3px 6px;
  z-index:2;
}


/* STEP 25 - FINAL MOBILE UX POLISH */
html{scroll-behavior:smooth}
body{touch-action:manipulation}
.btn,button{min-height:36px}
.btn.small{min-height:32px}
input,select,textarea{font-size:14px}
.customerStickyAction{
  position:sticky;
  bottom:10px;
  z-index:20;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid var(--line);
  box-shadow:0 12px 28px rgba(15,23,42,.12);
  border-radius:18px;
  padding:10px;
  margin-top:12px;
}
.customerStickyAction .btn{width:100%}
.mobileOnly{display:none}
.desktopOnly{display:block}
.customerItem .badge{margin-top:6px}
.customerCard h3{margin-top:0}
.tableMiniNote{
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  padding:8px 10px;
  font-size:12px;
  color:#64748b;
  margin-bottom:8px;
  display:none;
}
@media(max-width:900px){
  .sidebar{
    padding:12px;
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .brand{margin-bottom:12px}
  .nav{
    display:flex;
    gap:8px;
    overflow:auto;
    padding-bottom:2px;
  }
  .nav button{
    white-space:nowrap;
    width:auto;
    flex:0 0 auto;
    padding:10px 12px;
  }
  .top h2{font-size:20px}
  .card{padding:13px;border-radius:16px}
  .modal{padding:8px}
  .modalBox{
    margin:8px auto;
    border-radius:18px;
    padding:14px;
  }
  .modalHead{
    position:sticky;
    top:0;
    z-index:5;
    background:white;
    padding-bottom:10px;
    border-bottom:1px solid var(--line);
  }
  .actions{gap:6px}
  .actions .btn{flex:1 1 auto}
  .actions.compactActions .btn{flex:0 0 auto}
  .toolbar.dashboardToolbar{
    position:sticky;
    top:0;
    z-index:4;
    background:white;
    border:1px solid var(--line);
    border-radius:16px;
    padding:10px;
    box-shadow:0 8px 20px rgba(15,23,42,.06);
  }
  .tableMiniNote{display:block}
  .customerHero{
    border-radius:22px;
    padding:18px;
    margin-top:4px;
  }
  .customerHero h1{font-size:20px}
  .customerCard{border-radius:18px;padding:14px}
  .customerStats div{padding:9px 7px}
  .customerStats b{font-size:15px}
  .customerStats span{font-size:10px}
  .customerItem{border-radius:17px;padding:13px}
  .customerItemTop{display:block}
  .desktopOnly{display:none!important}
  .mobileOnly{display:block}
  .pendingBox{width:104px!important}
  .pendingBox .mediaPreview{height:78px!important}
  .printTemplateRow,.labelSizeGrid{gap:7px}
}
@media(max-width:420px){
  .main{padding:10px}
  .customerShell{padding:8px}
  .customerStats.customerStatsFour{gap:7px}
  .customerStats div{border-radius:14px}
  .btn{padding:10px 11px}
  .btn.small{font-size:11px}
  .iconBtn{width:34px;height:32px}
}


/* FINAL REVISION BEFORE PRODUCTION */
.logo{background:#fff!important;border:1px solid var(--line);overflow:hidden;padding:3px}
.logo img{width:100%;height:100%;object-fit:contain;display:block;border-radius:12px}
.appFooter{margin-top:22px;padding:14px 4px;text-align:center;color:#94a3b8;font-size:12px;font-weight:800}
.mobileMenuToggle{display:none;border:0;background:var(--primary);color:white;width:42px;height:42px;border-radius:14px;font-size:20px;font-weight:900;box-shadow:0 10px 24px rgba(37,99,235,.22)}
.mobileBackdrop{display:none;position:fixed;inset:0;z-index:980;background:rgba(15,23,42,.45);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.mobileBackdrop.show{display:block}
.mobileDrawerHead{display:none;align-items:center;justify-content:space-between;margin-bottom:12px}
.mobileDrawerClose{border:0;background:#f1f5f9;color:#0f172a;width:36px;height:36px;border-radius:12px;font-size:18px;font-weight:900}
.logPager{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:12px;flex-wrap:wrap}
.logPager .pagerActions{display:flex;gap:8px;align-items:center}
.logPager select{width:auto;min-width:92px}
.customerBrandLogo{width:70px;height:70px;border-radius:20px;background:white;padding:5px;object-fit:contain;margin-bottom:10px}
@media(max-width:900px){
  .mobileMenuToggle{display:grid;place-items:center}
  .sidebar{position:fixed!important;left:0;top:0;bottom:0;width:min(310px,86vw)!important;height:100vh!important;z-index:999;transform:translateX(-105%);transition:.22s ease;border-right:1px solid var(--line)!important;border-bottom:0!important;box-shadow:20px 0 60px rgba(15,23,42,.20);overflow-y:auto}
  .sidebar.open{transform:translateX(0)}
  .mobileDrawerHead{display:flex}
  .nav{display:block!important;overflow:visible!important}
  .nav button{width:100%!important;white-space:normal!important;display:block!important;margin-bottom:7px!important}
  .main{padding-top:72px!important}
  .mobileTopBar{display:flex!important;position:fixed;left:0;right:0;top:0;z-index:950;background:rgba(245,247,251,.94);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--line);padding:10px 12px;align-items:center;justify-content:space-between}
}
@media(min-width:901px){.mobileTopBar{display:none!important}}


/* FINAL LAST REVISION */
.customerHeroBrand{
  display:flex;
  align-items:center;
  gap:14px;
}
.customerHeroBrand .customerBrandLogo{
  width:62px;
  height:62px;
  margin:0;
  flex:0 0 auto;
}
.customerHeroBrand h1{
  margin:0;
}
.customerHeroBrand p{
  margin:4px 0 0;
}
.resetDangerBox{
  background:#fff7f7;
  border:1px solid #fecaca;
  border-radius:20px;
  padding:16px;
  box-shadow:0 10px 26px rgba(220,38,38,.08);
}
.resetDangerBox h3{margin-top:0;color:#991b1b}
.resetDangerBox p{color:#7f1d1d;line-height:1.55}
.resetOptionalBox{
  margin:14px 0 16px;
  padding:12px;
  border:1px solid #fed7aa;
  border-radius:14px;
  background:#fffdf7;
}
.resetOptionalHead{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}
.resetOptionalHead b{display:block;color:#7c2d12;font-size:14px}
.resetOptionalHead span{display:block;color:#9a3412;font-size:12px;margin-top:3px}
.resetOptionItem{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px;
  border:1px solid #ffedd5;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}
.resetOptionItem + .resetOptionItem{margin-top:8px}
.resetOptionItem input{width:18px;height:18px;margin-top:2px;flex:0 0 auto}
.resetOptionItem span{min-width:0}
.resetOptionItem b{display:block;color:#431407;font-size:13px}
.resetOptionItem small{display:block;color:#78716c;font-size:12px;line-height:1.45;margin-top:3px}
@media(max-width:480px){
  .customerHeroBrand{gap:10px}
  .customerHeroBrand .customerBrandLogo{width:54px;height:54px;border-radius:16px}
  .customerHeroBrand h1{font-size:18px}
}


/* MOBILE ADMIN DASHBOARD COMPACT FIX */
/* Hanya aktif di tampilan HP, desktop tidak berubah */
@media(max-width:700px){
  .stats,
  .stats.statsFive{
    grid-template-columns:repeat(2, minmax(0,1fr))!important;
    gap:8px!important;
    margin-bottom:10px!important;
  }

  .stat{
    padding:10px 9px!important;
    border-radius:14px!important;
    min-height:auto!important;
  }

  .stat h3{
    font-size:18px!important;
    line-height:1.1!important;
    margin:0!important;
  }

  .stat p{
    font-size:10px!important;
    line-height:1.2!important;
    margin:4px 0 0!important;
    letter-spacing:.1px!important;
  }

  .followupGrid{
    grid-template-columns:repeat(3, minmax(0,1fr))!important;
    gap:7px!important;
    margin-bottom:10px!important;
  }

  .followupCard{
    padding:9px 7px!important;
    border-radius:14px!important;
  }

  .followupCard h3{
    font-size:17px!important;
    line-height:1.1!important;
  }

  .followupCard p{
    font-size:9.5px!important;
    line-height:1.15!important;
    min-height:24px!important;
    margin:3px 0 7px!important;
  }

  .followupCard .btn{
    min-height:28px!important;
    padding:6px 7px!important;
    font-size:10px!important;
    border-radius:10px!important;
    width:100%!important;
  }
}

@media(max-width:390px){
  .stats,
  .stats.statsFive{
    gap:6px!important;
  }

  .stat{
    padding:8px 7px!important;
  }

  .stat h3{
    font-size:16px!important;
  }

  .stat p{
    font-size:9.5px!important;
  }

  .followupGrid{
    gap:5px!important;
  }

  .followupCard{
    padding:8px 5px!important;
  }

  .followupCard h3{
    font-size:15px!important;
  }

  .followupCard p{
    font-size:8.8px!important;
  }

  .followupCard .btn{
    font-size:9px!important;
    padding:5px!important;
  }
}


/* MOBILE DASHBOARD FILTER COLLAPSE FIX */
/* Desktop tetap normal */
.mobileFilterToggle{
  display:none;
}

@media(max-width:700px){
  .dashboardFilterCard{
    padding:10px!important;
    border-radius:16px!important;
    margin-bottom:10px!important;
  }

  .mobileFilterToggle{
    display:flex!important;
    width:100%!important;
    justify-content:center!important;
    align-items:center!important;
    gap:6px!important;
    min-height:36px!important;
    padding:8px 10px!important;
    font-size:12px!important;
    border-radius:12px!important;
    margin-bottom:0!important;
    background:#fff!important;
    color:#0f172a!important;
    border:1px solid var(--line)!important;
  }

  .toolbar.dashboardToolbar{
    position:static!important;
    display:none!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    margin-top:9px!important;
    margin-bottom:0!important;
    border:0!important;
    box-shadow:none!important;
    padding:0!important;
    background:transparent!important;
  }

  .toolbar.dashboardToolbar.mobileFilterOpen{
    display:grid!important;
  }

  .toolbar.dashboardToolbar input,
  .toolbar.dashboardToolbar select{
    min-height:34px!important;
    padding:8px 9px!important;
    border-radius:11px!important;
    font-size:12px!important;
  }

  .toolbar.dashboardToolbar .btn{
    min-height:34px!important;
    padding:8px!important;
    font-size:11px!important;
    border-radius:11px!important;
  }

  .toolbar.dashboardToolbar input#qAll{
    grid-column:1/-1!important;
  }
}

@media(max-width:390px){
  .toolbar.dashboardToolbar{
    grid-template-columns:1fr!important;
  }

  .toolbar.dashboardToolbar input#qAll{
    grid-column:auto!important;
  }
}


/* CUSTOMER QR SCANNER CAMERA FIX */
.scannerOverlay{
  padding:10px!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:auto!important;
}

.scannerPanel{
  width:min(520px, calc(100vw - 20px))!important;
  max-height:calc(100dvh - 20px)!important;
  overflow:auto!important;
  border-radius:22px!important;
}

.scannerTop{
  position:sticky!important;
  top:0!important;
  z-index:5!important;
  background:#0f172a!important;
  padding-bottom:8px!important;
}

.scannerVideoWrap{
  width:100%!important;
  max-height:min(58dvh, 420px)!important;
  aspect-ratio:3/4!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

#qrVideo{
  width:100%!important;
  height:100%!important;
  max-height:min(58dvh, 420px)!important;
  object-fit:cover!important;
}

.scannerControls{
  display:grid!important;
  grid-template-columns:1fr auto!important;
  gap:8px!important;
  margin:10px 0 0!important;
}

.scannerControls select{
  min-height:38px!important;
  border-radius:12px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  background:#111827!important;
  color:#fff!important;
  padding:8px 10px!important;
  font-size:12px!important;
}

.scannerControls button{
  border:0!important;
  background:#fff!important;
  color:#0f172a!important;
  border-radius:12px!important;
  font-weight:900!important;
  padding:8px 10px!important;
  min-height:38px!important;
  white-space:nowrap!important;
}

@media(orientation:landscape) and (max-height:520px){
  .scannerPanel{
    width:min(760px, calc(100vw - 20px))!important;
    max-height:calc(100dvh - 14px)!important;
  }

  .scannerVideoWrap{
    max-height:48dvh!important;
    aspect-ratio:16/9!important;
  }

  #qrVideo{
    max-height:48dvh!important;
  }

  .scannerHint{
    margin-top:6px!important;
    font-size:11px!important;
  }

  .scannerFallback{
    margin-top:6px!important;
    padding:8px!important;
  }
}

@media(max-width:420px){
  .scannerPanel{
    padding:10px!important;
    border-radius:18px!important;
  }

  .scannerVideoWrap{
    max-height:52dvh!important;
  }

  #qrVideo{
    max-height:52dvh!important;
  }

  .scannerTop h3{
    font-size:14px!important;
  }

  .scannerClose{
    padding:8px 10px!important;
    font-size:12px!important;
  }

  .scannerControls{
    grid-template-columns:1fr!important;
  }
}


/* ADMIN MOBILE FOLLOWUP MODAL FIX */
@media(max-width:700px){
  .modal{
    padding:10px!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
  }

  .modal.show{
    display:flex!important;
  }

  .modalBox{
    width:100%!important;
    max-width:calc(100vw - 20px)!important;
    max-height:calc(100dvh - 24px)!important;
    margin:0 auto!important;
    border-radius:20px!important;
    padding:12px!important;
    overflow:auto!important;
    position:relative!important;
  }

  .modalHead{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    background:rgba(255,255,255,.98)!important;
    backdrop-filter:blur(10px)!important;
    -webkit-backdrop-filter:blur(10px)!important;
    margin:-12px -12px 12px!important;
    padding:12px!important;
    border-bottom:1px solid var(--line)!important;
    border-radius:20px 20px 0 0!important;
    display:flex!important;
    align-items:flex-start!important;
  }

  .modalHead h3{
    font-size:16px!important;
    line-height:1.25!important;
    margin:0!important;
  }

  .modalHead p{
    font-size:11px!important;
    line-height:1.35!important;
    margin-top:4px!important;
  }

  .modalHead .close{
    flex:0 0 auto!important;
    min-width:44px!important;
    min-height:38px!important;
    padding:8px 10px!important;
    font-size:12px!important;
    background:#ef4444!important;
    color:#fff!important;
    font-weight:900!important;
  }

  .modalHead .actions{
    flex:0 0 auto!important;
    display:flex!important;
    gap:6px!important;
    align-items:center!important;
    justify-content:flex-end!important;
  }

  .modalBox > .tableWrap{
    max-height:calc(100dvh - 160px)!important;
    overflow:auto!important;
    border-radius:14px!important;
  }

  .modalBox table{
    min-width:760px!important;
    font-size:12px!important;
  }

  .modalBox th,
  .modalBox td{
    padding:9px!important;
    font-size:12px!important;
  }

  .modalBox .actions .btn{
    min-height:30px!important;
    padding:6px 8px!important;
    font-size:11px!important;
    border-radius:10px!important;
    flex:0 0 auto!important;
  }
}

@media(max-width:390px){
  .modal{
    padding:7px!important;
  }

  .modalBox{
    max-width:calc(100vw - 14px)!important;
    max-height:calc(100dvh - 14px)!important;
    border-radius:18px!important;
  }

  .modalHead{
    border-radius:18px 18px 0 0!important;
  }

  .modalHead h3{
    font-size:15px!important;
  }

  .modalHead .close{
    min-width:40px!important;
    min-height:36px!important;
    padding:7px 9px!important;
  }
}


/* MONITOR DRAWER + PRODUCTION LOGIN FIX */
@media(max-width:900px){
  #sidebar.open{
    transform:translateX(0)!important;
  }
  #mobileBackdrop.show{
    display:block!important;
  }
}


/* ADMIN MOBILE TABLE TO CARDVIEW FIX */
/* Aktif hanya pada HP. Desktop tetap tabel normal. */
@media(max-width:700px){
  .tableWrap{
    border:0!important;
    background:transparent!important;
    overflow:visible!important;
  }

  table.mobileCardTable{
    min-width:0!important;
    width:100%!important;
    display:block!important;
    border-collapse:separate!important;
  }

  table.mobileCardTable thead{
    display:none!important;
  }

  table.mobileCardTable tbody{
    display:block!important;
    width:100%!important;
  }

  table.mobileCardTable tr{
    display:block!important;
    background:#fff!important;
    border:1px solid var(--line)!important;
    border-radius:16px!important;
    box-shadow:0 8px 22px rgba(15,23,42,.055)!important;
    padding:10px!important;
    margin-bottom:10px!important;
    overflow:hidden!important;
  }

  table.mobileCardTable tr.finished{
    opacity:.70!important;
    background:#f8fafc!important;
  }

  table.mobileCardTable td{
    display:grid!important;
    grid-template-columns:92px 1fr!important;
    gap:8px!important;
    align-items:start!important;
    border:0!important;
    border-bottom:1px dashed #e2e8f0!important;
    padding:7px 2px!important;
    font-size:12px!important;
    line-height:1.35!important;
    word-break:break-word!important;
  }

  table.mobileCardTable td:last-child{
    border-bottom:0!important;
    padding-bottom:0!important;
  }

  table.mobileCardTable td::before{
    content:attr(data-label);
    color:#64748b;
    font-size:10px;
    line-height:1.25;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.25px;
  }

  table.mobileCardTable td b{
    font-size:13px!important;
  }

  table.mobileCardTable .small{
    font-size:10.5px!important;
    line-height:1.35!important;
  }

  table.mobileCardTable .badge{
    width:max-content!important;
    max-width:100%!important;
    white-space:normal!important;
    text-align:left!important;
    line-height:1.25!important;
  }

  table.mobileCardTable .actions{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    justify-content:flex-start!important;
  }

  table.mobileCardTable .actions .btn{
    flex:0 0 auto!important;
    min-height:30px!important;
    padding:6px 8px!important;
    font-size:11px!important;
    border-radius:10px!important;
  }

  table.mobileCardTable .actions.compactActions .iconBtn{
    width:34px!important;
    height:30px!important;
    min-height:30px!important;
  }

  table.mobileCardTable td[data-label="Aksi"],
  table.mobileCardTable td[data-label="Action"]{
    grid-template-columns:1fr!important;
  }

  table.mobileCardTable td[data-label="Aksi"]::before,
  table.mobileCardTable td[data-label="Action"]::before{
    margin-bottom:3px!important;
  }

  .modalBox table.mobileCardTable tr{
    box-shadow:0 6px 18px rgba(15,23,42,.06)!important;
  }

  .modalBox > .tableWrap{
    max-height:calc(100dvh - 155px)!important;
    overflow:auto!important;
    padding-right:2px!important;
  }

  .tableMiniNote{
    display:none!important;
  }
}

@media(max-width:390px){
  table.mobileCardTable td{
    grid-template-columns:78px 1fr!important;
    gap:7px!important;
    font-size:11.5px!important;
  }

  table.mobileCardTable td::before{
    font-size:9.3px!important;
  }

  table.mobileCardTable tr{
    padding:8px!important;
    border-radius:14px!important;
  }
}


/* MOBILE COMPACT ITEM LIST FIX */
.mobileItemList{
  display:none;
}

@media(max-width:700px){
  #tableBox > .tableMiniNote,
  #tableBox > .desktopTableOnly{
    display:none!important;
  }

  .mobileItemList{
    display:block!important;
  }

  .mobileItemRow{
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    box-shadow:0 6px 18px rgba(15,23,42,.055);
    margin-bottom:8px;
    overflow:hidden;
  }

  .mobileItemRow.finished{
    opacity:.72;
    background:#f8fafc;
  }

  .mobileItemMain{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:10px;
    cursor:pointer;
  }

  .mobileItemInfo{
    min-width:0;
    flex:1;
  }

  .mobileItemTitle{
    font-size:13px;
    line-height:1.25;
    font-weight:950;
    color:#0f172a;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobileItemSub{
    margin-top:3px;
    font-size:10.5px;
    line-height:1.2;
    font-weight:800;
    color:#64748b;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobileItemRight{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:5px;
  }

  .mobileItemRight .badge{
    font-size:9.5px!important;
    padding:5px 7px!important;
    max-width:115px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  .mobileChevron{
    width:22px;
    height:22px;
    border-radius:999px;
    background:#f1f5f9;
    color:#334155;
    display:grid;
    place-items:center;
    font-size:14px;
    font-weight:900;
    transition:.16s ease;
  }

  .mobileItemRow.open .mobileChevron{
    transform:rotate(180deg);
    background:var(--primarySoft);
    color:var(--primary);
  }

  .mobileItemMore{
    display:none;
    padding:0 10px 10px;
    border-top:1px dashed #e2e8f0;
  }

  .mobileItemRow.open .mobileItemMore{
    display:block;
  }

  .mobileMiniGrid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    margin-top:9px;
  }

  .mobileMiniGrid div{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:11px;
    padding:7px;
    min-width:0;
  }

  .mobileMiniGrid span{
    display:block;
    font-size:9px;
    line-height:1.1;
    color:#64748b;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.2px;
    margin-bottom:3px;
  }

  .mobileMiniGrid b{
    display:block;
    font-size:11px;
    line-height:1.25;
    color:#0f172a;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobileItemNote{
    margin-top:8px;
    background:#fff;
    border:1px dashed #cbd5e1;
    border-radius:11px;
    padding:7px;
    font-size:10.8px;
    line-height:1.35;
    color:#475569;
  }

  .mobileItemActions{
    margin-top:8px;
    gap:5px!important;
  }

  .mobileItemActions .btn{
    min-height:29px!important;
    padding:6px 8px!important;
    font-size:10.5px!important;
    border-radius:10px!important;
    flex:0 0 auto!important;
  }

  .mobileItemActions .iconBtn{
    width:31px!important;
    height:29px!important;
    min-height:29px!important;
    padding:0!important;
    font-size:14px!important;
  }

  .mobileEmptyState{
    background:#fff;
    border:1px dashed #cbd5e1;
    border-radius:14px;
    padding:18px;
    text-align:center;
    color:#64748b;
    font-weight:900;
    font-size:12px;
  }
}

@media(max-width:390px){
  .mobileItemMain{
    padding:9px;
  }

  .mobileItemTitle{
    font-size:12.2px;
  }

  .mobileItemRight .badge{
    max-width:98px!important;
    font-size:8.8px!important;
    padding:4px 6px!important;
  }

  .mobileMiniGrid{
    gap:6px;
  }

  .mobileMiniGrid div{
    padding:6px;
  }
}


/* MOBILE FOLLOWUP COLLAPSE MODAL FIX */
.mobileFollowupList{
  display:none;
}

@media(max-width:700px){
  .modal{
    padding:8px!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
  }

  .modal.show{
    display:flex!important;
  }

  .modalBox{
    width:100%!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    margin:0 auto!important;
    border-radius:20px!important;
    padding:10px!important;
    overflow:auto!important;
  }

  .modalHead{
    position:sticky!important;
    top:0!important;
    z-index:30!important;
    background:rgba(255,255,255,.98)!important;
    backdrop-filter:blur(10px)!important;
    -webkit-backdrop-filter:blur(10px)!important;
    margin:-10px -10px 10px!important;
    padding:10px!important;
    border-bottom:1px solid var(--line)!important;
    border-radius:20px 20px 0 0!important;
  }

  .modalHead h3{
    font-size:15px!important;
    line-height:1.25!important;
    margin:0!important;
  }

  .modalHead p{
    font-size:10.5px!important;
    line-height:1.25!important;
  }

  .modalHead .close{
    background:#ef4444!important;
    color:#fff!important;
    min-width:44px!important;
    min-height:36px!important;
    padding:7px 10px!important;
    font-size:12px!important;
    font-weight:900!important;
  }

  .followupDesktopTable{
    display:none!important;
  }

  .mobileFollowupList{
    display:block!important;
    max-height:calc(100dvh - 118px)!important;
    overflow:auto!important;
    padding:2px 1px 8px!important;
  }

  .mobileFollowupRow{
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    box-shadow:0 6px 18px rgba(15,23,42,.055);
    margin-bottom:8px;
    overflow:hidden;
  }

  .mobileFollowupMain{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:9px;
    cursor:pointer;
  }

  .mobileFollowupInfo{
    min-width:0;
    flex:1;
  }

  .mobileFollowupTitle{
    font-size:12.5px;
    line-height:1.22;
    font-weight:950;
    color:#0f172a;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobileFollowupSub{
    margin-top:3px;
    font-size:10px;
    line-height:1.2;
    color:#64748b;
    font-weight:800;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobileFollowupRight{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:5px;
  }

  .mobileFollowupRight .badge{
    font-size:9px!important;
    padding:4px 6px!important;
    max-width:102px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  .mobileFollowupMore{
    display:none;
    padding:0 9px 9px;
    border-top:1px dashed #e2e8f0;
  }

  .mobileFollowupRow.open .mobileFollowupMore{
    display:block;
  }

  .mobileFollowupRow.open .mobileChevron{
    transform:rotate(180deg);
    background:var(--primarySoft);
    color:var(--primary);
  }
}

@media(min-width:701px){
  .followupDesktopTable{
    display:block!important;
  }
}


/* ADMIN PRINT HEADER HIDE FIX */
/* Saat print, hanya area cetak yang tampil. Header/menu/admin panel tidak ikut tercetak. */
@media print{
  html, body{
    background:#fff!important;
    margin:0!important;
    padding:0!important;
  }

  body *{
    visibility:hidden!important;
  }

  .printArea,
  .printArea *,
  #printArea,
  #printArea *,
  #itemQrPrintArea,
  #itemQrPrintArea *,
  .itemQrPrintArea,
  .itemQrPrintArea *{
    visibility:visible!important;
  }

  .layout,
  .sidebar,
  .main,
  .mobileTopBar,
  .mobileBackdrop,
  .modal,
  .modalBox,
  .globalOverlayLoader,
  .adminMediaOverlay,
  .appFooter,
  .simtechTrialWatermark{
    display:none!important;
    visibility:hidden!important;
  }

  #printArea,
  #itemQrPrintArea,
  .printArea,
  .itemQrPrintArea{
    display:block!important;
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:100%!important;
    min-height:auto!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    z-index:999999!important;
  }

  #printArea:empty,
  #itemQrPrintArea:empty{
    display:none!important;
  }

  .receiptDoc,
  .receiptDoc *{
    visibility:visible!important;
  }

  .itemQrLabel,
  .itemQrLabel *{
    visibility:visible!important;
  }

  button,
  .btn,
  .close,
  .actions{
    display:none!important;
  }
}


/* PRINT QUEUE NUMBER BOX */
.receiptQueueBox{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  border:1px solid #111;
  border-radius:6px;
  padding:6px;
  margin:6px 0 8px;
  font-family:Arial,sans-serif;
}
.receiptQueueBox div{
  border:1px dashed #666;
  border-radius:5px;
  padding:5px;
  text-align:center;
}
.receiptQueueBox span{
  display:block;
  font-size:8pt;
  color:#333;
  font-weight:700;
  text-transform:uppercase;
}
.receiptQueueBox b{
  display:block;
  font-size:18pt;
  line-height:1.05;
  margin-top:2px;
}
.receiptQueueBox p{
  grid-column:1/-1;
  margin:2px 0 0;
  font-size:7pt;
  line-height:1.25;
  color:#333;
}
@media print{
  .receiptQueueBox,
  .receiptQueueBox *{
    visibility:visible!important;
  }
}


/* DOTS RECEIPT FORMAT FIX */
.dotsReceiptDoc{
  width:100%;
  min-height:100%;
  color:#1f4f98;
  font-family:"Arial", "Helvetica", sans-serif;
  font-weight:400;
  box-sizing:border-box;
  padding:2mm 4mm;
}
.dotsCompany{
  text-align:center;
  margin-bottom:4mm;
}
.dotsCompany h1{
  margin:0;
  font-size:20pt;
  line-height:1;
  letter-spacing:.5pt;
  font-weight:700;
  text-transform:uppercase;
}
.dotsCompany p{
  margin:1mm 0 0;
  font-size:8pt;
  line-height:1.05;
  font-weight:700;
}
.dotsTopInfo{
  display:grid;
  grid-template-columns:1.3fr .8fr;
  gap:10mm;
  align-items:start;
  margin:2mm 8mm 3mm;
  font-size:9pt;
  line-height:1.25;
}
.dotsTopInfo div div{
  display:grid;
  grid-template-columns:24mm 1fr;
  gap:2mm;
}
.dotsTopInfo span{
  white-space:nowrap;
}
.dotsTopInfo b{
  font-weight:700;
}
.dotsRightInfo{
  margin-top:1mm;
}
.dotsRightInfo div{
  grid-template-columns:22mm 1fr!important;
}
.dotsLine{
  height:1px;
  border-top:1.5px solid #1f4f98;
  margin:0 4mm 3mm;
}
.dotsTitle{
  text-align:center;
  text-decoration:underline;
  font-size:14pt;
  line-height:1;
  margin:0 0 5mm;
  font-weight:700;
}
.dotsCustomerInfo{
  margin:0 12mm 5mm;
  font-size:10pt;
  line-height:1.3;
}
.dotsCustomerInfo div{
  display:grid;
  grid-template-columns:26mm 1fr;
  gap:2mm;
  align-items:start;
}
.dotsCustomerInfo span{
  font-weight:950;
  white-space:nowrap;
}
.dotsCustomerInfo b{
  font-weight:700;
}
.dotsNb{
  margin:7mm 0 5mm;
  text-align:center;
  font-size:10pt;
  line-height:1.2;
  font-weight:950;
  font-style:italic;
}
.dotsAttention{
  text-align:center;
  margin-top:2mm;
}
.dotsAttention h3{
  display:inline-block;
  margin:0 0 3mm;
  font-size:10pt;
  line-height:1;
  font-weight:950;
  text-decoration:underline;
}
.dotsAttention p{
  margin:0 4mm;
  font-size:9pt;
  line-height:1.2;
  font-weight:950;
}
@media print{
  .dotsReceiptDoc,
  .dotsReceiptDoc *{
    visibility:visible!important;
  }
  .dotsReceiptDoc{
    page-break-after:avoid;
  }
}


/* RECEIPT QR + DEFAULT DOTS + A4 QUEUE MINI FIX */
.dotsDocQrRow{
  display:grid;
  grid-template-columns:1fr 22mm;
  gap:4mm;
  align-items:center;
  margin:0 8mm 3mm;
}
.dotsDocCode{
  border:1.2px solid #1f4f98;
  border-radius:2mm;
  padding:2mm 3mm;
}
.dotsDocCode span{
  display:block;
  font-size:7pt;
  line-height:1;
  font-weight:950;
}
.dotsDocCode b{
  display:block;
  font-size:13pt;
  line-height:1.1;
  margin-top:1mm;
  letter-spacing:.5pt;
}
.dotsDocCode small{
  display:block;
  font-size:6.5pt;
  line-height:1.1;
  margin-top:1mm;
}
.dotsQrBox{
  text-align:center;
}
.dotsQrBox img{
  width:21mm;
  height:21mm;
  object-fit:contain;
  border:1px solid #1f4f98;
  padding:1mm;
  box-sizing:border-box;
}
.receiptQueueMini{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid #333;
  border-radius:4px;
  padding:3px 6px;
  margin:4px 0 6px;
  font-size:10px;
  line-height:1;
}
.receiptQueueMini span{
  font-weight:700;
}
.receiptQueueMini b{
  font-size:13px;
  letter-spacing:.3px;
}
@media print{
  .dotsDocQrRow,
  .dotsDocQrRow *,
  .receiptQueueMini,
  .receiptQueueMini *{
    visibility:visible!important;
  }
}

/* SIMTECH TRIAL MODE */
.simtechTrialGate{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:20px;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.22), transparent 32%),
    radial-gradient(circle at bottom right, rgba(37,99,235,.18), transparent 35%),
    #f5f7fb;
}
.simtechTrialCard{
  width:min(420px,100%);
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:28px;
  padding:26px;
  box-shadow:0 24px 70px rgba(15,23,42,.16);
  text-align:center;
}
.simtechTrialBadge{
  display:inline-flex;
  background:#eff6ff;
  color:#2563eb;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:7px 12px;
  font-size:11px;
  font-weight:950;
  letter-spacing:.35px;
  margin-bottom:14px;
}
.simtechTrialCard h1{
  margin:0 0 8px;
  font-size:24px;
  color:#0f172a;
}
.simtechTrialCard p{
  color:#64748b;
  font-size:14px;
  line-height:1.55;
}
.simtechTrialCard input{
  width:100%;
  margin-top:12px;
  padding:13px 14px;
  border:1px solid #cbd5e1;
  border-radius:16px;
  font-size:14px;
  outline:none;
  box-sizing:border-box;
}
.simtechTrialCard button{
  width:100%;
  margin-top:10px;
  border:0;
  background:#2563eb;
  color:white;
  border-radius:16px;
  padding:13px 14px;
  font-weight:950;
  cursor:pointer;
}
.simtechTrialNote{
  margin-top:12px;
  color:#94a3b8;
  font-size:12px;
  line-height:1.45;
}
.simtechTrialWatermark{
  position:fixed;
  left:12px;
  right:12px;
  bottom:12px;
  z-index:2147482500;
  background:linear-gradient(135deg, rgba(37,99,235,.94), rgba(34,211,238,.94));
  color:white;
  border-radius:18px;
  box-shadow:0 14px 38px rgba(37,99,235,.22);
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:12px;
  pointer-events:none;
}
.simtechTrialWatermark b{
  font-weight:950;
}
.simtechTrialWatermark span{
  opacity:.90;
  font-size:11px;
}
.simtechTrialBodyPadding{
  padding-bottom:54px;
}
@media(max-width:520px){
  .simtechTrialWatermark{
    left:8px;
    right:8px;
    bottom:8px;
    border-radius:14px;
    font-size:10.5px;
    padding:8px 10px;
    flex-direction:column;
    gap:2px;
  }
  .simtechTrialBodyPadding{
    padding-bottom:70px;
  }
}
@media print{
  .simtechTrialWatermark{
    display:none!important;
    visibility:hidden!important;
  }
}


/* DOTS RECEIPT ONE ITEM PER PAGE FINAL */
.dotsReceiptDoc{
  width:100%;
  min-height:100%;
  color:#1f4f98;
  font-family:"Arial", "Helvetica", sans-serif;
  font-weight:800;
  box-sizing:border-box;
  padding:3mm 6mm;
  background:#fff;
}
.dotsReceiptPage{
  page-break-after:always;
  break-after:page;
  min-height:131mm;
  display:flex;
  flex-direction:column;
}
.dotsReceiptPage:last-child{
  page-break-after:auto;
  break-after:auto;
}
.dotsCompany{
  text-align:center;
  margin-bottom:3mm;
}
.dotsCompany h1{
  margin:0;
  font-size:18pt;
  line-height:1;
  letter-spacing:.5pt;
  font-weight:700; 
  text-transform:uppercase;
}
.dotsCompany p{
  margin:.8mm 0 0;
  font-size:7.5pt;
  line-height:1.05;
  font-weight:900;
}
.dotsTopCompact{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:8mm;
  align-items:start;
  margin:1.5mm 12mm 2mm;
  font-size:8.8pt;
  line-height:1.2;
}
.dotsTopCompact div div{
  display:grid;
  grid-template-columns:24mm 1fr;
  gap:2mm;
}
.dotsTopCompact span{
  white-space:nowrap;
  font-weight:600;
}
.dotsTopCompact b{
  font-weight:600;
}
.dotsTopRight div{
  grid-template-columns:21mm 1fr!important;
}
.dotsLine{
  height:1px;
  border-top:1.2px solid #1f4f98;
  margin:0 8mm 2mm;
}
.dotsDocCompact{
  display:grid;
  grid-template-columns:1fr 18mm;
  gap:3mm;
  align-items:center;
  margin:0 16mm 2.5mm;
}
.dotsDocCompact > div:first-child{
  border:1px solid #1f4f98;
  border-radius:2mm;
  padding:1.8mm 2.5mm;
  min-height:15mm;
}
.dotsDocCompact span{
  display:block;
  font-size:6.5pt;
  line-height:1;
  font-weight:700;
}
.dotsDocCompact b{
  display:block;
  font-size:13pt;
  line-height:1.05;
  margin-top:.8mm;
  letter-spacing:.4pt;
}
.dotsDocCompact small{
  display:block;
  font-size:9.2pt;
  line-height:1.1;
  margin-top:.8mm;
}
.dotsQrCompact{
  text-align:center;
}
.dotsQrCompact img{
  width:21mm;
  height:21mm;
  object-fit:contain;
  border:1px solid #1f4f98;
  padding:.8mm;
  box-sizing:border-box;
  display:block;
  margin:0 auto;
}
.dotsQrCompact small{
  display:block;
  margin-top:.5mm;
  font-size:5.8pt;
  line-height:1;
  font-weight:900;
}
.dotsTitle{
  text-align:center;
  text-decoration:underline;
  font-size:13pt;
  line-height:1;
  margin:1mm 0 4mm;
  font-weight:700;
}
.dotsCustomerInfo{
  margin:0 20mm 4mm;
  font-size:10pt;
  line-height:1.25;
}
.dotsCustomerInfo div{
  display:grid;
  grid-template-columns:25mm 1fr;
  gap:2mm;
  align-items:start;
  margin-bottom:.5mm;
}
.dotsCustomerInfo span{
  font-weight:600;
  white-space:nowrap;
}
.dotsCustomerInfo b{
  font-weight:600;
}
.dotsCustomerCompact div:nth-child(3) b,
.dotsCustomerCompact div:nth-child(4) b{
  line-height:1.2;
}
.dotsNb{
  margin-top:auto;
  margin-bottom:4mm;
  text-align:center;
  font-size:9.5pt;
  line-height:1.2;
  font-weight:700;
  font-style:italic;
}
.dotsAttention{
  text-align:center;
  margin-top:0;
}
.dotsAttention h3{
  display:inline-block;
  margin:0 0 2.2mm;
  font-size:9.5pt;
  line-height:1;
  font-weight:950;
  text-decoration:underline;
}
.dotsAttention p{
  margin:0 8mm;
  font-size:8.6pt;
  line-height:1.18;
  font-weight:700;
}
@media print{
  .dotsReceiptDoc,
  .dotsReceiptDoc *{
    visibility:visible!important;
  }
  .dotsReceiptPage{
    width:100%!important;
    min-height:131mm!important;
  }
}

@media print{
  .dotsReceiptDoc,
  .dotsReceiptDoc *{
    color:#000 !important;
    font-family: Arial, sans-serif !important;
    text-shadow:none !important;
    box-shadow:none !important;
    background:transparent !important;
    filter:none !important;
    -webkit-print-color-adjust: economy !important;
    print-color-adjust: economy !important;
  }

  .dotsReceiptDoc{
    font-weight:400 !important;
  }

  .dotsCompany h1{
    font-size:18pt !important;
    font-weight:700 !important;
    letter-spacing:0 !important;
  }

  .dotsCompany p,
  .dotsTopCompact,
  .dotsCustomerInfo,
  .dotsNb,
  .dotsAttention p{
    font-size:10pt !important;
    font-weight:700 !important;
    letter-spacing:0 !important;
  }

  .dotsDocCompact,
  .dotsDocCompact > div:first-child,
  .dotsQrCompact img{
    border-radius:0 !important;
    border-color:#000 !important;
  }

  .dotsLine{
    border-top:1px solid #000 !important;
  }

  .dotsDocCompact small,
  .dotsQrCompact small{
    font-size:8pt !important;
    font-weight:700 !important;
  }
}

/* ADMIN DETAIL ITEM MOBILE MODAL SAFE FIX */
@media(max-width:700px){
  #modal{
    padding:76px 8px 10px!important;
    align-items:flex-start!important;
    justify-content:center!important;
    overflow:hidden!important;
  }

  #modal.show{
    display:flex!important;
  }

  #modalBox{
    width:100%!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 92px)!important;
    margin:0 auto!important;
    overflow:auto!important;
    display:flex!important;
    flex-direction:column!important;
    border-radius:18px!important;
    padding:10px!important;
    -webkit-overflow-scrolling:touch!important;
  }

  #modalBox > .modalHead{
    flex-shrink:0!important;
    position:sticky!important;
    top:0!important;
    z-index:80!important;
    background:#fff!important;
    margin:-10px -10px 10px!important;
    padding:10px!important;
    border-bottom:1px solid var(--line)!important;
    border-radius:18px 18px 0 0!important;
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
  }

  #modalBox > .modalHead .actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }

  #modalBox > .modalHead .actions .btn,
  #modalBox > .modalHead .actions .close{
    width:100%!important;
    min-height:34px!important;
    padding:7px 8px!important;
    font-size:11px!important;
    border-radius:10px!important;
  }

  #modalBox > .modalHead .actions .close{
    grid-column:1/-1!important;
    background:#ef4444!important;
    color:#fff!important;
    font-weight:900!important;
  }

  #modalBox .card{
    border-radius:14px!important;
  }

  #modalBox .grid.form{
    grid-template-columns:1fr!important;
  }

  #modalBox .sparepartRow{
    grid-template-columns:1fr!important;
  }

  #modalBox .timelineBox{
    max-height:none!important;
  }
}

@media(max-width:390px){
  #modal{
    padding-top:72px!important;
  }

  #modalBox{
    max-height:calc(100dvh - 84px)!important;
  }
}

/* A4 RECEIPT HEADER + NOTES FIX */
@media print{
  .receiptCompanyA4,
  .receiptCompanyA4 *,
  .receiptNbA4,
  .receiptAttentionA4,
  .receiptAttentionA4 *{
    visibility:visible!important;
  }

  .receiptCompanyA4{
    text-align:center;
    border-bottom:2px solid #111;
    padding-bottom:7px;
    margin-bottom:8px;
    font-family:Arial,sans-serif!important;
    color:#111!important;
  }

  .receiptCompanyA4 h2{
    margin:0;
    font-size:18px;
    line-height:1.1;
    font-weight:700;
    text-transform:uppercase;
  }

  .receiptCompanyA4 p{
    margin:3px 0 0;
    font-size:11px;
    line-height:1.25;
  }

  .receiptNbA4{
    font-size:11px;
    line-height:1.35;
    margin:10px 0 6px;
    font-family:Arial,sans-serif!important;
    color:#111!important;
  }

  .receiptAttentionA4{
    border:1px solid #111;
    padding:7px;
    margin-top:6px;
    text-align:center;
    font-size:10.5px;
    line-height:1.35;
    font-family:Arial,sans-serif!important;
    color:#111!important;
  }

  .receiptAttentionA4 b{
    display:block;
    text-decoration:underline;
    margin-bottom:3px;
  }

  .receiptAttentionA4 p{
    margin:0;
  }
}


/* A4 RECEIPT LOGO + QUEUE RIGHT FIX */
@media print{
  .receiptCompanyA4WithLogo,
  .receiptCompanyA4WithLogo *,
  .receiptLogoA4,
  .receiptLogoA4 *,
  .receiptCompanyTextA4,
  .receiptQueueRightA4,
  .receiptQueueRightA4 *{
    visibility:visible!important;
  }

  .receiptCompanyA4WithLogo{
    display:grid!important;
    grid-template-columns:58px 1fr 95px!important;
    gap:10px!important;
    align-items:center!important;
    text-align:left!important;
    border-bottom:2px solid #111!important;
    padding-bottom:7px!important;
    margin-bottom:8px!important;
  }

  .receiptLogoA4{
    width:52px!important;
    height:52px!important;
    border:1px solid #111!important;
    display:grid!important;
    place-items:center!important;
    padding:3px!important;
  }

  .receiptLogoA4 img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    display:block!important;
  }

  .receiptCompanyTextA4{
    text-align:left!important;
  }

  .receiptCompanyTextA4 h2{
    margin:0!important;
    font-size:18px!important;
    line-height:1.1!important;
    font-weight:700!important;
    text-transform:uppercase!important;
  }

  .receiptCompanyTextA4 p{
    margin:3px 0 0!important;
    font-size:11px!important;
    line-height:1.25!important;
  }

  .receiptQueueRightA4{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    text-align:right!important;
  }

  .receiptQueueRightA4 .receiptQueueMini{
    margin:0!important;
    padding:5px 7px!important;
    border:1px solid #111!important;
    border-radius:0!important;
    display:inline-flex!important;
    flex-direction:column!important;
    gap:2px!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:82px!important;
  }

  .receiptQueueRightA4 .receiptQueueMini span{
    font-size:9px!important;
    line-height:1!important;
    font-weight:700!important;
  }

  .receiptQueueRightA4 .receiptQueueMini b{
    font-size:15px!important;
    line-height:1!important;
    font-weight:700!important;
  }
}


/* A4 RECEIPT LOGO BORDER REMOVE FIX */
@media print{
  .receiptLogoA4{
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
    padding:0!important;
  }

  .receiptLogoA4 img{
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }
}

/* ITEM LABEL CUSTOM TEXT AUTOSIZE FIX */
.itemLabelPreview .labelText.labelTextSmall{
  font-size:8px!important;
  line-height:1.05!important;
}
.itemLabelPreview .labelText.labelTextTiny{
  font-size:7px!important;
  line-height:1.02!important;
}
.itemLabelPreview .labelText .customLine,
.itemQrLabel .txtPart .customLine{
  white-space:normal!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
}
.itemLabelPreview .labelText .customLine{
  -webkit-line-clamp:2!important;
}
@media print{
  .itemQrLabel .txtPart.labelTextSmall{
    font-size:6.4pt!important;
    line-height:1!important;
  }
  .itemQrLabel .txtPart.labelTextTiny{
    font-size:5.8pt!important;
    line-height:.98!important;
  }
  .itemQrLabel .txtPart .customLine{
    -webkit-line-clamp:2!important;
  }
}

/* ITEM LABEL FONT CONFIG + PRINT ONLY LABEL FIX */
.labelStyleGrid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:8px;
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
}
.labelStyleRow{
  display:grid;
  grid-template-columns:1.1fr .8fr .65fr .65fr;
  gap:8px;
  align-items:center;
  font-size:12px;
}
.labelStyleName{
  font-weight:900;
  color:#0f172a;
}
.labelStyleRow label{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:800;
  color:#475569;
}
.labelStyleRow input[type="number"]{
  min-height:30px;
  padding:5px 7px;
  border-radius:9px;
}
.labelStyleRow input[type="checkbox"]{
  width:auto;
}
@media(max-width:700px){
  .labelStyleRow{
    grid-template-columns:1fr 1fr;
  }
  .labelStyleName{
    grid-column:1/-1;
  }
}
@media print{
  body.labelPrintMode #printArea,
  body.labelPrintMode #printArea *,
  body.labelPrintMode .receiptDoc,
  body.labelPrintMode .receiptDoc *{
    display:none!important;
    visibility:hidden!important;
  }

  body.labelPrintMode #itemQrPrintArea,
  body.labelPrintMode #itemQrPrintArea *,
  body.labelPrintMode .itemQrPrintArea,
  body.labelPrintMode .itemQrPrintArea *,
  body.labelPrintMode .itemQrLabel,
  body.labelPrintMode .itemQrLabel *{
    display:flex!important;
    visibility:visible!important;
  }

  body.labelPrintMode #itemQrPrintArea{
    display:block!important;
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:auto!important;
    min-height:auto!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
  }

  body.labelPrintMode .itemQrLabel{
    display:flex!important;
    page-break-after:avoid!important;
    break-after:avoid!important;
  }
}

/* ITEM LABEL CUSTOM TEXT NO ELLIPSIS FINAL FIX */
.itemLabelPreview,
.itemQrLabel{
  overflow:hidden!important;
}

.itemLabelPreview .labelText,
.itemQrLabel .txtPart{
  overflow:hidden!important;
}

.itemLabelPreview .labelText .customLine,
.itemQrLabel .txtPart .customLine{
  white-space:normal!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  display:block!important;
  -webkit-line-clamp:unset!important;
  line-clamp:unset!important;
  -webkit-box-orient:unset!important;
  max-height:none!important;
}

@media print{
  .itemQrLabel,
  .itemQrLabel *{
    text-overflow:clip!important;
  }

  .itemQrLabel .txtPart .customLine{
    white-space:normal!important;
    overflow:hidden!important;
    display:block!important;
    -webkit-line-clamp:unset!important;
    line-clamp:unset!important;
    -webkit-box-orient:unset!important;
    max-height:none!important;
  }
}

/* ITEM LABEL PRINT LAYOUT FINAL FIX */
/* Jangan paksa semua child label menjadi flex, karena text akan jadi row/tumpang tindih. */
@media print{
  body.labelPrintMode #itemQrPrintArea,
  body.labelPrintMode .itemQrPrintArea{
    display:block!important;
    visibility:visible!important;
  }

  body.labelPrintMode #itemQrPrintArea *{
    visibility:visible!important;
  }

  body.labelPrintMode .itemQrLabel{
    display:flex!important;
    align-items:center!important;
    gap:1.2mm!important;
    overflow:hidden!important;
  }

  body.labelPrintMode .itemQrLabel .qrPart{
    display:grid!important;
    place-items:center!important;
    flex:0 0 auto!important;
  }

  body.labelPrintMode .itemQrLabel .qrPart img{
    display:block!important;
    flex:none!important;
  }

  body.labelPrintMode .itemQrLabel .txtPart{
    display:block!important;
    flex:1 1 auto!important;
    min-width:0!important;
    overflow:hidden!important;
    white-space:normal!important;
  }

  body.labelPrintMode .itemQrLabel .txtPart div{
    display:block!important;
    width:100%!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    line-height:1.05!important;
  }

  body.labelPrintMode .itemQrLabel .txtPart .code{
    white-space:nowrap!important;
  }

  body.labelPrintMode .itemQrLabel .txtPart .customLine{
    white-space:normal!important;
    display:block!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    -webkit-line-clamp:unset!important;
    line-clamp:unset!important;
  }
}

/* ITEM LABEL TEXT COLUMN LOCK + WITA UPDATE SAFE */
@media print{
  body.labelPrintMode .itemQrLabel .txtPart{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:.4mm!important;
    min-width:0!important;
    overflow:hidden!important;
    white-space:normal!important;
  }

  body.labelPrintMode .itemQrLabel .txtPart > div{
    display:block!important;
    width:100%!important;
    flex:0 0 auto!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
  }

  body.labelPrintMode .itemQrLabel .txtPart .code{
    white-space:nowrap!important;
  }
}

/* PRINT AREA EXCLUSIVE FINAL FIX */
/* Default: print tidak menampilkan area print kosong/lawan jenis */
@media print{
  body:not(.receiptPrintMode):not(.labelPrintMode) #printArea,
  body:not(.receiptPrintMode):not(.labelPrintMode) #itemQrPrintArea{
    display:none!important;
    visibility:hidden!important;
  }

  body.receiptPrintMode #itemQrPrintArea,
  body.receiptPrintMode #itemQrPrintArea *,
  body.receiptPrintMode .itemQrPrintArea,
  body.receiptPrintMode .itemQrPrintArea *,
  body.receiptPrintMode .itemQrLabel,
  body.receiptPrintMode .itemQrLabel *{
    display:none!important;
    visibility:hidden!important;
  }

  body.receiptPrintMode #printArea{
    display:block!important;
    visibility:visible!important;
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    z-index:999999!important;
  }

  body.receiptPrintMode #printArea *,
  body.receiptPrintMode .receiptDoc,
  body.receiptPrintMode .receiptDoc *,
  body.receiptPrintMode .dotsReceiptDoc,
  body.receiptPrintMode .dotsReceiptDoc *{
    visibility:visible!important;
  }

  body.labelPrintMode #printArea,
  body.labelPrintMode #printArea *,
  body.labelPrintMode .receiptDoc,
  body.labelPrintMode .receiptDoc *,
  body.labelPrintMode .dotsReceiptDoc,
  body.labelPrintMode .dotsReceiptDoc *{
    display:none!important;
    visibility:hidden!important;
  }

  body.labelPrintMode #itemQrPrintArea{
    display:block!important;
    visibility:visible!important;
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:auto!important;
    min-height:auto!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    z-index:999999!important;
  }

  body.labelPrintMode #itemQrPrintArea *,
  body.labelPrintMode .itemQrLabel,
  body.labelPrintMode .itemQrLabel *{
    visibility:visible!important;
  }

  body.labelPrintMode .itemQrLabel{
    display:flex!important;
  }
}

/* THERMAL LABEL PRINTER MODE */
.thermalPrintBox{
  margin-top:10px;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  padding:10px;
}
.thermalPrintBox > label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:900;
  color:#0f172a;
}
.thermalPrintBox input[type="checkbox"]{
  width:auto;
}
.thermalPrintGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}
.thermalPrintGrid label{
  font-size:11px;
  color:#475569;
  font-weight:800;
}
.thermalPrintGrid select,
.thermalPrintGrid input{
  margin-top:4px;
  min-height:34px;
  padding:7px 9px;
  border-radius:10px;
}
@media(max-width:700px){
  .thermalPrintGrid{
    grid-template-columns:1fr;
  }
}
@media print{
  body.labelPrintMode #itemQrPrintArea{
    width:auto!important;
    max-width:none!important;
  }
}


/* ACTIVE USER DASHBOARD BADGE */
.dashboardTopWithUser{
  align-items:center;
}
.dashboardTopActions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.activeUserBadge{
  display:flex;
  align-items:center;
  gap:9px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:8px 11px;
  box-shadow:0 8px 22px rgba(15,23,42,.055);
  min-width:210px;
}
.activeUserIcon{
  width:34px;
  height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:var(--primarySoft);
  color:var(--primary);
  flex:0 0 auto;
}
.activeUserText{
  min-width:0;
  line-height:1.15;
}
.activeUserText span{
  display:block;
  font-size:10px;
  color:#64748b;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.2px;
}
.activeUserText b{
  display:block;
  font-size:13px;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.activeUserText small{
  display:block;
  font-size:10.5px;
  color:#64748b;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media(max-width:700px){
  .dashboardTopWithUser{
    display:block!important;
  }
  .dashboardTopActions{
    margin-top:10px;
    justify-content:stretch;
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .activeUserBadge{
    min-width:0;
    width:100%;
    padding:8px 10px;
    border-radius:14px;
  }
  .dashboardTopActions .btn{
    width:100%;
  }
}


/* ITEM LABEL QR READABILITY FIX */
.itemLabelPreview .qr{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:42px!important;
  max-width:none!important;
}
.itemLabelPreview .qr img{
  width:auto!important;
  height:100%!important;
  max-height:54px!important;
  image-rendering:auto!important;
}
@media print{
  body.labelPrintMode .itemQrLabel{
    gap:.8mm!important;
  }

  body.labelPrintMode .itemQrLabel .qrPart{
    flex:0 0 auto!important;
    padding:0!important;
  }

  body.labelPrintMode .itemQrLabel .qrPart img{
    image-rendering:auto!important;
    object-fit:contain!important;
  }

  body.labelPrintMode .itemQrLabel .txtPart{
    padding-left:.4mm!important;
  }
}

/* =========================================================
   SUMBER SUBUR — STEP 1 FOUNDATION THEME
   Restrained multi-accent identity: colorful, but still clean.
   ========================================================= */
:root{
  --bg:#f7f8fc;
  --card:#ffffff;
  --text:#182033;
  --muted:#697386;
  --line:#e7eaf0;
  --primary:#3157d5;
  --primarySoft:#edf2ff;
  --green:#15956f;
  --orange:#d99016;
  --red:#d34d5d;
  --violet:#7558c8;
  --cyan:#188fa8;
  --shadow:0 14px 34px rgba(26,35,58,.075);
}
.logo{background:linear-gradient(135deg,#3157d5,#188fa8 42%,#7558c8 72%,#d99016);overflow:hidden}
.logo img{width:100%;height:100%;object-fit:cover;display:block;background:#fff}
.customerHero{background:linear-gradient(135deg,#3157d5 0%,#188fa8 48%,#7558c8 100%)}
.card{border-color:#e8eaf1}
.nav button.active,.nav button:hover{box-shadow:inset 3px 0 0 var(--primary)}
.stat:nth-child(4n+1){border-top:3px solid #3157d5}
.stat:nth-child(4n+2){border-top:3px solid #15956f}
.stat:nth-child(4n+3){border-top:3px solid #d99016}
.stat:nth-child(4n+4){border-top:3px solid #7558c8}

/* ===== AP STEP 3: Storage Location / Rack Tracking ===== */
.storageBadge{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;background:#eef6ff;border:1px solid #cfe2ff;color:#174b7a;font-size:12px;font-weight:700;white-space:nowrap}
.storageBadge.transit{background:#fff8e6;border-color:#f2d38a;color:#805b00}
.storageCurrentBox{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:42px}
.storageSummaryGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:12px;margin-bottom:16px}
.storageLocationCard{appearance:none;text-align:left;cursor:pointer;width:100%;font:inherit;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.storageLocationCard:hover{transform:translateY(-2px);border-color:#a8c8ef;box-shadow:0 8px 24px rgba(20,60,100,.09)}
.storageLocationCard.transit{background:linear-gradient(145deg,#fffdf7,#fff8e8)}
.storageLocationCard h3{margin:8px 0 4px}.storageLocationCard p{margin:0;color:#64748b}
.storageLocationTop{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:800;color:#47617d}
.storageLocationTop b{font-size:10px;letter-spacing:.08em;padding:3px 7px;border-radius:999px;background:#f6df9a;color:#624500}
.storageTableTop{align-items:flex-end}.storageTableTop input{min-width:250px}
.locationHistoryBox{display:grid;gap:8px}
.locationHistoryRow{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px 16px;padding:10px 12px;border:1px solid #e5edf5;border-radius:10px;background:#fbfdff}
.locationHistoryRow>div:first-child{display:flex;flex-direction:column;gap:3px}.locationHistoryNote{grid-column:1/-1;padding-top:7px;border-top:1px dashed #dce6ef}
@media(max-width:700px){.storageSummaryGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.storageTableTop{align-items:stretch}.storageTableTop .actions{width:100%}.storageTableTop input{min-width:0;width:100%}.locationHistoryRow{grid-template-columns:1fr}.locationHistoryNote{grid-column:auto}}

/* STEP 3 refinement - compact rack summary */
.storageCompactFilter{margin-bottom:10px;padding:14px 16px}
.storageCompactFilter .actions{flex-wrap:wrap}
.storageCompactFilter input{min-width:260px;max-width:480px}
.storageSummaryGrid{
  display:flex !important;
  grid-template-columns:none !important;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:2px 2px 10px;
  margin-bottom:16px;
  scroll-snap-type:x proximity;
  scrollbar-width:thin;
}
.storageLocationCard{flex:0 0 185px;width:185px !important;min-height:118px;scroll-snap-align:start}
@media(max-width:700px){
  .storageCompactFilter input{min-width:0;width:100%;max-width:none}
  .storageSummaryGrid{display:flex !important;grid-template-columns:none !important}
  .storageLocationCard{flex-basis:158px;width:158px !important}
}

/* STEP 4 commercial / payment */
.commercialPanel{margin-top:16px;padding:14px;border:1px solid #dbe7f3;border-radius:16px;background:linear-gradient(135deg,#fbfdff,#fff)}
.commercialPanel h4{margin:0 0 3px}.commercialPanelHead{align-items:flex-start;margin-bottom:10px}
.commercialStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}
.commercialStats>div{padding:10px;border:1px solid #e7edf4;border-radius:12px;background:#fff;min-width:0}
.commercialStats span{display:block;font-size:11px;color:#64748b;margin-bottom:4px}.commercialStats b{display:block;font-size:13px;overflow-wrap:anywhere}
.paymentBadge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-weight:700;font-size:11px;border:1px solid transparent;white-space:nowrap}
.payPaid{background:#ecfdf5;color:#047857;border-color:#a7f3d0}.payPartial{background:#fff7ed;color:#c2410c;border-color:#fed7aa}.payPo{background:#f5f3ff;color:#6d28d9;border-color:#ddd6fe}.payUnpaid{background:#f8fafc;color:#475569;border-color:#e2e8f0}
.commercialApprovalLine{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 0;border-top:1px dashed #dce5ef;border-bottom:1px dashed #dce5ef}
.commercialApprovalLine .small{margin-right:auto}.commercialActions{margin-top:10px;flex-wrap:wrap}
.commercialHint{margin-top:10px;padding:9px 11px;border-radius:10px;background:#fff8e8;color:#765314;font-size:12px;border:1px solid #fde7ad}
.paymentHistoryMini{display:grid;gap:7px;margin-top:10px}.paymentMiniRow{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 10px;border-radius:10px;background:#fff;border:1px solid #edf1f5}.paymentMiniRow>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.paymentMiniRow .small{display:block;color:#64748b}
.commercialFormCard{max-width:760px}
@media(max-width:800px){.commercialStats{grid-template-columns:repeat(2,minmax(0,1fr))}.paymentMiniRow{align-items:flex-start;flex-direction:column}}
@media(max-width:500px){.commercialStats{grid-template-columns:1fr}.commercialActions .btn{width:100%}.commercialApprovalLine{align-items:flex-start;flex-direction:column}.commercialApprovalLine .small{margin-right:0}}

/* STEP 5 - Commercial workflow gate */
.commercialReadyHint{margin-top:10px;padding:9px 11px;border-radius:10px;background:#eefbf4;color:#17643a;font-size:12px;border:1px solid #c8efd9}
select option:disabled{color:#9aa6b2}

/* STEP 6 - Multi Item Invoice */
.invoiceSelectList{display:grid;gap:8px;margin-top:12px;max-height:440px;overflow:auto;padding-right:4px}
.invoiceSelectRow{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:11px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;cursor:pointer}
.invoiceSelectRow:hover{background:#f8fafc;border-color:#cbd5e1}
.invoiceSelectRow input{width:18px;height:18px}
.invoiceSelectRow div{min-width:0}.invoiceSelectRow div b,.invoiceSelectRow div span{display:block}.invoiceSelectRow strong{white-space:nowrap}
@media(max-width:640px){.invoiceSelectRow{grid-template-columns:auto 1fr}.invoiceSelectRow strong{grid-column:2;margin-top:2px}}

/* STEP 7 - Invoice Center, additional charges & master analytics */
.additionalChargePanel{margin-top:16px;padding:14px;border:1px solid #e4e8f0;border-radius:14px;background:#fbfcff}
.additionalChargePanel h4{margin:0}.extraChargeRow{display:grid;grid-template-columns:105px 145px 90px minmax(170px,1.6fr) 75px 125px auto;gap:7px;align-items:center;margin:8px 0}.extraChargeRow select,.extraChargeRow input{min-width:0}
.invoiceTargetWrap{margin-top:12px;padding:12px;border:1px dashed #cfd8e6;border-radius:12px;background:#f8fbff}.invoiceTargetWrap.hidden{display:none}
.masterTabs{display:flex;gap:8px;margin-bottom:12px}.masterTabs .btn{min-width:140px}
@media(max-width:900px){.extraChargeRow{grid-template-columns:1fr 1fr 90px 1.4fr 70px 120px auto}}
@media(max-width:700px){.extraChargeRow{grid-template-columns:1fr 1fr}.extraChargeRow>*{width:100%}.extraChargeRow .btn,.extraChargeRow .paymentBadge{width:auto}.masterTabs{overflow-x:auto}.masterTabs .btn{flex:0 0 auto}}

/* === AP STEP 7.1 refinement === */
.btn.actionReadable{color:#fff!important}
.catalogCodeRow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.catalogPickerList{max-height:420px;overflow:auto;display:grid;gap:7px;text-align:left}
.catalogPickerRow{width:100%;border:1px solid #dbe5ef;background:#fff;border-radius:12px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;color:#172033}
.catalogPickerRow:hover{background:#f7fbff;border-color:#9cc7ee}
.catalogPickerRow span{min-width:0;text-align:left}.catalogPickerRow b{display:block}.catalogPickerRow small{display:block;color:#64748b;margin-top:2px;white-space:normal}.catalogPickerRow strong{white-space:nowrap;color:#175f9e}
@media(max-width:640px){.catalogCodeRow{grid-template-columns:1fr}.catalogPickerRow{align-items:flex-start}.catalogPickerRow strong{font-size:12px}}

/* STEP 8 refinement */
.btn.moveRackBtn{background:#1f5f8b!important;color:#fff!important;border:1px solid #1f5f8b!important}
.btn.moveRackBtn:hover{filter:brightness(.94)}
.alertSummaryStrip{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 10px;margin-bottom:12px;scroll-snap-type:x proximity}
.alertSummaryCard{min-width:180px;max-width:220px;flex:0 0 auto;text-align:left;border:1px solid #e4e7ec;background:#fff;border-radius:14px;padding:14px;cursor:pointer;scroll-snap-align:start}
.alertSummaryCard span,.alertSummaryCard small{display:block;color:#667085}.alertSummaryCard b{display:block;font-size:28px;margin:5px 0;color:#172033}.alertSummaryCard.danger{border-left:4px solid #d92d20}.alertSummaryCard.warning{border-left:4px solid #f79009}.alertSummaryCard.info{border-left:4px solid #2e90fa}
.alertGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:12px}.alertItemCard{background:#fff;border:1px solid #e4e7ec;border-radius:14px;padding:14px}.alertItemCard.level-danger{border-left:4px solid #d92d20}.alertItemCard.level-warning{border-left:4px solid #f79009}.alertItemCard.level-info{border-left:4px solid #2e90fa}.alertPill{font-size:11px;font-weight:700;background:#fff3e0;color:#9a3412;border-radius:999px;padding:4px 8px;display:inline-block}.alertAge{text-align:center;min-width:56px}.alertAge b{font-size:25px;display:block}.alertAge span{font-size:11px;color:#667085}.alertMeta{display:flex;gap:8px 18px;flex-wrap:wrap;font-size:12px;color:#667085;margin:10px 0 12px}.alertMeta b{color:#344054}
@media(max-width:720px){.alertGrid{grid-template-columns:1fr}.alertSummaryCard{min-width:155px}.extraChargeRow{overflow-x:auto}}
/* AP STEP 8 refinement */
.itemTitleLine{display:flex;align-items:center;gap:8px}.itemComplaint{margin:6px 0 0;color:var(--muted)}.qrLabelQuick{font-size:20px;line-height:1;padding:5px 9px}.storageCurrentBox{gap:7px;flex-wrap:wrap}.moveRackBtn{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important}.mutationBtn{background:#fff!important;color:#1d4ed8!important;border-color:#93c5fd!important}.stackModal{display:none;position:fixed;inset:0;background:rgba(15,23,42,.48);z-index:9999;padding:5vh 16px;overflow:auto}.stackModal.show{display:block}.stackModalBox{max-width:720px;margin:auto;background:#fff;border-radius:20px;padding:18px;box-shadow:0 24px 80px rgba(15,23,42,.28)}.candidateLines{display:flex;flex-direction:column;gap:3px;margin-top:6px}.candidateLines span{font-size:12px;color:var(--muted)}

/* AP STEP 8.2 - urgency, quick location, compact desktop drawer */
@keyframes apUrgencyPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.10);border-color:#ef4444;background-color:rgba(254,242,242,.62)}
  50%{box-shadow:0 0 0 4px rgba(220,38,38,.18);border-color:#b91c1c;background-color:rgba(254,226,226,.90)}
}
.ageOverduePulse{outline:2px solid #ef4444!important;outline-offset:-2px;animation:apUrgencyPulse 1.25s ease-in-out infinite}
tr.ageOverduePulse td{background:rgba(254,242,242,.72)}
.mobileItemRow.ageOverduePulse{border-color:#ef4444!important}
.storageBadgeButton{border:0;cursor:pointer;font:inherit;transition:.16s ease;text-align:left}
.storageBadgeButton:hover{transform:translateY(-1px);box-shadow:0 3px 10px rgba(37,99,235,.18)}
.alertDetailBtn{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important}

/* AUTH UI GUARD: harus menang dari desktop .layout display override.
   Sebelum session valid, seluruh app chrome/sidebar wajib benar-benar tidak dirender. */
#app.hidden{display:none!important;visibility:hidden!important;pointer-events:none!important}
#app:not(.hidden){visibility:visible}

@media(min-width:901px){
  #app.layout:not(.hidden){display:block!important}
  .sidebar{
    position:fixed!important;left:0;top:0;bottom:0;z-index:900;
    width:76px!important;height:100vh!important;padding:16px 12px!important;
    overflow:hidden;background:#fff;transition:width .20s ease,box-shadow .20s ease;
    box-shadow:4px 0 18px rgba(15,23,42,.05)
  }
  .sidebar:hover{width:270px!important;box-shadow:16px 0 40px rgba(15,23,42,.16)}
  .sidebar>.brand{height:48px;min-width:240px;margin-bottom:18px;overflow:hidden}
  .sidebar>.brand .logo{width:44px;height:44px;min-width:44px;flex:0 0 44px}
  .sidebar>.brand>div:last-child{opacity:0;transform:translateX(-8px);transition:.16s ease;white-space:nowrap}
  .sidebar:hover>.brand>div:last-child{opacity:1;transform:none}
  .sidebar .nav{display:block!important;overflow:visible!important;width:246px}
  .sidebar .nav button{
    width:52px!important;height:46px;margin-bottom:7px!important;padding:0 12px!important;
    display:flex!important;align-items:center;gap:12px;white-space:nowrap;overflow:hidden;
    transition:width .18s ease,background .16s ease,color .16s ease
  }
  .sidebar:hover .nav button{width:246px!important}
  .navIcon{width:28px;min-width:28px;height:28px;display:grid;place-items:center;font-size:18px;font-weight:900;color:inherit}
  .navLabel{opacity:0;transform:translateX(-5px);transition:.14s ease;pointer-events:none}
  .sidebar:hover .navLabel{opacity:1;transform:none}
  .navLogout{color:#dc2626!important}
  .main{margin:0 0 0 76px!important;max-width:calc(100vw - 76px)!important;width:calc(100vw - 76px)!important;padding:22px!important}
}
@media(max-width:900px){
  .sidebar .nav button{display:flex!important;align-items:center!important;gap:10px!important}
  .navIcon{width:26px;min-width:26px;display:grid;place-items:center;font-size:17px}
  .navLabel{display:inline!important;opacity:1!important;transform:none!important}
  .sidebar>.brand>div:last-child{opacity:1!important;transform:none!important}
}
@media (prefers-reduced-motion: reduce){.ageOverduePulse{animation:none}}


/* =========================================================
   AP 1.7.3 - CUSTOMER INVOICE-FIRST + LOGO + MODAL/DRAWER UX
   ========================================================= */
.logo img,.brand .logo img{width:100%;height:100%;object-fit:contain;border-radius:inherit;background:#fff}
.customerBrandLogo{object-fit:contain;background:#fff}

/* Modal tetap menutup area sidebar secara visual. Sidebar baru "menyala" saat di-hover. */
@media(min-width:901px){
  body:has(#modal.show) .sidebar{z-index:1100!important}
  body:has(#modal.show) .sidebar::after{
    content:"";position:absolute;inset:0;background:rgba(15,23,42,.45);
    z-index:9999;pointer-events:none;opacity:1;transition:opacity .16s ease;
  }
  body:has(#modal.show) .sidebar:hover::after{opacity:0}
  body:has(#modal.show) .sidebar:hover{box-shadow:18px 0 48px rgba(15,23,42,.25)!important}
}

.customerInvoiceGuide{margin-top:10px}

/* Landing customer dibuat berbeda dari layout MMM: center-screen glass card + animated ambient shapes. */
body.customerLandingActive{
  min-height:100vh;
  background:
    radial-gradient(circle at 12% 18%,rgba(37,99,235,.13),transparent 26%),
    radial-gradient(circle at 88% 22%,rgba(16,185,129,.12),transparent 24%),
    radial-gradient(circle at 74% 86%,rgba(168,85,247,.11),transparent 28%),
    linear-gradient(145deg,#f8fbff 0%,#f7fafc 46%,#fdfcff 100%);
  overflow-x:hidden;
}
body.customerLandingActive::before,
body.customerLandingActive::after{
  content:"";position:fixed;border-radius:999px;filter:blur(2px);pointer-events:none;z-index:0;
  animation:apCustomerFloat 7s ease-in-out infinite;
}
body.customerLandingActive::before{width:180px;height:180px;left:-54px;top:14%;background:linear-gradient(135deg,rgba(37,99,235,.15),rgba(34,211,238,.08))}
body.customerLandingActive::after{width:230px;height:230px;right:-85px;bottom:8%;background:linear-gradient(135deg,rgba(168,85,247,.12),rgba(245,158,11,.08));animation-delay:-2.5s}
@keyframes apCustomerFloat{0%,100%{transform:translate3d(0,0,0) rotate(0)}50%{transform:translate3d(0,-16px,0) rotate(5deg)}}
body.customerLandingActive .customerShell{
  position:relative;z-index:1;min-height:100vh;max-width:560px;
  display:flex;flex-direction:column;justify-content:center;padding:28px 18px;
}
body.customerLandingActive .customerHero{
  margin:0 0 -22px;z-index:2;border-radius:28px 28px 18px 18px;padding:25px 24px 43px;
  background:linear-gradient(135deg,#2347b9 0%,#168da0 52%,#6e4fbf 100%);
  box-shadow:0 24px 60px rgba(37,99,235,.18);overflow:hidden;position:relative;
}
body.customerLandingActive .customerHero::after{
  content:"";position:absolute;width:170px;height:170px;border-radius:50%;right:-45px;top:-70px;
  border:28px solid rgba(255,255,255,.08);
}
body.customerLandingActive .customerHeroBrand{justify-content:flex-start;align-items:center}
body.customerLandingActive .customerHeroBrand .customerBrandLogo{
  width:72px;height:72px;border-radius:20px;padding:7px;box-shadow:0 10px 26px rgba(15,23,42,.14);
}
body.customerLandingActive #pageLogin{
  position:relative;z-index:3;margin:0 14px 0;border-radius:24px;padding:24px;
  border:1px solid rgba(226,232,240,.9);box-shadow:0 24px 60px rgba(15,23,42,.11);
  animation:apCustomerEnter .48s ease both;
}
body.customerLandingActive #pageLogin::before{
  content:"SERVICE TRACKING";display:inline-flex;margin-bottom:15px;padding:6px 9px;border-radius:999px;
  background:#eef4ff;color:#3157d5;font-size:10px;font-weight:950;letter-spacing:.8px;
}
body.customerLandingActive #pageLogin .label{font-size:13px;color:#334155}
body.customerLandingActive #pageLogin #trackCode{height:52px;font-size:20px;font-weight:950;letter-spacing:4px;text-align:center;background:#f8fafc}
body.customerLandingActive #pageLogin .qrBtn{min-width:104px}
body.customerLandingActive .appFooter{margin-top:20px;opacity:.72}
@keyframes apCustomerEnter{from{opacity:0;transform:translateY(15px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:560px){
  body.customerLandingActive .customerShell{padding:18px 10px;justify-content:center}
  body.customerLandingActive .customerHero{padding:20px 18px 40px;border-radius:24px 24px 17px 17px}
  body.customerLandingActive #pageLogin{margin:0 8px;padding:18px;border-radius:20px}
  body.customerLandingActive .customerHeroBrand .customerBrandLogo{width:58px;height:58px;border-radius:17px}
}
@media(prefers-reduced-motion:reduce){body.customerLandingActive::before,body.customerLandingActive::after,body.customerLandingActive #pageLogin{animation:none}}

/* AP STEP 9 - operational control refinements */
.qrLabelQuick{width:auto!important;min-width:78px!important;padding:7px 10px!important;display:inline-flex!important;align-items:center;gap:6px;white-space:nowrap}
.internalAttachmentPanel{margin:0 0 12px!important;border:1px dashed #cbd5e1!important;background:#fbfdff!important;box-shadow:none!important}
.internalAttachmentPanel input[type=file]{max-width:360px}
.handoverEvidenceBox{margin-top:12px;padding:12px;border:1px dashed #f59e0b;border-radius:12px;background:#fffbeb}
.localPreviewStage{min-height:260px;max-height:72vh;display:flex;align-items:center;justify-content:center;background:#0f172a;border-radius:14px;overflow:hidden;padding:10px}
.localPreviewStage img,.localPreviewStage video{max-width:100%;max-height:68vh;object-fit:contain}
.localPreviewStage iframe{width:100%;height:68vh;border:0;background:#fff}
.timelineBox .actions{margin-top:6px}
@media(max-width:700px){.internalAttachmentPanel .actions{align-items:stretch}.internalAttachmentPanel input[type=file]{max-width:100%;width:100%}.qrLabelQuick{min-width:auto!important}}


/* AP 1.8.1 - role visibility, preview close, readable internal receipt */
.ownerOnlyNav.hidden{display:none!important;}
.receiptUploadBtn{color:#fff!important;}
.previewCloseBtn{position:relative;z-index:3;cursor:pointer;pointer-events:auto!important;}
.stackModalBox>.modalHead{position:relative;z-index:5;}

/* AP 1.8.2 - owner navigation must be truly hidden for Admin, including desktop icon drawer */
.sidebar .nav button.ownerOnlyNav.hidden,
.sidebar .nav button.ownerOnlyNav[hidden],
.nav button.ownerOnlyNav.hidden,
.nav button.ownerOnlyNav[hidden]{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* AP-1.8.3 — Detail analysis layout refinement */
.detailTotalAttachmentRow{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:end;
}
.detailAttachmentQuick{min-width:170px}
.detailAttachmentQuick .btn{white-space:nowrap}
.analysisCostSection{
  margin-top:14px;
  padding:16px;
  border:1px solid #dbeafe;
  border-radius:16px;
  background:#fbfdff;
}
.analysisCostSection.hidden{display:none!important}
.analysisSectionHead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:8px}
.analysisSectionHead h4{margin:0 0 3px}
.serviceCostRow{
  display:grid;
  grid-template-columns:150px minmax(220px,1.6fr) 140px auto;
  gap:8px;
  align-items:center;
  margin-bottom:12px;
}
.serviceCostRow.isLocked{grid-template-columns:minmax(220px,1.8fr) 140px auto}
@media(max-width:700px){
  .detailTotalAttachmentRow{grid-template-columns:1fr}
  .detailAttachmentQuick{min-width:0}
  .serviceCostRow,.serviceCostRow.isLocked{grid-template-columns:1fr}
}

/* AP-1.8.6: keep Master Lokasi primary action readable regardless of inherited modal styles */
.location-add-btn{color:#fff!important;}

/* =========================================================
   AP 1.9.0 — WINCODE C342/C342C 60x40 LABEL DEFAULT
   Exact label canvas for 203 DPI Wincode C34-series printers.
   ========================================================= */
.itemLabelPreview{
  box-sizing:border-box;
}
.itemLabelPreview .itemName,
.itemQrLabel .itemName{
  font-weight:800;
  line-height:1.05;
}
.itemLabelPreview .itemCode,
.itemQrLabel .itemCode{
  color:#475569;
  line-height:1.05;
}
@media print{
  body.labelPrintMode #itemQrPrintArea{
    box-sizing:border-box!important;
  }
  body.labelPrintMode .wincodeC342Label{
    width:60mm!important;
    height:40mm!important;
    box-sizing:border-box!important;
    padding:1.6mm 1.8mm!important;
    gap:1.4mm!important;
    margin:0 auto!important;
    background:#fff!important;
    color:#000!important;
    overflow:hidden!important;
    align-items:center!important;
    justify-content:flex-start!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }
  body.labelPrintMode .wincodeC342Label .qrPart{
    width:22mm!important;
    height:22mm!important;
    flex:0 0 22mm!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
  }
  body.labelPrintMode .wincodeC342Label .qrPart img{
    width:22mm!important;
    height:22mm!important;
    max-width:22mm!important;
    max-height:22mm!important;
    object-fit:contain!important;
    display:block!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart{
    height:35.8mm!important;
    flex:1 1 auto!important;
    min-width:0!important;
    padding:0!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:.65mm!important;
    overflow:hidden!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart > div{
    color:#000!important;
    max-width:100%!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart .itemName{
    line-height:1.05!important;
    max-height:7.6mm!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart .code{
    line-height:1!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart .itemCode{
    line-height:1.05!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart .customLine{
    line-height:1.08!important;
    max-height:8mm!important;
  }
}

/* AP-1.9.1 frontend trial overlay */
.simtechTrialOverlay{position:fixed;inset:0;z-index:2147483646;background:#f5f7fb;overflow:auto}
html.simtechTrialLocked,body.simtechTrialLocked{overflow:hidden!important}
.simtechTrialOverlay .simtechTrialGate{min-height:100vh}
@media print{.simtechTrialOverlay{display:none!important}}


/* AP-1.9.4 — label auto-fit + item completeness */
.labelAutoFit[data-max-lines="1"]{max-height:1.25em}
.labelAutoFit[data-max-lines="2"]{max-height:2.35em}
.completenessPanel{border:1px solid #dbeafe;border-radius:14px;background:#f8fbff;padding:14px;margin-top:12px}
.completenessHead{align-items:flex-start;gap:12px}
.completenessHead h4,.completenessHead .label{margin:0 0 4px}
.completenessList{display:grid;gap:9px;margin-top:10px}
.completenessRow{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:9px;align-items:center;padding:9px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.completenessInputWrap input{width:100%}
.completenessPhotoWrap{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.completenessThumbBtn{border:0;background:transparent;padding:0;cursor:zoom-in}
.completenessThumbBtn img{width:52px;height:40px;object-fit:cover;border-radius:8px;border:1px solid #cbd5e1;display:block}
.detailCompletenessSummary{margin-top:5px;color:#475569;font-size:13px}
.detailCompletenessPanel{margin:14px 0}
@media(max-width:700px){
  .completenessRow{grid-template-columns:1fr}
  .completenessPhotoWrap{justify-content:flex-start}
}
@media print{
  body.labelPrintMode .labelAutoFit{overflow:hidden!important}
  body.labelPrintMode .labelAutoFit[data-max-lines="1"]{white-space:nowrap!important;text-overflow:ellipsis!important}
}

.itemQrPrintArea.labelMeasureActive{display:block!important;position:fixed!important;left:-10000px!important;top:0!important;visibility:hidden!important;pointer-events:none!important;z-index:-1!important}

.labelAutoFit.labelEllipsisApplied[data-max-lines="1"]{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important}
.labelAutoFit.labelEllipsisApplied[data-max-lines="2"]{white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;line-clamp:2!important}

/* =========================================================
   AP-1.9.5 — label print parity + completeness delete guard
   Screen measurement must use the exact same 60x40 geometry
   that Chromium applies only after entering print preview.
   ========================================================= */
.completenessDeleteLocked{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  color:#94a3b8;
}

/* Off-screen pre-print measurement mirrors @media print rules. */
#itemQrPrintArea.labelMeasureActive .wincodeC342Label{
  width:60mm!important;
  height:40mm!important;
  box-sizing:border-box!important;
  padding:1.6mm 1.8mm!important;
  gap:1.4mm!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:hidden!important;
  background:#fff!important;
  color:#000!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .qrPart{
  width:22mm!important;
  height:22mm!important;
  flex:0 0 22mm!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .qrPart img{
  width:22mm!important;
  height:22mm!important;
  max-width:22mm!important;
  max-height:22mm!important;
  object-fit:contain!important;
  display:block!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .txtPart{
  height:35.8mm!important;
  flex:1 1 auto!important;
  min-width:0!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:.65mm!important;
  overflow:hidden!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .txtPart > div{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  color:#000!important;
}

/* Keep the fitted font-size/max-height from JS when Chromium switches to print media. */
@media print{
  body.labelPrintMode .wincodeC342Label .labelAutoFit{
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.labelPrintMode .wincodeC342Label .labelAutoFit.labelEllipsisApplied[data-max-lines="1"]{
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  body.labelPrintMode .wincodeC342Label .labelAutoFit.labelEllipsisApplied[data-max-lines="2"]{
    white-space:normal!important;
    overflow:hidden!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
  }
}

/* =========================================================
   AP-1.9.6 — strict label text bounds
   Prevent long label text from ever overlapping adjacent rows.
   ========================================================= */
.itemLabelPreview .labelAutoFit,
#itemQrPrintArea .labelAutoFit{
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  overflow:hidden;
}

@media print{
  body.labelPrintMode .wincodeC342Label .txtPart{
    gap:.35mm!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart > .labelAutoFit{
    position:relative!important;
    flex:0 0 auto!important;
    min-height:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart .itemName{
    font-size:7px;
    line-height:1.08!important;
    max-height:16px!important;
  }
  body.labelPrintMode .wincodeC342Label .txtPart .code,
  body.labelPrintMode .wincodeC342Label .txtPart .itemCode{
    font-size:7px;
    line-height:1.08!important;
    max-height:8px!important;
    white-space:nowrap!important;
  }
  body.labelPrintMode .wincodeC342Label .labelEllipsisApplied{
    overflow:hidden!important;
  }
}

/* =========================================================
   AP-1.9.7 — Wincode vertical slot guard
   Every text variable owns a fixed vertical slot during the
   pre-print measurement and Chromium print render. Long text
   may shrink/ellipsis, but can never push/cover the next row.
   ========================================================= */
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .txtPart,
body.labelPrintMode .wincodeC342Label .txtPart{
  align-items:stretch!important;
  gap:.25mm!important;
}

#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlot,
body.labelPrintMode .wincodeC342Label .labelSlot{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  flex-grow:0!important;
  flex-shrink:0!important;
  margin:0!important;
  padding:0!important;
}

#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlotItem,
body.labelPrintMode .wincodeC342Label .labelSlotItem{
  height:6.4mm!important;
  min-height:6.4mm!important;
  max-height:6.4mm!important;
  flex-basis:6.4mm!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlotCode,
body.labelPrintMode .wincodeC342Label .labelSlotCode{
  height:3.4mm!important;
  min-height:3.4mm!important;
  max-height:3.4mm!important;
  flex-basis:3.4mm!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlotItemCode,
body.labelPrintMode .wincodeC342Label .labelSlotItemCode,
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlotDate,
body.labelPrintMode .wincodeC342Label .labelSlotDate{
  height:3.1mm!important;
  min-height:3.1mm!important;
  max-height:3.1mm!important;
  flex-basis:3.1mm!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlotCustomer,
body.labelPrintMode .wincodeC342Label .labelSlotCustomer{
  height:3.4mm!important;
  min-height:3.4mm!important;
  max-height:3.4mm!important;
  flex-basis:3.4mm!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlotCustom,
body.labelPrintMode .wincodeC342Label .labelSlotCustom{
  height:6.4mm!important;
  min-height:6.4mm!important;
  max-height:6.4mm!important;
  flex-basis:6.4mm!important;
}

/* One-line slots never wrap. Two-line slots are clamped by JS when necessary. */
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlot[data-max-lines="1"],
body.labelPrintMode .wincodeC342Label .labelSlot[data-max-lines="1"]{
  white-space:nowrap!important;
}
#itemQrPrintArea.labelMeasureActive .wincodeC342Label .labelSlot[data-max-lines="2"],
body.labelPrintMode .wincodeC342Label .labelSlot[data-max-lines="2"]{
  white-space:normal!important;
}

/* =========================================================
   AP-1.10.0 — Invoice notes + payment audit preview
   ========================================================= */
.invoiceNoteEditor{margin:12px 0;padding:12px;border:1px solid #dbe5ef;border-radius:14px;background:#f8fafc}
.invoiceNoteEditor textarea,.invoiceItemNoteBuilder textarea,.invEditItemNote{width:100%;resize:vertical;min-height:64px}
.invoiceItemNoteBuilder{grid-column:2/4;margin-top:2px}
.invoiceItemNoteBuilder .small{margin-bottom:5px}
.invoiceItemNoteView,.invoiceNoteView{white-space:pre-wrap;overflow-wrap:anywhere}
.invoiceItemNoteView{margin-top:8px;padding:7px 8px;border-radius:9px;background:#f8fafc;border:1px dashed #d8e1ec;color:#475569;font-size:12px}
.invoiceItemNoteView b{display:block;color:#172033;margin-bottom:3px}
.invoiceItemNoteView span{display:block}
.invoiceNoteView{margin:12px 0;padding:12px 14px;border-radius:14px;border:1px solid #dbe5ef;background:#f8fafc;color:#475569}
.invoiceNoteView>b{display:block;color:#172033;margin-bottom:6px}
.paymentHistoryClickable{cursor:pointer;transition:.15s ease}
.paymentHistoryClickable:hover{border-color:#93c5fd;background:#f8fbff;transform:translateY(-1px)}
.paymentCancelledRow{opacity:.72;background:#fff7f7}
.paymentAuditGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:6px}
.paymentAuditGrid>div{border:1px solid #e2e8f0;border-radius:12px;padding:11px;background:#f8fafc}
.paymentAuditGrid>div.wide{grid-column:1/-1}
.paymentAuditGrid span{display:block;color:#64748b;font-size:11px;margin-bottom:4px}
.preWrapText{white-space:pre-wrap;overflow-wrap:anywhere}
.paymentCancelAudit{border-color:#fecaca!important;background:#fff7f7!important}
.paymentProofPreview{margin-top:14px;border-top:1px solid #e2e8f0;padding-top:12px}
.paymentProofPreview img{display:block;max-width:100%;max-height:480px;margin:8px auto 12px;border-radius:12px;border:1px solid #e2e8f0;object-fit:contain}
.paymentProofPreview iframe{display:block;width:100%;height:480px;margin:8px 0 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.customerInvoiceNote{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:12px;padding:12px;border-radius:12px;border:1px solid #dbe5ef;background:#f8fafc;color:#475569}
.customerInvoiceNote b{display:block;color:#0f172a;margin-bottom:5px}
.customerInvoiceNote.itemNote{margin-bottom:12px}
@media(max-width:640px){.invoiceItemNoteBuilder{grid-column:1/-1}.paymentAuditGrid{grid-template-columns:1fr}.paymentAuditGrid>div.wide{grid-column:1}.paymentProofPreview iframe{height:360px}}

/* STEP 12 */
.urgentPulse{display:inline-block;background:#dc2626;color:#fff;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;margin-right:6px;animation:urgentPulse 1.2s infinite}.expressToggle{display:flex;gap:8px;align-items:center;font-weight:800}.serviceTerms{font-size:8.5px;line-height:1.25;margin-top:8px;border-top:1px solid #222;padding-top:6px}.serviceTerms h3{font-size:10px;margin:6px 0 4px}.serviceTerms ol{margin:0;padding-left:16px}.serviceTerms li{margin:2px 0}.expressChoice{border:1px solid #111;padding:6px;margin-bottom:6px}@keyframes urgentPulse{50%{opacity:.55;transform:scale(1.02)}}
