/* ============================================================
   小掌柜招商系统 · 视觉基线
   深蓝科技风 + 橙色激活锚点；数字统一 tabular-nums 便于对齐
   ============================================================ */
:root {
  --bg: #0a1020;
  --bg-2: #0d1526;
  --surface: #111c30;
  --surface-2: #16233a;
  --surface-3: #1c2c47;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eefc;
  --text-2: #9aabc7;
  --text-3: #6b7c99;
  --accent: #f08c1e;
  --accent-soft: rgba(240, 140, 30, 0.14);
  --blue: #3d7bff;
  --cyan: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --purple: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 68px;
  --header-h: 62px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(61, 123, 255, 0.16), transparent 60%),
    radial-gradient(760px 480px at 92% 4%, rgba(240, 140, 30, 0.09), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; height: 100%; }

/* ---------- 开屏（logo 启动页） ---------- */
body.is-splashing { overflow: hidden; }

#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(760px 520px at 50% 34%, rgba(61, 123, 255, 0.22), transparent 62%),
    radial-gradient(620px 460px at 78% 78%, rgba(240, 140, 30, 0.14), transparent 65%),
    linear-gradient(180deg, #0a1020 0%, #0c1526 55%, #0a1020 100%);
  transition: opacity 500ms ease, transform 500ms ease;
}
#splash.splash-hide { opacity: 0; transform: scale(1.03); pointer-events: none; }

.splash-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: splash-in 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes splash-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.splash-glow {
  position: absolute;
  top: 6px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 140, 30, 0.34), transparent 66%);
  filter: blur(6px);
  animation: splash-pulse 2.2s ease-in-out infinite;
}
@keyframes splash-pulse {
  0%, 100% { transform: scale(0.94); opacity: 0.75; }
  50% { transform: scale(1.06); opacity: 1; }
}

