:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;

  /* Status colors matching Customer App */
  --st-pending-bg: #f1f5f9;
  --st-pending-fg: #475569;
  --st-pending-bd: #cbd5e1;

  --st-received-bg: #fef3c7;
  --st-received-fg: #b45309;
  --st-received-bd: #fcd34d;

  --st-shipping-bg: #dbeafe;
  --st-shipping-fg: #1d4ed8;
  --st-shipping-bd: #93c5fd;

  --st-delivered-bg: #dcfce7;
  --st-delivered-fg: #15803d;
  --st-delivered-bd: #86efac;

  --st-cancelled-bg: #fee2e2;
  --st-cancelled-fg: #b91c1c;
  --st-cancelled-bd: #fca5a5;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-only {
  display: none !important;
}

/* ================= TOP BAR (STICKY) ================= */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.top-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  background: #0f172a;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 9px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.brand-text h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.direction-toggle {
  display: inline-flex;
  background: var(--bg);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dir-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dir-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.role-select {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Search + Status Row (Desktop: 1 horizontal line) */
.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 105px 0 42px;
  border: 2px solid var(--border-strong);
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.quick-match-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 7px;
  border-radius: 6px;
  pointer-events: none;
}

.btn-clear-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.status-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.status-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.status-chip .chip-count {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.15);
}

.status-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-export {
  background: #15803d;
  color: #fff;
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn-export:hover {
  background: #166534;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--surface-muted);
}

.btn-ghost {
  background: transparent;
  color: #cbd5e1;
}

.btn-ghost:hover {
  color: #fff;
}

.btn-warning {
  background: #d97706;
  color: #fff;
}

/* ================= MAIN CONTENT ================= */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 20px 100px;
}

.list-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ================= DESKTOP TABLE ================= */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.orders-table th {
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.orders-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13.5px;
}

.orders-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.orders-table tbody tr:hover {
  background: #f8fafc;
}

.orders-table tbody tr.row-selected {
  background: #eff6ff;
}

.orders-table tbody tr.row-active {
  background: #e0ecff;
}

.col-check {
  width: 42px;
  text-align: center;
}

.orders-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.code-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thumb-btn {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: #f1f5f9;
  cursor: zoom-in;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mono-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.domestic-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dir-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: middle;
}

.dir-vn-kr {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.dir-kr-vn {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.receiver-name {
  font-weight: 600;
}

.receiver-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pccc-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  color: #334155;
}

.goods-cell-desc {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.warning-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.warn-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}

.warn-fragile {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.warn-food {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.warn-cosmetic {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.weight-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
}

.fee-val {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Status Pills (Exact match to App) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-PENDING {
  background: var(--st-pending-bg);
  color: var(--st-pending-fg);
  border-color: var(--st-pending-bd);
}

.status-RECEIVED {
  background: var(--st-received-bg);
  color: var(--st-received-fg);
  border-color: var(--st-received-bd);
}

.status-SHIPPING {
  background: var(--st-shipping-bg);
  color: var(--st-shipping-fg);
  border-color: var(--st-shipping-bd);
}

.status-DELIVERED {
  background: var(--st-delivered-bg);
  color: var(--st-delivered-fg);
  border-color: var(--st-delivered-bd);
}

.status-CANCELLED {
  background: var(--st-cancelled-bg);
  color: var(--st-cancelled-fg);
  border-color: var(--st-cancelled-bd);
}

/* ================= MOBILE 3-LINE CARDS ================= */
.cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.order-card:active {
  background: #f8fafc;
}

.card-line-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-code-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-line-2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-line-3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

/* ================= BULK ACTION BAR ================= */
.bulk-action-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 18px;
}

.bulk-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.bulk-count-badge {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}

.bulk-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-select {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* ================= SIDE DRAWER (40% PC / FULL-SCREEN SHEET MOBILE) ================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 50;
}

.order-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40vw;
  min-width: 440px;
  max-width: 620px;
  background: var(--surface);
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  animation: slideInRight 0.2s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.drawer-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
}

.drawer-code-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mono-code-lg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.drawer-submeta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-icon-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.conflict-banner {
  background: #fef3c7;
  border-bottom: 1px solid #f59e0b;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #92400e;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface);
}

.section-highlight {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #1e293b;
}

/* Block 1: Photos & Goods */
.photo-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.photo-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.photo-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.photo-thumb-btn {
  position: relative;
  width: 100%;
  height: 120px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  cursor: zoom-in;
}

.photo-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zoom-hint {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
}

.photo-placeholder {
  height: 120px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-muted);
}

.goods-info-box {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
}

.goods-desc {
  margin: 6px 0;
  font-size: 14px;
  font-weight: 600;
}

.goods-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Block 2: Weight, Fee, Status */
.unit-price-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: #dbeafe;
  color: #1e40af;
  padding: 3px 8px;
  border-radius: 6px;
}

