/* ═══════════════════════════════════════════════════════════════════
   BizCore V265.3 — Delivery screens (approved mockups, 13 Oct 2026)
   • "Delivered by" picker (Create Delivery Note, Correct Dispatch)
   • Compact Confirm Delivery / Correct Confirmation / Revise Acceptance — desktop, tablet and phone
═══════════════════════════════════════════════════════════════════ */

/* ── Delivered by ── */
.dn-delivered-by-row { display: flex; gap: 8px; min-width: 0; }
.dn-delivered-by-row select { flex: 1 1 auto; min-width: 0; }
.dn-delivered-by-row.is-other select { flex: 0 0 46%; }
.dn-delivered-by-row .dn-delivered-by-other { flex: 1 1 auto; min-width: 0; }
.dn-delivered-by-row .dn-delivered-by-other[hidden] { display: none !important; }

/* ── Confirm Delivery: window ── */
#dn-confirm-modal .dn-compact-confirm {
  width: min(860px, calc(100vw - 32px)) !important; max-width: 860px !important;
  height: auto !important; max-height: calc(100dvh - 32px) !important;
  display: flex !important; flex-direction: column !important; overflow: hidden !important; border-radius: 12px !important;
}
#dn-confirm-modal .dn-confirm-header { min-height: 0 !important; padding: 10px 14px !important; gap: 10px; }
#dn-confirm-modal .dn-confirm-heading { gap: 10px; min-width: 0; }
#dn-confirm-modal .dn-confirm-heading h2 { font-size: 15.5px !important; line-height: 1.2; }
#dn-confirm-modal .dn-confirm-sub { font-size: 11.5px !important; margin-top: 2px !important; }
#dn-confirm-modal .dn-confirm-edit { border-top: 4px solid #d97706; }

/* summary chips + Accept all */
#dn-confirm-modal .dn-confirm-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #f8fafc; border-bottom: 1px solid #e7ecf2; flex: 0 0 auto; }
#dn-confirm-modal .dn-confirm-summary { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 !important; }
#dn-confirm-modal .dn-summary-chip { white-space: nowrap; }
#dn-confirm-modal .dn-accept-all { margin-left: auto; border: 1px solid #cfd8e3; border-radius: 7px; background: #fff; color: var(--c-1f568c); font: inherit; font-size: 12px; font-weight: 700; padding: 5px 10px; white-space: nowrap; cursor: pointer; }
#dn-confirm-modal .dn-accept-all:hover { background: #f1f7fd; border-color: var(--c-9db8d3); }
#dn-confirm-modal .dn-accept-all[hidden] { display: none; }

/* body */
#dn-confirm-modal .dn-confirm-body { padding: 10px 14px 12px !important; display: flex; flex-direction: column; gap: 8px; overflow-y: auto !important; flex: 1 1 auto; min-height: 0; background: #fff !important; }
#dn-confirm-modal .dn-confirm-items { display: flex; flex-direction: column; gap: 8px; margin: 0 !important; padding: 0 !important; }

/* correction / revision reason: one box, aligned with the items */
#dn-confirm-modal .dn-edit-mode-box { margin: 0 !important; padding: 9px 11px !important; border: 1px solid #f5d38a !important; background: #fffbeb !important; border-radius: 10px !important; display: block !important; box-shadow: none !important; }
#dn-confirm-modal .dn-edit-mode-box.revision { border-color: var(--c-c9d9e8) !important; background: var(--c-f7fbff) !important; }
#dn-confirm-modal .dn-edit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
#dn-confirm-modal .dn-edit-head label { display: inline !important; font-size: 12px !important; font-weight: 800 !important; color: #92400e !important; margin: 0 !important; text-transform: none !important; letter-spacing: 0 !important; }
#dn-confirm-modal .dn-edit-mode-box.revision .dn-edit-head label { color: var(--c-1f568c); }
#dn-confirm-modal .dn-edit-head em { display: inline !important; color: #b42318; font-style: normal; }
#dn-confirm-modal .dn-edit-head small { font-size: 10.5px; color: #a16207; font-weight: 600; }
#dn-confirm-modal .dn-edit-mode-box.revision .dn-edit-head small { color: #64748b; }
#dn-confirm-modal #dn-change-reason { width: 100%; min-height: 36px; height: 36px; resize: vertical; border: 1px solid #e8cf8f; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; background: #fff; }

