/* ══════════════════════════════════════════════════════════
   杰柜 · 工业风视觉系统
   JIEGUI LOGISTICS — Industrial / Utilitarian
   ══════════════════════════════════════════════════════════ */

:root {
  /* 中性色 */
  --ink: #12151c;
  --ink-2: #1b212b;
  --ink-3: #252c38;
  --paper: #f2f1ec;
  --paper-soft: #eae9e3;
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --line: #d9d7cf;
  --line-soft: #eceae4;
  --text: #21262e;
  --muted: #787d88;
  --muted-strong: #4f5662;

  /* 功能色 */
  --accent: #0f766e;
  --accent-deep: #115e59;
  --accent-soft: #ccfbf1;
  --hazard: #f5a524;
  --hazard-deep: #b45309;
  --warn: #d97706;
  --warn-deep: #b45309;
  --warn-bg: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fecaca;
  --danger-bg: #fef2f2;
  --ok: #16a34a;
  --ok-deep: #14532d;
  --ok-soft: #bbf7d0;
  --ok-bg: #f0fdf4;
  --info: #7c3aed;
  --info-bg: #f5f3ff;
  --info-deep: #0e7490;
  --tint: #f0f6f4;
  --tint2: #e2efeb;

  /* 形状与阴影 */
  --radius: 12px;
  --radius-s: 8px;
  --radius-xs: 5px;
  --shadow-1: 0 1px 2px rgba(18,21,28,.05), 0 2px 8px rgba(18,21,28,.04);
  --shadow-2: 0 12px 32px rgba(18,21,28,.12);
  --ease: cubic-bezier(.22,.61,.36,1);

  /* 字体 */
  --font: "Barlow", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

/* ── 基础 ─────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 520px at 88% -12%, rgba(245,165,36,.11), transparent 62%),
    radial-gradient(900px 500px at -8% 16%, rgba(15,118,110,.09), transparent 56%),
    radial-gradient(820px 620px at 52% 112%, rgba(15,118,110,.07), transparent 60%),
    linear-gradient(rgba(18,21,28,.020) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,21,28,.020) 1px, transparent 1px);
  background-size: auto, auto, auto, 44px 44px, 44px 44px;
  color: var(--text);
  line-height: 1.65;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--accent-deep); }
::selection { background: var(--hazard); color: var(--ink); }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 2px; }

.container { max-width: 1320px; margin: 0 auto; padding: 28px 28px 44px; }
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(245,165,36,.045), transparent 34%),
    repeating-linear-gradient(90deg, rgba(18,21,28,.016) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; opacity: .7;
}
.skip-nav {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--hazard); color: var(--ink); padding: 10px 18px;
  font-weight: 700; text-decoration: none; border-radius: 0 0 8px 0;
}
.skip-nav:focus { left: 0; }

/* ── 页面标题 ─────────────────────────────────────── */
.page-head { margin-bottom: 22px; position: relative; }
.page-head .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}
.page-head .eyebrow::before {
  content: ""; width: 18px; height: 3px; background: var(--hazard);
}
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: .01em; margin: 0; }
.page-head .page-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; letter-spacing: .01em; }
h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--muted-strong); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--ok); }

/* ── 顶栏 ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  border-bottom: 1px solid var(--ink-3);
  box-shadow: 0 1px 0 rgba(245,165,36,.18);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--hazard) 0 180px, rgba(245,165,36,.25) 180px 420px, transparent 420px);
  pointer-events: none;
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; height: 60px; padding: 0 28px; position: relative;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 19px; font-weight: 800; letter-spacing: .06em;
  text-decoration: none; color: var(--paper);
}
.brand-mark {
  position: relative; width: 28px; height: 28px; flex-shrink: 0;
  border: 2px solid var(--hazard); border-radius: 3px;
}
.brand-mark::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid rgba(245,165,36,.45); border-radius: 1px;
}
.brand-mark::after {
  content: ""; position: absolute; top: -4px; right: -4px;
  width: 9px; height: 9px; background: var(--hazard);
}
.brand-ver {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  color: var(--hazard); border: 1px solid rgba(245,165,36,.4);
  padding: 1px 7px; border-radius: 999px; letter-spacing: .04em;
}
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
  color: #b9bec8; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius-s); letter-spacing: .03em;
  position: relative; transition: color .2s var(--ease), background .2s var(--ease);
}
.topnav a:hover { color: var(--paper); background: rgba(255,255,255,.07); }
.topnav a.active { color: var(--paper); }
.topnav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--hazard); border-radius: 2px;
}
.user-badge { display: flex; align-items: center; gap: 10px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--ink-3); }
.logout-btn { font-size: 12px; color: var(--muted) !important; text-decoration: none; }
.logout-btn:hover { color: var(--danger) !important; }

/* ── 角色 / 阶段标记 ─────────────────────────────── */
.role-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap;
}
.role-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.role-admin { background: var(--accent-soft); color: var(--accent-deep); border-color: rgba(15,118,110,.28); }
.role-operator { background: var(--warn-bg); color: var(--warn-deep); border-color: rgba(217,119,6,.3); }
.role-customer { background: var(--ok-bg); color: var(--ok-deep); border-color: rgba(22,163,74,.28); }