.splash-logo {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.splash-name {
  position: relative;
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #fff;
  text-indent: 6px;
}
.splash-sub {
  position: relative;
  font-size: 12.5px;
  letter-spacing: 4px;
  color: var(--text-3);
  text-indent: 4px;
}
.splash-bar {
  position: relative;
  width: 168px;
  height: 3px;
  margin-top: 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.splash-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(240, 140, 30, 0.35), var(--accent));
  transform-origin: left center;
  animation: splash-load 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes splash-load {
  from { transform: scaleX(0.04); }
  60% { transform: scaleX(0.72); }
  to { transform: scaleX(1); }
}
.splash-tip {
  position: relative;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #53627c;
  text-transform: uppercase;
}

/* 小屏适配：logo 与字号收敛，避免溢出 */
@media (max-width: 480px) {
  .splash-logo { width: 80px; height: 80px; border-radius: 20px; }
  .splash-name { font-size: 22px; letter-spacing: 5px; }
  .splash-sub { font-size: 11.5px; letter-spacing: 3px; }
  .splash-bar { width: 136px; }
}
@media (max-height: 520px) {
  .splash-inner { gap: 10px; }
  .splash-logo { width: 64px; height: 64px; border-radius: 16px; }
  .splash-bar { margin-top: 8px; }
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  .splash-inner { animation: none; }
  .splash-glow { animation: none; }
  #splash { transition: opacity 200ms linear; }
  #splash.splash-hide { transform: none; }
}

/* ---------- 启动态 ---------- */
.boot {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.boot-logo { font-size: 30px; font-weight: 800; letter-spacing: 3px; }
.boot-logo-img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 24px rgba(240, 140, 30, 0.25); }
.boot-sub { color: var(--text-3); letter-spacing: 2px; font-size: 12px; }
.boot-bar { width: 180px; height: 3px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 3px; animation: boot 1.1s ease-in-out infinite; }
@keyframes boot { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

/* ---------- 登录 ---------- */
.login-wrap {
  height: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 64px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: linear-gradient(150deg, #0b1526 0%, #0a1220 60%, #101c30 100%);
}
.login-visual::after {
  content: "";
  position: absolute;
  right: -160px; bottom: -180px;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 140, 30, 0.18), transparent 62%);
}
.login-brand { font-size: 16px; letter-spacing: 1.5px; color: var(--text); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.login-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.login-title {
  font-size: 42px;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0;
}
.login-title em { font-style: normal; color: var(--accent); }
.login-desc { color: var(--text-2); max-width: 480px; margin-top: 18px; font-size: 14px; }
.login-points { display: flex; gap: 34px; margin-top: 42px; position: relative; z-index: 1; }
.login-point strong { display: block; font-size: 26px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.login-point span { color: var(--text-3); font-size: 12px; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 372px; }
.login-card h2 { font-size: 22px; margin: 0 0 6px; }
.login-card .muted { margin-bottom: 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 84px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.login-hint { margin-top: 18px; padding: 11px 13px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); font-size: 12px; color: var(--text-2); line-height: 1.8; }
.login-hint b { color: var(--accent); font-weight: 600; }
.login-error { color: #ff8f8f; font-size: 12.5px; min-height: 18px; margin-top: 4px; }

/* ---------- 框架 ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100%; transition: grid-template-columns 0.18s ease; }
.shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0c1526 0%, #0a1020 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-head {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0; display: block;
  background: var(--surface-2);
}
.logo-text { font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; }
.logo-text small { display: block; font-size: 10px; color: var(--text-3); letter-spacing: 1px; font-weight: 400; }
.collapsed .logo-text { display: none; }

.nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 10.5px; color: var(--text-3); letter-spacing: 1.4px; padding: 6px 10px; text-transform: uppercase; white-space: nowrap; }
.collapsed .nav-group-title { opacity: 0; height: 10px; padding: 0; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px;
  color: var(--text-2); text-decoration: none;
  font-size: 13px; cursor: pointer; user-select: none;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
  position: relative;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: #ffb562; font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.9; }
.collapsed .nav-item span { display: none; }
.collapsed .nav-item { justify-content: center; padding: 10px 0; }

.sidebar-foot { border-top: 1px solid var(--line); padding: 10px; flex-shrink: 0; }
.collapse-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; color: var(--text-3);
  padding: 8px 11px; border-radius: 8px; cursor: pointer; font-size: 12px;
  font-family: inherit;
}
.collapse-btn:hover { background: var(--surface); color: var(--text-2); }
.collapsed .collapse-btn span { display: none; }
.collapsed .collapse-btn { justify-content: center; }
.build-tag {
  font-size: 10.5px; color: var(--accent); opacity: 0.95; font-weight: 600;
  padding: 2px 11px 8px; letter-spacing: 0.4px; white-space: nowrap;
}
.collapsed .build-tag { display: none; }

/* 版本更新提示条 */
#update-banner {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  padding: 11px 12px 11px 18px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
  font-size: 12.5px; color: var(--text-2); z-index: 95;
  animation: pop-up 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
#update-banner::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #f08c1e; box-shadow: 0 0 0 4px rgba(240, 140, 30, 0.18);
}
@keyframes pop-up { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.main { display: flex; flex-direction: column; overflow: hidden; }
.header {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 32, 0.72);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.page-title { font-size: 16px; font-weight: 700; letter-spacing: 0.3px; }
.page-sub { color: var(--text-3); font-size: 12px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.clock { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(140deg, #3d7bff, #22d3ee); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #04121f; }
.user-meta { line-height: 1.25; }
.user-meta strong { font-size: 12.5px; font-weight: 600; display: block; }
.user-meta span { font-size: 10.5px; color: var(--text-3); }

.content { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.content::-webkit-scrollbar { width: 9px; }
.content::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 5px; border: 2px solid var(--bg); }

/* ---------- 通用块 ---------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, #101a2c 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.card-title { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--accent); }
.card-extra { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 10px; }

.grid { display: grid; gap: 14px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt-14 { margin-top: 14px; }
.mt-8 { margin-top: 8px; }
.mb-14 { margin-bottom: 14px; }
.muted { color: var(--text-3); font-size: 12px; }
.text-2 { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* KPI */
.kpi { position: relative; overflow: hidden; }
.kpi-label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.kpi-foot { margin-top: 8px; font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi-accent { position: absolute; right: -18px; top: -18px; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle, rgba(240,140,30,0.16), transparent 68%); }
.delta-up { color: #ff6b6b; }
.delta-down { color: #34d399; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: all 0.14s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: #ffc07a; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1a1002; font-weight: 650; }
.btn-primary:hover { background: #ff9d33; color: #1a1002; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-icon { padding: 6px; width: 30px; height: 30px; }
.btn-danger { border-color: rgba(239, 68, 68, 0.4); color: #ff9b9b; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.12); border-color: var(--red); color: #ffb4b4; }

/* 标签 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-gray { color: #9aa8c0; background: rgba(154, 168, 192, 0.12); border-color: rgba(154, 168, 192, 0.24); }
.badge-green { color: #4ade80; background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.26); }
.badge-orange { color: #ffb254; background: rgba(240, 140, 30, 0.14); border-color: rgba(240, 140, 30, 0.3); }
.badge-red { color: #ff8585; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.26); }
.badge-blue { color: #7aa8ff; background: rgba(61, 123, 255, 0.14); border-color: rgba(61, 123, 255, 0.3); }
.badge-cyan { color: #59e2f5; background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.26); }
.badge-purple { color: #c084fc; background: rgba(168, 85, 247, 0.13); border-color: rgba(168, 85, 247, 0.28); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  text-align: left; font-weight: 500; color: var(--text-3); font-size: 11.5px;
  padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: rgba(255,255,255,0.015); position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
table.data tbody tr { cursor: pointer; transition: background 0.1s; }
table.data tbody tr:hover { background: rgba(240, 140, 30, 0.05); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .strong { font-weight: 600; color: #fff; }
table.data .col-actions { text-align: right; white-space: nowrap; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--text-3); padding: 42px 0; font-size: 12.5px; }

/* 工具栏 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 132px; padding: 7px 10px; font-size: 12.5px; }
.toolbar .search { min-width: 220px; }
.spacer { flex: 1; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; font-size: 12px; color: var(--text-3); }
.pager-btns { display: flex; gap: 6px; align-items: center; }
.pager-btns button {
  min-width: 30px; height: 28px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 12px; font-family: inherit;
}
.pager-btns button.active { background: var(--accent-soft); border-color: var(--accent); color: #ffb562; font-weight: 600; }
.pager-btns button:disabled { opacity: 0.35; cursor: not-allowed; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  padding: 8px 14px; font-size: 12.5px; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: #ffb562; border-bottom-color: var(--accent); font-weight: 600; }

/* 图表 */
.chart { width: 100%; display: block; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.bar-track { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }

/* 抽屉 / 弹窗 */
.overlay {
  position: fixed; inset: 0; background: rgba(4, 8, 16, 0.66);
  backdrop-filter: blur(3px); z-index: 60; animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 94vw;
  background: var(--bg-2); border-left: 1px solid var(--line-strong);
  z-index: 61; display: flex; flex-direction: column;
  animation: slide-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -20px 0 50px rgba(0,0,0,0.4);
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--bg-2); }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 560px; max-width: 94vw; max-height: 88vh;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 14px;
  z-index: 61; display: flex; flex-direction: column; box-shadow: var(--shadow);
  animation: pop 0.16s ease;
}
.modal.wide { width: 780px; }
@keyframes pop { from { transform: translate(-50%, -47%) scale(0.985); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.modal-head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: grab; user-select: none; }
.modal-head .close-x { cursor: pointer; flex-shrink: 0; }
.modal.dragging { animation: none; cursor: grabbing; box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55); }
.modal.dragging .modal-head { cursor: grabbing; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }
.modal-title { font-size: 14.5px; font-weight: 650; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.close-x { background: transparent; border: 0; color: var(--text-3); font-size: 20px; cursor: pointer; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.close-x:hover { background: var(--surface); color: var(--text); }

/* Toast */
#toast-root { position: fixed; top: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 220px; max-width: 380px; padding: 11px 14px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-size: 12.5px; box-shadow: var(--shadow); animation: toast-in 0.18s ease;
  display: flex; gap: 9px; align-items: flex-start;
}
@keyframes toast-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok { border-left: 3px solid var(--green); }
.toast.err { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }

/* 详情字段 */
.dl { display: grid; grid-template-columns: 96px 1fr; gap: 10px 14px; font-size: 12.5px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; color: var(--text); }
.section-title { font-size: 12.5px; font-weight: 650; color: var(--text-2); margin: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; }
.section-title:first-child { margin-top: 0; }

/* 时间线 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line-strong); }
.tl-item { position: relative; padding: 0 0 16px 0; font-size: 12.5px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--bg-2); }
.tl-item.hot::before { background: var(--accent); }
.tl-time { color: var(--text-3); font-size: 11px; }

/* 铺位图 */
.floor-grid { display: flex; flex-direction: column; gap: 18px; }
.floor-zone { }
.floor-zone-title { font-size: 12px; color: var(--text-2); margin-bottom: 9px; display: flex; align-items: center; gap: 10px; }
.floor-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.floor-cell {
  border-radius: 8px; padding: 8px 6px; text-align: center; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 11px;
  transition: transform 0.1s, border-color 0.12s;
}
.floor-cell:hover { transform: translateY(-2px); border-color: var(--accent); }
.floor-cell b { display: block; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.floor-cell span { color: var(--text-3); font-size: 10px; }
.st-online { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.08); }
.st-online b { color: #6ee7a0; }
.st-locked { border-color: rgba(240, 140, 30, 0.45); background: rgba(240, 140, 30, 0.1); }
.st-locked b { color: #ffb254; }
.st-signed, .st-rented, .st-transferred { border-color: rgba(61, 123, 255, 0.35); background: rgba(61, 123, 255, 0.08); }
.st-signed b, .st-rented b, .st-transferred b { color: #8ab3ff; }
.st-draft { border-color: rgba(255,255,255,0.12); }
.st-offline { opacity: 0.42; }

/* 步骤条 */
.steps { display: flex; align-items: center; gap: 0; margin: 6px 0 18px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.step i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 10px; font-style: normal; flex-shrink: 0; }
.step.done i { background: var(--accent); border-color: var(--accent); color: #180f02; font-weight: 700; }
.step.done { color: #ffb562; }
.step-line { height: 1px; flex: 1; background: var(--line-strong); margin: 0 8px; }

/* 指示：色点 */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-orange { background: var(--accent); }
.dot-red { background: var(--red); }
.dot-blue { background: var(--blue); }
.dot-gray { background: var(--text-3); }

/* 表单网格 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field { margin-bottom: 0; }
/* 可搜索下拉（combobox）：输入即模糊匹配，弹出候选 */
.combo { position: relative; }
.combo-input { padding-right: 30px; cursor: text; }
.combo-arrow {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 11px; pointer-events: none;
}
.combo-pop {
  position: fixed; z-index: 88; padding: 5px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 10px; overflow-y: auto;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  animation: pop-fade 0.12s ease;
}
.combo-pop[hidden] { display: none; }
@keyframes pop-fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.combo-group {
  font-size: 10.5px; color: var(--text-3); letter-spacing: 0.05em;
  padding: 7px 9px 4px; position: sticky; top: 0; background: var(--surface-2);
}
.combo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 9px; border-radius: 7px; cursor: pointer; font-size: 13px;
}
.combo-item:hover, .combo-item.active { background: var(--surface-3); }
.combo-item.active { box-shadow: inset 0 0 0 1px var(--line-strong); }
.combo-item .ci-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-item .ci-meta { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.combo-item mark, .combo-group mark { background: rgba(240, 140, 30, 0.22); color: var(--accent); border-radius: 3px; padding: 0 1px; }
.combo-empty, .combo-more { padding: 11px 9px; font-size: 11.5px; color: var(--text-3); text-align: center; }

.help { font-size: 11px; color: var(--text-3); margin-top: 5px; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; }
.switch input { display: none; }
.switch i { width: 34px; height: 19px; border-radius: 20px; background: var(--surface-3); position: relative; transition: background 0.16s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform 0.16s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(15px); }

/* 空状态 / 加载 */
.loading { padding: 40px 0; text-align: center; color: var(--text-3); font-size: 12.5px; }
.loading i { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; margin-right: 7px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 数据速览条 */
.stat-strip { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stat-strip > div { flex: 1; padding: 12px 16px; border-right: 1px solid var(--line); }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip .s-label { font-size: 11px; color: var(--text-3); }
.stat-strip .s-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }

@media (max-width: 1180px) {
  .g-6, .g-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}