/* item rows */
#dn-confirm-modal .dn-accept-card { border: 1px solid #e3e9f0 !important; border-left-width: 1px !important; border-radius: 10px !important; padding: 9px 11px !important; margin: 0 !important; background: #fff !important; box-shadow: none !important; }
#dn-confirm-modal .dn-accept-card.is-partial,
#dn-confirm-modal .dn-accept-card.is-rejected { border-color: #f3c9c4 !important; background: #fffafa !important; }
#dn-confirm-modal .dn-accept-card.is-invalid { border-color: #ef4444 !important; background: #fff5f5 !important; }
#dn-confirm-modal .dn-acc-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
#dn-confirm-modal .dn-acc-name { min-width: 0; }
#dn-confirm-modal .dn-acc-name strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--c-17324d); overflow-wrap: anywhere; }
#dn-confirm-modal .dn-acc-name small { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: 11.5px; color: #64748b; margin-top: 2px; }
#dn-confirm-modal .dn-was { color: #a16207; font-weight: 700; }
#dn-confirm-modal .dn-line-status { font-size: 10px !important; font-weight: 800 !important; border-radius: 999px !important; padding: 1px 7px !important; margin: 0 !important; }
#dn-confirm-modal .dn-accept-card.is-ok .dn-line-status { display: none !important; }
#dn-confirm-modal .dn-acc-qtys { display: flex; gap: 10px; justify-content: flex-end; }
#dn-confirm-modal .dn-acc-qtys > .dn-qty-field { flex: 0 0 auto !important; max-width: none !important; }
#dn-confirm-modal .dn-qty-field { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 3px !important; padding: 0 !important; border: 0 !important; background: none !important; width: auto !important; min-width: 0 !important; box-shadow: none !important; margin: 0 !important; }
#dn-confirm-modal .dn-qty-label { font-size: 10px !important; font-weight: 800 !important; letter-spacing: .05em; text-transform: uppercase; margin: 0 !important; }
#dn-confirm-modal .dn-accepted-field .dn-qty-label { color: #15803d !important; }
#dn-confirm-modal .dn-rejected-field .dn-qty-label { color: #b42318 !important; }
#dn-confirm-modal .dn-qty-control { display: flex !important; height: 40px !important; border: 1px solid #cfd8e3 !important; border-radius: 9px !important; overflow: hidden !important; background: #fff !important; width: auto !important; }
#dn-confirm-modal .dn-accepted-field .dn-qty-control { border-color: #9bd3ad !important; }
#dn-confirm-modal .dn-rejected-field .dn-qty-control { border-color: #efb1aa !important; }
#dn-confirm-modal .dn-qty-control button { width: 40px !important; min-width: 40px !important; height: 100% !important; border: 0 !important; border-radius: 0 !important; background: #f3f6f9 !important; color: #334155 !important; font-size: 18px !important; font-weight: 700 !important; padding: 0 !important; cursor: pointer; touch-action: manipulation; }
#dn-confirm-modal .dn-qty-control button:active { background: #e2e8f0 !important; }
#dn-confirm-modal .dn-qty-control input { width: 56px !important; min-width: 0 !important; height: 100% !important; border: 0 !important; border-left: 1px solid #e3e9f0 !important; border-right: 1px solid #e3e9f0 !important; border-radius: 0 !important; text-align: center !important; font-size: 15px !important; font-weight: 700 !important; padding: 0 2px !important; background: #fff !important; -moz-appearance: textfield; }
#dn-confirm-modal .dn-qty-control input::-webkit-outer-spin-button,
#dn-confirm-modal .dn-qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#dn-confirm-modal .dn-qty-control input.invalid { background: #fef2f2 !important; color: #b42318 !important; }
#dn-confirm-modal .dn-acc-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#dn-confirm-modal .dn-acc-extra:has(> [style*="display: flex"]),
#dn-confirm-modal .dn-acc-extra:has(> [style*="display:flex"]) { margin-top: 8px; }
#dn-confirm-modal .dn-reject-extra { margin: 0 !important; padding: 0 !important; font-size: 0; }
#dn-confirm-modal .dn-reject-extra select { width: 100%; height: 38px; border: 1px solid #cfd8e3; border-radius: 8px; padding: 0 10px; font-size: 13px; background: #fff; }
#dn-confirm-modal .dn-line-remarks { grid-column: 1 / -1; max-width: none !important; width: 100% !important; box-sizing: border-box; height: 36px; border: 1px solid #cfd8e3; border-radius: 8px; padding: 0 10px; font-size: 13px; margin: 0 !important; width: 100%; }
#dn-confirm-modal .dn-line-error:not(.show) { display: none; }
#dn-confirm-modal .dn-line-error.show { margin-top: 6px; font-size: 11.5px; }

