.logistics-kpis { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 12px; padding: 18px 24px 0; }
.logistics-kpis article { display: flex; align-items: center; justify-content: space-between; min-height: 74px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.logistics-kpis span { color: var(--muted); font-size: 13px; }
.logistics-kpis strong { color: var(--accent); font-size: 28px; }
.logistics-kpis .warning strong { color: #b33b2e; }
.logistics-toolbar { display:grid; grid-template-columns:165px minmax(0,1fr); align-items:start; gap:12px; }
.logistics-toolbar-title { padding-top:3px; }
.logistics-filter-actions { display:grid; grid-template-columns:minmax(280px,2fr) repeat(5,minmax(105px,1fr)); gap:7px; width:100%; }
.logistics-filter-actions .product-search-form { display:grid; grid-template-columns:minmax(190px,1fr) auto; gap:6px; margin:0; }
.logistics-filter-actions input,.logistics-filter-actions select,.logistics-filter-actions button { width:100%; min-width:0; min-height:36px; height:36px; padding:6px 9px; }
.logistics-filter-actions .checkbox { display:flex; align-items:center; gap:6px; min-height:36px; padding:0 8px; white-space:nowrap; }
.logistics-filter-actions .checkbox input { width:auto; height:auto; min-height:0; }
.logistics-workspace { grid-template-columns: minmax(680px, 1.15fr) minmax(520px, .85fr); }
.logistics-detail-panel { max-height: calc(100vh - 220px); overflow: auto; }
.logistics-sheet { min-width: 0; }
.logistics-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--accent); }
.logistics-detail-header h2 { margin: 3px 0; }
.logistics-detail-list { grid-template-columns: 120px minmax(0, 1fr) 120px minmax(0, 1fr); gap:0; border-top:1px solid #ccd6de; border-left:1px solid #ccd6de; }
.logistics-detail-list dt, .logistics-detail-list dd { min-height:38px; margin:0; padding:9px 10px; border-right:1px solid #ccd6de; border-bottom:1px solid #ccd6de; white-space:pre-wrap; overflow-wrap:anywhere; }
.logistics-detail-list dt { color:#315f7d; background:#edf3f7; font-weight:700; }
.logistics-detail-list dd { color:#18242d; background:#fff; }
.logistics-list-panel { padding:10px; }
.logistics-list-tools { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-bottom:7px; }
.column-chooser { position:relative; }
.column-chooser summary { list-style:none; cursor:pointer; padding:6px 10px; }
.column-chooser summary::-webkit-details-marker { display:none; }
.column-chooser-menu { position:absolute; z-index:8; right:0; top:calc(100% + 5px); display:grid; grid-template-columns:repeat(2,minmax(120px,1fr)); gap:5px; width:290px; padding:10px; border:1px solid var(--border); border-radius:9px; background:var(--surface); box-shadow:var(--shadow-md); }
.column-chooser-menu label { display:flex; align-items:center; gap:6px; font-size:12px; }
.column-chooser-menu input { width:auto; }
.logistics-list-table { width:max-content; min-width:100%; }
.logistics-list-table th,.logistics-list-table td { height:38px; max-width:145px; padding:6px 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.25; }
.logistics-list-table th[data-column="number"],.logistics-list-table td[data-column="number"] { min-width:135px; }
.logistics-list-table th[data-column="customer"],.logistics-list-table td[data-column="customer"] { min-width:88px; max-width:110px; }
.logistics-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.logistics-timeline { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); margin: 0; padding: 18px 4px 8px; list-style: none; overflow-x: auto; }
.logistics-timeline li { position: relative; min-width: 90px; padding: 24px 6px 0; text-align: center; }
.logistics-timeline li::before { content: ""; position: absolute; z-index: 2; top: 1px; left: calc(50% - 8px); width: 16px; height: 16px; border: 3px solid #b8c1c9; border-radius: 50%; background: #fff; }
.logistics-timeline li::after { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: #ccd3d9; }
.logistics-timeline li:first-child::after { display: none; }
.logistics-timeline li.complete::before { border-color: #237a55; background: #237a55; }
.logistics-timeline li.complete::after { background: #237a55; }
.logistics-timeline strong, .logistics-timeline span { display: block; }
.logistics-timeline strong { font-size: 12px; }
.logistics-timeline span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.logistics-chip-list, .logistics-option-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.logistics-chip { padding: 6px 9px; border: 1px solid #b8c9d8; border-radius: 999px; color: #315a79; background: #eef6fb; font-size: 12px; }
.logistics-option-list { align-content: flex-start; max-height: 170px; overflow-y: auto; }
.logistics-alert-list { display: grid; gap: 8px; padding-top: 10px; }
.logistics-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-left: 4px solid #d19c35; border-radius: 6px; background: #fff9e9; }
.logistics-alert p { margin: 3px 0 0; }
.logistics-alert.critical { border-color: #b33b2e; background: #fff0ee; }
.logistics-alert.info { border-color: #38799e; background: #edf7fc; }
.logistics-alert.resolved { border-color: #8a969f; background: #f2f4f5; opacity: .75; }
.history-list article { padding: 9px 2px; border-bottom: 1px solid var(--border); }
.history-list p { margin: 3px 0 0; }
#lifecycle-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.status-text.delayed { color: #a32e26; font-weight: 700; }
.status-badge.booked, .status-badge.loading, .status-badge.departed { background: #edf6ff; color: #215f8a; }
.status-badge.in_transit { background: #eef0ff; color: #4a4c9b; }
.status-badge.customs_clearance { background: #fff5d8; color: #7c5b13; }
.status-badge.delivered { background: #e8f7ef; color: #176440; }
.status-badge.cancelled { background: #f1f1f1; color: #666; }
.logistics-dialog { width: min(1180px, 96vw); }
.logistics-dialog .package-table input, .logistics-dialog .package-table select { min-width: 95px; }
.logistics-dialog .package-table .document-path { min-width: 240px; }
.loading-dialog { width: min(1500px, 98vw); }
.loading-container-editor { margin-bottom:12px; padding:10px; border:1px solid #b9cedc; border-radius:9px; background:#f5f9fb; }
.loading-container-editor .package-table { min-width:760px; }
.loading-container-editor input { min-width:90px; padding:6px 8px; }
.loading-container-editor .loading-container-no,.loading-container-editor .loading-container-seal { min-width:145px; }
.loading-table-wrap { max-height: 68vh; }
.loading-table { min-width: 1380px; }
.loading-table td { vertical-align: top; }
.loading-table td:first-child strong, .loading-table td:first-child span { display: block; min-width: 150px; }
.loading-table input, .loading-table select { min-width: 86px; }
.loading-table .loading-actual { min-width: 105px; font-weight: 700; }
.loading-table tr.has-variance { background: #fff9e9; }
.loading-variance-text, .variance-notice { color: #a65f00; font-weight: 700; }
.variance-notice, .loading-confirm { display: block; min-width: 150px; }
.loading-confirm { margin-top: 8px; }
.loading-allocation-list { display: grid; min-width: 370px; gap: 7px; }
.loading-allocation { display: grid; grid-template-columns: 145px repeat(5, 78px) 34px; gap: 5px; align-items: center; }
.loading-allocation input, .loading-allocation select { min-width: 0; width: 100%; }
.loading-help { margin: 12px 0 0; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .logistics-workspace, .logistics-detail-panel { display: block !important; padding: 0; max-height: none; overflow: visible; }
  .logistics-detail-panel { border: 0; box-shadow: none; }
  .logistics-sheet { font-size: 9pt; }
  .logistics-sheet .package-detail, .logistics-timeline { break-inside: avoid; }
}

@media (max-width: 1050px) {
  .logistics-kpis { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .logistics-workspace { grid-template-columns: 1fr; }
  .logistics-detail-panel { max-height: none; }
  .logistics-toolbar { grid-template-columns:1fr; }
  .logistics-filter-actions { grid-template-columns:repeat(3,minmax(130px,1fr)); }
}

@media (max-width: 760px) {
  .logistics-kpis, .logistics-two-columns { grid-template-columns: 1fr; }
  .logistics-detail-list { grid-template-columns: 105px 1fr; }
  .logistics-filter-actions { grid-template-columns:1fr 1fr; }
  .logistics-filter-actions .product-search-form { grid-column:1/-1; }
}
.loading-release-panel{border:1px solid #bfd6e5;background:#f3f8fb}.loading-release-panel .section-heading{align-items:flex-start}.loading-release-panel .status-badge.released{background:#e8f5ed;color:#167647}.loading-release-panel .status-badge.blocked{background:#fee4e2;color:#b42318}.release-request-detail{margin-top:7px;color:#475467;font-size:12px;line-height:1.55}.loading-release-panel .detail-actions{margin-top:7px}