.stage-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid; white-space: nowrap;
}
.stage-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stage-1 { background: var(--accent-soft); color: var(--accent-deep); border-color: rgba(15,118,110,.28); }
.stage-2 { background: var(--tint2); color: var(--info-deep); border-color: rgba(14,116,144,.25); }
.stage-3 { background: var(--warn-bg); color: var(--warn-deep); border-color: rgba(217,119,6,.3); }
.stage-4 { background: var(--danger-bg); color: var(--danger); border-color: rgba(220,38,38,.3); }
.stage-5 { background: var(--ok-bg); color: var(--ok-deep); border-color: rgba(22,163,74,.28); }
.stage-6 { background: var(--info-bg); color: var(--info); border-color: rgba(124,58,237,.28); }
.stage-7 { background: var(--info-bg); color: var(--info-deep); border-color: rgba(124,58,237,.25); }
.stage-8 { background: var(--ok-bg); color: var(--ok-deep); border-color: rgba(22,163,74,.28); }
.stage-9 { background: var(--accent-soft); color: var(--accent-deep); border-color: rgba(15,118,110,.28); }

/* ── 统计卡片 ────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px 16px; text-align: left;
  box-shadow: var(--shadow-1); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 34px; height: 3px;
  background: var(--line); border-radius: 0 0 3px 0;
}
.stat-card::after {
  content: ""; position: absolute; right: 10px; top: 10px;
  width: 7px; height: 7px; border-top: 1.5px solid var(--line); border-right: 1.5px solid var(--line);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line); }
.stat-card:first-child::before, .stat-card.stat-todo::before { background: var(--accent); }
.stat-card.stat-overdue::before, .stat-card.stat-danger::before { background: var(--danger); }
.stat-card.stat-hazard::before { background: var(--warn); }
.stat-num {
  font-family: var(--mono); font-size: 34px; font-weight: 700; line-height: 1.1;
  color: var(--ink); letter-spacing: -.02em;
}
.stat-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase; margin-top: 6px;
}
.stat-overdue { background: var(--danger-bg); border-color: rgba(220,38,38,.25); }
.stat-overdue .stat-num { color: var(--danger); }
.stat-hazard { background: var(--warn-bg); border-color: rgba(217,119,6,.25); }
.stat-hazard .stat-num { color: var(--warn-deep); }

/* ── 卡片 / 区块 ─────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-1);
}
.section { margin-bottom: 22px; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px;
}
.section-header h3 {
  margin: 0; display: inline-flex; align-items: center; gap: 8px;
  padding-left: 10px; position: relative;
}
.section-header h3::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; background: var(--hazard); border-radius: 2px;
}

/* ── 表格 ────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
thead { background: var(--ink); }
th {
  padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 700;
  color: #c7ccd6; border-bottom: 1px solid var(--ink-3);
  font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}
td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
.empty-cell { text-align: center; color: var(--muted); padding: 42px !important; font-size: 13px; }
.row-danger { background: var(--danger-bg); border-left: 3px solid var(--danger); }
.row-danger:hover { background: #fde8e8; }
.td-order { font-family: var(--mono); font-weight: 700; color: var(--accent-deep); }
td a { font-weight: 600; }

/* ── 按钮 ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 22px; background: var(--hazard); color: var(--ink) !important;
  border: 1px solid var(--hazard-deep); border-radius: var(--radius-s);
  font-size: 14px; font-weight: 800; letter-spacing: .04em;
  cursor: pointer; text-decoration: none; box-shadow: 0 2px 0 rgba(180,83,9,.25);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn-primary:hover { background: #fbbf24; transform: translateY(-1px); box-shadow: 0 4px 0 rgba(180,83,9,.22); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(180,83,9,.25); }
.btn-small {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 5px 13px; font-size: 12px; font-weight: 600; border-radius: var(--radius-xs);
  text-decoration: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; transition: all .18s var(--ease);
}
.btn-small:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-danger { color: var(--danger); border-color: var(--danger-soft); background: var(--surface); }
.btn-danger:hover { color: var(--paper); background: var(--danger); border-color: var(--danger); }
.btn-back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; font-size: 13px; text-decoration: none; color: var(--muted); }
.btn-back::before { content: "←"; }
.btn-back:hover { color: var(--accent); }
.btn-block { width: 100%; }
.btn-close { color: var(--muted); }
.btn-print { color: var(--accent-deep); }
.btn-bar { display: inline-flex; gap: 8px; }
.btn-use { color: var(--accent-deep); border-color: rgba(15,118,110,.3); background: var(--accent-soft); }
.btn-use:hover { background: var(--accent); color: var(--paper); }

/* ── 表单 ────────────────────────────────────────── */
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-group { margin-bottom: 14px; flex: 1; min-width: 180px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--muted-strong); margin-bottom: 6px; letter-spacing: .03em; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: 14px; font-family: var(--font); background: var(--surface); color: var(--text);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(15,118,110,.13);
}
.required { color: var(--danger); font-weight: 800; }
.form-inline { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.form-inline label { font-size: 12px; font-weight: 700; color: var(--muted-strong); }
.form-inline input, .form-inline select { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); font-size: 13px; background: var(--surface); color: var(--text); }
.form-inline input:focus, .form-inline select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(15,118,110,.13); }
input, select, textarea { font-family: var(--font); }
input[type="date"] { color-scheme: light; }