/* received by + remarks */
#dn-confirm-modal .dn-receiver-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; margin: 2px 0 0 !important; padding: 0 !important; }
#dn-confirm-modal .dn-receiver-grid .form-group { margin: 0 !important; }
#dn-confirm-modal .dn-receiver-grid label { font-size: 10.5px !important; font-weight: 800 !important; letter-spacing: .04em; text-transform: uppercase; color: #475569 !important; margin-bottom: 5px !important; }
#dn-confirm-modal .dn-receiver-grid label em { color: #b42318; font-style: normal; }
#dn-confirm-modal #dn-received-by,
#dn-confirm-modal #dn-customer-remarks { height: 38px; min-height: 38px; font-size: 13.5px; }
#dn-confirm-modal #dn-customer-remarks { resize: vertical; padding-top: 9px; }

/* footer */
#dn-confirm-modal .dn-confirm-footer { padding: 10px 14px !important; gap: 8px; flex: 0 0 auto; }
#dn-confirm-modal .dn-footer-note { font-size: 11px !important; color: #64748b !important; gap: 5px; }
#dn-confirm-modal .dn-confirm-edit .dn-confirm-primary { background: #b45309 !important; border-color: #b45309 !important; }
#dn-confirm-modal .dn-confirm-primary.has-invalid { opacity: .55; }

/* phone */
@media (max-width: 700px) {
  #dn-confirm-modal.modal-overlay { padding: 0 !important; }
  #dn-confirm-modal .dn-compact-confirm { width: 100vw !important; max-width: none !important; height: 100dvh !important; max-height: 100dvh !important; border-radius: 0 !important; }
  #dn-confirm-modal .dn-confirm-bar { padding: 7px 10px; gap: 5px; }
  #dn-confirm-modal .dn-summary-chip { font-size: 10.5px !important; }
  #dn-confirm-modal .dn-accept-all { font-size: 11px; padding: 4px 8px; }
  #dn-confirm-modal .dn-confirm-body { padding: 10px !important; }
  #dn-confirm-modal .dn-acc-main { grid-template-columns: 1fr; }
  #dn-confirm-modal .dn-acc-qtys { gap: 10px; justify-content: flex-start; }
  #dn-confirm-modal .dn-receiver-grid { grid-template-columns: 1fr !important; }
  #dn-confirm-modal .dn-confirm-footer { flex-wrap: wrap; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important; }
  #dn-confirm-modal .dn-footer-note { width: 100%; }
  #dn-confirm-modal .dn-footer-actions { width: 100%; display: flex; gap: 8px; }
  #dn-confirm-modal .dn-footer-actions .btn { flex: 1; height: 42px; justify-content: center; }
  #dn-confirm-modal .dn-footer-actions .dn-confirm-primary { flex: 2; }
}
@media (max-width: 360px) {
  #dn-confirm-modal .dn-qty-control button { width: 36px !important; min-width: 36px !important; }
  #dn-confirm-modal .dn-qty-control input { width: 46px !important; }
}

