:root {
  --bg: #f0f2f5;
  --card: #fff;
  --primary: #1a5fb4;
  --primary-dark: #0d4a8f;
  --text: #1a1a1a;
  --muted: #666;
  --border: #e8e8e8;
  --danger: #c01c28;
  --success: #2ec27e;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --kpi-good: #059669;
  --kpi-good-bg: #ecfdf5;
  --kpi-good-border: #a7f3d0;
  --kpi-info: #2563eb;
  --kpi-info-bg: #eff6ff;
  --kpi-info-border: #bfdbfe;
  --kpi-warn: #d97706;
  --kpi-warn-bg: #fffbeb;
  --kpi-warn-border: #fde68a;
  --kpi-danger: #dc2626;
  --kpi-danger-bg: #fef2f2;
  --kpi-danger-border: #fecaca;
  --kpi-neutral: #475569;
  --kpi-neutral-bg: #f8fafc;
  --kpi-neutral-border: #e2e8f0;
  --kpi-muted: #94a3b8;
  --kpi-muted-bg: #f1f5f9;
  --kpi-muted-border: #e2e8f0;
  --kpi-fresh: #0891b2;
  --kpi-fresh-bg: #ecfeff;
  --kpi-fresh-border: #a5f3fc;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

.view { min-height: 100vh; padding-bottom: 24px; }

.view-customers-page {
  height: 100vh;
  padding-bottom: 0;
  overflow: hidden;
}

.customers-page-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.customers-page-scroll .list {
  padding-bottom: 24px;
}

.customers-collapsible-header {
  background: var(--bg);
}

.customers-topbar {
  position: relative;
  z-index: 1;
}

.customers-sticky-header {
  background: var(--bg);
}

.customers-sticky-header.filters-collapsed .filter-body,
#customer-filter-body.hidden {
  display: none;
}

.customers-sticky-header:not(.filters-collapsed) .filter-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar span { font-weight: 600; font-size: 17px; }

.topbar-centered {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}

.topbar-centered .btn-back {
  grid-column: 1;
  justify-self: start;
}

.topbar-centered .topbar-title {
  grid-column: 2;
  text-align: center;
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-back, .btn-text {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}

.stale-data-banner {
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff3cd;
  color: #856404;
  font-size: 13px;
  line-height: 1.4;
}

.stale-data-banner .btn-link {
  background: none;
  border: none;
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.brand {
  text-align: center;
  padding: 48px 24px 24px;
}

.brand-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 16px;
  display: block;
}

.brand h1 { font-size: 28px; color: var(--primary); }
.brand p { color: var(--muted); margin-top: 8px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 16px;
  box-shadow: var(--shadow);
}

.card h3 { font-size: 15px; margin-bottom: 12px; color: var(--muted); }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: #fafafa;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:active { background: var(--primary-dark); }
.btn.secondary { background: #e8eef5; color: var(--primary); }
.btn.ghost {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid #c5d0e0;
}
.btn.ghost:active { background: #f0f4fa; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:active { opacity: 0.9; }
.danger-zone { border: 1px solid rgba(192, 28, 40, 0.25); }
.profile-form .profile-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.profile-form input { width: 100%; margin-top: 4px; }
.btn:disabled,
.btn.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.small { padding: 8px 14px; font-size: 13px; white-space: nowrap; }
.btn.block { width: 100%; margin-top: 8px; }

.search-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
}

.search-bar input { flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }

.search-bar .btn.small { flex-shrink: 0; }

.customer-select-list {
  min-height: 140px;
  font-size: 15px;
  background: #fafafa;
}

.pick-list .list-item.selected {
  border: 2px solid var(--primary);
  background: #f0f6ff;
}

.view-create-order {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 0;
}

.create-order-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 16px 4px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.create-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
}

.create-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #e8edf3;
  color: #64748b;
}

.create-step.active .create-step-num {
  background: var(--primary);
  color: #fff;
}

.create-step.done .create-step-num {
  background: #dbeafe;
  color: var(--primary);
}