/* ── 筛选栏 ──────────────────────────────────────── */
.filter-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow-1);
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
}
.filter-bar input, .filter-bar select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: 13px; background: var(--surface); color: var(--text);
}
.filter-bar input[type="date"] { min-width: 130px; color: var(--text); }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(15,118,110,.13); }
.filter-label { font-size: 11px; font-weight: 700; color: var(--muted); margin-right: 2px; padding-bottom: 6px; letter-spacing: .04em; }
.filter-sep { font-size: 13px; color: var(--muted); padding-bottom: 6px; }
.filter-toggle {
  display: none; align-items: center; gap: 8px; padding: 11px 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  margin: 0 8px 8px; font-size: 13px; font-weight: 700; color: var(--muted-strong);
  cursor: pointer; box-shadow: var(--shadow-1); user-select: none;
}

/* ── 财务模块 ────────────────────────────────────── */
.finance-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px; }
.finance-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.finance-col-title { margin: 0 0 10px 0; font-size: 14px; font-weight: 800; padding-bottom: 8px; border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 8px; }
.cost-title { color: var(--danger); }
.revenue-title { color: var(--ok-deep); }
.finance-list { min-height: 60px; }
.finance-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.finance-row:last-child { border-bottom: none; }
.finance-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.tag-cost { background: var(--danger-bg); color: var(--danger); }
.tag-revenue { background: var(--ok-bg); color: var(--ok-deep); }
.finance-currency { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; flex-shrink: 0; font-family: var(--mono); }
.currency-cny { background: var(--tint2); color: var(--accent-deep); }
.currency-usd { background: var(--warn-bg); color: var(--warn-deep); }
.finance-amount { font-family: var(--mono); font-size: 14px; font-weight: 700; min-width: 70px; text-align: right; flex-shrink: 0; }
.finance-notes { color: var(--muted); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-subtotal { padding: 8px 0 0 0; margin-top: 8px; border-top: 1px solid var(--line); font-size: 13px; display: flex; gap: 16px; }
.finance-summary-bar { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 12px; }
.rate-row { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rate-row input { padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--radius-xs); font-size: 14px; font-family: var(--mono); background: var(--surface); color: var(--text); }
.rate-row input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(15,118,110,.13); }
.rmb-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rmb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; text-align: center; }
.rmb-label { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; letter-spacing: .06em; }
.rmb-value { font-size: 18px; font-weight: 800; font-family: var(--mono); color: var(--ink); }
.rmb-profit { color: var(--ok-deep); }
.rmb-margin { color: var(--accent-deep); }
.finance-add { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 16px !important; }

