/* ============================================================
   采购协同套件 · 设计系统
   ============================================================ */
:root {
  --brand: #AD461D;
  --brand-2: #CA602B;
  --brand-dark: #763819;
  --brand-soft: #FFF0E2;
  --brand-line: #EDCFB2;

  --bg: #FAF7F1;
  --card: #FFFFFF;
  --line: #EADFD1;
  --line-soft: #F1E9DF;

  --text: #30251E;
  --text-2: #5B4A3E;
  --muted: #78665A;
  --faint: #9A8777;

  --ok: #0E8F6E; --ok-soft: #E6F6F1;
  --warn: #B4761A; --warn-soft: #FDF3E3;
  --danger: #C0392B; --danger-soft: #FCEDEB;
  --info: #AD461D; --info-soft: #FFF0E2;
  --purple: #6B4FA8; --purple-soft: #F1ECFA;
  --gray-soft: #F5EFE7;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(47,33,21, .04), 0 8px 24px -16px rgba(47,33,21, .22);
  --shadow-lg: 0 24px 64px -24px rgba(42,29,19, .38);
  --side-w: 228px;
  --top-h: 56px;

  --f-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; font-size: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.2px; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; }

.mono { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: -.2px; }
.tb { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.up { color: var(--danger); }
.down { color: var(--ok); }
.warn-t { color: var(--warn); }
.sp { flex: 1; }
.tnum { font-variant-numeric: tabular-nums; }

/* ==================== 登录 ==================== */
.login { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 100vh; }
.login-l {
  position: relative; display: flex; flex-direction: column;
  padding: 40px 56px;
  background: radial-gradient(1200px 600px at 12% 8%, #69492F 0%, #422E1E 42%, #2B1E14 100%);
  color: #fff; overflow: hidden;
}
.login-l::after {
  content: ""; position: absolute; right: -160px; bottom: -180px; width: 520px; height: 520px;
  border-radius: 50%; background: radial-gradient(circle, rgba(197,140,94,.34), transparent 62%);
}
.lg-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.lg-brand .logo { width: 36px; height: 36px; font-size: 17px; }
.lg-brand .t1 { font-size: 14px; font-weight: 600; letter-spacing: .5px; }
.lg-brand .t2 { font-size: 9.5px; letter-spacing: 2px; color: rgba(255,255,255,.48); }
.lg-main { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; max-width: 560px; }
.lg-main h1 { font-size: 31px; line-height: 1.34; letter-spacing: -.6px; margin-bottom: 16px; font-weight: 650; }
.lg-main .sub { font-size: 13.5px; line-height: 1.85; color: rgba(255,255,255,.72); margin: 0 0 30px; }
.lg-feats { display: grid; gap: 14px; }
.lf { display: flex; gap: 12px; align-items: flex-start; }
.lfi {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.13); color: #E7A875;
}
.lfi svg { width: 17px; height: 17px; }
.lf b { display: block; font-size: 12.8px; font-weight: 600; margin-bottom: 2px; }
.lf span { font-size: 11.8px; color: rgba(255,255,255,.58); line-height: 1.6; }
.lg-foot { position: relative; z-index: 1; font-size: 11px; color: rgba(255,255,255,.35); text-align: center; }

.login-r { display: flex; align-items: center; justify-content: center; background: #fff; padding: 40px; }
.login-box { width: 100%; max-width: 372px; }
.lb-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.lb-h h2 { font-size: 22px; }
.btn.primary { background: linear-gradient(180deg, #B8491D, #AD461D); border-color: #AD461D; box-shadow: 0 1px 2px rgba(131,91,59,.35); }
.btn.primary:hover { background: linear-gradient(180deg, #CA602B, #8B3514); }
.btn.block { width: 100%; }
.btn.lg { padding: 11px; font-size: 14px; margin-top: 6px; }
.fl { display: block; margin-bottom: 14px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.fl input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FFFCF8; font-size: 13.5px;
  transition: .15s;
}
.fl input:focus { outline: none; border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(187,122,68,.12); }
.lb-roles { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.lbl { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }   /* 全部账号一屏展示，不做内滚动 */
.role-chip {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px; text-align: left; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: .14s;
}
.role-chip:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.role-chip .av { width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.role-chip .rn { font-size: 12px; font-weight: 500; white-space: nowrap; flex: 0 0 auto; }
.role-chip .rt { font-size: 10.5px; color: var(--muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert { padding: 9px 12px; border-radius: var(--radius-sm); font-size: 12px; margin-bottom: 12px; }
.alert.danger { background: var(--danger-soft); color: #8E2A1F; border: 1px solid #F3D3CE; }
.alert.ok { background: var(--ok-soft); color: #0A6B52; border: 1px solid #C9EADF; }
.alert.warn { background: var(--warn-soft); color: #8A5A0E; border: 1px solid #F0DFC0; }
.alert.info { background: var(--info-soft); color: #68482F; border: 1px solid #F1E6D8; }

/* ==================== 骨架 ==================== */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #302115 0%, #241910 100%);
  border-right: 1px solid #20160E;
}
.side-h { display: flex; align-items: center; gap: 10px; padding: 15px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.logo {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(140deg, #CA602B, #AD461D); color: #fff; font-size: 14px; font-weight: 600;
  flex: 0 0 auto; box-shadow: 0 2px 8px rgba(131,91,59,.4);
}
.side-h .t1 { font-size: 12.5px; font-weight: 600; color: #F8F3ED; letter-spacing: .3px; }
.side-h .t2 { font-size: 8.5px; letter-spacing: 1.6px; color: rgba(255,255,255,.32); }

.side-n { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.side-n::-webkit-scrollbar { width: 4px; }
.side-n::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.nav-g {
  font-size: 10px; letter-spacing: 1.2px; color: rgba(255,255,255,.28);
  padding: 12px 10px 6px; font-weight: 600;
}
.nav-i {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  color: rgba(255,255,255,.66); font-size: 12.5px; transition: .14s; position: relative; margin-bottom: 1px;
}
.nav-i .ic { width: 15px; height: 15px; opacity: .8; flex: 0 0 auto; }
/* 图标基础尺寸（全局兜底，避免未指定时撑满容器） */
svg.ic { width: 15px; height: 15px; flex: 0 0 auto; }
svg.ic.tiny { width: 11px; height: 11px; }
svg.ic.lg { width: 20px; height: 20px; }
.icon-btn svg { width: 16px; height: 16px; }
.qf svg.ic { opacity: .55; }.nav-i:hover { background: rgba(255,255,255,.06); color: #F4EBE0; }
.nav-i.on { background: linear-gradient(90deg, rgba(187,122,68,.34), rgba(187,122,68,.14)); color: #fff; font-weight: 550; }
.nav-i.on::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: #C79165; }
.nav-i.on .ic { opacity: 1; color: #DDC2A0; }
.bd {
  margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: #C0392B; color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center;
}
.side-f { padding: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.who { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; }
.who .av {
  width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.1);
  color: #F4EBE0; display: grid; place-items: center; font-size: 12px; flex: 0 0 auto;
}
.who .wi { flex: 1; min-width: 0; }
.who .n { font-size: 12px; color: #F7F1EA; font-weight: 550; }
.who .r { font-size: 10.5px; color: rgba(255,255,255,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.crumb b { color: var(--text); font-weight: 600; }
.crumb i { font-style: normal; color: var(--faint); }
.top-search {
  display: flex; align-items: center; gap: 7px; margin-left: 18px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #FDFBF8; width: 260px;
}
.top-search svg { width: 14px; height: 14px; color: var(--faint); }
.top-search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 12.5px; }
.scope-chip {
  font-size: 11.5px; color: var(--brand); background: var(--brand-soft);
  border: 1px solid var(--brand-line); padding: 3px 9px; border-radius: 6px; white-space: nowrap;
}
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; color: var(--text-2); position: relative; transition: .14s;
}
.icon-btn:hover { background: var(--gray-soft); border-color: var(--line); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.on-dark { color: rgba(255,255,255,.5); }
.icon-btn.on-dark:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.1); color: #fff; }
.icon-btn .dot { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); border: 1.5px solid #fff; }

.body { padding: 18px 20px 40px; flex: 1; }

/* ==================== 通知浮层 ==================== */
.noti-pop {
  position: fixed; top: 52px; right: 20px; width: 340px; max-height: 460px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.np-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-weight: 600; font-size: 13px; }
.np-list { overflow: auto; flex: 1; }
.np-i { display: flex; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.np-i:hover { background: #FEFDFB; }
.np-d { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; background: var(--info); }
.np-i.warn .np-d { background: var(--warn); }
.np-i.danger .np-d { background: var(--danger); }
.np-i .t { font-size: 12.5px; font-weight: 550; }
.np-i .b { font-size: 11.5px; color: var(--text-2); line-height: 1.6; margin-top: 2px; }
.np-i .m { font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.np-f { padding: 9px; border-top: 1px solid var(--line-soft); }

/* ==================== 通用组件 ==================== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 14px; }
.card.pad { padding: 16px; }
.card-h { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line-soft); }
.card-h h3 { font-size: 13.5px; font-weight: 600; }
.chs { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card-b { padding: 14px 16px 16px; }
.tw { overflow-x: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-weight: 500; font-size: 12.5px; transition: .14s; white-space: nowrap;
}
.btn:hover { background: var(--gray-soft); color: var(--text); border-color: #EBE2D8; }
.btn.solid { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.solid:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 3px rgba(131,91,59, .28); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--text-2); }
.btn.ghost:hover { background: #FDFBF8; border-color: var(--brand-line); color: var(--brand); }
.btn.soft { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.btn.soft:hover { background: #F6EFE6; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: #0B7A5E; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #A22F23; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn.xs { padding: 3px 8px; font-size: 11.5px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 1.5px 7px; border-radius: 5px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap; line-height: 1.65;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.gray { background: var(--gray-soft); color: var(--text-2); }

.sla { font-size: 11px; padding: 1.5px 6px; border-radius: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sla.ok { background: var(--gray-soft); color: var(--text-2); }
.sla.due { background: var(--warn-soft); color: var(--warn); }
.sla.over { background: var(--danger-soft); color: var(--danger); font-weight: 550; }

.empty { padding: 34px 16px; text-align: center; }
.empty .e-t { font-size: 12.5px; color: var(--muted); }
.empty .e-h { font-size: 11.5px; color: var(--faint); margin-top: 4px; }

/* 表格 */
table.t { width: 100%; font-size: 12.5px; }
table.t thead th {
  text-align: left; font-weight: 550; font-size: 11.5px; color: var(--muted);
  padding: 9px 12px; background: #FDFCFA; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.t thead th.r { text-align: right; }
table.t tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr.clickable { cursor: pointer; }
table.t tbody tr.clickable:hover { background: #FFFAF4; }
table.t tbody td.r { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { padding: 9px 12px; background: #FDFCFA; font-weight: 600; border-top: 1px solid var(--line); }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 5px; background: #fff; padding: 4px; border: 1px solid var(--line); border-radius: 9px; }
.chip {
  padding: 5px 11px; border-radius: 6px; border: 0; background: transparent;
  color: var(--text-2); font-size: 12px; font-weight: 500; transition: .14s; white-space: nowrap;
}
.chip:hover { background: var(--gray-soft); }
.chip.on { background: var(--brand); color: #fff; box-shadow: 0 1px 3px rgba(131,91,59,.3); }
.chip .n { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.search {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 12.5px; outline: none; min-width: 180px;
}
.search:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(187,122,68,.1); }
select.search { cursor: pointer; }

/* KPI */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px 11px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); opacity: .85; }
.kpi.ok::before { background: var(--ok); }
.kpi.warn::before { background: var(--warn); }
.kpi.danger::before { background: var(--danger); }
.kpi.purple::before { background: var(--purple); }
.k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.k-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.k-ic { color: var(--faint); }
.k-ic svg { width: 14px; height: 14px; }
.k-val { font-size: 23px; font-weight: 650; letter-spacing: -.7px; font-variant-numeric: tabular-nums; line-height: 1.24; }
.k-val small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.k-bot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 3px; min-height: 28px; }
.k-sub { font-size: 11px; color: var(--muted); }
.k-sub b { color: var(--danger); font-weight: 600; }
.k-delta { font-size: 11px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.k-delta.up { background: var(--danger-soft); color: var(--danger); }
.k-delta.down { background: var(--ok-soft); color: var(--ok); }
.k-spark { margin-left: auto; }

/* 布局网格 */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 1.6fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 1.6fr; }
.g-1-1-1 { grid-template-columns: 1fr 1fr 1fr; }

/* 图表 */
.chart { width: 100%; height: auto; overflow: visible; }
.ch-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--text-2); }
.ch-legend.center { justify-content: center; }
.ch-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ch-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.ch-tip {
  position: fixed; top: 0; left: 0; z-index: 999; pointer-events: none;
  background: rgba(43,30,19, .93); color: #fff; font-size: 11.5px; padding: 6px 9px;
  border-radius: 6px; opacity: 0; transition: opacity .12s; max-width: 260px; line-height: 1.5;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.5);
}
.ch-tip.on { opacity: 1; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-wrap { flex-wrap: wrap; }
.donut-legend { flex: 1 1 132px; min-width: 0; display: grid; gap: 6px; }
.donut-legend > div { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; gap: 6px; align-items: start; font-size: 11.4px; }
.donut-legend i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; margin-top: 4px; }
.donut-legend .n { color: var(--text-2); line-height: 1.3; word-break: break-word; }   /* 名称换行而不是截断 */
.donut-legend .v { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.3; }
.donut-legend .p { width: 34px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.3; }

.heat { display: grid; gap: 3px; font-size: 10.5px; }
.heat .hc { text-align: center; color: var(--muted); font-size: 10px; padding-bottom: 2px; }
.heat .hr { color: var(--text-2); display: flex; align-items: center; font-size: 11px; }
.heat .cell { border-radius: 3px; display: grid; place-items: center; font-variant-numeric: tabular-nums; font-size: 10px; }

.hbar { display: grid; gap: 9px; }
.hb-row { display: grid; grid-template-columns: 96px 1fr 62px; align-items: center; gap: 9px; }
.hb-name { font-size: 11.8px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 7px; background: var(--gray-soft); border-radius: 4px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 4px; }
.hbar.wh .hb-row { grid-template-columns: 92px 1fr 58px 40px; }
.hb-badge { font-size: 10.5px; text-align: center; color: var(--text-2); background: var(--gray-soft); border-radius: 5px; padding: 1px 0; font-variant-numeric: tabular-nums; }
.hb-badge.hot { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.hb-val { text-align: right; font-size: 11.5px; font-variant-numeric: tabular-nums; font-weight: 550; }

/* 四队列 */
.qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.qcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.qcard .qh { display: flex; align-items: center; gap: 7px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.qcard .qh .t { font-size: 12.5px; font-weight: 600; }
.qcard .qh .c { margin-left: auto; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.qcard .qh .c.red { color: var(--danger); }
.qcard .qh .c.orange { color: var(--warn); }
.qcard.warn { border-top: 2px solid var(--warn); }
.qcard.danger { border-top: 2px solid var(--danger); }
.qcard.info { border-top: 2px solid var(--brand); }
.qcard .qb { flex: 1; padding: 4px 0; }
.qcard .qf { padding: 9px 14px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.qcard .qf:hover { color: var(--brand); background: #FEFDFB; }
.qi { display: flex; align-items: center; gap: 8px; padding: 7px 14px; cursor: pointer; }
.qi:hover { background: #FFFAF4; }
.qi .qi-m { flex: 1; min-width: 0; }
.qi .t1 { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi .t2 { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 抽屉 */
.mask { position: fixed; inset: 0; background: rgba(41,29,19, .38); backdrop-filter: blur(2px); z-index: 100; display: flex; justify-content: flex-end; }
.drawer {
  background: #fff; height: 100%; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); transform: translateX(24px); opacity: .6; transition: .2s cubic-bezier(.2,.8,.3,1);
}
.drawer.in { transform: none; opacity: 1; }
.dh { display: flex; align-items: flex-start; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.dh-t { flex: 1; min-width: 0; }
.dh h3 { font-size: 14.5px; }
.dh .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.db { flex: 1; overflow: auto; padding: 16px 18px 22px; }
.df { padding: 11px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; background: #fff; }
.df .btn { flex: 1; }

.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; margin-bottom: 14px; }
.kv .k { font-size: 11px; color: var(--muted); }
.kv .v { font-size: 13px; font-weight: 550; margin-top: 1px; }
.sec { display: flex; align-items: center; gap: 8px; margin: 16px 0 9px; }
.sec:first-child { margin-top: 0; }
.sec h4 { font-size: 12.5px; }
.sec .sp { flex: 1; }

.tl { position: relative; padding-left: 16px; }
.tl::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-i { position: relative; padding-bottom: 13px; }
.tl-i::before { content: ""; position: absolute; left: -15px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; border: 1.6px solid var(--brand-line); }
.tl-i.ok::before { border-color: var(--ok); background: var(--ok); }
.tl-i.rej::before { border-color: var(--danger); background: var(--danger); }
.tl-i .h { font-size: 12.2px; font-weight: 550; }
.tl-i .t { font-size: 10.5px; color: var(--faint); }
.tl-i .c { font-size: 11.5px; color: var(--text-2); background: #FDFBF8; border: 1px solid var(--line-soft); border-radius: 6px; padding: 6px 9px; margin-top: 5px; }

.steps { display: flex; align-items: center; gap: 0; margin: 2px 0 4px; }
.steps .s { flex: 1; height: 3px; background: var(--line); position: relative; }
.steps .s:first-child { border-radius: 2px 0 0 2px; }
.steps .s:last-child { border-radius: 0 2px 2px 0; }
.steps .s.done, .steps .s.cur { background: var(--brand); }
.steps .s.cur::after { content: ""; position: absolute; right: -1px; top: -3.5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.step-labels { display: flex; margin-bottom: 16px; }
.step-labels span { flex: 1; font-size: 9.5px; color: var(--faint); text-align: center; }
.step-labels span.on { color: var(--brand); font-weight: 600; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label, .fl2 { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 500; margin-bottom: 5px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #FFFCF8; font-size: 12.5px; outline: none; transition: .14s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(187,122,68,.1); }
.field textarea { min-height: 68px; resize: vertical; line-height: 1.6; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 骨架屏 */
.sk-wrap { display: grid; gap: 12px; }
.sk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sk-card { height: 84px; border-radius: var(--radius); background: linear-gradient(90deg, #F1E9DF 25%, #FCFAF8 37%, #F1E9DF 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
.sk-card.tall { height: 210px; }
.sk-block { height: 240px; border-radius: var(--radius); background: linear-gradient(90deg, #F1E9DF 25%, #FCFAF8 37%, #F1E9DF 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 12px);
  background: rgba(43,30,19, .94); color: #fff; padding: 9px 18px; border-radius: 8px;
  font-size: 12.5px; opacity: 0; pointer-events: none; transition: .2s; z-index: 300; box-shadow: 0 12px 32px -12px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: rgba(14, 122, 94, .96); }
.toast.err { background: rgba(178, 52, 40, .96); }

.gauge { height: 5px; background: #F3EDE6; border-radius: 99px; overflow: hidden; }
.gauge > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.gauge.warn > i { background: var(--warn); }
.gauge.danger > i { background: var(--danger); }
.gauge.ok > i { background: var(--ok); }

/* ==================== 响应式 ==================== */
@media (max-width: 1400px) {
  .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  :root { --side-w: 64px; }
  .side-h .t1, .side-h .t2, .nav-i span:not(.bd), .nav-g, .who .wi { display: none; }
  .side-h { justify-content: center; padding: 14px 0; }
  .nav-i { justify-content: center; padding: 10px; }
  .nav-i.on::before { display: none; }
  .who { justify-content: center; }
  .g-2-1, .g-1-2, .g3, .g4, .g-1-1-1 { grid-template-columns: 1fr; }
  .top-search { width: 160px; }
  .kv { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 228px; z-index: 90; transform: translateX(-100%); transition: .2s; }
  .side.open { transform: none; }
  .side-h .t1, .side-h .t2, .nav-i span:not(.bd), .nav-g, .who .wi { display: block; }
  .nav-i { justify-content: flex-start; padding: 8px 10px; }
  .body { padding: 14px 12px 40px; }
  .top { padding: 0 12px; gap: 8px; }
  .crumb { display: none; }
  .top-search { margin-left: 0; flex: 1; width: auto; }
  .scope-chip { display: none; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .qgrid { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .login { grid-template-columns: 1fr; }
  .login-l { display: none; }
  .login-r { min-height: 100vh; }
  table.t { min-width: 640px; }
  .df { flex-wrap: wrap; }
}



/* ============================================================
   品牌层：馋小兔（产品名）· 光初 AI（厂商）
   ============================================================ */
:root {
  --accent: #E8590C;
  --accent-2: #F98A3C;
  --accent-soft: #FDF0E7;
  --accent-line: #F6CDB4;
}
.logo {
  background: linear-gradient(140deg, var(--accent-2), var(--accent)) !important;
  box-shadow: 0 2px 10px rgba(232, 89, 12, .34) !important;
  font-size: 13px !important;
}
.logo.lg { width: 46px; height: 46px; border-radius: 12px; font-size: 20px !important; }
.side-h { text-decoration: none; }
.side-h:hover .t1 { color: #fff; }
.side-h .t1 { letter-spacing: .6px; }
.logo .lm { width: 72%; height: 72%; display: block; }
.logo.lg .lm { width: 70%; height: 70%; }

/* ==================== 登录 v2：先业态，再身份 ==================== */
.login2 { display: grid; grid-template-columns: 372px 1fr; min-height: 100vh; background: #F9F5EE; }

/* 左侧品牌栏 */
.l2-l {
  position: relative; display: flex; flex-direction: column; padding: 36px 38px 30px; color: #fff; overflow: hidden;
  background: radial-gradient(900px 520px at 10% 6%, #69492F 0%, #422E1E 46%, #291D13 100%);
}
.l2-l::after {
  content: ""; position: absolute; right: -190px; bottom: -210px; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(197,140,94,.3), transparent 62%);
}
.l2-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.l2-mid h1 { font-size: 26px; line-height: 1.42; letter-spacing: -.4px; font-weight: 650; margin-bottom: 16px; }
.l2-mid .sub { font-size: 12.5px; line-height: 1.95; color: rgba(255,255,255,.66); margin: 0; }
.l2-nums { display: flex; gap: 26px; margin-top: 34px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.11); }
.l2-nums > div { display: flex; flex-direction: column; gap: 3px; }
.l2-nums b { font-size: 25px; font-weight: 650; letter-spacing: -.6px; color: #E7A875; font-variant-numeric: tabular-nums; }
.l2-nums span { font-size: 10.5px; color: rgba(255,255,255,.44); letter-spacing: .4px; }

/* 右侧主区 */
.l2-r { display: flex; flex-direction: column; padding: 26px 42px 34px; overflow-y: auto; max-height: 100vh; }
.l2-steps { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.stp { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.stp i {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: 11px; font-weight: 600; background: #F6EFE7; color: #AB9684;
}
.stp.on { color: var(--brand); font-weight: 600; }
.stp.on i { background: var(--brand); color: #fff; box-shadow: 0 0 0 3px rgba(131,91,59,.12); }
.stp.done i { background: #F3E9DD; color: var(--brand); }
.stp-line { width: 34px; height: 1px; background: var(--line); }
.stp-line.on { background: #DEC4A4; }
.lk { background: none; border: 0; font-size: 12px; color: var(--muted); padding: 4px 2px; display: inline-flex; align-items: center; gap: 4px; }
.lk:hover { color: var(--brand); }
.lk svg { width: 14px; height: 14px; }

.l2-h { padding: 26px 0 18px; }
.l2-h h2 { font-size: 23px; letter-spacing: -.4px; margin-bottom: 7px; }
.l2-h p { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin: 0; max-width: 640px; }
.l2-h .lk.back { margin-bottom: 12px; padding: 2px 0; }

/* 业态卡片 */
.fmt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fmt-card {
  text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 17px 14px;
  transition: .16s; display: flex; flex-direction: column; gap: 10px; min-height: 132px;
}
.fmt-card:hover { border-color: #EAC6A6; box-shadow: 0 6px 20px rgba(94,65,42,.09); transform: translateY(-1px); }
.fmt-card.wide { grid-column: span 2; min-height: auto; }
.fc-top { display: flex; align-items: center; gap: 11px; }
.fc-ic {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center;
  background: linear-gradient(160deg, #FAF6F1, #F5ECE2); color: var(--brand); border: 1px solid #F4EBDF;
}
.fc-ic svg { width: 19px; height: 19px; }
.fc-ic.sm { width: 26px; height: 26px; border-radius: 7px; }
.fc-ic.sm svg { width: 14px; height: 14px; }
.fc-hd { min-width: 0; }
.fc-n { font-size: 14.5px; font-weight: 650; letter-spacing: -.2px; color: var(--text); }
.fc-tag { font-size: 11px; color: var(--muted); margin-top: 2px; }
.fc-go {
  margin-left: auto; flex: 0 0 auto; font-size: 11px; color: var(--brand); opacity: 0; transition: .16s;
  display: inline-flex; align-items: center; gap: 1px; white-space: nowrap;
}
.fc-go svg { width: 13px; height: 13px; }
.fmt-card:hover .fc-go { opacity: 1; }
.fc-pain {
  font-size: 11.8px; line-height: 1.65; color: #806C5C; padding: 8px 10px; border-radius: 8px;
  background: #FCFAF7; border-left: 2px solid #EFE2D3;
}
.fc-m { display: flex; gap: 14px; font-size: 10.8px; color: var(--muted); margin-top: auto; }
.fc-m span { position: relative; }
.fc-m span + span::before { content: "·"; position: absolute; left: -8px; color: #E2D7C9; }
.l2-tip { margin-top: 16px; font-size: 11.5px; color: var(--muted); }

/* 身份选择 */
.l2-fmtbar {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 10px; font-size: 11.8px;
  background: #fff; border: 1px solid var(--line); color: var(--text-2); margin-bottom: 20px;
}
.l2-fmtbar b { font-size: 12.5px; color: var(--text); font-weight: 650; }
.l2-fmtbar .sep { width: 1px; height: 12px; background: var(--line); }
.pgrp { margin-bottom: 20px; }
.pgrp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.pgrp-t { font-size: 12px; font-weight: 650; color: var(--text); }
.pgrp-n {
  font-size: 10px; padding: 0 6px; height: 16px; line-height: 16px; border-radius: 8px;
  background: #FFF0E2; color: var(--brand); font-variant-numeric: tabular-nums;
}
.pgrp-d { font-size: 10.8px; color: var(--muted); }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pcard {
  display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 12px 13px;
  background: #fff; text-align: left; border: 1px solid var(--line); border-radius: 9px; transition: .14s;
}
.pcard:hover { border-color: #EAC6A6; background: #FFFAF4; box-shadow: 0 3px 10px rgba(94,65,42,.07); }
.pcard:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pc-head { display: flex; align-items: center; gap: 8px; }
.pc-role-icon {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center;
  background: #FFF0E2; color: var(--brand-dark);
}
.pc-role { color: var(--text); font-size: 16px; font-weight: 680; line-height: 1.35; }
.pc-arrow { color: var(--muted); margin-left: auto; }
.pc-scope { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.pc-pain { color: var(--text-2); font-size: 13px; line-height: 1.55; }
.pc-work { color: var(--brand-dark); font-size: 11.5px; line-height: 1.5; margin-top: auto; padding-top: 2px; }

/* 手动登录 */
.l2-manual { max-width: 360px; }
.fl select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #FFFCF8; font-size: 13.5px; color: var(--text);
}
.fl select:focus { outline: none; border-color: var(--brand-2); background: #fff; }

@media (max-width: 1180px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .login2 { grid-template-columns: 1fr; }
  .l2-l { display: none; }
  .l2-r { max-height: none; padding: 20px; }
  .fmt-grid { grid-template-columns: 1fr; }
  .fmt-card.wide { grid-column: span 1; }
  .pgrid { grid-template-columns: 1fr; }
}

/* ==================== 视角业态切换 ==================== */
.scope-chip.sw { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; transition: .14s; }
.scope-chip.sw:hover { background: #F7F0E8; border-color: #EAC6A6; }
.scope-chip.sw svg { width: 12px; height: 12px; opacity: .62; }
.scope-pop {
  position: absolute; top: calc(100% - 6px); right: 74px; width: 214px; z-index: 60; padding: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 14px 38px rgba(61,43,28,.16);
}
.sp-h { font-size: 10.5px; color: var(--muted); padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line-soft); margin-bottom: 5px; }
.sp-i {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border-radius: 7px;
  background: none; border: 0; font-size: 12.5px; color: var(--text); text-align: left;
}
.sp-i:hover { background: var(--brand-soft); }
.sp-i.on { background: #FAF5F0; color: var(--brand); font-weight: 600; }
.sp-d { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #FAF6F2; color: var(--brand); flex: 0 0 auto; }
.sp-d svg { width: 13px; height: 13px; }
.sp-ck { margin-left: auto; font-size: 10px; color: var(--brand); }

/* ==================== 工作台：本业态相关场景 ==================== */
.home-scn { padding: 14px 16px; margin-bottom: 14px; }
.hs-h { display: flex; align-items: baseline; gap: 7px; margin-bottom: 11px; }
.hs-t { font-size: 12.5px; font-weight: 650; color: var(--text); }
.hs-h b { font-size: 15px; color: var(--brand); font-variant-numeric: tabular-nums; }
.hs-u { font-size: 11px; color: var(--muted); }
.hs-h .lnk { font-size: 11.5px; color: var(--brand); text-decoration: none; }
.hs-h .lnk + .lnk { margin-left: 10px; }
.hs-domains { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-d {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2);
  padding: 4px 9px; border-radius: 7px; background: #FCFAF7; border: 1px solid #F7F1E9; text-decoration: none;
}
.hs-d:hover { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.hs-d span { font-size: 10px; color: var(--brand); background: #fff; border-radius: 5px; padding: 0 5px; }

/* ==================== 登录：业态卡可视化 ==================== */
.fmt-card { position: relative; overflow: hidden; }
.fmt-card::after {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--fc) 12%, transparent), transparent 68%);
  pointer-events: none; transform: translate(34px, -44px);
}
.fmt-card .fc-ic {
  background: linear-gradient(150deg, color-mix(in srgb, var(--fc) 13%, #fff), color-mix(in srgb, var(--fc) 5%, #fff));
  border-color: color-mix(in srgb, var(--fc) 20%, #fff);
  color: var(--fc);
}
.fmt-card:hover { border-color: color-mix(in srgb, var(--fc) 34%, #fff); }
.fmt-card:hover .fc-n { color: var(--fc); }
.fmt-card .fc-go { color: var(--fc); }

.fc-meters { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px 12px; margin-top: auto; padding-top: 2px; }
.fmt-card.wide .fc-meters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px 26px; }
.mtr { display: grid; grid-template-columns: 1fr; gap: 3px; min-width: 0; }
.mtr-l { font-size: 9.5px; color: #BFB2A2; letter-spacing: .2px; }
.mtr-v { font-size: 14.5px; font-weight: 680; color: #4B3422; font-variant-numeric: tabular-nums; letter-spacing: -.3px; line-height: 1.1; }
.mtr-v em { font-style: normal; font-size: 9.5px; font-weight: 500; color: #AC9A8B; margin-left: 2px; }
.mtr-t { height: 4px; border-radius: 3px; background: #F8F4EE; overflow: hidden; margin-top: 2px; }
.mtr-t > i { display: block; height: 100%; border-radius: 3px; opacity: .82; transition: width .45s ease; }
.fmt-card:hover .mtr-t > i { opacity: 1; }