/* ═══ V265.5 — Deliveries screen ═══ */
#page-deliveries .dl-page { max-width: 1400px; margin: 0 auto; padding: 4px 0 24px; }
#page-deliveries .dl-head h2 { margin: 0; font-size: 22px; color: var(--c-17324d); }
#page-deliveries .dl-head span { display: block; margin-top: 3px; font-size: 12.5px; color: #64748b; }
#page-deliveries .dl-tools { display: flex; gap: 8px; align-items: center; margin: 14px 0 10px; flex-wrap: wrap; }
#page-deliveries .dl-search { flex: 1 1 260px; min-width: 0; height: 40px; border: 1px solid #cfd8e3; border-radius: 9px; padding: 0 12px; font-size: 14px; background: #fff; }
#page-deliveries .dl-seg { display: inline-flex; border: 1px solid #cfd8e3; border-radius: 9px; overflow: hidden; background: #fff; flex: 0 0 auto; }
#page-deliveries .dl-seg button { border: 0; background: #fff; color: #475569; font: inherit; font-size: 13px; font-weight: 700; padding: 0 14px; height: 38px; cursor: pointer; }
#page-deliveries .dl-seg button + button { border-left: 1px solid #e3e9f0; }
#page-deliveries .dl-seg button.on { background: var(--c-eef5fc); color: var(--c-173a5e); box-shadow: inset 0 -2px 0 var(--c-2b6cb0); }
#page-deliveries .dl-seg b { display: inline-block; margin-left: 5px; min-width: 18px; background: #e2e8f0; border-radius: 999px; padding: 0 6px; font-size: 11px; text-align: center; }
#page-deliveries .dl-seg button.on b { background: var(--c-173a5e); color: #fff; }
#page-deliveries .dl-scan-btn { height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--c-173a5e); color: #fff; font: inherit; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex: 0 0 auto; }
#page-deliveries .dl-grp { font-size: 10.5px; font-weight: 800; color: #64748b; letter-spacing: .07em; text-transform: uppercase; margin: 12px 2px 7px; }
#page-deliveries .dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
#page-deliveries .dl-card { background: #fff; border: 1px solid #e3e9f0; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(15,23,42,.04); min-width: 0; }
#page-deliveries .dl-top { display: flex; align-items: center; gap: 8px; }
#page-deliveries .dl-dn { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; font-size: 15px; color: var(--c-17324d); cursor: pointer; white-space: nowrap; text-decoration: underline; text-decoration-color: transparent; }
#page-deliveries .dl-dn:hover { text-decoration-color: var(--c-9db8d3); }
#page-deliveries .dl-age { margin-left: auto; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
#page-deliveries .dl-age.g { background: #e8f7ee; color: #15803d; }
#page-deliveries .dl-age.a { background: #fff4dc; color: #a15c07; }
#page-deliveries .dl-age.r { background: #fdecea; color: #b42318; }
#page-deliveries .dl-cu { font-size: 14px; font-weight: 700; color: var(--c-17324d); overflow-wrap: anywhere; }
#page-deliveries .dl-ad { font-size: 12px; color: #64748b; }
#page-deliveries .dl-meta { font-size: 11.5px; color: #64748b; display: flex; gap: 4px 12px; flex-wrap: wrap; }
#page-deliveries .dl-meta b { color: #334155; }
#page-deliveries .dl-who { color: #334155; }
#page-deliveries .dl-acts { display: flex; gap: 8px; margin-top: 4px; }
#page-deliveries .dl-view,
#page-deliveries .dl-go { height: 42px; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; touch-action: manipulation; }
#page-deliveries .dl-view { border: 1px solid #cfd8e3; background: #fff; color: var(--c-1f568c); padding: 0 14px; flex: 0 0 auto; }
#page-deliveries .dl-go { border: 0; background: #15803d; color: #fff; flex: 1; }
#page-deliveries .dl-go:active { background: #166534; }
#page-deliveries .dl-empty { text-align: center; padding: 50px 16px; color: #64748b; }
#page-deliveries .dl-empty i { font-size: 34px; color: #94a3b8; }
#page-deliveries .dl-empty p { margin: 8px 0 12px; font-size: 14px; }
@media (max-width: 700px) {
  #page-deliveries .dl-head span { display: none; }
  #page-deliveries .dl-tools { position: sticky; top: 0; z-index: 3; background: var(--bg, #f4f7fa); padding: 8px 0; margin: 6px 0 4px; }
  #page-deliveries .dl-search { flex-basis: 100%; order: 1; }
  #page-deliveries .dl-seg { order: 2; }
  #page-deliveries .dl-scan-btn { order: 3; margin-left: auto; }
  #page-deliveries .dl-grid { grid-template-columns: 1fr; gap: 9px; }
}

