/* ══════════════════════════════════════════════════════════════════════════
   倍川集团 · 人事花名册系统 — 设计系统
   语言：精密工程感（Linear 式层级 + 企业级浅色 + 数据密集可读）
   原则：8px 栅格 / 超细描边 / 分层表面 / 负字距 / 克制的品牌色 / 160-250ms 自定义缓动
   ══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'InterVar';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'InterVar';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ────────────────────────── Tokens ────────────────────────── */
:root {
  --font: 'InterVar', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC',
          'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  /* 表面层级（浅色：亮度递减表达层级） */
  --bg:            #f6f7f9;
  --bg-grad:       radial-gradient(1200px 620px at 12% -8%, #eef1ff 0%, transparent 62%),
                   radial-gradient(900px 520px at 96% 0%, #f0fbfa 0%, transparent 55%);
  --surface:       #ffffff;
  --surface-2:     #fbfcfe;
  --surface-3:     #f3f5f9;
  --overlay:       rgba(13, 18, 32, .45);

  /* 文本 */
  --text:          #0d1220;
  --text-2:        #58617a;
  --text-3:        #8a93a8;
  --text-4:        #aab2c4;

  /* 描边 */
  --border:        rgba(15, 23, 42, .08);
  --border-2:      rgba(15, 23, 42, .055);
  --border-strong: rgba(15, 23, 42, .14);

  /* 品牌 */
  --accent:        #4f46e5;
  --accent-2:      #6366f1;
  --accent-3:      #818cf8;
  --accent-soft:   rgba(79, 70, 229, .085);
  --accent-ring:   rgba(99, 102, 241, .30);

  /* 语义 */
  --ok:            #0d9f6e;
  --ok-soft:       rgba(13, 159, 110, .10);
  --warn:          #d97706;
  --warn-soft:     rgba(217, 119, 6, .10);
  --danger:        #dc2626;
  --danger-soft:   rgba(220, 38, 38, .095);
  --info:          #0284c7;
  --info-soft:     rgba(2, 132, 199, .10);

  /* 社保/公积金 tag 色系 */
  --t-indigo: #4f46e5; --t-indigo-bg: rgba(79,70,229,.10);
  --t-blue:   #2563eb; --t-blue-bg:   rgba(37,99,235,.10);
  --t-sky:    #0284c7; --t-sky-bg:    rgba(2,132,199,.10);
  --t-cyan:   #0891b2; --t-cyan-bg:   rgba(8,145,178,.11);
  --t-teal:   #0d9488; --t-teal-bg:   rgba(13,148,136,.11);
  --t-violet: #7c3aed; --t-violet-bg: rgba(124,58,237,.10);
  --t-purple: #9333ea; --t-purple-bg: rgba(147,51,234,.10);
  --t-rose:   #e11d48; --t-rose-bg:   rgba(225,29,72,.09);
  --t-amber:  #b45309; --t-amber-bg:  rgba(180,83,9,.10);
  --t-yellow: #a16207; --t-yellow-bg: rgba(161,98,7,.11);
  --t-orange: #ea580c; --t-orange-bg: rgba(234,88,12,.10);
  --t-slate:  #475569; --t-slate-bg:  rgba(71,85,105,.10);
  --t-red:    #dc2626; --t-red-bg:    rgba(220,38,38,.10);
  --t-gray:   #6b7280; --t-gray-bg:   rgba(107,114,128,.10);

  /* 圆角 */
  --r-xs: 5px; --r-sm: 7px; --r: 9px; --r-lg: 13px; --r-xl: 18px; --r-full: 999px;

  /* 阴影：多层叠加，克制 */
  --sh-1: 0 1px 2px rgba(16,24,40,.045), 0 0 0 1px rgba(16,24,40,.035);
  --sh-2: 0 1px 2px rgba(16,24,40,.05), 0 4px 12px -3px rgba(16,24,40,.07), 0 0 0 1px rgba(16,24,40,.035);
  --sh-3: 0 2px 4px rgba(16,24,40,.05), 0 12px 28px -8px rgba(16,24,40,.13), 0 0 0 1px rgba(16,24,40,.04);
  --sh-pop: 0 1px 1px rgba(16,24,40,.04), 0 6px 14px -4px rgba(16,24,40,.10),
            0 22px 46px -14px rgba(16,24,40,.22), 0 0 0 1px rgba(16,24,40,.05);
  --sh-accent: 0 1px 2px rgba(79,70,229,.22), 0 8px 20px -6px rgba(79,70,229,.36);

  /* 动效 */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .5, 1);

  --sidebar-w: 232px;
}

[data-theme="dark"] {
  --bg:            #0a0b0f;
  --bg-grad:       radial-gradient(1100px 600px at 10% -10%, rgba(79,70,229,.16) 0%, transparent 60%),
                   radial-gradient(900px 520px at 98% -5%, rgba(13,148,136,.12) 0%, transparent 55%);
  --surface:       #13141a;
  --surface-2:     #171821;
  --surface-3:     #1d1e28;
  --overlay:       rgba(0, 0, 0, .62);

  --text:          #f2f3f7;
  --text-2:        #a4adc0;
  --text-3:        #757f95;
  --text-4:        #545c70;

  --border:        rgba(255, 255, 255, .09);
  --border-2:      rgba(255, 255, 255, .06);
  --border-strong: rgba(255, 255, 255, .17);

  --accent:        #7c7ff5;
  --accent-2:      #8b8cf8;
  --accent-3:      #a5a6fb;
  --accent-soft:   rgba(124, 127, 245, .14);
  --accent-ring:   rgba(140, 140, 250, .35);

  --ok:            #34d399; --ok-soft: rgba(52, 211, 153, .13);
  --warn:          #fbbf24; --warn-soft: rgba(251, 191, 36, .13);
  --danger:        #f87171; --danger-soft: rgba(248, 113, 113, .13);
  --info:          #38bdf8; --info-soft: rgba(56, 189, 248, .13);

  --t-indigo: #a5a6fb; --t-indigo-bg: rgba(124,127,245,.15);
  --t-blue:   #7fb0fb; --t-blue-bg:   rgba(59,130,246,.15);
  --t-sky:    #6cc7f2; --t-sky-bg:    rgba(2,132,199,.16);
  --t-cyan:   #5fcbe0; --t-cyan-bg:   rgba(8,145,178,.16);
  --t-teal:   #5fd4c4; --t-teal-bg:   rgba(13,148,136,.16);
  --t-violet: #c0a4fb; --t-violet-bg: rgba(124,58,237,.16);
  --t-purple: #d0a6f9; --t-purple-bg: rgba(147,51,234,.15);
  --t-rose:   #fb93ab; --t-rose-bg:   rgba(225,29,72,.15);
  --t-amber:  #f3c073; --t-amber-bg:  rgba(180,83,9,.18);
  --t-yellow: #ecd06a; --t-yellow-bg: rgba(161,98,7,.18);
  --t-orange: #f9a86a; --t-orange-bg: rgba(234,88,12,.16);
  --t-slate:  #9fb0c4; --t-slate-bg:  rgba(100,116,139,.18);
  --t-red:    #f88b8b; --t-red-bg:    rgba(220,38,38,.15);
  --t-gray:   #9aa3b2; --t-gray-bg:   rgba(107,114,128,.16);

  --sh-1: 0 1px 2px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.045);
  --sh-2: 0 2px 6px rgba(0,0,0,.45), 0 8px 22px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  --sh-3: 0 4px 10px rgba(0,0,0,.5), 0 20px 40px -12px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.055);
  --sh-pop: 0 2px 4px rgba(0,0,0,.4), 0 12px 28px -6px rgba(0,0,0,.6),
            0 36px 70px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.07);
  --sh-accent: 0 1px 2px rgba(0,0,0,.4), 0 10px 24px -8px rgba(124,127,245,.5);
}

