*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.orders-page {
  height: 100vh;
  overflow: hidden;
}

/* HEADER */
.header {
  background: #1e40af;
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-left svg { width: 22px; height: 22px; fill: #93c5fd; }
.header-title { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.header-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.header-user { color: #bfdbfe; }
.header-link {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  background: rgba(255,255,255,.15);
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.header-link:hover { background: rgba(255,255,255,.22); }
.header-link.muted {
  background: transparent;
  opacity: .88;
  padding-left: 0;
  padding-right: 0;
}
.header-link.muted:hover {
  background: transparent;
  opacity: 1;
}
.header-link.active { background: rgba(255,255,255,.22); }
.btn-logout {
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  padding: 6px 14px; border-radius: 6px;
  font-size: 13px; cursor: pointer;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.25); }

/* TOOLBAR */
.toolbar {
  padding: 16px 8px;
  display: flex;
  align-items: center;
  column-gap: 6px;
  row-gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}
.toolbar .search-box { order: 20; }
.toolbar #btnShipments { order: 21; }
.toolbar #btnToggleReceived { order: 22; }
.toolbar #btnExport { order: 23; }
.toolbar label[for="importFile"] { order: 24; }
.toolbar #btnBackup { order: 25; }
.toolbar label[for="restoreFile"] { order: 26; }
.toolbar #btnToggleResize { order: 27 !important; }
.toolbar #filtersBar {
  order: 28 !important;
  flex: 0 0 auto;
  margin-left: 0;
  white-space: nowrap;
}
.btn-primary {
  background: #2563eb; color: #fff;
  border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  justify-content: center;
  transition: background .15s;
  white-space: nowrap;
}
.toolbar #btnAdd {
  width: 170px;
  height: 38px;
  padding: 0 14px;
  line-height: 1;
  position: relative;
  justify-content: center;
}
.toolbar #btnAdd svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary {
  background: #fff; color: #374151;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: all .15s; white-space: nowrap;
}
.btn-secondary:hover { border-color: #2563eb; color: #2563eb; }
.btn-secondary.header-btn {
  padding: 6px 12px;
  font-size: 13px;
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #fff;
}
.btn-secondary.header-btn:hover {
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.2);
  color: #fff;
}
.search-box {
  flex: 0 1 200px;
  min-width: 200px;
  max-width: 200px;
  display: flex; align-items: center;
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 8px; padding: 0 12px; gap: 8px;
}
.search-box svg { width: 16px; height: 16px; fill: #94a3b8; flex-shrink: 0; }
.search-box input {
  border: none; outline: none; background: transparent;
  font-size: 14px; color: #1e293b; width: 100%; padding: 9px 0;
}

/* TABLE WRAPPER */
.table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
  padding: 0 8px 24px 8px;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #94a3b8 #e2e8f0;
}
.table-wrap::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.table-wrap::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 999px;
}
.table-wrap::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border: 3px solid #e2e8f0;
  border-radius: 999px;
}
.table-wrap::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  font-size: 13.5px;
  table-layout: fixed;
}
body.orders-page table {
  min-width: 1900px;
}
thead {
  background: #1e40af;
  color: #fff;
  position: relative;
  z-index: 2;
}
th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  border-right: 2px solid rgba(255,255,255,.5);
  position: sticky;
  top: 0;
  z-index: 30;
  background: #1e40af;
  overflow: hidden;
}
.col-resize-handle {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 2;
}
.col-resize-handle:hover,
.col-resizing .col-resize-handle { background: rgba(255,255,255,.45); }
th:last-child { border-right: none; }
th:nth-child(12), td:nth-child(12),
th:nth-child(13), td:nth-child(13) {
  white-space: nowrap;
}
td {
  padding: 5px 14px;
  height: 36px;
  line-height: 1;
  border-bottom: 1px solid #cbd5e1;
  border-right: 2px solid #cbd5e1;
  color: #374151;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
td:last-child { border-right: none; }
td.cell-paid-full { background: #a7f3c0 !important; }
td.cell-paid-full .badge { background: transparent; color: #374151; }
tr:hover td.cell-paid-full { background: #86efac !important; }
td.cell-paid-partial,
tr.row-received td.cell-paid-partial { background: #fef9c3 !important; }
td.cell-paid-partial .badge { background: transparent; color: #374151; }
tr:hover td.cell-paid-partial { background: #fef08a !important; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #eff6ff; }
tr.row-arrived td:nth-child(-n+13) { background: #fef9c3; }
tr.row-arrived:hover td:nth-child(-n+13) { background: #fef08a; }
tr.row-received td { background: #a7f3c0; }
tr.row-received:hover td { background: #86efac; }
tr.row-temporary td { background: #fff7ed; }
tr.row-temporary:hover td { background: #ffedd5; }
tr.row-new-item td { background: #fff7ed; }
tr.row-new-item:hover td { background: #ffedd5; }
tr.row-selected td { box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.12); }
tr.row-highlight td {
  outline: 2px solid #fb923c;
  outline-offset: -2px;
}


td.editable { cursor: pointer; }
td.editable:hover {
  background: #dbeafe !important;
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}
td.editing {
  padding: 4px !important;
  background: #fff !important;
  outline: 2px solid #2563eb !important;
  outline-offset: -2px;
}
td.editing input {
  width: 100%; border: none; outline: none;
  font-size: 13.5px; font-family: inherit;
  color: #1e293b; background: transparent;
  padding: 6px 8px;
}

.td-name { max-width: 220px; white-space: normal; word-break: break-word; }
.td-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}
.td-actions > button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.bulk-select {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563eb;
}
.shipment-summary-row td.td-actions {
  display: table-cell !important;
  vertical-align: middle !important;
  text-align: center !important;
  white-space: nowrap;
  overflow: hidden;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.shipment-actions-merged {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  width: 100%;
  margin: 0 auto;
}
.shipment-actions-merged > button {
  width: 32px;
  height: 32px;
  margin: 0;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.action-btn {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.action-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.action-btn-icon {
  min-width: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.action-btn-danger {
  border-color: #fca5a5;
  color: #dc2626;
}
.action-btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}
.action-btn-primary {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}
.action-btn-primary:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.btn-edit, .btn-delete, .btn-history {
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.btn-edit { background: #eff6ff; color: #2563eb; }
.btn-edit:hover { background: #dbeafe; }
.btn-delete { background: #fff1f2; color: #e11d48; }
.btn-delete:hover { background: #ffe4e6; }
.btn-history { background: #f0fdf4; color: #16a34a; }
.btn-history:hover { background: #dcfce7; }

/* HISTORY */
.history-entry {
  border-bottom: 1px solid #f1f5f9;
  padding: 12px 0;
}
.history-entry:last-child { border-bottom: none; }
.history-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.history-action { font-size: 13px; font-weight: 600; color: #1e293b; }
.history-user { font-size: 12px; color: #2563eb; background: #eff6ff; padding: 2px 8px; border-radius: 10px; }
.history-time { font-size: 12px; color: #94a3b8; margin-left: auto; }
.history-change {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 4px 0;
}
.history-field { color: #64748b; min-width: 130px; font-size: 12px; }
.history-old { color: #e11d48; text-decoration: line-through; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-arrow { color: #94a3b8; }
.history-new { color: #16a34a; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
  color: #374151;
}
.orders-page td[data-field="payment"] .badge,
.orders-page td[data-shipment-field="paid_amount"] .badge {
  font-size: 13.5px;
}
.badge-green { background: #a7f3c0; }
.badge-red { background: #fee2e2; }
.badge-gray { background: #f1f5f9; }
.badge-orange { background: #fed7aa; color: #9a3412; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }

.shipment-inline-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 700;
}
.shipment-summary-row {
  background: #f0f9ff;
}
.shipment-summary-row td {
  border-bottom-color: #bae6fd;
}
.shipment-row-products {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}
.shipment-row-note {
  margin-top: 4px;
  color: #075985;
  font-size: 11px;
  font-weight: 700;
}

/* SORTING */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { background: #1e3a8a; }
th.sortable::after { content: ' ⇅'; opacity: .4; font-size: 11px; }
th.sort-asc::after  { content: ' ▲'; opacity: 1; }
th.sort-desc::after { content: ' ▼'; opacity: 1; }

/* FILTERS */
.filters-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 24px 12px;
  background: #fff; border-bottom: 1px solid #e2e8f0;
}
.toolbar .filters-bar {
  padding: 0;
  background: transparent;
  border-bottom: 0;
  gap: 6px;
  flex-wrap: nowrap;
}
.toolbar .filters-bar .filter-group {
  white-space: nowrap;
}
.toolbar .filters-bar .btn-reset-filters {
  margin-left: 0;
}
.filter-group { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #64748b; }
.filter-group input[type="date"],
.filter-group select {
  border: 1px solid #e2e8f0; border-radius: 7px;
  padding: 6px 10px; font-size: 13px; color: #1e293b;
  background: #f8fafc; outline: none;
}
.filter-group input[type="date"]:focus,
.filter-group select:focus { border-color: #2563eb; background: #fff; }
.btn-active { background: #dbeafe !important; color: #1d4ed8 !important; border: 1px solid #93c5fd !important; }

.btn-reset-filters {
  border: none; background: #f1f5f9; color: #64748b;
  border-radius: 7px; padding: 6px 12px; font-size: 13px;
  cursor: pointer; transition: all .15s; margin-left: auto;
}
.btn-reset-filters:hover { background: #e2e8f0; color: #1e293b; }

.temp-panel {
  margin: 14px 24px 0;
  padding: 16px 18px;
  border: 1px solid #fdba74;
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 100%);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.temp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.temp-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #9a3412;
}
.temp-panel-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #7c2d12;
}
.temp-panel-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.temp-item {
  background: rgba(255,255,255,.78);
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px 14px;
}
.temp-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
}
.temp-item-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #78716c;
}
.temp-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.temp-item-actions .btn-secondary,
.temp-item-actions .btn-primary {
  font-size: 12px;
  padding: 7px 10px;
}
.temp-bind-box {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
}
.temp-bind-box-title {
  font-size: 12px;
  font-weight: 700;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.temp-bind-box-name {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}
.temp-bind-box-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #78716c;
  line-height: 1.45;
}

/* FOOTER */
.footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 14px 24px;
  display: flex; gap: 32px;
  font-size: 13px; color: #64748b;
  flex-wrap: wrap;
}
.footer-stat strong { color: #1e293b; font-size: 15px; }

/* MODAL */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,.3);
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 20px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border: none; background: #f1f5f9;
  border-radius: 8px; cursor: pointer; font-size: 18px; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: #e2e8f0; }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex; justify-content: flex-end; gap: 10px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 600; color: #374151; }
.form-group input {
  padding: 9px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 7px; font-size: 14px; color: #1e293b; outline: none;
  transition: border-color .15s;
}
.form-group input:focus { border-color: #2563eb; }
.section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: #94a3b8;
  margin: 8px 0 2px; grid-column: 1/-1;
}
.btn-save {
  background: #2563eb; color: #fff;
  border: none; border-radius: 8px;
  padding: 10px 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.btn-save:hover { background: #1d4ed8; }
.btn-cancel {
  background: #f8fafc; color: #64748b;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 10px 20px; font-size: 14px;
  cursor: pointer; transition: all .15s;
}
.btn-cancel:hover { border-color: #94a3b8; color: #374151; }

/* CONFIRM */
.confirm-modal { max-width: 380px; }
.confirm-modal .modal-body { text-align: center; padding: 28px 24px; }
.confirm-modal .modal-body p { color: #64748b; margin-top: 8px; font-size: 14px; }
.btn-danger {
  background: #e11d48; color: #fff;
  border: none; border-radius: 8px;
  padding: 10px 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.btn-danger:hover { background: #be123c; }

/* SHIPMENTS */
.shipments-modal { max-width: 1040px; }
.shipments-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
}
.shipments-side {
  border-right: 1px solid #e2e8f0;
  padding-right: 16px;
}
.shipments-list,
.shipment-orders {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shipments-list {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}
.shipment-orders {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.shipment-card,
.shipment-order {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}
.shipment-card.active,
.shipment-order.selected {
  border-color: #0284c7;
  background: #f0f9ff;
}
.shipment-order {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.shipment-order.locked {
  opacity: .58;
  cursor: not-allowed;
}
.shipment-order input { margin-top: 3px; }
.shipment-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: #1e293b;
}
.shipment-card-sub,
.shipment-order-sub {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}
.shipment-card-diff {
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}
.shipment-card-diff.ok { color: #15803d; }
.shipment-card-diff.over { color: #0369a1; }
.shipment-card-diff.under { color: #be123c; }
.shipment-card-diff.neutral { color: #64748b; }
.shipment-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.shipment-card-actions .btn-secondary,
.shipment-card-actions .btn-delete {
  padding: 6px 10px;
  font-size: 12px;
}
.shipment-summary {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0f9ff;
  color: #075985;
  font-size: 13px;
  font-weight: 700;
}
.shipment-empty {
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 13px;
}

/* USERS MODAL */
.users-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.user-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #f8fafc; border-radius: 8px;
}
.user-row-info { font-size: 14px; }
.user-row-info span { color: #94a3b8; font-size: 12px; }

.empty-state {
  text-align: center; padding: 60px 20px; color: #94a3b8;
}
.empty-state svg { width: 48px; height: 48px; fill: #e2e8f0; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

.hidden { display: none !important; }

/* Reminder banner */
.reminder-banner {
  background: #fef3c7;
  border-bottom: 2px solid #f59e0b;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: #92400e;
}
.reminder-content { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.reminder-icon { font-size: 18px; flex-shrink: 0; }
.reminder-content strong { margin-right: 6px; }
.reminder-item {
  display: inline-block;
  background: #fff;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 2px;
  font-size: 13px;
  cursor: pointer;
}
.reminder-item:hover { background: #fffbeb; }
.reminder-item.overdue { border-color: #ef4444; color: #dc2626; }
.reminder-close {
  background: none; border: none;
  font-size: 16px; color: #92400e;
  cursor: pointer; padding: 4px 8px;
  border-radius: 6px; flex-shrink: 0;
}
.reminder-close:hover { background: #fde68a; }

td.cell-shipping-overdue { background: #f87171 !important; color: #7f1d1d !important; font-weight: 600; }
td.cell-shipping-today   { background: #fca5a5 !important; color: #991b1b !important; font-weight: 600; }
td.cell-shipping-soon    { background: #fed7aa !important; color: #9a3412 !important; font-weight: 600; }
tr:hover td.cell-shipping-overdue { background: #ef4444 !important; }
tr:hover td.cell-shipping-today   { background: #f87171 !important; }
tr:hover td.cell-shipping-soon    { background: #fdba74 !important; }

/* Toast */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Autocomplete */
.autocomplete-wrap { position: relative; }
.autocomplete-dropdown {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1.5px solid #2563eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 10px;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: #eff6ff; }
.autocomplete-item img {
  width: 36px; height: 36px;
  object-fit: cover; border-radius: 5px; flex-shrink: 0;
}
.autocomplete-item-info { flex: 1; min-width: 0; }
.autocomplete-item-name {
  font-weight: 500; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.autocomplete-item-sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }

/* Import label */
.import-label {
  background: #fff; color: #374151;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: all .15s; white-space: nowrap;
}
.import-label:hover { border-color: #2563eb; color: #2563eb; }