/* ═══ V265.5 — Delivery Note view on phone & tablet (below 900 px) ═══ */
#dn-print-modal .dn-m-tabs,
#dn-print-modal .dn-m-details,
#dn-print-modal .dn-m-chip,
#dn-print-modal .dn-m-more { display: none !important; }
@media (max-width: 899px) {
  #dn-print-modal .dn-m-chip { display: inline-block !important; margin-left: 8px; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: #fff4dc; color: #a15c07; white-space: nowrap; }
  #dn-print-modal .dn-m-chip.ok { background: #e8f7ee; color: #15803d; }
  #dn-print-modal .dn-m-chip.part { background: #eaf2ff; color: #1d4ed8; }
  #dn-print-modal .dn-m-chip.rej { background: #fdecea; color: #b42318; }
  #dn-print-modal .dn-m-tabs { display: flex !important; position: sticky; top: 0; z-index: 4; background: #fff; border-bottom: 1px solid #e3e9f0; }
  #dn-print-modal .dn-m-tabs button { flex: 1; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: #64748b; padding: 11px 0; cursor: pointer; }
  #dn-print-modal .dn-m-tabs button.on { color: #173a5e; box-shadow: inset 0 -3px 0 #2b6cb0; }
  #dn-print-modal .dn-view-workspace { display: flex !important; flex-direction: column !important; gap: 10px !important; padding: 10px !important; }
  #dn-print-modal .dn-view-workspace[data-mtab="details"] .dn-view-document { display: none !important; }
  #dn-print-modal .dn-view-workspace[data-mtab="doc"] .dn-m-details,
  #dn-print-modal .dn-view-workspace[data-mtab="doc"] .dn-view-acceptance { display: none !important; }
  #dn-print-modal .dn-view-workspace[data-mtab="details"] .dn-m-details { display: flex !important; flex-direction: column; gap: 9px; }
  #dn-print-modal .dn-view-acceptance { position: static !important; width: 100% !important; }
  #dn-print-modal .dn-view-document { overflow: hidden !important; justify-content: flex-start !important; width: 100% !important; }
  #dn-print-modal .dn-view-document .dn-a4 { width: 210mm !important; min-width: 210mm !important; max-width: none !important; flex: 0 0 auto !important; margin: 0 !important; }
  #dn-print-modal .dn-view-workspace > * { align-self: stretch; min-width: 0; }
  #dn-print-modal .dn-m-details { width: 100%; }
  #dn-print-modal .dn-m-card { background: #fff; border: 1px solid #e3e9f0; border-radius: 12px; padding: 10px 12px; }
  #dn-print-modal .dn-m-lbl { font-size: 10px; font-weight: 800; color: #64748b; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
  #dn-print-modal .dn-m-cu { font-size: 15px; font-weight: 800; color: #17324d; }
  #dn-print-modal .dn-m-sub { font-size: 12.5px; color: #475569; margin-top: 2px; }
  #dn-print-modal .dn-m-tel { display: inline-flex; gap: 5px; align-items: center; margin-top: 6px; font-size: 13px; font-weight: 700; color: #1f568c; text-decoration: none; }
  #dn-print-modal .dn-m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
  #dn-print-modal .dn-m-grid small { display: block; font-size: 10px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
  #dn-print-modal .dn-m-grid b { font-size: 13px; color: #17324d; overflow-wrap: anywhere; }
  #dn-print-modal .dn-m-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #edf0f3; font-size: 13.5px; }
  #dn-print-modal .dn-m-item:first-of-type { border-top: 0; }
  #dn-print-modal .dn-m-item .n { color: #94a3b8; font-weight: 700; width: 18px; flex: 0 0 18px; }
  #dn-print-modal .dn-m-item .d { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  #dn-print-modal .dn-m-item .d small { display: block; font-size: 11px; color: #64748b; }
  #dn-print-modal .dn-m-item .d em { color: #b42318; font-style: normal; }
  #dn-print-modal .dn-m-item .q { font-weight: 800; font-size: 15px; }
  #dn-print-modal .dn-m-item .u { color: #64748b; font-size: 12px; min-width: 28px; }
  /* bar: More · (Close on tablet) · Confirm / View Acceptance · Print */
  #dn-print-modal .dn-view-actionbar { flex-wrap: nowrap !important; overflow: hidden; gap: 8px !important; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)) !important; }
  #dn-print-modal .dn-view-actionbar > .btn,
  #dn-print-modal .dn-view-actionbar > #dn-dispatch-tools { display: none !important; }
  #dn-print-modal .dn-view-actionbar > .dn-m-more { display: inline-flex !important; order: 1; }
  #dn-print-modal .dn-view-actionbar > #dn-print-btn { display: inline-flex !important; order: 3; }
  #dn-print-modal .dn-view-actionbar > #dn-open-confirm-btn:not([style*="display: none"]):not([style*="display:none"]) { display: inline-flex !important; order: 2; flex: 1; justify-content: center; }
  #dn-print-modal .dn-view-actionbar > .dn-view-actionbar-spacer { display: none !important; }
  #dn-print-modal .dn-view-actionbar .btn { height: 42px; white-space: nowrap; }
}
@media (min-width: 600px) and (max-width: 899px) {
  #dn-print-modal .dn-view-actionbar > #dn-close-btn { display: inline-flex !important; order: 0; }
}
@media (max-width: 599px) {
  #dn-print-modal .dn-view-actionbar > #dn-print-btn span { display: none; }
  #dn-print-modal .dn-view-actionbar > #dn-print-btn { width: 46px; justify-content: center; padding: 0 !important; }
}