/* ────────────────────────── Reset ────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -.008em;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' 1, 'cv11' 1, 'ss01' 1;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); }

.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 99px; border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-4); background-clip: content-box; }

/* ────────────────────────── 布局 ────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 16px 12px 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-right: 1px solid var(--border-2);
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(145deg, var(--accent) 0%, #7c3aed 55%, #0d9488 130%);
  box-shadow: var(--sh-accent), inset 0 1px 0 rgba(255,255,255,.28);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: -.03em;
}
.brand-text { min-width: 0; }
.brand-title { font-size: 13.5px; font-weight: 620; letter-spacing: -.02em; line-height: 1.2; }
.brand-sub { font-size: 10.5px; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }

/* ── 一级模块切换（tab）── */
.mod-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  padding: 3px; margin: 0 2px 14px;
  background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--r);
}
.mod-switch.single { grid-template-columns: 1fr; }
.mod-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 7px 4px 6px; border-radius: var(--r-sm);
  font-size: 11.5px; font-weight: 540; color: var(--text-3);
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out),
              transform 160ms var(--ease-out);
  position: relative;
}
.mod-tab .mt-ic { width: 17px; height: 17px; opacity: .78; }
.mod-tab:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.mod-tab:active { transform: scale(.97); }
.mod-tab.on {
  background: var(--surface); color: var(--accent); font-weight: 600;
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255,255,255,.5);
}
.mod-tab.on .mt-ic { opacity: 1; }
.mod-tab.on::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 2px; background: var(--accent);
}

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.nav-group {
  font-size: 10px; font-weight: 640; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-4); padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 480; color: var(--text-2);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
  position: relative; width: 100%; text-align: left;
}
.nav-item svg { width: 16px; height: 16px; flex: none; opacity: .82; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 560; }
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 620; font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-3);
  min-width: 20px; text-align: center;
}
.nav-item.active .nav-badge { background: var(--accent); color: #fff; }
.nav-badge.hot { background: var(--danger-soft); color: var(--danger); }

.sidebar-foot { padding-top: 10px; border-top: 1px solid var(--border-2); margin-top: 8px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 7px; border-radius: var(--r);
  transition: background-color 140ms var(--ease-out); width: 100%; text-align: left;
}
.user-chip:hover { background: var(--surface-3); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff;
  font-size: 11px; font-weight: 620; letter-spacing: -.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.user-name { font-size: 12.5px; font-weight: 560; line-height: 1.25; }
.user-role { font-size: 10.5px; color: var(--text-3); }

/* ────────────────────────── 主区 ────────────────────────── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 26px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--border-2);
}
.page-title { font-size: 16px; font-weight: 620; letter-spacing: -.028em; }
.page-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.topbar-spacer { flex: 1; }

.search {
  position: relative; display: flex; align-items: center;
  width: 290px; max-width: 40vw;
}
.search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; padding: 8px 30px 8px 32px;
  border-radius: var(--r); border: 1px solid var(--border);
  background: var(--surface); font-size: 13px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background-color 150ms;
}
.search input::placeholder { color: var(--text-4); }
.search input:focus {
  outline: none; border-color: var(--accent-ring);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}
.search kbd {
  position: absolute; right: 8px; font-size: 10px; font-family: var(--mono);
  color: var(--text-4); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 4px; background: var(--surface-2);
}

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r); flex: none;
  display: grid; place-items: center; color: var(--text-2);
  border: 1px solid transparent;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out),
              transform 140ms var(--ease-out);
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on { background: var(--accent-soft); color: var(--accent); }

.content { padding: 22px 26px 60px; flex: 1; }
.page.page-in { animation: pageIn 340ms var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } }

/* ────────────────────────── 通用元件 ────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border-2);
}
.card-title { font-size: 13.5px; font-weight: 600; letter-spacing: -.02em; }
.card-desc { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.card-body { padding: 16px; }
.card-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.grid { display: grid; gap: 14px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* KPI */
.kpi {
  position: relative; padding: 15px 16px 14px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  overflow: hidden; isolation: isolate;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out),
              border-color 220ms var(--ease-out);
}
.kpi::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; z-index: -1;
  background: linear-gradient(90deg, var(--accent), #7c3aed 45%, transparent);
  opacity: .85;
}
.kpi.tone-ok::after { background: linear-gradient(90deg, var(--ok), #34d399 45%, transparent); }
.kpi.tone-warn::after { background: linear-gradient(90deg, var(--warn), #fbbf24 45%, transparent); }
.kpi.tone-danger::after { background: linear-gradient(90deg, var(--danger), #f87171 45%, transparent); }
.kpi.tone-info::after { background: linear-gradient(90deg, var(--info), #38bdf8 45%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--border); }
}
.kpi-label {
  font-size: 11.5px; font-weight: 540; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.kpi-value {
  font-size: 27px; font-weight: 640; letter-spacing: -.045em; line-height: 1.15;
  margin-top: 7px; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 4px;
}
.kpi-unit { font-size: 12.5px; font-weight: 520; color: var(--text-3); letter-spacing: 0; }
.kpi-foot { font-size: 11.5px; color: var(--text-3); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }

/* Tag */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1.5px 7px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 560; white-space: nowrap; line-height: 1.7;
  border: 1px solid transparent;
}
.tag .dot { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.tag.tone { background: var(--surface-3); color: var(--text-2); border-color: var(--border-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
/* 社保公司 tag：颜色随公司稳定 */
.tag[data-color="indigo"] { background: var(--t-indigo-bg); color: var(--t-indigo); }
.tag[data-color="blue"]   { background: var(--t-blue-bg);   color: var(--t-blue); }
.tag[data-color="sky"]    { background: var(--t-sky-bg);    color: var(--t-sky); }
.tag[data-color="cyan"]   { background: var(--t-cyan-bg);   color: var(--t-cyan); }
.tag[data-color="teal"]   { background: var(--t-teal-bg);   color: var(--t-teal); }
.tag[data-color="violet"] { background: var(--t-violet-bg); color: var(--t-violet); }
.tag[data-color="purple"] { background: var(--t-purple-bg); color: var(--t-purple); }
.tag[data-color="rose"]   { background: var(--t-rose-bg);   color: var(--t-rose); }
.tag[data-color="amber"]  { background: var(--t-amber-bg);  color: var(--t-amber); }
.tag[data-color="yellow"] { background: var(--t-yellow-bg); color: var(--t-yellow); }
.tag[data-color="orange"] { background: var(--t-orange-bg); color: var(--t-orange); }
.tag[data-color="slate"]  { background: var(--t-slate-bg);  color: var(--t-slate); }
.tag[data-color="red"]    { background: var(--t-red-bg);    color: var(--t-red); }
.tag[data-color="gray"]   { background: var(--t-gray-bg);   color: var(--t-gray); }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--r); font-size: 12.5px; font-weight: 540;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  box-shadow: var(--sh-1); white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out),
              box-shadow 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3.5px var(--accent-soft); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff; border-color: transparent; box-shadow: var(--sh-accent);
}
.btn.primary:hover { background: linear-gradient(180deg, var(--accent-3), var(--accent-2)); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.success { background: var(--ok); color: #fff; border-color: transparent; }
.btn.success:hover { filter: brightness(1.06); }
.btn.soft-ok {
  background: var(--ok-soft); color: var(--ok); border-color: transparent; box-shadow: none;
}
.btn.soft-ok:hover { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.btn.sm { padding: 4.5px 9px; font-size: 11.5px; border-radius: var(--r-sm); }
.btn.sm svg { width: 12.5px; height: 12.5px; }
.btn.xs { padding: 3px 8px; font-size: 11px; border-radius: var(--r-xs); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* 输入 */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 540; color: var(--text-3); }
.input, select.input, textarea.input {
  width: 100%; padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); font-size: 13px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.input:focus { outline: none; border-color: var(--accent-ring); box-shadow: 0 0 0 3.5px var(--accent-soft); }
.input[readonly], .input:disabled { background: var(--surface-3); color: var(--text-3); }
select.input { appearance: none; background-image: none; padding-right: 26px; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px;
  border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
input[type="date"].input { font-variant-numeric: tabular-nums; }
[data-theme="dark"] input[type="date"] { color-scheme: dark; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3.5px 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 520;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: all 140ms var(--ease-out);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on {
  background: var(--accent); border-color: transparent; color: #fff; box-shadow: var(--sh-accent);
}
.chip:active { transform: scale(.96); }

/* 段落标题 */
.section-head { display: flex; align-items: flex-end; gap: 12px; margin: 4px 0 12px; }
.section-title { font-size: 14.5px; font-weight: 620; letter-spacing: -.025em; }
.section-desc { font-size: 12px; color: var(--text-3); }
.section-head .spacer { flex: 1; }

/* 表格 */
.table-wrap {
  overflow: auto; border-radius: var(--r-lg);
  border: 1px solid var(--border-2); background: var(--surface); box-shadow: var(--sh-1);
  max-height: calc(100vh - 250px);
}
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.tbl thead th {
  position: sticky; top: 0; z-index: 6;
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 9px 11px; text-align: left; font-size: 11px; font-weight: 620;
  color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
table.tbl thead th.sortable { cursor: pointer; }
table.tbl thead th.sortable:hover { color: var(--text); }
table.tbl thead th .arw { opacity: 0; margin-left: 3px; font-size: 9px; }
table.tbl thead th.sorted .arw { opacity: 1; color: var(--accent); }
/* 右侧固定操作列：横向滚动时主操作始终可见 */
table.tbl th.sticky-r, table.tbl td.sticky-r {
  position: sticky; right: 0; z-index: 5;
  background: var(--surface);
  box-shadow: -9px 0 14px -10px rgba(16, 24, 40, .22);
}
table.tbl thead th.sticky-r {
  z-index: 8;
  background: color-mix(in srgb, var(--surface-2) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
table.tbl tbody tr:hover td.sticky-r { background: var(--surface-2); }
[data-theme="dark"] table.tbl th.sticky-r,
[data-theme="dark"] table.tbl td.sticky-r { box-shadow: -9px 0 14px -10px rgba(0, 0, 0, .7); }
table.tbl tbody td {
  padding: 9px 11px; border-bottom: 1px solid var(--border-2); vertical-align: middle;
  white-space: nowrap;
}
table.tbl tbody tr { transition: background-color 120ms var(--ease-out); }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr.clickable { cursor: pointer; }
.cell-name { display: flex; align-items: center; gap: 9px; }
.cell-name .avatar { width: 26px; height: 26px; font-size: 10.5px; }
.cell-name .nm { font-weight: 560; font-size: 13px; letter-spacing: -.015em; }
.cell-name .sub { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.empty { padding: 46px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 行内可编辑日期 */
.editable {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; margin: -2px -7px; border-radius: var(--r-xs);
  font-size: 12.5px; font-variant-numeric: tabular-nums; color: inherit;
  border: 1px solid transparent;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out),
              color 140ms var(--ease-out);
}
.editable .pen {
  width: 11px; height: 11px; opacity: 0; transition: opacity 140ms var(--ease-out);
}
.editable.em { color: var(--text-3); }
.editable.em .ph { border-bottom: 1px dashed var(--border-strong); }
@media (hover: hover) and (pointer: fine) {
  .editable:hover {
    background: var(--accent-soft); border-color: var(--accent-ring); color: var(--accent);
  }
  .editable:hover .pen { opacity: .75; }
  .editable.em:hover .ph { border-bottom-color: transparent; }
}
.editable:active { transform: scale(.97); }
.cell-date {
  width: 134px; padding: 3px 7px; font-size: 12px; font-variant-numeric: tabular-nums;
  border-radius: var(--r-xs); border: 1px solid var(--accent-ring); background: var(--surface);
  box-shadow: 0 0 0 3.5px var(--accent-soft); outline: none;
}
[data-theme="dark"] .cell-date { color-scheme: dark; }

/* 进度条 */
.bar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 54px; }
.bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width 600ms var(--ease-out);
}
.bar.warn > i { background: linear-gradient(90deg, var(--warn), #fbbf24); }
.bar.ok > i { background: linear-gradient(90deg, var(--ok), #34d399); }
.bar.danger > i { background: linear-gradient(90deg, var(--danger), #f87171); }

/* 抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: var(--overlay); z-index: 60;
  opacity: 0; pointer-events: none;
  transition: opacity 240ms var(--ease-out);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 94vw); z-index: 61;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--sh-pop);
  transform: translateX(100%); display: flex; flex-direction: column;
  transition: transform 340ms var(--ease-drawer, cubic-bezier(.32,.72,0,1));
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 13px;
}
.drawer-head .avatar { width: 44px; height: 44px; font-size: 16px; }
.drawer-title { font-size: 16.5px; font-weight: 640; letter-spacing: -.03em; }
.drawer-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }
.drawer-foot {
  padding: 12px 20px; border-top: 1px solid var(--border-2);
  display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2);
}

.dsec { margin-bottom: 18px; }
.dsec-title {
  font-size: 10.5px; font-weight: 660; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-4); margin-bottom: 9px; display: flex; align-items: center; gap: 7px;
}
.dsec-title::after { content: ''; flex: 1; height: 1px; background: var(--border-2); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 9px 14px; }
.ditem { min-width: 0; }
.ditem .k { font-size: 10.5px; color: var(--text-3); margin-bottom: 1px; }
.ditem .v { font-size: 13px; font-weight: 500; word-break: break-all; }
.ditem .v.empty-v { color: var(--text-4); font-weight: 400; }

/* 时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 4.5px; top: 6px; bottom: 6px; width: 1.5px;
  background: linear-gradient(180deg, var(--accent), var(--border));
}
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -19.5px; top: 4.5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--accent);
}
.tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl-item.pending::before { border-color: var(--warn); }
.tl-date { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tl-title { font-size: 12.5px; font-weight: 560; }
.tl-desc { font-size: 11.5px; color: var(--text-3); }

/* 图表容器 */
.chart { width: 100%; height: 260px; }
.chart.tall { height: 330px; }
.chart.xtall { height: 420px; }
.chart.short { height: 210px; }

/* 提示 */
.toast-wrap {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 15px; border-radius: var(--r);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border); box-shadow: var(--sh-pop);
  font-size: 13px; font-weight: 520; max-width: 74vw;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: toastIn 300ms var(--ease-spring) both;
}
.toast.out { animation: toastOut 220ms var(--ease-out) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
.toast .ic { width: 17px; height: 17px; flex: none; }
.toast.ok .ic { color: var(--ok); } .toast.err .ic { color: var(--danger); }
.toast.info .ic { color: var(--info); }

/* 弹层 */
.pop {
  position: fixed; z-index: 90; min-width: 210px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--sh-pop); padding: 5px;
  transform-origin: var(--pop-origin, top right);
  animation: popIn 165ms var(--ease-out) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(.955) translateY(-3px); } }
.pop-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 7px 9px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--text-2);
  transition: background-color 120ms var(--ease-out), color 120ms;
}
.pop-item:hover { background: var(--surface-3); color: var(--text); }
.pop-item.danger { color: var(--danger); }
.pop-item.danger:hover { background: var(--danger-soft); }
.pop-sep { height: 1px; background: var(--border-2); margin: 4px 2px; }
.pop-head { padding: 8px 9px 6px; font-size: 11px; color: var(--text-3); }

/* 模态 */
.modal-mask {
  position: fixed; inset: 0; background: var(--overlay); z-index: 100;
  display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease-out);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(430px, 92vw); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--sh-pop); padding: 21px;
  transform: scale(.96) translateY(6px); transition: transform 250ms var(--ease-spring);
  transform-origin: center;
}
.modal-mask.open .modal { transform: scale(1) translateY(0); }
.modal h3 { font-size: 15.5px; font-weight: 620; letter-spacing: -.025em; }
.modal p { font-size: 13px; color: var(--text-2); margin-top: 7px; line-height: 1.6; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 19px; }

/* 加载 */
.skel {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.spin {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin 620ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 实体化入场：卡片错峰 */
.stagger > * { animation: riseIn 420ms var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 42ms; }
.stagger > *:nth-child(3) { animation-delay: 84ms; }
.stagger > *:nth-child(4) { animation-delay: 126ms; }
.stagger > *:nth-child(5) { animation-delay: 168ms; }
.stagger > *:nth-child(6) { animation-delay: 210ms; }
.stagger > *:nth-child(7) { animation-delay: 252ms; }
.stagger > *:nth-child(8) { animation-delay: 294ms; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } }

/* 人员卡片（组织架构/生日等） */
.person {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface);
  transition: border-color 160ms var(--ease-out), transform 160ms var(--ease-out),
              box-shadow 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .person:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--sh-2); }
}
.person .nm { font-size: 13px; font-weight: 560; }
.person .sub { font-size: 11px; color: var(--text-3); }

/* 组织架构树 */
.tree-node { border-bottom: 1px solid var(--border-2); }
.tree-node:last-child { border-bottom: 0; }
.tree-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; width: 100%;
  text-align: left; transition: background-color 140ms var(--ease-out);
}
.tree-row:hover { background: var(--surface-2); }
.tree-caret {
  width: 15px; height: 15px; flex: none; color: var(--text-3);
  transition: transform 200ms var(--ease-out);
}
.tree-node.open > .tree-row .tree-caret { transform: rotate(90deg); }
.tree-name { font-size: 13px; font-weight: 580; }
.tree-count {
  font-size: 11px; font-weight: 620; color: var(--accent); background: var(--accent-soft);
  padding: 1.5px 8px; border-radius: var(--r-full); font-variant-numeric: tabular-nums;
}
.tree-kids { display: none; padding: 2px 0 10px 24px; }
.tree-node.open > .tree-kids { display: block; animation: pageIn 240ms var(--ease-out) both; }
.tree-sub {
  display: flex; align-items: center; gap: 9px; padding: 6px 12px;
  font-size: 12.5px; color: var(--text-2); border-left: 1px solid var(--border); margin-left: 6px;
}
.tree-sub .tree-count { background: var(--surface-3); color: var(--text-2); }
.pos-wrap { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 12px 8px 27px; margin-left: 6px; }
.pos-chip {
  font-size: 11px; padding: 2px 8px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums;
}

/* 分段控件 */
.seg {
  display: inline-flex; padding: 2.5px; gap: 2px; background: var(--surface-3);
  border-radius: var(--r); border: 1px solid var(--border-2);
}
.seg button {
  padding: 4.5px 11px; border-radius: var(--r-sm); font-size: 12px; font-weight: 520;
  color: var(--text-3); transition: all 150ms var(--ease-out);
}
.seg button:hover { color: var(--text); }
.seg button.on {
  background: var(--surface); color: var(--text); box-shadow: var(--sh-1); font-weight: 580;
}

/* 提醒条目 */
.alert-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--border-2);
  transition: background-color 140ms var(--ease-out);
}
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { background: var(--surface-2); }
.alert-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 660;
}
.alert-ic.lv0 { background: var(--danger-soft); color: var(--danger); }
.alert-ic.lv1 { background: var(--warn-soft); color: var(--warn); }
.alert-ic.lv2 { background: var(--info-soft); color: var(--info); }
.alert-kind {
  font-size: 10px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-4);
}

/* 工具条 */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 13px; }
.toolbar .spacer { flex: 1; }
.toolbar select.input { width: auto; min-width: 108px; }

/* ── 单据明细行编辑器 ── */
.line-row {
  padding: 9px 10px; border: 1px solid var(--border-2); border-radius: var(--r);
  background: var(--surface-2); margin-bottom: 7px;
  transition: border-color 150ms var(--ease-out);
}
.line-row:focus-within { border-color: var(--accent-ring); background: var(--surface); }
.line-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.line-main .input { padding: 5px 8px; font-size: 12.5px; }
.line-sub { margin-top: 5px; padding-left: 2px; }
.line-head {
  display: flex; gap: 6px; padding: 0 10px 5px;
  font-size: 10.5px; font-weight: 560; letter-spacing: .05em; color: var(--text-4);
}
.line-head span { min-width: 0; }

/* ── 弹层表单 ── */
.modal.wide { width: min(620px, 94vw); }
.modal-fields {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 11px 14px; margin-top: 16px; max-height: min(56vh, 460px); overflow-y: auto;
  padding-right: 2px;
}
.modal-fields .field:has(textarea) { grid-column: 1/-1; }
.modal-fields textarea.input { resize: vertical; min-height: 62px; font-size: 13px; }
.modal.wide .modal-fields .field { min-width: 0; }

/* ── 单据/物料卡片内的小标签 ── */
.pos-chip { font-size: 11px; padding: 2px 8px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* 提醒行里的多行内容自适应 */
.alert-row { align-items: flex-start; }
.alert-row .muted { line-height: 1.6; }

.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.danger:hover { filter: brightness(1.07); }

/* 统计条 */
.statline { display: flex; gap: 22px; flex-wrap: wrap; padding: 12px 16px; }
.statline .s { min-width: 0; }
.statline .s .k { font-size: 11px; color: var(--text-3); }
.statline .s .v {
  font-size: 18px; font-weight: 620; letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}

/* 空态 */
.no-data {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 44px 16px; color: var(--text-3); font-size: 13px;
}
.no-data svg { width: 32px; height: 32px; opacity: .35; }

/* 移动端 */
.mobile-only { display: none; }
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 70;
    transform: translateX(-100%); transition: transform 300ms cubic-bezier(.32,.72,0,1);
    box-shadow: var(--sh-pop);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .content { padding: 16px 14px 60px; }
  .topbar { padding: 10px 14px; }
  .search { width: auto; flex: 1; max-width: none; }
  .search kbd { display: none; }
  .table-wrap { max-height: none; }
  .g-kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
.mask-nav {
  position: fixed; inset: 0; background: var(--overlay); z-index: 65;
  opacity: 0; pointer-events: none; transition: opacity 260ms var(--ease-out);
}
.mask-nav.open { opacity: 1; pointer-events: auto; }

/* 打印 */
@media print {
  .sidebar, .topbar, .card-actions, .btn { display: none !important; }
  body { background: #fff; }
}

/* 无障碍：减少动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0ms !important;
  }
  /* 入场动画直接关掉：把时长压到 0.01ms 配 fill-mode:both 时，一旦动画
     没能推进，元素会永远停在 opacity:0 —— 内容不可见。无障碍场景宁可不做动效。 */
  .page-in, .stagger > *, .toast, .pop, .modal {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .drawer { transition: none; }
}

/* ─────────────── 导入预演（差异预览）─────────────── */
.pv-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 9px; margin-top: 12px;
}
.pv-stat {
  padding: 9px 11px; border-radius: var(--r); background: var(--surface-2);
  border: 1px solid var(--border-2);
}
.pv-label { font-size: 11px; color: var(--text-3); }
.pv-value {
  font-size: 20px; font-weight: 640; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; margin-top: 2px;
}
.pv-value.up { color: var(--ok); }
.pv-value.warn { color: var(--warn); }
.pv-list {
  max-height: 150px; overflow-y: auto; margin-top: 6px; padding: 7px 9px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r);
  display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start;
}
.pv-row {
  display: flex; gap: 8px; align-items: baseline; width: 100%;
  font-size: 12px; padding: 2px 0; border-bottom: 1px dashed var(--border-2);
}
.pv-row:last-child { border-bottom: 0; }
.pv-chip {
  font-size: 11.5px; padding: 2px 8px; border-radius: var(--r-full);
  background: var(--ok-soft); color: var(--ok); font-weight: 540;
}
.pv-note {
  margin-top: 14px; padding: 9px 11px; border-radius: var(--r);
  background: var(--accent-soft); color: var(--accent); font-size: 12px; line-height: 1.6;
}
.pop-item svg { width: 14px; height: 14px; opacity: .8; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r) var(--r) 0; }

/* ─────────────── 备份管理 ─────────────── */
.bk-tier {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  border-bottom: 1px solid var(--border-2);
}
.bk-tier:last-child { border-bottom: 0; }
.bk-tier-ic {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 660;
}
.bk-count {
  font-size: 19px; font-weight: 640; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.bk-bar {
  height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: 1;
}
.bk-bar > i { display: block; height: 100%; border-radius: 99px; }
.bk-timeline { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.bk-dot {
  width: 9px; height: 9px; border-radius: 3px; flex: none;
  background: var(--accent); opacity: .85; cursor: default;
  transition: transform 140ms var(--ease-out);
}
.bk-dot:hover { transform: scale(1.5); }
.bk-dot.keep { background: var(--text-4); }

/* 危险动作的弱化文本按钮（如「停用」） */
.btn.ghost.danger-text { color: var(--danger); }
.btn.ghost.danger-text:hover { background: var(--danger-soft); color: var(--danger); }
