/* Shipment detail sheet, following the supplied mobile tracking reference. */
.shipment-sheet {
  max-width: 620px;
  padding: 34px 36px;
  border-radius: 3px;
  color: #626262;
  font-size: 14px;
  line-height: 1.65;
}
.sheet-brand { color: #a58b46; font-size: 20px; font-weight: 700; padding-right: 32px; }
.sheet-brand span { display: block; font-size: 9px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; }
.sheet-tracking { margin: 30px auto 22px; text-align: center; overflow-wrap: anywhere; color: #707070; font-size: 16px; }
.sheet-barcode { display: block; width: 100%; max-width: 390px; height: 65px; margin: 0 auto 4px; color: #343434; }
.sheet-section { margin: 0 0 28px; }
.sheet-section h2 { margin: 0 0 22px; padding-bottom: 5px; border-bottom: 1px solid #aaa; color: #555; font-size: 18px; font-weight: 600; line-height: 1.4; }
.sheet-contact p { margin: 0 0 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-status { margin: 8px 0 24px; padding: 12px 16px; background: #929292; color: white; text-align: center; text-transform: uppercase; font-size: 13px; }
.sheet-facts { margin: 0; }
.sheet-facts > div { margin-bottom: 25px; }
.sheet-facts dt { margin-bottom: 4px; font-weight: 600; }
.sheet-facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.shipment-sheet .section-title { color: #555; }
@media (max-width: 600px) {
  .shipment-sheet { padding: 28px 22px; }
  .sheet-tracking { font-size: 14px; }
  .sheet-section h2 { font-size: 17px; }
  .shipment-sheet .danger-zone { align-items: flex-start; flex-direction: column; }
}
body:has(#modal-slot .modal) { overflow: hidden; }
.shipment-sheet .sheet-contact { min-width: 0; }
.shipment-sheet input, .shipment-sheet select { min-width: 0; }

/* Public tracking uses the same sheet without the admin modal shell. */
.public-shipment-sheet { width: 100%; margin: 0 auto; background: #fff; border: 1px solid #e2e2e2; box-sizing: border-box; }
#results-inner > .journey-card, .public-tracking-history { max-width: 620px; margin-right: auto; margin-left: auto; }
.public-shipment-sheet .sheet-brand { line-height: 1.65; }
.public-shipment-sheet .sheet-section h2 { letter-spacing: normal; }

/* Admin operations: compact details and clearly separated editing actions. */
.admin-shipment { max-width: 860px; border-radius: 18px; color: var(--ink); padding: 28px 32px; }
.admin-shipment .sheet-brand { color: var(--ink); }
.admin-shipment .sheet-tracking { margin: 18px 0 24px; font-weight: 700; color: var(--ink); }
.admin-shipment .sheet-barcode { max-width: 250px; height: 44px; }
.shipment-overview { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; padding: 18px 20px; background: #edf3f9; border-radius: 12px; margin-bottom: 20px; }
.shipment-overview strong { display: block; overflow-wrap: anywhere; font-size: 15px; }
.overview-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.admin-shipment .contact-grid .sheet-section { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.admin-shipment .sheet-section h2 { font-size: 16px; color: var(--ink); margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.admin-shipment .sheet-contact p:first-child { font-weight: 700; font-size: 15px; }
.admin-shipment .sheet-contact p { font-size: 13px; }
.admin-shipment .sheet-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 24px; }
.admin-shipment .sheet-facts > div { margin: 0; }
.admin-shipment .sheet-facts dt { color: var(--muted); font-size: 12px; font-weight: 500; }
.admin-shipment .sheet-facts dd { font-weight: 600; font-size: 14px; }
.admin-shipment #status-form { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.admin-shipment input, .admin-shipment select { min-height: 44px; background: white; }
.admin-shipment .section-title { font-size: 16px; text-transform: none; letter-spacing: normal; color: var(--ink); }
.update-actions { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.notification-choice { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; cursor: pointer; }
.admin-shipment .notification-choice input { width: 18px; height: 18px; min-height: 0; margin: 3px 0 0; flex-shrink: 0; }
.notification-choice small { display: block; color: var(--muted); font-size: 12px; max-width: 280px; }
.update-actions button { flex-shrink: 0; }
.save-confirmation { color: #166534; background: #edf9f0; padding: 10px 12px; border-radius: 8px; }
@media (max-width: 600px) {
  .admin-shipment { padding: 22px 16px; border-radius: 14px; }
  .shipment-overview, .contact-grid { grid-template-columns: 1fr; gap: 12px; }
  .admin-shipment .sheet-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .delivery-controls, .update-actions { flex-direction: column; align-items: stretch; }
  .admin-shipment #status-form, .delivery-card { padding: 16px; }
}
.date-picker-control { display: flex; align-items: stretch; gap: 8px; }
.date-picker-control input { flex: 1; min-width: 0; }
.calendar-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 12px; border: 1px solid #e6b78f; border-radius: 8px; background: white; color: var(--ink); font-size: 13px; font-weight: 600; }
.calendar-button:hover { background: #ffeddc; border-color: var(--signal); }
@media (max-width: 380px) { .calendar-button span { display: none; } }
.admin-shipment .estimated-delivery-fact { grid-column: span 2; }
.estimated-delivery-fact .date-picker-control { max-width: 360px; margin-top: 6px; }
.date-autosave-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
.estimated-delivery-fact #delivery-date-result { font-size: 12px; margin: 6px 0 0; }
.estimated-delivery-fact #delivery-date-result:empty { display: none; }
/* Apply the same shipment typography to existing and new tracking results. */
.public-shipment-sheet, .public-tracking-history { text-transform: uppercase; }
.shipment-brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shipment-brand-lockup > img { display: block; flex-shrink: 0; width: 48px; height: 48px; }
.shipment-brand-lockup .sheet-brand { padding-right: 0; }
@media (max-width: 380px) {
  .shipment-brand-lockup { gap: 10px; }
  .shipment-brand-lockup > img { width: 40px; height: 40px; }
}
/* Public tracking: a consistent shipment document with aligned barcode label. */
.public-shipment-sheet { max-width: 860px; border: 1px solid #e1e7ef; border-radius: 16px; padding: 28px; color: #243c56; line-height: 1.55; box-shadow: 0 8px 28px rgba(11,37,69,.05); }
#results-inner > .journey-card, .public-tracking-history { max-width: 860px; }
.public-shipment-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #e9edf3; }
.public-shipment-sheet .sheet-brand { color: #173653; font-size: 21px; line-height: 1.4; }
.public-shipment-sheet .sheet-brand span { color: #7b8998; font-size: 9px; margin-top: 4px; letter-spacing: 1.4px; }
.public-shipment-sheet .sheet-tracking { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 250px; max-width: 100%; flex: 0 1 250px; margin: 0; text-align: center; color: #173653; }
.public-shipment-sheet .sheet-barcode { display: block; width: 100%; max-width: 250px; height: 48px; margin: 0; }
.public-shipment-sheet .sheet-tracking > div { width: 100%; margin: 0; text-align: center; font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: 14px; font-weight: 650; line-height: 1.4; letter-spacing: 1px; overflow-wrap: anywhere; }
.public-shipment-sheet .sheet-status { text-align: left; background: #edf4fc; color: #185b91; border: 1px solid #dbe8f8; border-radius: 8px; font-size: 12px; font-weight: 650; padding: 12px 16px; margin: 0 0 24px; }
.public-contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 24px; }
.public-shipment-sheet .public-contact-grid .sheet-section { border: 1px solid #e1e7ef; border-radius: 10px; padding: 18px; margin: 0; min-width: 0; }
.public-shipment-sheet .sheet-section h2 { color: #173653; font-size: 14px; font-weight: 650; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid #e9edf3; }
.public-shipment-sheet .sheet-contact p { font-size: 12px; color: #536477; margin-bottom: 8px; }
.public-shipment-sheet .sheet-contact p:first-child { font-size: 14px; color: #173653; font-weight: 650; }
.public-shipment-sheet .sheet-contact p:last-child { margin-bottom: 0; }
.public-shipment-information { margin: 0; }
.public-shipment-sheet .sheet-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; }
.public-shipment-sheet .sheet-facts > div { padding: 14px 0; margin: 0; border-bottom: 1px solid #edf1f5; min-width: 0; }
.public-shipment-sheet .sheet-facts dt { color: #7b8998; font-size: 11px; font-weight: 500; margin-bottom: 6px; }
.public-shipment-sheet .sheet-facts dd { color: #243c56; font-size: 13px; font-weight: 600; white-space: normal; }
@media (max-width: 640px) {
  .public-shipment-sheet { padding: 20px 16px; border-radius: 12px; }
  .public-shipment-header { flex-direction: column; align-items: flex-start; gap: 24px; }
  .public-shipment-sheet .sheet-tracking { align-self: center; flex: 0 1 auto; }
  .public-contact-grid { grid-template-columns: 1fr; gap: 14px; }
  .public-shipment-sheet .sheet-facts { gap: 0 16px; }
}
@media (max-width: 360px) { .public-shipment-sheet .sheet-facts { grid-template-columns: 1fr; } }