/* action sheet (⋯ More) */
.bc-sheet-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(15,23,42,.45); display: flex; align-items: flex-end; justify-content: center; }
.bc-sheet { width: 100%; max-width: 520px; background: #fff; border-radius: 16px 16px 0 0; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.bc-sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: #cbd5e1; margin: 2px auto 8px; }
.bc-sheet-item, .bc-sheet-cancel { display: flex; width: 100%; align-items: center; gap: 12px; border: 0; border-top: 1px solid #f1f5f9; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--c-17324d); padding: 13px 20px; cursor: pointer; text-align: left; }
.bc-sheet-item i { font-size: 19px; color: #475569; }
.bc-sheet-item.danger, .bc-sheet-item.danger i { color: #b42318; }
.bc-sheet-cancel { justify-content: center; font-weight: 800; color: #64748b; }

/* QR scanner */
.dl-scan-overlay { position: fixed; inset: 0; z-index: 9100; background: rgba(15,23,42,.7); display: flex; align-items: center; justify-content: center; padding: 12px; }
.dl-scan-box { width: min(460px, 100%); background: #fff; border-radius: 14px; overflow: hidden; }
.dl-scan-head { display: flex; align-items: center; padding: 12px 14px; background: var(--c-173a5e); color: #fff; }
.dl-scan-x { margin-left: auto; border: 0; background: none; color: #fff; font-size: 18px; cursor: pointer; }
.dl-scan-video { position: relative; background: #000; aspect-ratio: 1 / 1; }
.dl-scan-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-scan-frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.dl-scan-msg { padding: 10px 14px 4px; font-size: 13px; color: #475569; }
.dl-scan-type { display: flex; gap: 8px; padding: 8px 14px 14px; }
.dl-scan-type input { flex: 1; min-width: 0; height: 40px; border: 1px solid #cfd8e3; border-radius: 9px; padding: 0 10px; font-size: 14px; }
.dl-scan-type button { height: 40px; border: 0; border-radius: 9px; background: #15803d; color: #fff; font-weight: 800; padding: 0 16px; }

/* V265.6 — "open on this device" */
#page-deliveries .dl-headrow { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
#page-deliveries .dl-start { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #334155; background: #fff; border: 1px solid #dbe3ec; border-radius: 8px; padding: 7px 11px; cursor: pointer; user-select: none; }
#page-deliveries .dl-start input { width: 16px; height: 16px; margin: 0; accent-color: var(--c-173a5e); }
@media (max-width: 700px) { #page-deliveries .dl-start { margin-left: 0; width: 100%; } }

/* V265.6 — Deliveries: a box per group (approved Design 1) */
#page-deliveries .dl-panel { background: #fff; border: 1px solid #dfe6ee; border-top: 3px solid #d97706; border-radius: 12px; padding: 0 12px 12px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
#page-deliveries .dl-panel.today { border-top-color: #15803d; }
#page-deliveries .dl-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 2px 9px; margin-bottom: 12px; border-bottom: 1px solid #edf0f3; }
#page-deliveries .dl-dot { width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; flex: 0 0 9px; }
#page-deliveries .dl-panel.today .dl-dot { background: #22c55e; }
#page-deliveries .dl-panel-title { font-size: 14px; font-weight: 800; color: var(--c-17324d); }
#page-deliveries .dl-cnt { background: #eef2f7; color: #334155; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 800; }
#page-deliveries .dl-panel-hint { margin-left: auto; font-size: 11.5px; font-weight: 600; color: #94a3b8; }
#page-deliveries .dl-panel .dl-card { background: #f8fafc; box-shadow: none; }
#page-deliveries .dl-panel .dl-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 700px) {
  #page-deliveries .dl-panel { padding: 0 9px 9px; }
  #page-deliveries .dl-panel .dl-grid { grid-template-columns: 1fr; }
  #page-deliveries .dl-panel-hint { display: none; }
}

/* V265.6 — loading state */
#page-deliveries .dl-loading { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: #475569; padding: 14px 4px; }
#page-deliveries .dl-spinner { width: 18px; height: 18px; border: 3px solid #dbe5f0; border-top-color: var(--c-173a5e); border-radius: 50%; animation: dlspin .8s linear infinite; }
@keyframes dlspin { to { transform: rotate(360deg); } }
#page-deliveries .dl-skeleton .dl-card { gap: 9px; }
#page-deliveries .dl-skeleton i, #page-deliveries .dl-skeleton b { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg,#eef2f6 25%,#f6f8fa 50%,#eef2f6 75%); background-size: 200% 100%; animation: dlshimmer 1.2s infinite; }
#page-deliveries .dl-skeleton i:nth-child(1) { width: 45%; height: 15px; } #page-deliveries .dl-skeleton i:nth-child(2) { width: 70%; } #page-deliveries .dl-skeleton i:nth-child(3) { width: 55%; }
#page-deliveries .dl-skeleton b { height: 40px; border-radius: 9px; margin-top: 4px; }
@keyframes dlshimmer { to { background-position: -200% 0; } }

/* ═════ V273.2 delivery acknowledgement and the office check (js/dn-ack.js) ═════ */
#page-deliveries .dl-panel.ack { border-top-color: #b45309; }
#page-deliveries .dl-panel.ack .dl-dot { background: #f59e0b; }
#page-deliveries .dl-panel.conf { border-top-color: #175b91; }
#page-deliveries .dl-panel.conf .dl-dot { background: #3b82f6; }
#page-deliveries .dl-go.dl-office { background: #175b91; }
#page-deliveries .dl-wait { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border-radius: 9px; background: #eef4fa; color: #3a5a78; font-size: 12.5px; font-weight: 700; }
.dn-dot-ackpending { background: #b45309 !important; }
.dn-dot-toconfirm { background: #3b82f6 !important; }
.dna-chip { display: inline-block; margin-left: 5px; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; vertical-align: middle; }
.dna-chip.ack { background: #fff4dc; color: #92580a; }
.dna-chip.ack.late { background: #fde7e7; color: #b42318; }
.dna-chip.conf { background: #e6f1fd; color: #1d5fa8; }
.dna-stage { display: inline-block; margin-left: 10px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; vertical-align: middle; background: rgba(255,255,255,.16); color: #fff; }
.dna-stage.ackPending { background: #fff4dc; color: #92580a; }
.dna-stage.toConfirm { background: #e6f1fd; color: #1d5fa8; }
.dna-stage.confirmed { background: #e8f7ee; color: #15803d; }
.dna-box { max-width: 440px; }
.dna-box .dna-sub { display: block; margin-top: 6px; font-size: 12px; color: #64748b; }
.dna-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.dna-choices .btn { width: 100%; justify-content: center; height: 42px; font-size: 14px; }
.dna-now { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #1d5fa8; margin-left: 12px; cursor: pointer; }
.dna-now input { width: 16px; height: 16px; }
#dna-check-modal .modal { max-width: 760px; height: auto !important; min-height: 0 !important; max-height: 92vh; }
#dna-check-modal .modal-body { flex: 0 1 auto !important; overflow: auto; }
#dna-check-modal .modal-header h2 { margin: 0; }
.dna-check-sub { font-size: 12.5px; color: #64748b; margin-top: 3px; }
.dna-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.dna-kv > div { background: #f6f9fc; border: 1px solid #e3e9f0; border-radius: 9px; padding: 8px 10px; }
.dna-kv span { display: block; font-size: 11px; color: #64748b; margin-bottom: 2px; }
.dna-kv b { font-size: 13px; color: #17324d; font-weight: 600; }
.dna-kv small { color: #92580a; font-weight: 600; }
.dna-rem { background: #fffbea; border: 1px solid #f0d77b; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; color: #7a5a00; margin-bottom: 12px; }
.dna-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.dna-t th { text-align: left; font-size: 11.5px; font-weight: 700; color: #475569; background: #f3f6fa; padding: 8px; border-bottom: 1px solid #dfe6ee; }
.dna-t td { padding: 8px; border-bottom: 1px solid #edf0f3; vertical-align: top; }
.dna-t td small { display: block; font-size: 11.5px; color: #64748b; margin-top: 2px; }
.dna-t .n { text-align: right; white-space: nowrap; }
.dna-t .ok { color: #15803d; font-weight: 600; }
.dna-t .bad { color: #b42318; font-weight: 600; }
.dna-t tr.rej td { background: #fffafa; }
.dna-hint { margin-top: 12px; font-size: 12.5px; color: #475569; background: #f6f9fc; border-radius: 9px; padding: 9px 11px; }
@media (max-width: 700px) { .dna-kv { grid-template-columns: 1fr 1fr; } .dna-now { margin: 6px 0 0; } }