/* ── 信息网格 ────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; font-size: 14px; }
.info-grid div { padding: 6px 0; }
.info-grid strong { color: var(--muted-strong); font-weight: 700; }
.info-table td { font-size: 13px; }
.info-table td:first-child { color: var(--muted-strong); font-weight: 700; white-space: nowrap; }

/* ── 阶段进度条 ──────────────────────────────────── */
.stage-progress { display: flex; align-items: flex-start; overflow-x: auto; padding: 16px 0; gap: 0; }
.stage-item { display: flex; flex-direction: column; align-items: center; min-width: 70px; text-align: center; flex-shrink: 0; }
.stage-dot {
  width: 32px; height: 32px; border-radius: var(--radius-xs); display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 800; font-family: var(--mono);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted);
  transition: all .3s var(--ease);
}
.stage-done { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.stage-active { background: var(--hazard); border-color: var(--hazard); color: var(--ink); animation: pulse 2s infinite; }
.stage-pending { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,165,36,.45); }
  50% { box-shadow: 0 0 0 8px rgba(245,165,36,0); }
}
.stage-name { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.stage-info { font-size: 10px; color: var(--muted); margin-top: 2px; display: flex; flex-direction: column; gap: 1px; }
.stage-line { width: 30px; height: 2px; background: var(--line); margin-top: 16px; flex-shrink: 0; border-radius: 1px; }
.stage-line-active { background: var(--hazard); }

/* ── 迷你进度条 ──────────────────────────────────── */
.mini-progress { display: flex; align-items: center; gap: 2px; margin: 10px 0; }
.mini-dot { width: 10px; height: 10px; border-radius: 2px; background: var(--line); transition: background .2s var(--ease); }
.mini-done { background: var(--ok); }
.mini-active { background: var(--hazard); animation: pulse 2s infinite; }
.mini-line { width: 20px; height: 2px; background: var(--line); border-radius: 1px; }
.mini-line-active { background: var(--ok); }

/* ── 登录页 ──────────────────────────────────────── */
.login-page { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 100vh; background: var(--ink); }
.login-brand {
  position: relative; background: var(--ink); color: var(--paper);
  padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(245,165,36,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,165,36,.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 40%, #000 0, transparent 72%);
}
.login-brand::after {
  content: ""; position: absolute; width: 340px; height: 340px; right: -120px; top: -120px;
  border: 1px solid rgba(245,165,36,.25); border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(245,165,36,.05), 0 0 0 88px rgba(245,165,36,.035);
}
.login-brand .brand-lockup { position: relative; z-index: 1; }
.login-brand .brand-lockup .brand-mark { width: 44px; height: 44px; margin-bottom: 22px; }
.login-brand h1 { font-size: clamp(44px, 6vw, 72px); font-weight: 900; letter-spacing: .08em; line-height: 1; margin: 0 0 10px; }
.login-brand .brand-tag {
  font-family: var(--mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--hazard); font-weight: 700;
}
.login-brand .brand-desc { margin-top: 18px; color: #aab0bc; font-size: 14px; max-width: 34ch; }
.login-brand .brand-coords { position: relative; z-index: 1; font-family: var(--mono); font-size: 11px; color: #6f7684; letter-spacing: .08em; line-height: 2; }
.login-brand .brand-coords b { color: var(--hazard); font-weight: 700; }
.login-form-panel {
  background-color: var(--paper);
  background-image:
    radial-gradient(700px 480px at 18% 0%, rgba(245,165,36,.10), transparent 60%),
    linear-gradient(rgba(18,21,28,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,21,28,.022) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  display: flex; align-items: center; justify-content: center; padding: 32px; position: relative;
}
.login-form-panel::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--hazard) 0 160px, var(--line) 160px 100%);
}
.login-card {
  position: relative; background: var(--surface); width: 100%; max-width: 420px;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 40px 36px;
}
.login-card::before {
  content: ""; position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-top: 2px solid var(--hazard); border-right: 2px solid var(--hazard);
}
.login-card .login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-card .login-logo .brand-mark { width: 24px; height: 24px; }
.login-card h1 { font-size: 24px; font-weight: 900; letter-spacing: .04em; margin: 0 0 4px; }
.login-subtitle { color: var(--muted); font-size: 13px; margin-bottom: 26px; letter-spacing: .02em; }
.login-card label { display: block; font-size: 12px; font-weight: 800; color: var(--muted-strong); margin-bottom: 6px; margin-top: 16px; letter-spacing: .05em; }
.login-card input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: 15px; background: var(--surface); color: var(--text);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.login-card input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(15,118,110,.13); }
.login-card button { margin-top: 22px; }
.login-card .login-foot { margin-top: 22px; font-size: 11px; color: var(--muted); text-align: center; font-family: var(--mono); letter-spacing: .06em; }

/* ── 闪存消息 ────────────────────────────────────── */
.flash-message {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: var(--radius-s); margin-bottom: 16px; font-size: 13px; font-weight: 600;
  border: 1px solid;
}
.flash-message::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.flash-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-soft); }
.flash-success { background: var(--ok-bg); color: var(--ok-deep); border-color: var(--ok-soft); }