.weight-fee-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
  margin-bottom: 14px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-group label, .block-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-with-unit {
  position: relative;
}

.input-xl {
  width: 100%;
  height: 52px;
  padding: 0 38px 0 14px;
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  background: #fff;
}

.input-xl:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.mono-input {
  font-family: 'JetBrains Mono', monospace;
}

.input-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 14px;
}

.field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-link-xs {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.status-picker-wrap {
  margin-bottom: 14px;
}

.status-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.status-pick-btn {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: all 0.15s ease;
}

.status-pick-btn.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-gray { background: #64748b; }
.dot-amber { background: #f59e0b; }
.dot-blue { background: #3b82f6; }
.dot-green { background: #22c55e; }

.input-md {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 9px;
  font-size: 14px;
  background: #fff;
}

.input-md:focus {
  outline: none;
  border-color: var(--primary);
}

.internal-badge {
  font-size: 10.5px;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.secondary-danger-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-link-muted {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}

.btn-link-muted:hover {
  color: var(--text);
}

.btn-cancel-order {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.btn-cancel-order:hover {
  background: #fee2e2;
}

/* Block 3: Contact & Copy */
.contact-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.contact-card:last-child {
  margin-bottom: 0;
}

.contact-card-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.copy-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
}

.copy-row-text {
  min-width: 0;
  word-break: break-word;
}

.copy-row-label {
  color: var(--text-muted);
  font-size: 12px;
  margin-right: 4px;
}

.btn-copy-mini {
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-copy-mini:hover {
  background: #f1f5f9;
}

.sender-info-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #16a34a;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
}

/* Audit Log */
.audit-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface-muted);
  font-size: 12.5px;
}

.audit-details summary {
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.audit-count {
  background: #e2e8f0;
  color: #334155;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}

.audit-list {
  list-style: none;
  padding: 8px 0 0;
  margin: 8px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audit-list li {
  font-size: 12px;
  color: #475569;
}

/* Sticky Drawer Footer */
.drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.btn-save-main {
  width: 100%;
  height: 52px;
  font-size: 15.5px;
  font-weight: 700;
  border-radius: 12px;
}

/* ================= LIGHTBOX ================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.lightbox-caption {
  margin-top: 12px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
}

/* ================= EMPTY STATE & TOAST ================= */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid #3b82f6;
}

.toast-success { border-left-color: #22c55e; }
.toast-warning { border-left-color: #f59e0b; }

/* ================= RESPONSIVE MOBILE (<= 768px) ================= */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .top-bar-inner {
    padding: 10px 12px;
    gap: 8px;
  }

  .brand-sub {
    display: none;
  }

  .direction-toggle {
    display: none;
  }

  .role-select {
    font-size: 11.5px;
    max-width: 170px;
  }

  .search-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .search-box-wrap {
    max-width: none;
    min-width: 0;
  }

  .search-input {
    height: 48px;
    font-size: 15.5px;
    padding-right: 42px;
  }

  .quick-match-badge {
    display: none;
  }

  .mobile-dir-row {
    gap: 6px;
  }

  .dir-pill {
    flex: 1;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .dir-pill.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
  }

  .status-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .status-filters::-webkit-scrollbar {
    display: none;
  }

  .main-content {
    padding: 12px 12px 80px;
  }

  /* Full-screen Bottom Sheet on Mobile */
  .order-drawer {
    width: 100vw;
    min-width: 0;
    max-width: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    animation: slideUpSheet 0.22s ease-out;
  }

  .drawer-body {
    padding: 12px 12px 24px;
  }

  .weight-fee-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 10px;
  }

  .input-xl {
    height: 56px;
    font-size: 24px;
  }

  .status-pick-btn {
    min-height: 54px;
    font-size: 13.5px;
  }

  .btn-save-main {
    height: 56px;
    font-size: 16px;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ================= CLOUD LOGIN MODAL ================= */
.cloud-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
