/* 维泰克订单后台系统 —— 黑金 · Mac 风格 */
:root {
  --bg: #0b0b0e;
  --bg-2: #101014;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-solid: #17171c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --ink: #f2efe7;
  --ink-2: #b6b1a4;
  --ink-3: #78735f;
  --gold: #d4af37;
  --gold-light: #e8c96a;
  --gold-deep: #a9862a;
  --gold-glow: rgba(212, 175, 55, 0.28);
  --good: #0ca30c;
  --bad: #d03b3b;
  --danger: #ff5f57;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(212, 175, 55, 0.07), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(212, 175, 55, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(212, 175, 55, 0.45); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.main { margin-left: 224px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.content { padding: 26px 28px; flex: 1; animation: fadeUp .35s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 224px; position: fixed; left: 0; top: 0; height: 100vh;
  background: rgba(16, 16, 20, 0.72);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 24px 20px 20px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(212,175,55,.22), rgba(212,175,55,.06));
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.15);
}
.brand-name {
  font-size: 17px; font-weight: 700; letter-spacing: .06em;
  background: linear-gradient(135deg, #f2dfa0, var(--gold) 55%, #b8912c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: 10px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.sidebar nav { display: flex; flex-direction: column; padding: 10px 12px; gap: 3px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px;
  transition: all .18s ease; position: relative;
}
.sidebar nav a:hover { background: var(--surface); color: var(--ink); transform: translateX(2px); }
.sidebar nav a.active {
  background: linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,.05));
  color: var(--gold-light); font-weight: 600;
}
.sidebar nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 20%; height: 60%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  box-shadow: 0 0 10px var(--gold-glow);
}
.nav-ico { width: 16px; text-align: center; font-size: 15px; opacity: .9; }
.sidebar-foot { margin-top: auto; padding: 16px 20px; font-size: 11px; color: var(--ink-3); letter-spacing: .08em; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  background: rgba(16, 16, 20, 0.6);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.page-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.user-box { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #1a1405; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.logout { color: var(--ink-3); text-decoration: none; margin-left: 8px; font-size: 12px; transition: color .15s; }
.logout:hover { color: var(--gold-light); }

/* macOS 红绿灯 */
.tl { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.tl-red { background: #ff5f57; }
.tl-yellow { background: #febc2e; }
.tl-green { background: #28c840; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: border-color .2s ease;
}
.card:hover { border-color: var(--border-strong); }
.card-title {
  margin: 0 0 16px; font-size: 15px; font-weight: 600; letter-spacing: .03em;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ""; width: 4px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
}
.card-foot { margin-top: 12px; }
.card-foot a { color: var(--gold); text-decoration: none; font-size: 13px; transition: color .15s; }
.card-foot a:hover { color: var(--gold-light); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 760px; }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(212, 175, 55, 0.08);
}
.kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kpi-label { font-size: 12px; color: var(--ink-3); letter-spacing: .05em; }
.kpi-dot { font-size: 6px; color: var(--gold); opacity: .8; }
.kpi-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-sub { font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.gold { color: var(--gold-light); }
.good { color: #2ecf4e; }
.bad { color: var(--danger); }

/* ---------- 进度分布条 ---------- */
.viz-root { --series-1: #d4af37; }
.bar-list { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 112px 1fr 112px; align-items: center; gap: 12px; }
.bar-name {
  font-size: 13px; color: var(--ink-2);
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  white-space: nowrap; overflow: hidden;
}
.bar-name .bar-text { overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: rgba(255, 255, 255, 0.06); border-radius: 4px; height: 13px; overflow: hidden; }
.bar-fill {
  height: 100%; min-width: 2px; border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  transition: filter .18s ease;
}
.bar-row:hover .bar-fill { filter: brightness(1.2); }
.bar-value { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600;
  letter-spacing: .06em; padding: 11px 12px;
  border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
  user-select: none;
}
.table th.sortable { cursor: pointer; transition: color .15s; }
.table th.sortable:hover { color: var(--gold-light); }
.table th.sorted { color: var(--gold); }
.table th .arrow { font-size: 9px; margin-left: 3px; vertical-align: 1px; }
.table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: top; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr.clickable { cursor: pointer; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.addr { max-width: 220px; word-break: break-all; white-space: pre-wrap; }
.remark { max-width: 170px; word-break: break-all; }
.params { min-width: 140px; max-width: 260px; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 0; }
.ops { white-space: nowrap; }
.ops .btn + .btn { margin-left: 4px; }

/* ---------- 徽章 / 标签 ---------- */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: var(--ink-2);
  font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: inherit; transition: all .15s ease;
}
.badge-btn { cursor: pointer; }
.badge-btn:hover { border-color: rgba(212, 175, 55, 0.55); color: var(--gold-light); background: rgba(212, 175, 55, 0.1); }
.badge-income { background: rgba(46, 207, 78, 0.12); color: #2ecf4e; border-color: rgba(46, 207, 78, 0.3); }
.badge-expense { background: rgba(255, 95, 87, 0.1); color: var(--danger); border-color: rgba(255, 95, 87, 0.3); }

/* ---------- 订单状态颜色（固定映射，颜色跟随状态本身） ---------- */
.badge.prog {
  font-weight: 600;
  --pc: #8f8a7c; --pb: rgba(255, 255, 255, 0.05); --pbd: rgba(255, 255, 255, 0.1);
  color: var(--pc); background: var(--pb); border-color: var(--pbd);
}
.badge.prog-waiting { --pc: #ffd34d; --pb: rgba(255, 211, 77, 0.12); --pbd: rgba(255, 211, 77, 0.35); }
.badge.prog-selected { --pc: #b3abf7; --pb: rgba(179, 171, 247, 0.12); --pbd: rgba(179, 171, 247, 0.35); }
.badge.prog-done { --pc: #3fd6a0; --pb: rgba(63, 214, 160, 0.12); --pbd: rgba(63, 214, 160, 0.35); }
.badge.prog-shipped { --pc: #6ab0ff; --pb: rgba(106, 176, 255, 0.12); --pbd: rgba(106, 176, 255, 0.35); }
.badge.prog-paid { --pc: #4ede6f; --pb: rgba(78, 222, 111, 0.12); --pbd: rgba(78, 222, 111, 0.35); }
.badge.prog-refunded { --pc: #d55181; --pb: rgba(213, 81, 129, 0.16); --pbd: rgba(213, 81, 129, 0.45); }
.badge.prog-abnormal { --pc: #ff8a84; --pb: rgba(255, 138, 132, 0.12); --pbd: rgba(255, 138, 132, 0.35); }
.badge-btn.prog:hover { color: var(--pc); border-color: var(--pbd); background: var(--pb); filter: brightness(1.2); }
.prog-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none;
  background: #8f8a7c;
}
.prog-dot-waiting { background: #ffd34d; }
.prog-dot-selected { background: #b3abf7; }
.prog-dot-done { background: #3fd6a0; }
.prog-dot-shipped { background: #6ab0ff; }
.prog-dot-paid { background: #4ede6f; }
.prog-dot-refunded { background: #d55181; }
.prog-dot-abnormal { background: #ff8a84; }
.chip {
  display: inline-block; background: rgba(212, 175, 55, 0.09); color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 5px; padding: 1px 7px; margin: 1px 3px 1px 0;
  font-size: 12px; white-space: nowrap;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 8px 17px; border-radius: 9px;
  border: 1px solid transparent; cursor: pointer; font-size: 14px;
  text-decoration: none; line-height: 1.4; font-family: inherit; background: none;
  transition: all .18s ease;
}
.btn:active { transform: scale(.97); }
.btn-gold {
  background: linear-gradient(135deg, #e9cc72 0%, var(--gold) 45%, #b8912c 100%);
  color: #1a1405; font-weight: 600;
  box-shadow: 0 2px 14px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-gold:hover { filter: brightness(1.1); box-shadow: 0 4px 22px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255,255,255,.4); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04); border-color: var(--border-strong); color: var(--ink-2);
}
.btn-ghost:hover { border-color: rgba(212, 175, 55, 0.55); color: var(--gold-light); background: rgba(212, 175, 55, 0.08); }
.btn-danger {
  background: rgba(255, 95, 87, 0.08); border-color: rgba(255, 95, 87, 0.35); color: var(--danger);
}
.btn-danger:hover { background: rgba(255, 95, 87, 0.18); border-color: var(--danger); }
.btn-sm { padding: 4px 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------- 输入 ---------- */
.input {
  padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 9px;
  font-size: 14px; background: rgba(255, 255, 255, 0.05); color: var(--ink);
  font-family: inherit; width: 100%; transition: all .18s ease;
}
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: rgba(255, 255, 255, 0.24); }
.input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
  background: rgba(255, 255, 255, 0.07);
}
textarea.input { resize: vertical; }
select.input { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px;
}
select.input option { background: var(--surface-solid); color: var(--ink); }
.input-sm { padding: 4px 8px; font-size: 12px; width: auto; }

/* ---------- 工具栏 / 搜索 ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.carousel-cfg {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #8f8a7c; white-space: nowrap;
}
.carousel-cfg .input { width: 56px; min-width: 0; padding: 6px 8px; text-align: center; }
.filter-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-form .input { min-width: 200px; width: auto; }
.search-box { position: relative; }
.search-box .input { padding-left: 34px; min-width: 260px; }
.search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 16px; pointer-events: none;
}
.count-chip {
  font-size: 12px; color: var(--gold-light); background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25); border-radius: 999px; padding: 4px 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---------- 分页 ---------- */
.pager {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; font-size: 13px;
}
.pager-btns { display: flex; gap: 8px; }
.muted { color: var(--ink-3); }

/* ---------- 选项卡 ---------- */
.tabs { display: flex; gap: 4px; background: rgba(255, 255, 255, 0.05); border-radius: 9px; padding: 3px; border: 1px solid var(--border); }
.tab {
  padding: 7px 18px; border-radius: 7px; border: none; background: none;
  color: var(--ink-3); font-size: 13px; cursor: pointer; font-family: inherit;
  transition: all .18s ease;
}
.tab:hover { color: var(--ink); }
.tab.active {
  background: linear-gradient(135deg, rgba(212,175,55,.18), rgba(212,175,55,.07));
  color: var(--gold-light); font-weight: 600;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50; align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; animation: maskIn .22s ease; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  border-radius: 16px; width: min(760px, 94vw); max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 175, 55, 0.06);
  animation: modalIn .28s cubic-bezier(.22,.9,.3,1.2);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-close, .icon-btn {
  border: none; background: none; font-size: 16px; cursor: pointer;
  color: var(--ink-3); padding: 5px 9px; border-radius: 7px; transition: all .15s;
}
.modal-close:hover, .icon-btn:hover { color: var(--ink); background: var(--surface-hover); }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--border);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.form-grid .span2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- 详情抽屉 ---------- */
.drawer-mask {
  display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
  z-index: 45; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.drawer-mask.show { display: block; animation: maskIn .25s ease; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(430px, 94vw);
  background: rgba(20, 20, 25, 0.9);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border-left: 1px solid var(--border-strong);
  z-index: 46; display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .32s cubic-bezier(.22,.9,.28,1);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5);
}
.drawer.show { transform: none; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 22px 16px; border-bottom: 1px solid var(--border);
}
.drawer-title {
  font-size: 19px; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(135deg, #f2dfa0, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.drawer-sub { font-size: 12px; color: var(--ink-3); margin-top: 5px; font-variant-numeric: tabular-nums; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-foot {
  display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border);
}
.drawer-foot .btn { flex: 1; text-align: center; }
.dl { display: flex; flex-direction: column; gap: 2px; }
.dl-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 10px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dl-row .dl-k { font-size: 12px; color: var(--ink-3); letter-spacing: .05em; white-space: nowrap; }
.dl-row .dl-v { font-size: 13px; color: var(--ink); text-align: right; word-break: break-all; white-space: pre-wrap; }
.dl-row .dl-v.money { color: var(--gold-light); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 登录页 ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background:
    radial-gradient(700px 400px at 50% -10%, rgba(212, 175, 55, 0.14), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(212, 175, 55, 0.05), transparent 60%),
    #0a0a0d;
}
.login-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: 20px; padding: 40px 36px 36px; width: min(400px, 92vw);
  display: flex; flex-direction: column; gap: 15px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(212, 175, 55, 0.07);
  animation: modalIn .35s cubic-bezier(.22,.9,.3,1.1);
}
.login-tl { display: flex; gap: 8px; position: absolute; top: 20px; left: 22px; }
.login-logo {
  text-align: center; font-size: 44px; margin-top: 12px;
  filter: drop-shadow(0 6px 20px rgba(212, 175, 55, 0.35));
}
.login-card h1 {
  margin: 0; text-align: center; font-size: 21px; font-weight: 700; letter-spacing: .05em;
  background: linear-gradient(135deg, #f2dfa0, var(--gold) 60%, #b8912c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-sub { margin: -6px 0 8px; text-align: center; color: var(--ink-3); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); letter-spacing: .05em; }
.form-error {
  background: rgba(255, 95, 87, 0.1); color: var(--danger);
  border: 1px solid rgba(255, 95, 87, 0.3); padding: 9px 13px; border-radius: 9px; font-size: 13px;
}

/* ---------- 防伪管理 ---------- */
.mono { font-family: ui-monospace, "SF Mono", Consolas, "Courier New", monospace; letter-spacing: .06em; }
.hidden { display: none !important; }
.nfc-row { display: flex; gap: 8px; }
.nfc-row .btn { white-space: nowrap; flex: none; }
.thumbs { white-space: nowrap; }
.thumb {
  width: 42px; height: 42px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--border-strong); margin-right: 5px;
  transition: transform .18s ease, border-color .18s ease;
}
.thumb:hover { transform: scale(1.6); border-color: var(--gold); z-index: 5; position: relative; }
.photo-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-tile {
  width: 92px; height: 92px; border-radius: 10px; position: relative;
  border: 1px dashed var(--border-strong); background: rgba(255, 255, 255, 0.03);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; overflow: hidden; cursor: pointer; transition: border-color .18s ease;
}
.photo-tile:hover { border-color: var(--gold); }
.photo-add { border-style: dashed; }
.photo-plus { font-size: 22px; color: var(--ink-3); }
.photo-hint { font-size: 11px; color: var(--ink-3); }
.photo-thumb { width: 100%; height: 100%; object-fit: cover; }
.photo-remove {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px;
  border-radius: 50%; border: none; cursor: pointer; font-size: 11px;
  background: rgba(0, 0, 0, 0.65); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.photo-remove:hover { background: var(--bad); }

/* ---------- 财务分析图表 ---------- */
.trend-svg { width: 100%; height: auto; display: block; }
.trend-svg .gridline { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.trend-svg .tick { fill: #78735f; font-size: 10px; font-family: inherit; }
.trend-svg .line-income { fill: none; stroke: #2ecf4e; stroke-width: 2; stroke-linejoin: round; }
.trend-svg .line-expense { fill: none; stroke: #ff5f57; stroke-width: 2; stroke-linejoin: round; }
.trend-svg .dot-income { fill: #2ecf4e; cursor: pointer; }
.trend-svg .dot-expense { fill: #ff5f57; cursor: pointer; }
.trend-svg .legend-bg { fill: rgba(255, 255, 255, 0.04); stroke: rgba(255, 255, 255, 0.1); }
.trend-svg .legend-text { fill: #b6b1a4; font-size: 11px; font-family: inherit; }

/* ---------- 现货管理 ---------- */
.pf-img-box {
  border: 1px dashed var(--border-strong); border-radius: 10px;
  height: 110px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-3); font-size: 13px; overflow: hidden;
  transition: border-color .18s ease;
}
.pf-img-box:hover { border-color: var(--gold); }
.pf-img-box img { width: 100%; height: 100%; object-fit: cover; }
.src-chip { background: rgba(106, 176, 255, 0.12); color: #6ab0ff; border: 1px solid rgba(106, 176, 255, 0.3); }

/* ---------- 验真页（公开） ---------- */
.verify-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: 20px; padding: 36px 32px; width: min(440px, 94vw);
  display: flex; flex-direction: column; gap: 14px; text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(212, 175, 55, 0.07);
  animation: modalIn .35s cubic-bezier(.22,.9,.3,1.1);
}
.verify-ico {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  border: 2px solid; flex: none;
}
.verify-ico.good { color: #4ede6f; border-color: rgba(78, 222, 111, 0.5); background: rgba(78, 222, 111, 0.1); }
.verify-ico.bad { color: #ff8a84; border-color: rgba(255, 138, 132, 0.5); background: rgba(255, 138, 132, 0.1); }
.verify-title { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: .06em; }
.verify-title.good { color: #4ede6f; }
.verify-title.bad { color: #ff8a84; }
.verify-sub { color: var(--ink-2); font-size: 13px; margin: 0; line-height: 1.8; }
.verify-code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 22px; letter-spacing: .14em; color: var(--gold-light);
  border: 1px dashed rgba(212, 175, 55, 0.4); border-radius: 10px;
  padding: 12px 10px; background: rgba(212, 175, 55, 0.06);
}
.verify-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.verify-photos img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border-strong);
}
.verify-dl { display: flex; flex-direction: column; text-align: left; margin: 0; }
.verify-row { display: flex; gap: 12px; padding: 9px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.verify-row dt { width: 72px; flex: none; font-size: 12px; color: var(--ink-3); }
.verify-row dd { margin: 0; font-size: 13px; word-break: break-all; }
.verify-foot { font-size: 11px; color: var(--ink-3); letter-spacing: .12em; margin: 10px 0 0; }
.verify-back {
  position: fixed; top: 16px; left: 16px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  color: var(--ink-2); font-size: 17px; text-decoration: none;
  transition: all .18s ease;
}
.verify-back:hover { color: var(--gold-light); border-color: rgba(212, 175, 55, 0.55); transform: translateX(-2px); }

/* ---------- 设置页 ---------- */
.stack-form { display: flex; flex-direction: column; gap: 13px; }
.stack-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.data-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.small { font-size: 12px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; top: 22px; right: 22px; z-index: 100;
  background: var(--surface-solid); color: var(--ink);
  border: 1px solid rgba(212, 175, 55, 0.4); border-left: 3px solid var(--gold);
  padding: 11px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(-10px); transition: .25s cubic-bezier(.22,.9,.3,1.2);
  pointer-events: none; max-width: 360px;
}
.toast.show { opacity: 1; transform: none; }
.toast.err { border-color: rgba(255, 95, 87, 0.5); border-left-color: var(--danger); }

/* ---------- 移动端（手机） ---------- */
.nav-toggle {
  display: none; border: none; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 19px; padding: 4px 8px; border-radius: 7px;
}
.nav-toggle:hover { color: var(--gold-light); background: var(--surface-hover); }
.sidebar-mask { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.22,.9,.28,1);
    z-index: 60;
  }
  .sidebar.open { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, 0.5); }
  .sidebar-mask.show {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    animation: maskIn .25s ease;
  }
  .main { margin-left: 0; }
  .topbar { padding: 12px 14px; }
  .topbar-left { gap: 10px; }
  .page-title { font-size: 15px; }
  .user-box { font-size: 12px; }
  .user-box .logout { display: none; }
  .content { padding: 16px 12px; }
  .card { padding: 14px; overflow-x: auto; }
  .card-title { font-size: 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .kpi-card { padding: 13px 14px; }
  .kpi-label { font-size: 11px; }
  .kpi-value { font-size: 19px; }
  .kpi-sub { font-size: 10px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .toolbar-right { justify-content: space-between; width: 100%; }
  .filter-form { width: 100%; }
  .filter-form .input { min-width: 0; width: 100%; }
  .search-box { flex: 1; }
  .search-box .input { width: 100%; }
  .bar-row { grid-template-columns: 88px 1fr 100px; gap: 8px; }
  .pager { flex-direction: column; align-items: flex-start; gap: 10px; }
  .table th, .table td { padding: 9px 10px; font-size: 13px; }
  .modal-body { padding: 16px; }
  .form-grid { gap: 11px 12px; }
  .drawer { width: 94vw; }
  .toast { left: 16px; right: 16px; top: auto; bottom: 20px; }
  .tabs .tab { padding: 7px 13px; }
  .nfc-row { flex-direction: column; }
  .photo-tile { width: 76px; height: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
