/* =============================================
   MAHI ERP — FORMS CSS v13
   EXACTLY matches Image 2 (DTDC Bag Manifest)
   White form, steel-blue section bars,
   compact inline label:input rows
   NO recent/pending tables shown
   ============================================= */

/* ═══ REMOVE ALL card styling ═══ */
.mod-panel {
  background: white !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
  border-bottom: 1px solid #c8d8e8 !important;
}

/* ═══ SECTION HEADER BAR — matches DTDC steel blue ═══ */
.mod-hd {
  background: linear-gradient(180deg, #6080b0 0%, #385888 100%) !important;
  padding: 5px 10px !important;
  border: none !important;
  border-top: 1px solid #4a70a0 !important;
  border-bottom: 1px solid #2a4870 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 1px !important;
}
.mh-ic { display: none !important; }
.mh-t {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: white !important;
  text-transform: uppercase !important;
  letter-spacing: .6px !important;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
}
.mh-s {
  font-size: 9px !important;
  color: rgba(255,255,255,.75) !important;
  margin-top: 0 !important;
}
.mod-body {
  padding: 0 !important;
  background: white !important;
}

/* ═══ SUB-HEADERS (Sender Info, Receiver Info…) ═══ */
/* These are bare divs with inline uppercase style */
.mod-body > div[style*="uppercase"],
.mod-body > div[style*="text-transform"],
div[style*="text-transform:uppercase"][style*="font-weight:700"],
div[style*="text-transform:uppercase"][style*="font-weight: 700"] {
  background: #dce8f4 !important;
  color: #1a3560 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-bottom: 1px solid #b8ccde !important;
  border-top: 1px solid #c8d8e8 !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  margin: 0 !important;
  line-height: 1.8 !important;
}

/* ═══ FORM GRID — matches DTDC 2-col layout ═══ */
.form-grid,
.form-grid[style] {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: white !important;
}
.form-grid-3,
.form-grid-3[style] {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: white !important;
}

/* ═══ FIELD GROUP — one label:input row ═══ */
.fg {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 5px 8px 5px 0 !important;
  gap: 0 !important;
  min-height: 30px !important;
  border-bottom: 1px solid #e8edf2 !important;
  background: white !important;
  position: relative !important;
}
.fg:last-child { border-bottom: none !important; }
.fg.full {
  grid-column: 1 / -1 !important;
}

/* ═══ LABEL — right-aligned, fixed 145px ═══ */
.fg > label {
  width: 145px !important;
  min-width: 145px !important;
  max-width: 145px !important;
  text-align: right !important;
  padding-right: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #1f2d3d !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 22px !important;
  align-self: center !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  flex-shrink: 0 !important;
}
.fg > label b,
.fg > label strong { color: #cc2222 !important; }

/* ═══ INPUTS — compact 22px, matches DTDC exactly ═══ */
.fi, .fs {
  flex: 1 !important;
  height: 22px !important;
  padding: 2px 5px !important;
  border: 1px solid #aab8c8 !important;
  border-radius: 1px !important;
  font-size: 11px !important;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  outline: none !important;
  background: white !important;
  color: #1a2a3a !important;
  min-width: 0 !important;
  width: 100% !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.05) !important;
}
.fi:focus, .fs:focus {
  border-color: #3a70b0 !important;
  outline: 1px solid #3a70b0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  background: #f8fbff !important;
}
.fi[readonly], .fi[disabled] {
  background: #e8ecf2 !important;
  color: #5a7090 !important;
  cursor: default !important;
  border-color: #c0ccda !important;
}
.fi[type="datetime-local"] { font-size: 11px !important; }
.fi::placeholder, .fs::placeholder {
  color: #9aacba !important;
  font-size: 10px !important;
}
.fs {
  height: auto !important;
  padding: 3px 5px !important;
  min-height: 22px !important;
}
select.fi, select.fs, .fg > select {
  flex: 1 !important;
  height: 22px !important;
  padding: 1px 4px !important;
  border: 1px solid #aab8c8 !important;
  border-radius: 1px !important;
  font-size: 11px !important;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  background: white !important;
  color: #1a2a3a !important;
  cursor: pointer !important;
  outline: none !important;
  min-width: 0 !important;
  width: 100% !important;
}
select.fi:focus, select.fs:focus {
  border-color: #3a70b0 !important;
}
textarea.fi {
  height: auto !important;
  min-height: 42px !important;
  resize: vertical !important;
  padding: 3px 5px !important;
}

/* Weight+unit flex wrapper */
.fg > div[style*="display:flex"] {
  flex: 1 !important;
  display: flex !important;
  gap: 3px !important;
  align-items: center !important;
  min-width: 0 !important;
}
.fg > div[style*="display:flex"] .fi { flex: 1 !important; min-width: 0 !important; }
.fg > div[style*="display:flex"] select { width: 58px !important; flex-shrink: 0 !important; height: 22px !important; }

/* Hide small hints */
.fg small,
small[style*="font-size"] { display: none !important; }

/* ═══ AWB / PRS NUMBER BOX ═══ */
.prs-awb-box {
  background: #f0f5fb !important;
  border: none !important;
  border-bottom: 1px solid #b8ccde !important;
  border-top: 1px solid #c8d8e8 !important;
  border-radius: 0 !important;
  padding: 7px 12px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
.prs-awb-id {
  font-family: Consolas, 'Courier New', monospace !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1a3a6e !important;
  letter-spacing: 1.5px !important;
}
.prs-awb-lbl {
  font-size: 9px !important;
  color: #5a7090 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
}
.prs-awb-box > div > div:last-child { display: none !important; }
.awb-regen {
  padding: 3px 14px !important;
  border-radius: 2px !important;
  border: 1px solid #8ab0d0 !important;
  background: white !important;
  color: #2a5296 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  text-transform: uppercase !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}
.awb-regen:hover { background: #2a5296 !important; color: white !important; }

/* ═══ FETCH BOX ═══ */
.prs-fetch-box {
  background: #f0f4f8 !important;
  border: none !important;
  border-bottom: 1px solid #b8ccde !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  border-radius: 0 !important;
}

/* ═══ COD AMOUNT BOX ═══ */
#prs-cod-wrap,
#bk-cod-section {
  background: #fffbee !important;
  border: 1px solid #d0a020 !important;
  border-radius: 1px !important;
  padding: 5px 8px !important;
  margin: 0 !important;
}
#prs-cod-wrap .fg,
#bk-cod-section .fg { border-bottom: none !important; }
#prs-cod-wrap .fi,
#bk-cod-section .fi {
  border: 1px solid #d0a020 !important;
  font-weight: 700 !important;
}

/* ═══ INFO BANNER ═══ */
.ib {
  padding: 5px 10px !important;
  border-radius: 1px !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  display: flex !important;
  gap: 6px !important;
  align-items: flex-start !important;
  border: 1px solid !important;
  border-left: 3px solid !important;
}
.ib.blue   { background: #e8f2ff !important; border-color: #90b8e0 !important; border-left-color: #3070b8 !important; color: #1a3f6e !important; }
.ib.orange { background: #fdf0e2 !important; border-color: #ddb870 !important; border-left-color: #c07030 !important; color: #7a3c00 !important; }
.ib.green  { background: #e2f4e8 !important; border-color: #8ec89a !important; border-left-color: #2a8a3c !important; color: #1a5a2e !important; }
.ib.red    { background: #fce8e8 !important; border-color: #d09090 !important; border-left-color: #a02020 !important; color: #7a1a1a !important; }

/* ═══ ACTION BUTTONS BAR — DTDC exact SAVE|ADD|EDIT|DELETE|PRINT|CLEAR ═══ */
.act-row {
  display: flex !important;
  gap: 4px !important;
  padding: 6px 10px !important;
  background: linear-gradient(180deg, #d8e4ee 0%, #c0ccd8 100%) !important;
  border-top: 2px solid #8aaccc !important;
  border-bottom: 1px solid #a0b8cc !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  margin: 0 !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 20 !important;
}
.act-row .btn {
  padding: 3px 16px !important;
  border-radius: 2px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  height: 24px !important;
  text-transform: uppercase !important;
  letter-spacing: .4px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  cursor: pointer !important;
  border: 1px solid !important;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  box-shadow: none !important;
}
.act-row .btn:active { transform: translateY(1px) !important; }
.act-row .btn-p { background: linear-gradient(180deg, #4878b8, #2a5296) !important; color: white !important; border-color: #1a3a6e !important; }
.act-row .btn-p:hover { background: linear-gradient(180deg, #5888c8, #1a4080) !important; }
.act-row .btn-s { background: linear-gradient(180deg, #38a858, #1a7a3c) !important; color: white !important; border-color: #106030 !important; }
.act-row .btn-s:hover { background: linear-gradient(180deg, #48b868, #156030) !important; }
.act-row .btn-d { background: linear-gradient(180deg, #e05050, #a81818) !important; color: white !important; border-color: #800808 !important; }
.act-row .btn-n { background: linear-gradient(180deg, #eef2f6, #d8e0e8) !important; color: #2a3a4a !important; border-color: #90a0b0 !important; }
.act-row .btn-n:hover { background: linear-gradient(180deg, #f8fbff, #c8d4dc) !important; }
.act-row .btn-warn { background: linear-gradient(180deg, #e8a820, #b07808) !important; color: white !important; border-color: #907000 !important; }

/* ERP action bar (erp-btn variant) */
.erp-action-bar {
  display: flex !important;
  gap: 4px !important;
  padding: 6px 10px !important;
  background: linear-gradient(180deg, #d8e4ee 0%, #c0ccd8 100%) !important;
  border-top: 2px solid #8aaccc !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 20 !important;
}
.erp-btn { padding: 3px 16px !important; border-radius: 2px !important; border: 1px solid !important; font-size: 11px !important; font-weight: 700 !important; cursor: pointer !important; font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important; letter-spacing: .4px !important; text-transform: uppercase !important; white-space: nowrap !important; height: 24px !important; display: inline-flex !important; align-items: center !important; }
.erp-btn:active { transform: translateY(1px) !important; }
.erp-btn-save   { background: linear-gradient(180deg,#4878b8,#2a5296) !important; color: white !important; border-color: #1a3a6e !important; }
.erp-btn-add    { background: linear-gradient(180deg,#38a858,#1a7a3c) !important; color: white !important; border-color: #106030 !important; }
.erp-btn-edit   { background: linear-gradient(180deg,#e8a820,#b07808) !important; color: white !important; border-color: #907000 !important; }
.erp-btn-delete { background: linear-gradient(180deg,#e05050,#a81818) !important; color: white !important; border-color: #800808 !important; }
.erp-btn-print  { background: linear-gradient(180deg,#909aa4,#68747e) !important; color: white !important; border-color: #485058 !important; }
.erp-btn-clear  { background: linear-gradient(180deg,#eef2f6,#d8e0e8) !important; color: #2a3a4a !important; border-color: #90a0b0 !important; }
.erp-mandatory  { font-size: 10px !important; color: #cc0000 !important; font-style: italic !important; margin-left: auto !important; }

/* ═══════════════════════════════════════════
   COMPLETELY HIDE ALL RECENT / PENDING TABLES
   (Image 3 - user explicitly does NOT want)
   ═══════════════════════════════════════════ */

/* Direct targeting of JS-generated IDs */
#prsPendingTableWrap         { display: none !important; }
#recentBookingsTable         { display: none !important; }

/* Hide the tbl-card wrappers that contain these */
.tbl-card:has(#prsPendingTableWrap)  { display: none !important; }
.tbl-card:has(#recentBookingsTable)  { display: none !important; }

/* Hide section dividers ("PENDING PICKUP REQUESTS", "100 Most Recent...") */
#mainC > div[style*="22px 0"],
#mainC > div[style*="margin:22px"],
#mainC > div[style*="align-items:center;gap:12px;margin"] {
  display: none !important;
}

/* Hide any tbl-card that comes AFTER act-row in a form context */
.act-row ~ .tbl-card         { display: none !important; }
.act-row ~ .ib + .tbl-card   { display: none !important; }
.act-row ~ div[style*="flex"][style*="gap:12px"] { display: none !important; }

/* The ib.blue bulk-excel-columns hint BELOW act-row */
.act-row ~ .ib               { display: none !important; }
.act-row ~ .ib ~ .tbl-card   { display: none !important; }

/* Keep the functional maniftest/master-manifest sections */
#mfShipmentsSection          { display: block !important; }
#mfShipmentsSection .tbl-card{ display: block !important; }
#mmShipmentsSection          { display: block !important; }
#mmShipmentsSection .tbl-card{ display: block !important; }
#bkSearchResult              { display: block !important; }
/* bkBulkPreview shows only when file is imported - controlled by JS */

/* ═══ PRS GEN / CLOSURE pending tables — also hide ═══ */
div:has(> #genPendingSection)     { display: none !important; }
div:has(> #closurePendingSection) { display: none !important; }

/* ═══ STAGE BANNER ═══ */
.stage-updated-banner { display: none; }

/* ═══ PINCODE HINTS ═══ */
div[id$="-hint"] {
  font-size: 10px !important;
  padding: 1px 4px !important;
  margin: 0 !important;
}

/* ═══ CLOSURE STATUS BUTTONS ═══ */
.closure-status { display: flex !important; gap: 4px !important; flex-wrap: wrap !important; margin: 4px 0 !important; }
.cs-opt { padding: 3px 10px !important; border-radius: 2px !important; border: 1px solid #a0b0c0 !important; font-size: 11px !important; font-weight: 600 !important; cursor: pointer !important; font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important; color: #2a3a4a !important; background: #eef2f7 !important; text-transform: uppercase !important; }
.cs-opt:hover  { border-color: #2a5296 !important; color: #2a5296 !important; }
.cs-opt.sel    { border-color: #1a7a3c !important; background: #e2f4e8 !important; color: #1a7a3c !important; }
.cs-opt.sel-no { border-color: #b01f1f !important; background: #fce8e8 !important; color: #b01f1f !important; }

/* ═══ SECTION BARS ═══ */
.erp-section-bar, .erp-section-hdr {
  background: linear-gradient(180deg, #6a8cba, #3a5a88) !important;
  color: white !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  border-top: 1px solid #4a70a0 !important;
  border-bottom: 1px solid #2a4870 !important;
  margin: 0 !important;
}

/* ═══ SHIPMENT LABEL ═══ */
.label-preview{display:none;margin:6px 0 !important;background:white !important;border:2px solid #555 !important;max-width:580px;font-family:'Segoe UI',Tahoma,Arial,sans-serif !important;font-size:11px;}
.lbl-main-row{display:grid;grid-template-columns:1fr 200px;border-bottom:2px solid #333;}
.lbl-to-col{padding:10px 12px;border-right:2px solid #333;}
.lbl-to-lbl{font-size:8px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:#555;}
.lbl-to-name{font-size:13px;font-weight:700;color:#000;margin-bottom:3px;}
.lbl-to-addr{font-size:10px;color:#222;line-height:1.5;}
.lbl-to-pin{font-size:26px;font-weight:700;color:#000;letter-spacing:3px;margin:4px 0;}
.lbl-to-phone{font-size:10px;color:#333;}
.lbl-awb-col{padding:8px;display:flex;flex-direction:column;align-items:center;background:#f8f8f8;}
.lbl-awb-lbl{font-size:8px;font-weight:700;text-transform:uppercase;color:#666;align-self:flex-end;}
.lbl-awb-val{font-size:10px;font-weight:700;color:#1a3a6e;align-self:flex-end;margin-bottom:6px;}
.lbl-barcode-wrap{width:180px;display:flex;flex-direction:column;align-items:center;background:white;padding:3px;border:1px solid #ddd;}
#barcodeCanvas{width:180px !important;height:auto !important;max-height:70px;display:block;}
.lbl-awb-numtext{font-family:Consolas,'Courier New',monospace;font-size:8px;letter-spacing:1px;color:#111;margin-top:2px;}
.lbl-routing{font-size:8px;color:#555;margin-top:4px;}
.lbl-pay-bar{display:grid;grid-template-columns:1fr 1fr;border-bottom:2px solid #333;}
.lbl-pay-left{padding:5px 12px;font-size:14px;font-weight:700;border-right:2px solid #333;color:#000;}
.lbl-pay-left.cod{color:#c06010;background:#fdf0e2;}
.lbl-pay-right{padding:5px 10px;font-size:13px;font-weight:700;color:#1a3a6e;display:flex;align-items:center;justify-content:flex-end;gap:5px;}
.lbl-note-bar{padding:4px 12px;font-size:9px;color:#333;border-bottom:1px solid #ccc;background:#fffbf0;}
.lbl-dims-row{display:grid;grid-template-columns:1fr 1fr;padding:5px 12px;border-bottom:1px solid #ccc;font-size:10px;}
.lbl-orderid-row{padding:4px 12px;border-bottom:1px solid #ccc;font-size:9px;color:#555;display:flex;gap:12px;}
.lbl-from-bar{border-top:2px solid #333;border-bottom:1px solid #ccc;padding:8px 12px;}
.lbl-from-lbl{font-size:8px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:#555;}
.lbl-from-name{font-size:11px;font-weight:700;color:#000;}
.lbl-from-addr{font-size:9px;color:#333;line-height:1.5;}
.lbl-product-tbl{width:100%;border-collapse:collapse;font-size:10px;}
.lbl-product-tbl th{background:#f0f0f0;padding:3px 8px;font-size:8px;font-weight:700;text-transform:uppercase;color:#555;border-bottom:1px solid #ccc;}
.lbl-product-tbl td{padding:4px 8px;border-bottom:1px solid #eee;color:#222;}
.lbl-return-strip{padding:5px 12px;background:#fdf0e2;border-top:1px dashed #c06010;font-size:9px;color:#7a4000;}
.lbl-bottom-note{padding:4px 12px;font-size:8px;color:#555;border-top:1px solid #ccc;font-style:italic;}
.lbl-footer{display:flex;justify-content:space-between;padding:4px 12px;background:#f0f0f0;border-top:1px solid #ccc;}
.lbl-footer-txt{font-size:8px;color:#888;}
.lbl-footer-branch{font-size:10px;font-weight:700;color:#1a3a6e;}

/* Timeline */
.tl-ed{display:flex;flex-direction:column;gap:3px;margin:6px 0;}
.tl-row{display:grid;grid-template-columns:150px 1fr 150px 100px;gap:4px;align-items:center;padding:4px 8px;background:#f5f8fb;border:1px solid #c0ccda;}
.tl-row.tl-done{border-left:3px solid #1a7a3c;background:#e2f4e8;}
.tl-row.tl-active{border-left:3px solid #c06010;background:#fdf0e2;}
.tl-row.tl-pending{border-left:3px solid #c0ccda;}
.tl-sn{font-size:11px;font-weight:600;}
.tl-row input,.tl-row select{padding:2px 4px;border:1px solid #a0adb8;border-radius:1px;font-size:10px;height:20px;background:white;}

/* WF Bar */
.wf-bar{display:flex;gap:2px;overflow-x:auto;padding:3px 6px;flex-wrap:wrap;background:#eef2f7;border-bottom:1px solid #aab7c4;}
.wfs{padding:2px 7px;font-size:9px;font-weight:700;background:#eef2f7;color:#5a7090;border:1px solid #aab7c4;text-transform:uppercase;}
.wf-prs{background:#dbeafe;color:#1e40af;border-color:#93c5fd;}
.wf-rvp{background:#ede9fe;color:#6d28d9;border-color:#c4b5fd;}
.wf-booking{background:#fef9c3;color:#854d0e;border-color:#fde047;}
.wf-manifest{background:#cffafe;color:#0e7490;border-color:#67e8f9;}
.wf-mmaster{background:#fed7aa;color:#9a3412;border-color:#fdba74;}
.wf-intransit{background:#bfdbfe;color:#1e40af;border-color:#93c5fd;}
.wf-ofd{background:#fef08a;color:#713f12;border-color:#fde047;}
.wf-pod{background:#d1fae5;color:#065f46;border-color:#6ee7b7;}
.wf-delivered{background:#bbf7d0;color:#14532d;border-color:#4ade80;}
.wf-cds{background:#bfdbfe;color:#1e40af;border-color:#93c5fd;}
.wf-rto_ood{background:#fecdd3;color:#881337;border-color:#fda4af;}
.wf-rto_it{background:#fee2e2;color:#991b1b;border-color:#fca5a5;}
.wf-rto_del{background:#d1fae5;color:#065f46;border-color:#6ee7b7;}

/* Override inline styles that set modern rounded/colored backgrounds */
.fi[style*="background:#f0fdfa"],
.fi[style*="background: #f0fdfa"] { background: #f0f8f0 !important; font-weight: 700 !important; }
.fi[style*="background:#eff6ff"],
.fi[style*="background: #eff6ff"] { background: #eef4ff !important; font-weight: 700 !important; }
.fi[style*="background:#f8faff"],
.fi[style*="background: #f8faff"] { background: #f4f8fc !important; }
.fi[style*="background:#f1f5f9"],
.fi[style*="background: #f1f5f9"] { background: #e8ecf2 !important; }
.fi[style*="font-size:15px"],
.fi[style*="font-size: 15px"] { font-size: 12px !important; font-weight: 700 !important; }
.fi[style*="font-size:13px"],
.fi[style*="font-size: 13px"] { font-size: 11px !important; }

/* ═══ HIDE ALL INFO BANNERS (.ib) ═══ */
.ib { display: none !important; }

/* ═══════════════════════════════════════════
   PRS GENERATION — override inline styles
   ═══════════════════════════════════════════ */

/* Fetched PRS result box — replace dark navy with DTDC white style */
#genFetchResult > div[style*="background:linear-gradient"],
#genFetchResult > div[style*="background: linear-gradient"],
#genFetchResult > div[style*="0a1628"],
#genFetchResult > div[style*="#1e3a6e"] {
  background: white !important;
  border: 1px solid #a8b8c8 !important;
  border-radius: 0 !important;
  padding: 10px 12px !important;
  margin-bottom: 6px !important;
}

/* PRS number display inside fetched result */
#genFetchResult div[style*="font-size:26px"],
#genFetchResult div[style*="font-size: 26px"] {
  font-family: Consolas, 'Courier New', monospace !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1a3a6e !important;
  letter-spacing: 1px !important;
}

/* PRS Number label */
#genFetchResult div[style*="font-size:10px"][style*="uppercase"] {
  font-size: 9px !important;
  color: #5a7090 !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
}

/* Branch/submitted text */
#genFetchResult div[style*="font-size:11px"][style*="rgba(255"] {
  color: #5a7090 !important;
  font-size: 10px !important;
}

/* Status badge */
#genFetchResult span[style*="padding:5px"] {
  border-radius: 1px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  border: 1px solid #a8b8c8 !important;
  padding: 2px 10px !important;
}

/* Horizontal table inside fetched result */
#genFetchResult table {
  background: white !important;
  border: 1px solid #a8b8c8 !important;
}
#genFetchResult thead tr {
  background: linear-gradient(180deg, #ccdaec, #a8bcd4) !important;
}
#genFetchResult thead th {
  color: #1a3a6e !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  border-right: 1px solid #a0b8cc !important;
  border-bottom: 2px solid #7090b0 !important;
}
#genFetchResult tbody td {
  color: #1a2a3a !important;
  font-size: 11px !important;
  padding: 3px 7px !important;
  background: white !important;
  border-right: 1px solid #d8e4ee !important;
  border-bottom: 1px solid #d8e4ee !important;
}
#genFetchResult tbody tr:nth-child(even) td { background: #f0f6fc !important; }
#genFetchResult tbody tr:hover td { background: #d4e8f8 !important; }

/* Assign Rider section — replace green background with DTDC white */
#genDriverSection {
  background: white !important;
  border: 1px solid #a8b8c8 !important;
  border-radius: 0 !important;
  border-top: 2px solid #5a80a8 !important;
  padding: 0 !important;
  margin-top: 0 !important;
}

/* Assign Rider header */
#genDriverSection > div[style*="font-size:11px"][style*="uppercase"] {
  background: linear-gradient(180deg, #6080b0, #385888) !important;
  color: white !important;
  padding: 4px 10px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .5px !important;
  border-bottom: 1px solid #2a4870 !important;
  margin: 0 !important;
  text-transform: uppercase !important;
}

/* Rider preview box */
#genRiderPreview {
  background: #f0f5fb !important;
  border: 1px solid #a8b8c8 !important;
  border-radius: 1px !important;
  font-size: 11px !important;
  padding: 5px 10px !important;
  margin: 4px 0 0 !important;
}

/* HIDE the pending PRS table at bottom of gen page */
#genPendingTable { display: none !important; }
.tbl-card:has(#genPendingTable) { display: none !important; }

/* ═══════════════════════════════════════════
   PRS CLOSURE — override inline styles
   ═══════════════════════════════════════════ */

/* Hide pending closure table at bottom */
#closurePendingTable,
#closureTableWrap { display: none !important; }
.tbl-card:has(#closurePendingTable) { display: none !important; }
.tbl-card:has(#closureTableWrap)    { display: none !important; }

/* Fix rider preview rounded corners */
#genRiderPreview[style*="border-radius:8px"] {
  border-radius: 1px !important;
}

/* Fix the flex wrapper in genDriverSection */
#genDriverSection .form-grid {
  padding: 6px 10px 4px !important;
}

/* Fix act-row inside genDriverSection */
#genDriverSection .act-row {
  margin: 0 !important;
  border-top: 2px solid #8aaccc !important;
}

/* ═══════════════════════════════════════════
   PRS CLOSURE — DTDC style overrides
   ═══════════════════════════════════════════ */

/* Shipment Count Details header */
#closureShipmentCount > div[style*="uppercase"] {
  background: linear-gradient(180deg, #6080b0, #385888) !important;
  color: white !important;
  padding: 4px 10px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .5px !important;
  border-bottom: 1px solid #2a4870 !important;
  margin: 0 0 0 0 !important;
  text-transform: uppercase !important;
}

/* Summary cards grid — replace modern cards with compact ERP table rows */
#closureShipmentCount > div[style*="grid-template-columns:repeat(4"] {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1px !important;
  margin: 0 !important;
  background: #a8b8c8 !important;
  border: 1px solid #a8b8c8 !important;
}

/* Individual stat cards */
#closureShipmentCount > div[style*="grid-template-columns:repeat(4"] > div {
  border-radius: 0 !important;
  padding: 12px 8px !important;
  text-align: center !important;
  border: none !important;
  background: white !important;
}

/* Card big number */
#closureShipmentCount #sumRequested,
#closureShipmentCount #sumDone,
#closureShipmentCount #sumPending,
#closureShipmentCount #sumStatus {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* Override each card's background color inline styles */
/* Blue card (Requested) */
#closureShipmentCount > div > div:nth-child(1) {
  background: #eef4fb !important;
  border-right: 1px solid #a8b8c8 !important;
}
/* Green card (Picked Up) */
#closureShipmentCount > div > div:nth-child(2) {
  background: #e8f8ee !important;
  border-right: 1px solid #a8b8c8 !important;
}
/* Orange card (Pending) */
#closureShipmentCount > div > div:nth-child(3) {
  background: #fdf4e8 !important;
  border-right: 1px solid #a8b8c8 !important;
}
/* Status card (OPEN/CLOSED) */
#closureShipmentCount > div > div:nth-child(4) {
  background: #f0f5fb !important;
}

/* Card label text */
#closureShipmentCount > div > div > div:last-child {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #3a5a7a !important;
  margin-top: 4px !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
}

/* Inputs row below cards */
#closureShipmentCount > div[style*="grid-template-columns:1fr 1fr 1fr"] {
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid #c8d8e8 !important;
}

/* Partial Reason box */
#closurePartialReason {
  background: #fdf4e8 !important;
  border: 1px solid #d4a820 !important;
  border-radius: 0 !important;
  border-left: 3px solid #c08010 !important;
  padding: 6px 10px !important;
  margin: 0 !important;
}
#closurePartialReason > div[style*="uppercase"] {
  background: none !important;
  color: #7a4800 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  border: none !important;
  margin-bottom: 6px !important;
}

/* Not Done Reason box */
#closureReason {
  background: #fce8e8 !important;
  border: 1px solid #c09090 !important;
  border-radius: 0 !important;
  border-left: 3px solid #a02020 !important;
  padding: 6px 10px !important;
  margin: 0 !important;
}
#closureReason > div[style*="uppercase"] {
  background: none !important;
  color: #7a1a1a !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  border: none !important;
  margin-bottom: 6px !important;
}

/* Override pending input orange border */
#closurePendingShip {
  background: #fdf4e8 !important;
  border-color: #c0a070 !important;
  color: #7a4800 !important;
  font-weight: 700 !important;
}

/* WAS THE PICKUP COMPLETED section header */
#closureShipmentCount { margin-top: 0 !important; }

/* Hide PRS Closure bottom table */
#closureTableWrap,
#closurePendingTable,
.tbl-card:has(> .tbl-hd > h3) { }
/* More specific hide for the closure table */
div[id="closureTableWrap"],
div[id="closurePendingTable"] { display: none !important; }

/* ALL tbl-cards that are direct children of mainC after act-row */
#mainC .act-row ~ .tbl-card,
#mainC .act-row ~ div > .tbl-card { display: none !important; }

/* The divider line that appears before the closure table */
#mainC .act-row ~ div[style*="margin:22px"] { display: none !important; }

/* Fix the PRS details overflow padding */
#closureDetails {
  overflow-x: auto !important;
}
div[style*="overflow-x:auto;padding:0 22px 22px"],
div[style*="overflow-x: auto; padding: 0 22px"] {
  padding: 0 !important;
  overflow-x: auto !important;
}

/* PRS full details table inside closure */
#closureDetails table {
  background: white !important;
  border: 1px solid #a8b8c8 !important;
  min-width: 900px;
}
#closureDetails thead tr {
  background: linear-gradient(180deg, #ccdaec, #a8bcd4) !important;
}
#closureDetails thead th {
  color: #1a3a6e !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  border-right: 1px solid #a0b8cc !important;
  border-bottom: 2px solid #7090b0 !important;
}
#closureDetails tbody td {
  font-size: 11px !important;
  padding: 3px 7px !important;
  border-right: 1px solid #d8e4ee !important;
  border-bottom: 1px solid #d8e4ee !important;
}
#closureDetails .td-id { color: #1a3a6e !important; }

/* Override closureShipmentCount margin */
#closureShipmentCount[style*="margin-top:16px"] {
  margin-top: 0 !important;
}

/* cs-opt buttons DTDC style */
.cs-opt {
  padding: 4px 16px !important;
  border-radius: 2px !important;
  border: 1px solid #a0b0c0 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  background: linear-gradient(180deg, #eef2f6, #d8e0e8) !important;
  color: #2a3a4a !important;
  text-transform: uppercase !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.cs-opt:hover {
  background: linear-gradient(180deg, #d8e8f4, #b8cce0) !important;
  border-color: #2a5296 !important;
  color: #1a3a6e !important;
}
.cs-opt.sel {
  background: linear-gradient(180deg, #38a858, #1a7a3c) !important;
  border-color: #106030 !important;
  color: white !important;
}
.cs-opt.sel-no {
  background: linear-gradient(180deg, #e05050, #a81818) !important;
  border-color: #800808 !important;
  color: white !important;
}

/* ═══════════════════════════════════════════
   MASTER MANIFEST — Summary cards DTDC style
   Replace dark navy box with clean ERP style
   ═══════════════════════════════════════════ */

/* The outer dark navy container */
#mmShipmentsSection > div[style*="background:#0a1628"],
#mmShipmentsSection > div[style*="background: #0a1628"] {
  background: white !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  border: 1px solid #a8b8c8 !important;
  border-top: none !important;
}

/* Summary label */
#mmShipmentsSection > div[style*="background:#0a1628"] > div:first-child,
#mmShipmentsSection > div[style*="background: #0a1628"] > div:first-child {
  background: linear-gradient(180deg, #6080b0, #385888) !important;
  color: white !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .5px !important;
  text-transform: uppercase !important;
  padding: 4px 10px !important;
  margin: 0 !important;
  border-bottom: 1px solid #2a4870 !important;
}

/* The grid of 3 summary cards */
#mmSummaryCards {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0 !important;
  background: #a8b8c8 !important;
  padding: 0 !important;
}

/* Each individual card */
#mmSummaryCards > div {
  background: white !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 10px 8px !important;
  text-align: center !important;
}
#mmSummaryCards > div:nth-child(1) { background: #eef4fb !important; }
#mmSummaryCards > div:nth-child(2) { background: #e8f8ee !important; }
#mmSummaryCards > div:nth-child(3) { background: #fdf4e8 !important; }

/* Big number inside each card */
#mmSummaryCards > div > div:first-child {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  color: #1a3a6e !important;
}
#mmSummaryCards > div:nth-child(1) > div:first-child { color: #1a3a6e !important; }
#mmSummaryCards > div:nth-child(2) > div:first-child { color: #1a7a3c !important; }
#mmSummaryCards > div:nth-child(3) > div:first-child { color: #7a4800 !important; }

/* Label text under number */
#mmSummaryCards > div > div:last-child {
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #3a5a7a !important;
  margin-top: 3px !important;
  text-transform: uppercase !important;
  letter-spacing: .4px !important;
}

/* Ship count badge inside tbl-hd */
#mmShipCount {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #7a4800 !important;
  padding: 1px 8px !important;
  background: #fdf4e8 !important;
  border-radius: 1px !important;
  border: 1px solid #c0a060 !important;
}

/* mmShipmentsSection act-row */
#mmShipmentsSection > .act-row { margin-top: 0 !important; }

/* ═══════════════════════════════════════════
   MANIFEST — also fix mfShipCount badge
   ═══════════════════════════════════════════ */
#mfShipCount {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #1a3a6e !important;
  padding: 1px 8px !important;
  background: #eef4fb !important;
  border-radius: 1px !important;
  border: 1px solid #7090b0 !important;
}

/* ═══════════════════════════════════════════
   MASTER MANIFEST — Hide TOP summary, fix BOTTOM
   ═══════════════════════════════════════════ */

/* HIDE the top summary card block completely */
#mmShipmentsSection > div[style*="background:#0a1628"],
#mmShipmentsSection > div[style*="background: #0a1628"] {
  display: none !important;
}

/* BOTTOM footer totals — replace navy with compact DTDC white row */
#mmShipmentsTable > div[style*="background:var(--navy)"],
#mmShipmentsTable > div[style*="background: var(--navy)"],
div[style*="background:var(--navy)"][style*="grid-template-columns:repeat(3"] {
  background: linear-gradient(180deg, #dce8f4, #b8cce0) !important;
  border-top: 2px solid #8aaccc !important;
  padding: 5px 10px !important;
  gap: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  border-bottom: 1px solid #a8b8c8 !important;
}

/* Each bottom summary cell */
#mmShipmentsTable > div[style*="background:var(--navy)"] > div,
#mmShipmentsTable > div[style*="background: var(--navy)"] > div,
div[style*="background:var(--navy)"][style*="grid-template-columns:repeat(3"] > div {
  text-align: center !important;
  padding: 4px 8px !important;
  border-right: 1px solid #a8b8c8 !important;
}
div[style*="background:var(--navy)"][style*="grid-template-columns:repeat(3"] > div:last-child {
  border-right: none !important;
}

/* Big number in bottom summary */
div[style*="background:var(--navy)"][style*="grid-template-columns:repeat(3"] div[style*="font-size:36px"],
div[style*="background:var(--navy)"][style*="grid-template-columns:repeat(3"] div[style*="font-size: 36px"] {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #1a3a6e !important;
}

/* Label in bottom summary */
div[style*="background:var(--navy)"][style*="grid-template-columns:repeat(3"] div[style*="rgba(255,255,255,.5)"] {
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #3a5a7a !important;
  text-transform: uppercase !important;
  letter-spacing: .4px !important;
  margin-top: 2px !important;
}

/* Keep remove button styling clean */
#mmShipmentsTable button[style*="border-radius:7px"] {
  border-radius: 1px !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  background: #fce8e8 !important;
  border: 1px solid #c09090 !important;
  color: #a02020 !important;
}

/* Fix large AWB number font in table */
#mmShipmentsTable td[style*="font-size:14px"] { font-size: 11px !important; }
#mmShipmentsTable td[style*="font-size:15px"] { font-size: 11px !important; }
#mmShipmentsTable td[style*="font-size:12px"] { font-size: 11px !important; }

/* ═══════════════════════════════════════════
   MASTER MANIFEST — Hide Fragile & Insurance columns
   These are the 33rd and 34th columns (second-to-last, third-to-last before Remove)
   ═══════════════════════════════════════════ */

/* Target by nth-child - Fragile=33, Insurance=34 in the wide table */
#mmShipmentsTable table thead th:nth-child(33),
#mmShipmentsTable table thead th:nth-child(34),
#mmShipmentsTable table tbody td:nth-child(33),
#mmShipmentsTable table tbody td:nth-child(34) {
  display: none !important;
}

/* ═══════════════════════════════════════════
   PRS CLOSURE / PRS PICKUP — hide bottom tables
   Only in specific module context
   ═══════════════════════════════════════════ */

/* PRS Pickup pending table — still hidden */
.tbl-card:has(#prsPendingTableWrap) { display: none !important; }
#prsPendingTableWrap { display: none !important; }

/* Hide the generic divider+tbl-card pair that appears after act-row in PRS pages */
/* These are identified by their inline margin:22px style */
div[style*="margin:22px 0 14px"] { display: none !important; }
div[style*="margin:22px 0"] + .tbl-card { display: none !important; }

/* ═══════════════════════════════════════════
   MANIFEST — Hide PRS/ID column (col 4)
   After PRS closure, PRS number not needed
   ═══════════════════════════════════════════ */
#mfShipmentsTable table thead th:nth-child(4),
#mfShipmentsTable table tbody td:nth-child(4) {
  display: none !important;
}

/* ═══════════════════════════════════════════
   MASTER MANIFEST — Hide PRS/ID column (col 7)
   ═══════════════════════════════════════════ */
#mmShipmentsTable table thead th:nth-child(7),
#mmShipmentsTable table tbody td:nth-child(7) {
  display: none !important;
}

/* Un-hide PRS gen and closure tables */
.tbl-card:has(#genPendingTable) { display: block !important; margin-top: 6px; }
#genPendingTable { display: block !important; }
#prsClosureTable { display: block !important; overflow-x: auto !important; }
.tbl-card:has(#prsClosureTable) { display: block !important; margin-top: 6px; }

/* ═══════════════════════════════════════════
   PRS GEN & CLOSURE pending tables
   Date filter + Clear button DTDC style
   ═══════════════════════════════════════════ */

/* Show gen and closure pending tables */
.tbl-card:has(#genPendingTable),
.tbl-card:has(#prsClosureTable) {
  display: block !important;
  margin-top: 6px !important;
}
#genPendingTable,
#prsClosureTable { display: block !important; overflow-x: auto !important; }

/* Clear button inline style override */
button[onclick*="closureDateFilter'][value=''"],
button[onclick*="genDateFilter'][value=''"],
button[onclick*="filterGenTable"],
button[onclick*="filterClosureTable"] {
  padding: 3px 8px !important;
  border-radius: 1px !important;
  border: 1px solid #a0b0c0 !important;
  background: #eef2f7 !important;
  font-size: 10px !important;
  cursor: pointer !important;
  color: #3a4f63 !important;
  height: 22px !important;
}

/* "All PRS Pending Closure" divider — show it */
div[style*="margin:22px 0 14px"] { display: none !important; }
div[style*="margin: 22px 0 14px"] { display: none !important; }

/* But show the closure table section divider */
div[style*="margin:22px 0 14px"]:has(+ .tbl-card:has(#prsClosureTable)),
div[style*="margin:22px 0 14px"] + .tbl-card:has(#prsClosureTable) {
  display: block !important;
}

/* ═══ SIMPLIFY PRS CLOSURE shipment count cards ═══ */
/* Make them a simple 4-column flat row, no big numbers */
#closureShipmentCount > div[style*="grid-template-columns:repeat(4"] {
  display: flex !important;
  gap: 0 !important;
  border: 1px solid #a8b8c8 !important;
  background: #a8b8c8 !important;
  margin: 0 !important;
}
#closureShipmentCount > div[style*="grid-template-columns:repeat(4"] > div {
  flex: 1 !important;
  background: white !important;
  border-radius: 0 !important;
  padding: 8px 10px !important;
  text-align: center !important;
  border-right: 1px solid #a8b8c8 !important;
}
#closureShipmentCount > div[style*="grid-template-columns:repeat(4"] > div:last-child {
  border-right: none !important;
}
/* Numbers in cards — small and compact */
#sumRequested, #sumDone, #sumPending, #sumStatus {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}
#sumRequested { color: #1a3a6e !important; }
#sumDone      { color: #1a7a3c !important; }
#sumPending   { color: #8a4000 !important; }
#sumStatus    { font-size: 18px !important; }

/* Card labels */
#closureShipmentCount > div > div > div:last-child {
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #3a5a7a !important;
  text-transform: uppercase !important;
  letter-spacing: .4px !important;
  margin-top: 2px !important;
}

/* Inputs row below cards */
#closureShipmentCount > div[style*="grid-template-columns:1fr 1fr 1fr"] {
  margin-top: 0 !important;
  border-top: 1px solid #c8d8e8 !important;
  padding: 4px 0 !important;
}

/* Clickable PRS number in pending tables */
#genPendingTable .td-id,
#prsClosureTable .td-id {
  color: #1a3a6e !important;
  cursor: pointer !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}
#genPendingTable .td-id:hover,
#prsClosureTable .td-id:hover {
  color: #0a2050 !important;
}

/* ═══════════════════════════════════════════
   PRS GENERATION — Assign Rider section
   Simple DTDC style, no green box
   ═══════════════════════════════════════════ */
#genDriverSection {
  background: white !important;
  border: none !important;
  border-top: 1px solid #c8d8e8 !important;
  padding: 0 !important;
  margin-top: 0 !important;
  border-radius: 0 !important;
}
#genDriverSection > div:first-child {
  /* The ASSIGN RIDER / DRIVER header - already styled as mod-hd */
}

/* Filter stage label */
.stage-filter-label span:first-child {
  font-size: 10px !important;
  color: #5a7090 !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
}