.create-step-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.create-step.active .create-step-label {
  color: var(--primary);
  font-weight: 700;
}

.create-step.done .create-step-label {
  color: #64748b;
}

.create-step-line {
  width: 28px;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px 16px;
  flex-shrink: 0;
}

.create-order-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.create-order-panel {
  padding-top: 4px;
}

.create-order-intro-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.create-order-search {
  padding-top: 0;
}

.create-order-chip {
  display: inline-block;
  margin: 10px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.create-order-new-customer-card {
  margin-top: 8px;
}

.create-order-new-customer-card .hint {
  margin-bottom: 8px;
}

.create-order-empty {
  padding: 24px 16px;
  text-align: center;
}

.create-order-summary {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.create-order-summary .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
}

.create-order-summary .summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.create-order-summary .summary-row span {
  color: #64748b;
  flex-shrink: 0;
}

.create-order-summary .summary-row strong {
  text-align: right;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.create-order-success-card {
  text-align: center;
  padding: 28px 20px;
}

.create-order-success-label {
  margin: 0 0 8px;
  font-size: 14px;
  color: #047857;
  font-weight: 600;
}

.create-order-result-key {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.create-order-success-actions {
  margin-top: 16px;
}

.create-order-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--bg, #f0f2f5);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
}

.create-order-footer.hidden {
  display: none;
}

.create-order-footer-row {
  display: flex;
  gap: 10px;
}

.create-order-footer-row .btn {
  flex: 1;
}

.create-order-footer .error {
  margin-top: 8px;
  margin-bottom: 0;
}

.create-order-selected {
  padding: 0 16px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  min-height: 20px;
}

.create-order-selected.muted {
  color: #94a3b8;
  font-weight: 500;
}

.doc-hint {
  margin: 0 0 8px;
  font-size: 12px;
}

.list { padding: 8px 16px; }

.list-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.list-item:active { opacity: 0.85; }

.list-item h4 { font-size: 16px; margin-bottom: 6px; }
.list-item .meta { font-size: 13px; color: var(--muted); line-height: 1.5; }
.list-item .badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e8eef5;
  color: var(--primary);
  margin-top: 6px;
}

.summary .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.summary .amount { font-weight: 700; color: var(--primary); }

.tabs {
  display: flex;
  margin: 0 16px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

.tab.active { background: var(--primary); color: #fff; font-weight: 600; }

.tab-panel { padding-top: 8px; }

.status-card {
  border-left: 4px solid var(--primary);
}

.status-card.status-created { border-left-color: #90a4ae; }
.status-card.status-pending { border-left-color: #90a4ae; }
.status-card.status-quoted { border-left-color: #43a047; }
.status-card.status-arrived { border-left-color: #00897b; }
.status-card.status-transit { border-left-color: #5c6bc0; }
.status-card.status-pickup { border-left-color: #66bb6a; }
.status-card.status-done { border-left-color: #ab47bc; }
.status-card.status-warehoused { border-left-color: #42a5f5; }
.status-card.status-loaded { border-left-color: #ff9800; }
.status-card.status-shipping { border-left-color: #5c6bc0; }
.status-card.status-cleared { border-left-color: #66bb6a; }
.status-card.status-picked { border-left-color: #ab47bc; }

.status-card .title { font-size: 20px; font-weight: 700; margin-top: 0; line-height: 1.3; }
.status-card .desc { color: var(--muted); margin-top: 6px; font-size: 14px; }
.status-card .status-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.status-card .status-meta .muted { font-size: 12px; color: var(--muted); }

/* 订单详情状态区：单层卡片，不再叠 order-hero 渐变 */
.order-status-panel {
  padding: 16px 16px 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.order-status-panel.status-pending { border-top: 3px solid #64748b; }
.order-status-panel.status-created { border-top: 3px solid #64748b; }
.order-status-panel.status-warehoused { border-top: 3px solid #42a5f5; }
.order-status-panel.status-quoted { border-top: 3px solid #43a047; }
.order-status-panel.status-loaded { border-top: 3px solid #ff9800; }
.order-status-panel.status-arrived { border-top: 3px solid #00897b; }
.order-status-panel.status-transit { border-top: 3px solid #4f46e5; }
.order-status-panel.status-pickup { border-top: 3px solid #16a34a; }
.order-status-panel.status-done { border-top: 3px solid #7c3aed; }
.order-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.order-status-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.order-status-key {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.order-status-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.order-status-key-row .btn-copy-inline {
  flex-shrink: 0;
}
.order-status-desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.4;
}
.order-status-customer,
.order-status-time {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}
.order-status-panel .order-hero-warn {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.4;
}
.order-status-panel .status-timeline {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.order-hero {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
.order-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.order-hero h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: #0f172a;
}
.order-hero-meta { font-size: 13px; color: #64748b; margin-top: 2px; }
.order-hero-time { margin-top: 6px; font-size: 12px; color: #475569; }
.order-hero-warn {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.4;
}
.status-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.status-tl-item {
  flex: 1 1 72px;
  min-width: 68px;
  padding: 8px 6px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.status-tl-item.done { background: #f0fdf4; border-color: #bbf7d0; }
.status-tl-item.current {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.status-tl-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}
.status-tl-time {
  display: block;
  font-size: 11px;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-all;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.order-money-card {
  margin-top: 0;
}

.order-money-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.money-cell label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.money-cell strong {
  font-size: 20px;
  color: var(--text);
}

.money-cell-received {
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
}

.money-received {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: #047857;
}

.money-due-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.money-due-banner.has-due {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.money-due-banner.settled {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-style: dashed;
}

.money-due-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.money-due-banner.has-due .money-due-label {
  color: #b91c1c;
}

.money-due-banner.settled .money-due-label {
  color: #64748b;
  font-weight: 600;
}

.money-due-amount {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: #dc2626;
}

.money-due-banner.has-due .money-due-amount {
  font-size: 30px;
  color: #dc2626;
}

.money-due-banner.settled .money-due-amount {
  font-size: 20px;
  font-weight: 700;
  color: #94a3b8;
}

.money-due-tag {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #dc2626;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.money-settled-tag {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.money-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.currency-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.currency-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.currency-tab.active {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.naira-rate-wrap {
  margin-bottom: 10px;
}

.naira-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.naira-rate-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.naira-rate-input input {
  width: 88px;
}

.rate-label-block {
  display: block;
  margin-top: 8px;
}

.rate-label-title {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.rate-input-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.rate-input-row input {
  width: 100px;
}

.rate-live-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}

.doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.doc-actions .btn {
  flex: 1;
  min-width: 140px;
}

.doc-btn.doc-btn-locked,
.doc-btn.doc-btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.doc-btn.doc-btn-ready:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.doc-btn.doc-btn-done:not(:disabled) {
  border-color: #137333;
  color: #137333;
}

.doc-btn.doc-btn-disabled:disabled {
  opacity: 0.45;
}

.cell-value-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.cell-value-row .container-no-text {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-all;
}

.btn-copy-inline {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
}

.btn-copy-inline:active {
  opacity: 0.85;
}

.info-grid .cell.full {
  grid-column: 1 / -1;
}

.list-item.list-item-settled {
  background: linear-gradient(135deg, #f1f8e9 0%, #fff 60%);
  border-left-color: #2e7d32 !important;
}

.badge-settled {
  background: #d1fae5;
  color: #065f46;
}
.badge-need-fee {
  background: #ffedd5;
  color: #9a3412;
}
.badge-need-pickup {
  background: #ede9fe;
  color: #5b21b6;
}
.badge-partial {
  background: #ccfbf1;
  color: #0f766e;
}
.list-item-need-fee {
  border-left: 3px solid #f97316;
}

.money-settled-tag {
  background: #e8f5e9;
  color: #2e7d32;
  margin-left: 6px;
}

.money-due-text {
  color: #dc2626;
  font-weight: 700;
}

.money-due-usd {
  font-size: 12px;
  color: var(--muted);
  width: 100%;
  text-align: right;
}

.order-section h3 {
  margin-bottom: 12px;
}

.section-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: #e8eef5;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.field-optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}

.field-required {
  font-size: 11px;
  font-weight: 600;
  color: #c62828;
  margin-left: 6px;
}

.create-order-cargo-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.create-order-cargo-type {
  display: flex;
  gap: 12px;
}

.cargo-type-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border: 1.5px solid #d0d7de;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.cargo-type-option:has(input:checked) {
  border-color: var(--primary);
  background: #eef4ff;
  color: var(--primary);
}

.billing-panel {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.billing-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.billing-metric {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
}
.billing-metric label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.billing-metric strong {
  font-size: 20px;
  display: block;
}
.billing-metric span {
  font-size: 11px;
  color: #94a3b8;
}
.billing-status {
  font-size: 13px;
  margin: 0 0 10px;
}
.billing-status.pending { color: #b45309; }
.billing-status.ok { color: #047857; }
.billing-status.locked { color: #334155; }
.billing-notice {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.billing-choose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.billing-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.billing-opt:has(input:checked) {
  border-color: var(--primary);
  background: #eef4ff;
}
.billing-opt input { width: auto; margin: 0; }

.billing-panel {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.billing-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.billing-metric {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
}
.billing-metric label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.billing-metric strong {
  font-size: 20px;
  display: block;
}
.billing-metric span {
  font-size: 11px;
  color: var(--muted);
}
.billing-status {
  font-size: 13px;
  margin: 0 0 10px;
}
.billing-status.pending { color: #b45309; }
.billing-status.ok { color: #047857; }
.billing-status.locked { color: #64748b; }
.billing-notice {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.billing-choose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.billing-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid #d0d7de;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.billing-opt:has(input:checked) {
  border-color: var(--primary);
  background: #eef4ff;
}
.billing-opt input { width: auto; margin: 0; }

.cargo-type-option input {
  width: auto;
  margin: 0;
}

.create-order-price-card {
  margin-bottom: 12px;
}

.create-order-price-card label {
  display: block;
  margin-bottom: 6px;
}

.create-order-price-card input,
.create-order-price-card textarea {
  width: 100%;
  margin-top: 6px;
  box-sizing: border-box;
}

.create-order-price-card textarea {
  resize: vertical;
  min-height: 72px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
}

.doc-inline-status {
  font-size: 13px;
  margin: 12px 0 6px;
  color: var(--muted);
}

.doc-inline-status.done { color: #137333; }
.doc-inline-status.ready { color: var(--primary); }
.doc-inline-status.locked { color: var(--muted); }

.order-pricing-card .btn,
.order-section .btn { margin-top: 4px; }

#order-pricing-card .doc-inline-status,
#order-warehouse-card .doc-inline-status { margin-top: 14px; }

#order-pricing-card .btn + .doc-inline-status { margin-top: 16px; }

.pickup-qr-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  background: #f8fafc;
}

.pickup-qr-panel.hidden { display: none; }

.pickup-qr-img {
  width: 180px;
  height: 180px;
  display: block;
  margin: 8px auto;
  border-radius: 8px;
  background: #fff;
}

.pickup-qr-code {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.08em;
}

.info-grid .cell label { font-size: 11px; color: var(--muted); margin: 0; }
.info-grid .cell span { font-weight: 600; }

.error { color: var(--danger); font-size: 13px; margin-top: 10px; }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  z-index: 100;
}

.modal-inner {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: 0;
}

.modal-actions { display: flex; gap: 10px; margin-top: 12px; }
.modal-actions .btn { flex: 1; }

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 200;
}

.loading {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 150;
  gap: 12px;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading span { color: var(--muted); font-size: 14px; }

.list-item.loading-item {
  opacity: 0.55;
  pointer-events: none;
}

.actions .btn { margin-bottom: 8px; }

.compact .list-item { padding: 10px 12px; margin-bottom: 6px; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 32px;
  font-size: 14px;
}

.view-mode-tabs {
  display: flex;
  margin: 12px 16px 0;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.view-mode {
  flex: 1;
  padding: 11px;
  border: none;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
  color: var(--muted);
}

.view-mode.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.phase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 0;
}

.phase-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.phase-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #e8eef5;
  font-weight: 600;
}

.customer-filters {
  padding: 0 16px 4px;
  border-bottom: 1px solid var(--border);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 6px;
}

.filter-title-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.filter-title-btn::after {
  content: '▼';
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.customers-sticky-header:not(.filters-collapsed) .filter-title-btn::after {
  transform: rotate(180deg);
}

.filter-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.filter-collapsed-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
}

.filter-result-hint {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.filter-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.filter-toggle.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #e8eef5;
}

.filter-count {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  margin-left: 4px;
  padding: 0 5px;
}

.filter-clear {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.filter-body {
  padding-bottom: 10px;
  max-height: 38vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-group {
  margin-bottom: 10px;
}

.filter-group-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 16px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.3;
}

.filter-chip em {
  font-style: normal;
  font-size: 11px;
  color: #999;
  margin-left: 2px;
}

.filter-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #e8eef5;
  font-weight: 600;
}

.filter-chip.active em {
  color: var(--primary);
  opacity: 0.75;
}

/* ── 客户列表卡片 ── */
.list-item.customer-item {
  position: relative;
  padding: 14px 14px 12px 16px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-left-style: solid;
  overflow: hidden;
}

.customer-item.tone-growth {
  border-left-color: #059669;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 42%);
}
.customer-item.tone-stable {
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 42%);
}
.customer-item.tone-drop {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 42%);
}
.customer-item.tone-dormant,
.customer-item.tone-grade-c {
  border-left-color: #94a3b8;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 42%);
}
.customer-item.tone-grade-a {
  border-left-color: #059669;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 42%);
}
.customer-item.tone-grade-b {
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 42%);
}
.customer-item.tone-unknown {
  border-left-color: #cbd5e1;
}

.customer-item--due {
  border-color: #fecaca;
  box-shadow: 0 2px 14px rgba(220, 38, 38, 0.1);
}
.customer-item--due.tone-stable,
.customer-item--due.tone-grade-b {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 55%);
}

.customer-item--idle:not(.customer-item--due) {
  opacity: 0.92;
}

.customer-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.customer-item-top h4 {
  flex: 1;
  line-height: 1.35;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

.grade-pill {
  flex-shrink: 0;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.grade-pill.grade-A {
  background: linear-gradient(145deg, #059669, #047857);
}
.grade-pill.grade-B {
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
}
.grade-pill.grade-C {
  background: linear-gradient(145deg, #64748b, #475569);
}
.grade-pill.grade-unknown {
  background: linear-gradient(145deg, #cbd5e1, #94a3b8);
  color: #334155;
}

/* KPI 四宫格 */
.customer-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.customer-kpis .kpi {
  border-radius: 10px;
  padding: 7px 4px 8px;
  text-align: center;
  min-width: 0;
  border: 1px solid var(--kpi-neutral-border);
  background: var(--kpi-neutral-bg);
}

.customer-kpis .kpi-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--kpi-muted);
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}

.customer-kpis .kpi strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-kpis .kpi-days strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.customer-kpis .kpi.kpi-good {
  background: var(--kpi-good-bg);
  border-color: var(--kpi-good-border);
}
.customer-kpis .kpi.kpi-good .kpi-label { color: var(--kpi-good); }
.customer-kpis .kpi.kpi-good strong { color: var(--kpi-good); }

.customer-kpis .kpi.kpi-fresh {
  background: var(--kpi-fresh-bg);
  border-color: var(--kpi-fresh-border);
}
.customer-kpis .kpi.kpi-fresh .kpi-label { color: var(--kpi-fresh); }
.customer-kpis .kpi.kpi-fresh strong { color: var(--kpi-fresh); }

.customer-kpis .kpi.kpi-info {
  background: var(--kpi-info-bg);
  border-color: var(--kpi-info-border);
}
.customer-kpis .kpi.kpi-info .kpi-label { color: var(--kpi-info); }
.customer-kpis .kpi.kpi-info strong { color: var(--kpi-info); }

.customer-kpis .kpi.kpi-warn {
  background: var(--kpi-warn-bg);
  border-color: var(--kpi-warn-border);
}
.customer-kpis .kpi.kpi-warn .kpi-label { color: var(--kpi-warn); }
.customer-kpis .kpi.kpi-warn strong { color: var(--kpi-warn); }

.customer-kpis .kpi.kpi-danger {
  background: var(--kpi-danger-bg);
  border-color: var(--kpi-danger-border);
}
.customer-kpis .kpi.kpi-danger .kpi-label { color: var(--kpi-danger); }
.customer-kpis .kpi.kpi-danger strong { color: var(--kpi-danger); }

.customer-kpis .kpi.kpi-neutral {
  background: var(--kpi-neutral-bg);
  border-color: var(--kpi-neutral-border);
}
.customer-kpis .kpi.kpi-neutral .kpi-label { color: var(--kpi-neutral); }
.customer-kpis .kpi.kpi-neutral strong { color: var(--kpi-neutral); }

.customer-kpis .kpi.kpi-muted {
  background: var(--kpi-muted-bg);
  border-color: var(--kpi-muted-border);
}
.customer-kpis .kpi.kpi-muted .kpi-label,
.customer-kpis .kpi.kpi-muted strong { color: var(--kpi-muted); }

/* 预警标签 */
.customer-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.customer-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.analytics-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  line-height: 1.3;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

.analytics-tag.trend-up { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.analytics-tag.trend-stable { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.analytics-tag.trend-down { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.analytics-tag.trend-dormant { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.analytics-tag.trend-new { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }

.analytics-tag.grade-A { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.analytics-tag.grade-B { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.analytics-tag.grade-C { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

.analytics-tag.potential-high { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.analytics-tag.potential-mid { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.analytics-tag.potential-low { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

.analytics-tag.warn-idle { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.analytics-tag.warn-drop { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.analytics-tag.warn-new { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.analytics-tag.warn-opportunity { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.analytics-tag.warn-generic { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.analytics-tag.neutral { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* 兼容旧类名 */
.analytics-tag.trend-增长 { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.analytics-tag.trend-平稳 { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.analytics-tag.trend-骤降,
.analytics-tag.trend-下滑 { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.analytics-tag.trend-休眠 { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.analytics-tag.potential-高 { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.analytics-tag.potential-中 { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.analytics-tag.potential-低 { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.analytics-tag.warn { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* 订单统计 */
.customer-order-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.order-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid transparent;
}

.order-stat b {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.order-stat--done {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.order-stat--transit {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.order-stat.done {
  background: #ecfdf5;
  color: #047857;
}

.order-stat.transit {
  background: #eff6ff;
  color: #1d4ed8;
}

/* 底部：潜力 + 单量 + 未收 */
.customer-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.customer-footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.potential-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.potential-badge.potential-high {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.potential-badge.potential-mid {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.potential-badge.potential-low {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.order-count-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.customer-due-highlight {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1.5px solid #f87171;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.due-highlight-label {
  font-size: 12px;
  font-weight: 800;
  color: #b91c1c;
  letter-spacing: 0.04em;
}

.due-highlight-amount {
  font-size: 18px;
  font-weight: 800;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.customer-no-due-tag {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
}

.customer-item--due .customer-due-highlight {
  animation: due-pulse 2.5s ease-in-out infinite;
}

@keyframes due-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15); }
  50% { box-shadow: 0 2px 14px rgba(220, 38, 38, 0.28); }
}

.analytics-card h3,
.profile-card h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
}

.analytics-highlight {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
}

.analytics-highlight .days {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.analytics-highlight .days-label {
  font-size: 13px;
  color: var(--muted);
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.analytics-cell label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.analytics-cell span {
  font-size: 14px;
  font-weight: 600;
}

.analytics-cell.full {
  grid-column: 1 / -1;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.profile-cell label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-cell span {
  font-size: 14px;
  word-break: break-all;
}

.profile-cell.full {
  grid-column: 1 / -1;
}

.btn-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.list-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding: 14px 16px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-section-title .count {
  font-weight: 500;
  color: #999;
}

.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.v3-badge {
  background: #1a237e;
  color: #fff;
}

.phase-badge {
  background: #eceff1;
  color: #455a64;
}

.piece-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.piece-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8eaf6;
  color: #283593;
}

.piece-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.piece-stat {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.piece-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  color: #0f172a;
}

.piece-container-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.piece-container-block {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.piece-container-block.no-container {
  background: #fff;
}

.piece-container-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

.piece-container-head strong {
  font-size: 14px;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.piece-container-clearance {
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
}

.piece-container-clearance.muted {
  color: #94a3b8;
}

.piece-code-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.piece-code-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
  border-top: 1px dashed #e2e8f0;
}

.piece-code-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.piece-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #334155;
}

.piece-st {
  color: #475569;
  font-weight: 600;
}

.info-grid.cargo-only {
  grid-template-columns: repeat(2, 1fr);
}
  font-size: 18px;
  margin-top: 4px;
  color: #1a237e;
}

.status-created { background: #eef2f7; color: #5c6b7a; }
.status-pending { background: #eef2f7; color: #5c6b7a; }
.status-quoted { background: #e8f5e9; color: #2e7d32; }
.status-arrived { background: #e0f2f1; color: #00695c; }
.status-need-fee { background: #e3f2fd; color: #1565c0; }
.status-need-pickup { background: #e0f2f1; color: #00695c; }
.list-item.status-need-fee { border-left: 4px solid #42a5f5; }
.list-item.status-need-pickup { border-left: 4px solid #00897b; }
.status-card.status-need-fee { border-left-color: #42a5f5; }
.status-card.status-need-pickup { border-left-color: #00897b; }
.order-status-panel.status-need-fee { border-top: 3px solid #42a5f5; }
.order-status-panel.status-need-pickup { border-top: 3px solid #00897b; }
.status-transit { background: #e8eaf6; color: #3949ab; }
.status-pickup { background: #e8f5e9; color: #2e7d32; }
.status-done { background: #f3e5f5; color: #7b1fa2; }
.status-warehoused { background: #e3f2fd; color: #1565c0; }
.status-loaded { background: #fff3e0; color: #e65100; }
.status-shipping { background: #e8eaf6; color: #3949ab; }
.status-cleared { background: #e8f5e9; color: #2e7d32; }
.status-picked { background: #f3e5f5; color: #6a1b9a; }

.list-item.status-created { border-left: 4px solid #90a4ae; }
.list-item.status-pending { border-left: 4px solid #90a4ae; }
.list-item.status-quoted { border-left: 4px solid #43a047; }
.list-item.status-arrived { border-left: 4px solid #00897b; }
.list-item.status-transit { border-left: 4px solid #5c6bc0; }
.list-item.status-pickup { border-left: 4px solid #66bb6a; }
.list-item.status-done { border-left: 4px solid #ab47bc; }
.list-item.status-warehoused { border-left: 4px solid #42a5f5; }
.list-item.status-loaded { border-left: 4px solid #ff9800; }
.list-item.status-shipping { border-left: 4px solid #5c6bc0; }
.list-item.status-cleared { border-left: 4px solid #66bb6a; }
.list-item.status-picked { border-left: 4px solid #ab47bc; }

.list-item-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 4px;
}
.list-item-status-row .status-time {
  font-size: 12px;
  margin-left: auto;
}