/* ── 订单卡片（客户视角） ────────────────────────── */
.shipment-card { position: relative; border-left: 4px solid var(--accent); }
.shipment-card::after {
  content: ""; position: absolute; right: 12px; top: 12px;
  width: 9px; height: 9px; border-top: 1.5px solid var(--line); border-right: 1.5px solid var(--line);
}
.shipment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.shipment-header strong { font-size: 15px; }

/* ── 询价 / 历史调用 ─────────────────────────────── */
.history-item { display: flex; align-items: center; gap: 8px; }
.quote-item-row { display: flex; align-items: center; gap: 8px; }
.quote-add-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.items-table td, .items-table th { padding: 8px 10px; }
.other-input { flex: 1; min-width: 120px; }
.tip, .note { font-size: 12px; color: var(--muted); }
.meta { font-size: 11px; color: var(--muted); }
.right { margin-left: auto; }
.clearfix::after { content: ""; display: table; clear: both; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0; }
.sign { font-family: var(--mono); }
.sign-line { border-top: 1px solid var(--line); padding-top: 10px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state::before { content: "□"; display: block; font-size: 34px; color: var(--line); margin-bottom: 10px; }

/* ── 动效 ────────────────────────────────────────── */
.stat-card, .card, .page-head, .section { animation: rise .45s var(--ease) both; }
.stats-row .stat-card:nth-child(1) { animation-delay: .02s; }
.stats-row .stat-card:nth-child(2) { animation-delay: .07s; }
.stats-row .stat-card:nth-child(3) { animation-delay: .12s; }
.stats-row .stat-card:nth-child(4) { animation-delay: .17s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow-2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── 返回顶部 ────────────────────────────────────── */
#backTop {
  position: fixed; right: 16px; bottom: 80px; width: 44px; height: 44px; z-index: 98;
  background: var(--ink); color: var(--hazard); border: 1px solid var(--ink-3);
  font-size: 18px; border-radius: var(--radius-s); cursor: pointer;
  box-shadow: var(--shadow-2); display: none; align-items: center; justify-content: center;
}
#backTop.show { display: flex; }
#backTop:hover { background: var(--ink-2); transform: translateY(-2px); }

/* ── 手机端专属元素：桌面端隐藏 ──────────────────── */
.hamburger { display: none; }
.drawer-overlay { display: none; }
.drawer { display: none; }
.bottom-bar { display: none; }
.filter-toggle { display: none; }
.filter-body { display: block; }

/* ══════════════════════════════════════════════════
   响应式 — 手机端
   ══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { padding: 34px 26px 20px; min-height: 200px; }
  .login-brand .brand-lockup { display: flex; align-items: center; gap: 14px; }
  .login-brand .brand-lockup .brand-mark { margin: 0; width: 34px; height: 34px; }
  .login-brand h1 { font-size: 34px; margin: 0; }
  .login-brand .brand-desc, .login-brand .brand-coords { display: none; }
  .login-brand .brand-tag { font-size: 11px; }
  .login-form-panel { padding: 24px 16px 40px; }
}

@media (max-width: 768px) {
  .container { padding: 10px 0 78px 0; }
  body { font-size: 13px; padding-bottom: 60px; }
  h2 { font-size: 17px; margin-bottom: 8px; }
  h3 { font-size: 14px; }
  .page-head { padding: 0 8px; margin-bottom: 14px; }
  .page-head h2 { font-size: 22px; }
  .card { border-radius: var(--radius); padding: 14px 12px; margin: 0 8px 10px; box-shadow: var(--shadow-1); }

  /* 顶栏 */
  .topbar { padding: 0 10px; }
  .topbar-inner { height: 50px; padding: 0; gap: 10px; }
  .brand { font-size: 15px; flex: 1; justify-content: center; }
  .brand-mark { width: 22px; height: 22px; }
  .brand-ver { font-size: 9px; }
  .topnav { display: none; }
  .hamburger {
    display: flex; width: 38px; height: 38px; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer; flex-direction: column; gap: 4px;
    padding: 0; flex-shrink: 0;
  }
  .hamburger span { display: block; width: 20px; height: 2px; background: var(--paper); border-radius: 2px; transition: all .3s var(--ease); }
  .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

  /* 抽屉 */
  .drawer-overlay { position: fixed; inset: 0; background: rgba(10,12,16,.55); z-index: 200; backdrop-filter: blur(2px); }
  .drawer-overlay.show { display: block; }
  .drawer {
    display: block; position: fixed; top: 0; left: -286px; width: 268px; height: 100%;
    background: var(--ink); z-index: 201; transition: left .3s var(--ease);
    overflow-y: auto; padding: 14px 0 20px;
  }
  .drawer.show { left: 0; }
  .drawer a {
    display: flex; align-items: center; gap: 10px; padding: 13px 20px;
    color: #b9bec8; text-decoration: none; font-size: 14px; font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.05); position: relative;
  }
  .drawer a::before { content: "▣"; font-size: 10px; color: var(--ink-3); }
  .drawer a:hover, .drawer a.active { color: var(--paper); background: rgba(255,255,255,.07); }
  .drawer a.active::before { color: var(--hazard); }
  .drawer .drawer-footer { padding: 14px 20px; color: var(--muted); font-size: 13px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 12px; }
  .drawer .drawer-footer a { border: none; padding: 0; color: var(--danger); font-size: 13px; display: inline; }
  .drawer .drawer-footer a::before { display: none; }

  /* 底部导航 */
  .bottom-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 58px;
    background: var(--surface); border-top: 1px solid var(--line); z-index: 99;
    justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(18,21,28,.06);
  }
  .bottom-bar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
    color: var(--muted); font-size: 10px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-s);
    min-width: 54px; position: relative;
  }
  .bottom-bar a.active { color: var(--ink); font-weight: 800; }
  .bottom-bar a.active::before {
    content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 3px; background: var(--hazard); border-radius: 0 0 3px 3px;
  }
  .bottom-bar .bb-icon { font-size: 20px; line-height: 1; filter: grayscale(1) contrast(1.12); opacity: .92; }
  .bottom-bar a.active .bb-icon { filter: none; opacity: 1; }

  /* 筛选折叠 */
  .filter-toggle { display: flex; }
  .filter-toggle::after { content: "▾"; margin-left: auto; font-size: 10px; transition: transform .3s var(--ease); }
  .filter-toggle.open::after { transform: rotate(180deg); }
  .filter-body { display: none; padding: 0 8px; }
  .filter-body.show { display: block; }
  .card form[style*="flex"] { gap: 6px !important; }
  .card form[style*="flex"] input, .card form[style*="flex"] select { font-size: 16px !important; padding: 10px 12px !important; border-radius: var(--radius-s) !important; height: 44px; max-width: 100%; }
  .card form[style*="flex"] button, .card form[style*="flex"] .btn-primary { height: 44px; padding: 0 20px !important; font-size: 14px !important; }

  /* 表格 → 卡片 */
  .section { overflow-x: visible; margin: 0 8px; }
  .section h3 { padding-left: 4px; }
  table.data-table, table.data-table thead, table.data-table tbody,
  table.data-table th, table.data-table td, table.data-table tr { display: block; }
  table.data-table { border-radius: 0; box-shadow: none; background: transparent; }
  table.data-table thead { display: none; }
  table.data-table tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; padding: 10px 12px; box-shadow: var(--shadow-1); position: relative; }
  table.data-table td { padding: 3px 0; border: none; font-size: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  table.data-table td::before { content: attr(data-label); font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; flex-shrink: 0; letter-spacing: .03em; }
  table.data-table td a { font-weight: 700; }
  table.data-table .action-cell { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; }
  table.data-table .action-cell::before { display: none; }
  table.data-table .empty-cell { justify-content: center; padding: 30px 0 !important; }
  table.data-table .empty-cell::before { display: none; }
  table.data-table .stage-badge { margin-left: auto; }
  table.data-table tr:hover { background: var(--surface); }
  table.data-table .td-order { font-size: 15px; font-weight: 800; padding-bottom: 8px; }
  table.data-table .td-order::before { display: none; }
  table.data-table .row-danger { border-left: 3px solid var(--danger); }

  /* 表单 */
  .form-row { flex-direction: column; gap: 0; }
  .form-group { min-width: 100%; margin-bottom: 14px; }
  .form-group label { font-size: 13px; margin-bottom: 6px; }
  .form-group input, .form-group select, .form-group textarea { padding: 10px 14px; font-size: 15px; border-radius: var(--radius-s); height: 44px; }
  .form-group textarea { height: auto; }
  .form-inline { flex-direction: column; align-items: stretch; gap: 12px; }
  .form-inline label { font-size: 13px; }
  .form-inline input, .form-inline select { margin-left: 0; width: 100%; height: 44px; font-size: 15px; }

  /* 统计卡片 */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px 12px 12px; }
  .stat-card { padding: 12px 12px 10px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 10px; }

  /* 按钮 */
  .btn-primary { padding: 11px 22px; font-size: 14px; border-radius: var(--radius-s); min-height: 44px; }
  .btn-small { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-s); min-height: 36px; }
  .btn-danger { min-height: 36px; }
  .btn-back { font-size: 13px; padding: 10px 0; }
  .btn-block { padding: 14px; font-size: 16px; }

  /* 区域头 */
  .section-header { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 10px; padding: 0 8px; }
  .section-header .btn-primary { text-align: center; }

  /* 财务 */
  .finance-columns { grid-template-columns: 1fr; gap: 10px; }
  .rmb-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .finance-add { padding: 10px 12px !important; }

  /* 信息网格 */
  .info-grid { grid-template-columns: 1fr; gap: 2px; font-size: 13px; padding: 0 8px; }

  /* 登录 */
  .login-card { max-width: 100%; padding: 30px 22px; border-radius: var(--radius); box-shadow: none; border: 1px solid var(--line); }
  .login-card h1 { font-size: 22px; }
  .login-card input { padding: 12px 14px; font-size: 16px; height: 48px; border-radius: var(--radius-s); }
  .login-card button { height: 48px; font-size: 16px; }

  /* 阶段进度 */
  .stage-item { min-width: 50px; }
  .stage-dot { width: 24px; height: 24px; font-size: 10px; }
  .stage-name { font-size: 9px; }
  .stage-line { width: 16px; }

  /* 订单卡片：收窄高度 */
  .shipment-card { margin: 0 8px 8px; border-left-width: 4px; padding: 10px 12px; }
  .shipment-header { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 4px; }
  .shipment-card .mini-progress { margin: 6px 0; }
  .shipment-card .mini-dot { width: 7px; height: 7px; }
  .shipment-card .mini-line { width: 12px; height: 2px; margin: 0 1px; }
  .shipment-card .info-grid { grid-template-columns: 1fr 1fr; gap: 0 10px; font-size: 12px; padding: 0; }
  .shipment-card .info-grid div { padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shipment-card > .btn-small { margin-top: 4px; padding: 4px 10px; min-height: 30px; font-size: 12px; }

  /* 历史询价 */
  .history-item { flex-wrap: wrap; }
  .history-item .btn-use { width: 100%; }
  tr[id^="edit-form-"] td { padding: 0; }
  tr[id^="edit-form-"] form { flex-direction: column !important; padding: 10px 0; }
  tr[id^="edit-form-"] input, tr[id^="edit-form-"] select { width: 100% !important; height: 40px; margin: 2px 0; }

  /* 闪存 */
  .flash-message { margin: 8px; border-radius: var(--radius-s); }
  table:not(.data-table) { min-width: 600px; }
  .card:has(table:not(.data-table)), .finance-col:has(table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .bottom-bar a { font-size: 9px; min-width: 44px; padding: 4px 6px; }
  .bottom-bar .bb-icon { font-size: 18px; }
  .stat-card { padding: 10px 10px 8px; }
}
