:root {
  --bg: #f3f1ea;
  --panel: #fffdf8;
  --panel-2: #fbf8f0;
  --ink: #17241f;
  --ink-2: #31423a;
  --muted: #718077;
  --line: #e5e0d4;
  --line-strong: #d6cfbf;
  --brand: #0d4439;
  --brand-2: #176553;
  --brand-3: #e6f0eb;
  --accent: #e8993b;
  --accent-soft: #fbebd4;
  --red: #bf4a3a;
  --red-soft: #f9e6e2;
  --blue: #3e6f96;
  --blue-soft: #e6eff6;
  --green: #2f7d5f;
  --green-soft: #e3f1e9;
  --slate: #65716d;
  --slate-soft: #edf0ed;
  --purple: #69558f;
  --purple-soft: #eee9f6;
  --shadow: 0 18px 45px rgba(23, 36, 31, 0.08);
  --shadow-sm: 0 4px 14px rgba(23, 36, 31, 0.06);
  --radius: 18px;
  --radius-sm: 11px;
  --sidebar: 246px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------- 登录 ---------------- */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(380px, 0.85fr);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(232, 153, 59, 0.16), transparent 60%),
    var(--bg);
}
.login-brand {
  position: relative;
  overflow: hidden;
  padding: 56px 64px;
  background:
    linear-gradient(145deg, rgba(6, 37, 31, 0.97), rgba(13, 68, 57, 0.96)),
    var(--brand);
  color: #f7f3e8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000 10%, transparent 90%);
}
.login-brand::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(232, 153, 59, 0.5), rgba(232, 153, 59, 0) 62%);
  filter: blur(8px);
}
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent); color: #17241f;
  display: grid; place-items: center;
  font-weight: 900; font-size: 24px; letter-spacing: -1px;
  box-shadow: 0 10px 26px rgba(232, 153, 59, 0.35);
}
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: 0.02em; }
.brand-sub { font-size: 11px; letter-spacing: 0.24em; color: rgba(247,243,232,0.62); text-transform: uppercase; margin-top: 3px; }
.login-hero { position: relative; z-index: 1; max-width: 620px; margin: 46px 0; }
.login-hero .eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 0.2em; font-weight: 700; margin-bottom: 18px; }
.login-hero h1 { font-size: clamp(38px, 4.2vw, 62px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 800; }
.login-hero h1 span { color: var(--accent); }
.login-hero p { margin-top: 22px; color: rgba(247,243,232,0.72); font-size: 15px; line-height: 1.9; max-width: 500px; }
.login-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.login-metric { border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 16px; background: rgba(255,255,255,0.035); }
.login-metric strong { font-size: 24px; display: block; letter-spacing: -0.03em; }
.login-metric span { font-size: 11px; color: rgba(247,243,232,0.58); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-card { width: min(430px, 100%); }
.login-card .eyebrow { color: var(--brand-2); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; }
.login-card h2 { margin-top: 12px; font-size: 32px; letter-spacing: -0.04em; }
.login-card > p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-form { margin-top: 30px; display: grid; gap: 18px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--panel); padding: 13px 14px; color: var(--ink); outline: none;
  transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(23, 101, 83, 0.1);
}
.field textarea { min-height: 90px; resize: vertical; }
.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--brand); color: #fff; transition: transform .12s, background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; padding: 14px; font-size: 14px; }
.btn-accent { background: var(--accent); color: #1e2a25; }
.btn-accent:hover { background: #f0a64d; }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #f3d6d0; }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 9px; }
.btn-xs { padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.login-demo { margin-top: 24px; border-top: 1px dashed var(--line-strong); padding-top: 18px; }
.login-demo-title { font-size: 11px; color: var(--muted); letter-spacing: .1em; margin-bottom: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip {
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: 7px 11px; font-size: 12px; color: var(--ink-2);
}
.demo-chip:hover { border-color: var(--brand-2); color: var(--brand-2); }

/* ---------------- 主框架 ---------------- */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20;
  background: linear-gradient(180deg, #0b3a30 0%, #082c25 100%);
  color: #e9f1ed; display: flex; flex-direction: column; padding: 22px 16px 16px;
}
.sidebar .brand-lockup { padding: 0 8px 22px; }
.sidebar .brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 19px; }
.sidebar .brand-name { font-size: 19px; }
.sidebar .brand-sub { font-size: 9px; }
.side-nav { display: grid; gap: 4px; overflow-y: auto; padding: 4px 0; }
.side-label { font-size: 10px; letter-spacing: .18em; color: rgba(233,241,237,.36); padding: 16px 12px 7px; }
.side-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px;
  color: rgba(233,241,237,.7); font-size: 13px; font-weight: 600; border: 0; background: transparent;
  text-align: left; width: 100%; position: relative;
}
.side-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-item.active { background: rgba(232,153,59,.16); color: #ffd9a6; }
.side-item.active::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.side-item svg { width: 17px; height: 17px; opacity: .9; }
.side-item .nav-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #1d2a24; font-size: 10px; display: grid; place-items: center; font-weight: 800;
}
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; }
.side-user:hover { background: rgba(255,255,255,.05); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(232,153,59,.22);
  color: #ffd9a6; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  flex: 0 0 auto;
}
.side-user strong { display: block; font-size: 12px; }
.side-user span { display: block; font-size: 10px; color: rgba(233,241,237,.46); margin-top: 2px; }
.side-logout { margin-left: auto; border: 0; background: transparent; color: rgba(233,241,237,.5); padding: 4px; }
.side-logout:hover { color: #fff; }

.main { grid-column: 2; min-width: 0; padding: 0 34px 48px; }
.topbar {
  height: 82px; display: flex; align-items: center; gap: 18px;
  border-bottom: 1px solid rgba(214,207,191,.55); position: sticky; top: 0; z-index: 10;
  background: rgba(243,241,234,.88); backdrop-filter: blur(14px);
}
.page-head { min-width: 0; }
.page-head h1 { font-size: 23px; letter-spacing: -.03em; }
.page-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2); border-radius: 999px; padding: 8px 12px; font-size: 11px;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel); display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--line-strong); background: var(--panel-2); }
.view { padding-top: 26px; animation: rise .28s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------------- 通用组件 ---------------- */
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.card-head h2 { font-size: 15px; letter-spacing: -.01em; }
.card-head p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 16px 20px 20px; }
.kpi {
  position: relative; overflow: hidden; padding: 18px 19px 17px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.kpi::after { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 4px 4px 0; background: var(--brand-2); opacity: .75; }
.kpi.accent::after { background: var(--accent); }
.kpi.red::after { background: var(--red); }
.kpi.blue::after { background: var(--blue); }
.kpi-label { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.kpi-value { margin-top: 9px; font-size: 29px; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.kpi-foot { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.trend-up { color: var(--green); font-weight: 700; }
.trend-down { color: var(--red); font-weight: 700; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--accent-soft); color: #a26012; }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.indigo { background: var(--purple-soft); color: var(--purple); }
.badge.slate { background: var(--slate-soft); color: var(--slate); }
.badge.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .grow { flex: 1 1 auto; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 11px; padding: 0 12px; min-width: 220px;
}
.search input { border: 0; outline: none; background: transparent; padding: 10px 0; width: 100%; font-size: 12px; }
.seg { display: flex; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 7px 10px; font-size: 11px; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--brand); color: #fff; }
.select, .input {
  border: 1px solid var(--line); background: var(--panel); border-radius: 10px;
  padding: 9px 11px; font-size: 12px; color: var(--ink); outline: none;
}
.select:focus, .input:focus { border-color: var(--brand-2); }

.table-wrap { overflow: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead th {
  text-align: left; font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .06em;
  padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap;
}
tbody td { padding: 13px 12px; border-bottom: 1px solid rgba(229,224,212,.72); vertical-align: middle; }
tbody tr:hover { background: rgba(251,248,240,.7); }
tbody tr:last-child td { border-bottom: 0; }
.cell-main { font-weight: 700; color: var(--ink); }
.cell-sub { font-size: 10px; color: var(--muted); margin-top: 3px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 6px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 16px 0; font-size: 11px; color: var(--muted); }

.split-list { display: grid; gap: 10px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.list-row:last-child { border: 0; }
.thumb {
  width: 42px; height: 42px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 21px; flex: 0 0 auto;
}
.list-row .grow { min-width: 0; flex: 1; }
.list-row strong { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row span { font-size: 10px; color: var(--muted); display: block; margin-top: 3px; }
.list-row .val { font-size: 12px; font-weight: 800; text-align: right; white-space: nowrap; }

.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 16px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; max-width: 36px; flex: 1; display: flex; align-items: flex-end; }
.bar {
  width: 100%; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand));
  min-height: 4px; position: relative; transition: height .5s ease;
}
.bar.alt { background: linear-gradient(180deg, #f2b665, var(--accent)); }
.bar-col span { font-size: 10px; color: var(--muted); }
.bar-col b { font-size: 10px; color: var(--ink-2); }
.donut-legend { display: grid; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.legend-row .grow { flex: 1; color: var(--ink-2); }
.legend-row strong { font-variant-numeric: tabular-nums; }
.legend-row span { color: var(--muted); width: 48px; text-align: right; }

/* ---------------- 抽屉 / 弹窗 ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(14, 26, 21, .42); z-index: 80; backdrop-filter: blur(2px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(590px, 94vw); background: var(--bg);
  z-index: 81; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(15,30,24,.18);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 22px 24px 16px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head h2 { font-size: 18px; letter-spacing: -.02em; }
.drawer-head p { font-size: 11px; color: var(--muted); margin-top: 4px; }
.drawer-head .close { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px 28px; }
.drawer-foot { padding: 14px 24px; background: var(--panel); border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }
.close {
  width: 32px; height: 32px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px;
  display: grid; place-items: center; color: var(--muted);
}
.close:hover { color: var(--ink); }
.modal {
  position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(600px, 94vw); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal .drawer-head { padding: 20px 22px 14px; }
.modal .drawer-body { padding: 16px 22px 22px; }
.modal .drawer-foot { padding: 13px 22px; }

.detail-block { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.detail-block h3 { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .04em; margin-bottom: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 16px; }
.detail-item label { display: block; font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.detail-item strong { font-size: 12px; font-weight: 700; }
.detail-item.full { grid-column: 1 / -1; }
.item-line { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.item-line:last-child { border: 0; }
.item-line .grow { flex: 1; min-width: 0; }
.item-line strong { font-size: 12px; }
.item-line span { font-size: 10px; color: var(--muted); }
.item-line .money { font-weight: 800; font-size: 12px; white-space: nowrap; }
.total-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; }
.total-line.grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 11px; font-size: 14px; font-weight: 800; }
.total-line.grand b { color: var(--brand); font-size: 20px; letter-spacing: -.03em; }

.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 13px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--panel); border: 3px solid var(--brand-2); margin-top: 2px; z-index: 1; }
.tl-item:first-child .tl-dot { background: var(--brand-2); }
.tl-body strong { font-size: 12px; display: block; }
.tl-body span { font-size: 10px; color: var(--muted); display: block; margin-top: 2px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field label { font-size: 11px; }
.form-grid .field input, .form-grid .field select, .form-grid .field textarea { padding: 10px 11px; font-size: 12px; }
.help { font-size: 10px; color: var(--muted); line-height: 1.6; }
.callout { border-radius: 12px; padding: 11px 13px; background: var(--accent-soft); color: #895516; font-size: 11px; line-height: 1.65; }
.callout.green { background: var(--green-soft); color: var(--green); }
.callout.red { background: var(--red-soft); color: var(--red); }
.callout.blue { background: var(--blue-soft); color: var(--blue); }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.price-box { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.price-box label { font-size: 10px; color: var(--muted); display: block; margin-bottom: 5px; }
.price-box input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 12px; }
.matrix-table td, .matrix-table th { white-space: nowrap; }
.matrix-table td input { width: 82px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; font-size: 11px; }

.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 120; display: grid; gap: 8px; }
.toast {
  background: #132a22; color: #f4f8f5; border-radius: 11px; padding: 12px 16px; font-size: 12px;
  box-shadow: var(--shadow); animation: toastIn .2s ease; max-width: 360px;
}
.toast.error { background: #58261f; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spinner {
  width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; padding: 80px; color: var(--muted); font-size: 12px; gap: 10px; }
.loading .spinner { border-color: var(--line); border-top-color: var(--brand); }

/* 打印拣货单 */
.print-sheet { background: #fff; color: #111; padding: 24px; border-radius: 10px; }
.print-sheet h1 { font-size: 20px; }
.print-sheet table { font-size: 12px; }
.print-sheet th, .print-sheet td { border: 1px solid #ddd; padding: 7px; }
@media print {
  body * { visibility: hidden; }
  .print-sheet, .print-sheet * { visibility: visible; }
  .print-sheet { position: absolute; inset: 0; border-radius: 0; }
}

/* 响应式 */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .main { grid-column: 1; padding: 0 18px 40px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { padding: 28px; }
  .topbar { height: 72px; }
  .page-head h1 { font-size: 19px; }
  .three-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 23px; }
  .topbar-actions .pill { display: none; }
}
