/*!
 * Wos UI v1.1.0 · 零依赖设计系统 · MIT License
 * 本文件 = tokens.css + base.css + components.css 合并版
 * 仓库: https://gitee.com/dushu/wos-ui  演示: https://wos.qzh.red
 */
/* ====== css/tokens.css ====== */
:root {
  /* ---- ★ 主题色相：唯一必改的变量 ---- */
  --hue: 275;            /* 275=品牌紫  220=蓝  190=青  155=绿  25=朱红  330=洋红 */
  --hue-shift: 18;       /* 辅助色的色相偏移量，一般不用动 */

  /* ---- 品牌色（全部由 --hue 派生） ---- */
  --brand:        oklch(0.585 0.19 var(--hue));
  --brand-hover:  oklch(0.525 0.20 var(--hue));
  --brand-2:      oklch(0.665 0.155 calc(var(--hue) + var(--hue-shift)));
  --brand-soft:   oklch(0.965 0.025 var(--hue));
  --brand-line:   oklch(0.885 0.05 var(--hue));

  /* ---- 语义色（中性偏移自主题色相，纯度压低） ---- */
  --gold:      oklch(0.80 0.12 85);
  --gold-deep: oklch(0.62 0.11 75);
  --ok:        oklch(0.58 0.15 155);
  --ok-soft:   oklch(0.965 0.04 155);
  --warn:      oklch(0.66 0.14 70);
  --warn-soft: oklch(0.965 0.045 75);
  --danger:        oklch(0.55 0.21 27);
  --danger-soft:   oklch(0.965 0.035 27);
  --danger-line:   oklch(0.90 0.05 27);
  --info:      oklch(0.58 0.16 260);
  --info-soft: oklch(0.965 0.03 260);

  /* ---- 深色侧边栏（石墨底，色相随主题） ---- */
  --side-bg:         oklch(0.185 0.016 var(--hue));
  --side-bg-2:       oklch(0.225 0.018 var(--hue));
  --side-text:       oklch(0.78 0.012 var(--hue));
  --side-text-dim:   oklch(0.58 0.014 var(--hue));
  --side-active-bg:  oklch(0.30 0.045 var(--hue));
  --side-active-text: #ffffff;
  --side-hover:      oklch(0.255 0.02 var(--hue));
  --side-border:     oklch(0.30 0.018 var(--hue));

  /* ---- 工作区（极浅冷调，不用纯白） ---- */
  --bg:             oklch(0.984 0.003 var(--hue));
  --surface:        oklch(1 0.0015 var(--hue));
  --surface-2:      oklch(0.975 0.004 var(--hue));
  --surface-sunken: oklch(0.968 0.005 var(--hue));

  /* ---- 文字 ---- */
  --text:     oklch(0.24 0.012 var(--hue));
  --text-2:   oklch(0.44 0.014 var(--hue));
  --text-3:   oklch(0.60 0.012 var(--hue));
  --text-inv: oklch(0.97 0.005 var(--hue));

  /* ---- 描边 ---- */
  --line:        oklch(0.918 0.006 var(--hue));
  --line-2:      oklch(0.945 0.005 var(--hue));
  --line-strong: oklch(0.86 0.008 var(--hue));
  --line-hover:  oklch(0.83 0.01 var(--hue));

  /* ---- 阴影：极克制，靠边框分层而非堆叠阴影 ---- */
  --shadow-xs: 0 1px 2px oklch(0.24 0.02 var(--hue) / 0.04);
  --shadow-sm: 0 1px 3px oklch(0.24 0.02 var(--hue) / 0.06), 0 1px 2px oklch(0.24 0.02 var(--hue) / 0.03);
  --shadow-md: 0 4px 16px -4px oklch(0.24 0.02 var(--hue) / 0.10), 0 2px 6px -2px oklch(0.24 0.02 var(--hue) / 0.05);
  --shadow-lg: 0 18px 44px -12px oklch(0.24 0.03 var(--hue) / 0.18), 0 6px 14px -6px oklch(0.24 0.02 var(--hue) / 0.08);
  --shadow-glow: 0 0 0 3px oklch(0.62 0.15 var(--hue) / 0.14);

  /* ---- 圆角：小圆角为主，避免"万物皆胶囊" ---- */
  --r-xs: 5px;
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 999px;

  /* ---- 间距：非线性节奏 ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* ---- 字体 ---- */
  --font: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
          "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: "SF Mono", "DIN Alternate", "Roboto Mono", ui-monospace, monospace;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  /* ---- 动效：指数缓动，不做回弹 ---- */
  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);      /* ease-out-quart */
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);      /* ease-out-expo */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 340ms;

  /* ---- 布局 ---- */
  --side-w: 250px;
  --side-w-collapsed: 68px;
  --topbar-h: 62px;
  --content-max: 1440px;

  color-scheme: light;
}

/* ====== css/base.css ====== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.011em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: oklch(0.62 0.15 var(--hue) / 0.18); }

/* 滚动条：细且克制 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: oklch(0.84 0.008 var(--hue));
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: oklch(0.74 0.01 var(--hue)); }

/* 数字统一等宽，避免跳动 */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------------- 面板 ---------------- */
/* 用细边框分层，不靠堆叠阴影 —— 阴影只用在悬浮层 */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--line-2);
}
.panel-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.008em;
}
.panel-sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
  font-weight: 400;
}
.panel-body { padding: var(--s-6); }
.panel-body--flush { padding: 0; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--line-hover); }
.btn:active { transform: translateY(0.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-glow); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px oklch(0.5 0.16 var(--hue) / 0.28);
}
.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: 0 2px 8px oklch(0.5 0.16 var(--hue) / 0.32);
}

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: oklch(0.24 0.02 var(--hue) / 0.055); border-color: transparent; }

.btn-danger { color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-soft); border-color: oklch(0.82 0.06 27); }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
.btn-lg { height: 42px; padding: 0 22px; font-size: 14.5px; }
.btn-block { width: 100%; }

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.004em;
}
.label .req { color: var(--danger); margin-left: 2px; }

.input,
.select,
.textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.textarea { height: auto; padding: 10px 12px; line-height: 1.65; resize: vertical; min-height: 92px; }
.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371807f' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-hover); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--shadow-glow);
}
.input::placeholder, .textarea::placeholder { color: oklch(0.70 0.008 var(--hue)); }
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--surface-sunken);
  color: var(--text-3);
  cursor: not-allowed;
}
.input--err { border-color: var(--danger); }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* 搜索输入框（带图标） */
.search { position: relative; }
.search .input { padding-left: 34px; }
.search::before {
  content: "";
  position: absolute; left: 11px; top: 50%;
  width: 14px; height: 14px; transform: translateY(-50%);
  background: var(--text-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M16.5 16.5L21 21'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M16.5 16.5L21 21'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}

/* ---------------- 徽标 ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--surface-sunken);
  color: var(--text-2);
  border: 1px solid var(--line-2);
}
.badge--ok { background: var(--ok-soft); color: oklch(0.42 0.13 155); border-color: oklch(0.88 0.06 155); }
.badge--warn { background: var(--warn-soft); color: oklch(0.48 0.13 75); border-color: oklch(0.88 0.07 75); }
.badge--danger { background: var(--danger-soft); color: oklch(0.48 0.18 27); border-color: var(--danger-line); }
.badge--brand { background: var(--brand-soft); color: oklch(0.47 0.17 var(--hue)); border-color: var(--brand-line); }
.badge--gold { background: oklch(0.96 0.045 85); color: var(--gold-deep); border-color: oklch(0.88 0.07 85); }
.badge--dot::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.03em;
  padding: 10px 16px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th:first-child { padding-left: var(--s-6); border-top-left-radius: var(--r-lg); }
.table th:last-child { padding-right: var(--s-6); border-top-right-radius: var(--r-lg); }
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.table td:first-child { padding-left: var(--s-6); }
.table td:last-child { padding-right: var(--s-6); }
.table tbody tr { transition: background var(--dur-fast) var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .ta-r { text-align: right; }
.table .ta-c { text-align: center; }

/* ---------------- 空状态 ---------------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-16) var(--s-6);
  text-align: center;
}
.empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  background: var(--surface-sunken);
  border: 1px solid var(--line-2);
  color: var(--text-3);
  margin-bottom: var(--s-1);
}
.empty-title { font-size: 14.5px; font-weight: 600; }
.empty-desc { font-size: 13px; color: var(--text-3); max-width: 380px; line-height: 1.65; }

/* ---------------- 加载 ---------------- */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid oklch(1 0 0 / 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.62s linear infinite;
  flex-shrink: 0;
}
.spinner--dark { border-color: oklch(0.24 0.02 var(--hue) / 0.16); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--line-2) 50%, var(--surface-sunken) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: var(--r-xs);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------------- 工具类 ---------------- */
.row { display: flex; align-items: center; gap: var(--s-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mt-1 { margin-top: var(--s-1); } .mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); }

/* 分隔线用细线，不用卡片堆叠 */
.hr { height: 1px; background: var(--line-2); border: 0; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ====== css/components.css ====== */
/* ---------------- Modal 弹窗 ---------------- */
.mask {
  position: fixed;
  inset: 0;
  background: oklch(0.2 0.02 var(--hue) / 0.45);
  display: grid;
  place-items: center;
  z-index: 60;
  animation: wos-fade-in 180ms var(--ease);
}
.mask[hidden] { display: none; }
.modal {
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--s-5) 22px;
  box-shadow: 0 18px 50px oklch(0.2 0.03 var(--hue) / 0.25);
  animation: wos-pop 200ms var(--ease-expo);
}
.modal-title { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.modal-sub { font-size: 12px; color: var(--text-3); margin: 0 0 14px; }
.modal-err { font-size: 12.5px; color: var(--danger); margin: 2px 0 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: var(--s-5); }
@keyframes wos-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wos-pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------------- Toast 轻提示 ---------------- */
.toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 9px;
  background: oklch(0.24 0.012 var(--hue));
  color: #fff;
  font-size: 13.2px;
  box-shadow: 0 10px 30px -8px oklch(0.2 0.03 var(--hue) / 0.42),
              0 3px 10px -3px oklch(0.2 0.02 var(--hue) / 0.24);
  max-width: min(90vw, 440px);
  animation: wos-toast-in 200ms var(--ease-expo);
}
.toast-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-2);
  flex-shrink: 0;
}
.toast--ok .toast-dot { background: #34d399; }
.toast--error .toast-dot { background: #f87171; }
.toast--info .toast-dot { background: var(--gold); }
.toast--leave { opacity: 0; transform: translateY(-10px) scale(0.97); transition: all 200ms var(--ease); }
@keyframes wos-toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------------- Tabs 标签页 ---------------- */
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.tab {
  height: 30px;
  padding: 0 16px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.tab:hover { color: var(--text); }
.tab:focus-visible { outline: none; box-shadow: var(--shadow-glow); }
.tab--active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

/* 下划线式 Tabs（备选风格） */
.tabs--line {
  display: flex;
  gap: var(--s-5);
  padding: 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.tabs--line .tab {
  height: 38px;
  padding: 0 2px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  position: relative;
}
.tabs--line .tab--active { background: none; box-shadow: none; color: var(--brand); }
.tabs--line .tab--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* ---------------- Switch 开关 ---------------- */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  background: oklch(0.80 0.008 var(--hue));
  transition: background var(--dur) var(--ease);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px oklch(0.2 0.02 var(--hue) / 0.3);
  transition: transform var(--dur) var(--ease-expo);
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--shadow-glow); }
.switch input:disabled + .switch-track { opacity: 0.45; cursor: not-allowed; }
.switch-sm { width: 32px; height: 18px; }
.switch-sm .switch-track::after { width: 14px; height: 14px; }
.switch-sm input:checked + .switch-track::after { transform: translateX(14px); }

/* ---------------- Checkbox 复选框 ---------------- */
.ck {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  user-select: none;
}
.ck input { position: absolute; opacity: 0; pointer-events: none; }
.ck-box {
  width: 17px; height: 17px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.ck-box svg {
  width: 11px; height: 11px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-expo);
}
.ck input:checked + .ck-box { background: var(--brand); border-color: var(--brand); }
.ck input:checked + .ck-box svg { opacity: 1; transform: scale(1); }
.ck input:focus-visible + .ck-box { box-shadow: var(--shadow-glow); }
.ck input:disabled + .ck-box { opacity: 0.45; }
.ck:hover .ck-box { border-color: var(--line-hover); }
.ck input:checked:hover + .ck-box { border-color: var(--brand); }

/* ---------------- Pagination 分页 ---------------- */
/* 用法：<div class="pager"><button class="pager-btn">‹</button><button class="pager-btn pager-btn--on">1</button>…<span class="pager-info">共 n 条</span></div>
   当前页类名 pager-btn--on；历史别名 pager-btn--active / pager-ellipsis / pager-gap 均兼容 */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.pager-btn:hover:not(:disabled):not(.pager-btn--on):not(.pager-btn--active) {
  border-color: var(--brand);
  color: var(--brand);
}
.pager-btn--on,
.pager-btn--active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-ellipsis,
.pager-gap {
  min-width: 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  user-select: none;
}
.pager-info {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------------- Progress 进度条 ---------------- */
.prog {
  height: 7px;
  border-radius: var(--r-full);
  background: var(--surface-sunken);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transition: width var(--dur-slow) var(--ease-expo);
}
.prog-fill--ok { background: oklch(0.62 0.14 155); }
.prog-fill--warn { background: oklch(0.72 0.14 75); }
.prog-fill--danger { background: oklch(0.60 0.19 27); }

/* ---------------- Metrics 指标条 ---------------- */
.metrics {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.metric {
  padding: var(--s-5) var(--s-6);
  border-left: 1px solid var(--line-2);
  min-width: 0;
}
.metric:first-child { border-left: 0; }
.m-label {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.m-value {
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.18;
  margin-top: var(--s-2);
  font-variant-numeric: tabular-nums;
}
.m-value .m-unit { font-size: 14px; font-weight: 400; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }
.metric--brand .m-value { color: var(--brand); }
.metric--gold .m-value { color: var(--gold-deep); }
.m-foot { margin-top: 5px; min-height: 17px; font-size: 12px; color: var(--text-3); }
.m-foot .up { color: oklch(0.55 0.14 155); font-weight: 500; }
.m-foot .down { color: oklch(0.55 0.18 27); font-weight: 500; }

/* ---------------- Avatar 头像 ---------------- */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 4px oklch(0.55 0.18 var(--hue) / 0.3);
  flex-shrink: 0;
}
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-lg { width: 44px; height: 44px; font-size: 17px; }
.avatar-group { display: flex; }
.avatar-group .avatar {
  border: 2px solid var(--surface);
  margin-left: -8px;
}
.avatar-group .avatar:first-child { margin-left: 0; }

/* ---------------- Tag 标签（可点击/可删除） ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: default;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  user-select: none;
}
.tag--click { cursor: pointer; }
.tag--click:hover { border-color: var(--brand-line); background: var(--brand-soft); color: oklch(0.47 0.17 var(--hue)); }
.tag--on { border-color: var(--brand); background: var(--brand-soft); color: oklch(0.47 0.17 var(--hue)); font-weight: 500; }
.tag-x {
  display: inline-grid;
  place-items: center;
  width: 14px; height: 14px;
  margin-right: -3px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1;
}
.tag-x:hover { background: oklch(0.24 0.02 var(--hue) / 0.1); color: var(--text); }

/* ---------------- Tooltip（纯 CSS，data-tip） ---------------- */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: oklch(0.24 0.012 var(--hue));
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  z-index: 80;
}
[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
[data-tip--bottom]::after { bottom: auto; top: calc(100% + 7px); }

/* ---------------- Notice 通告条 ---------------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--text);
}
.notice--ok { border-color: oklch(0.88 0.06 155); background: var(--ok-soft); }
.notice--warn { border-color: oklch(0.88 0.07 75); background: var(--warn-soft); }
.notice--danger { border-color: var(--danger-line); background: var(--danger-soft); }

/* ---------------- Kbd 键位 ---------------- */
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
}

/* ---------------- Drawer 抽屉 ---------------- */
.scrim {
  position: fixed;
  inset: 0;
  background: oklch(0.2 0.02 var(--hue) / 0.42);
  z-index: 25;
  animation: wos-fade-in 180ms var(--ease);
}
.drawer {
  position: fixed;
  top: 0; bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 26;
  transition: transform var(--dur-slow) var(--ease-expo);
}
.drawer--left { left: 0; transform: translateX(-100%); }
.drawer--right { right: 0; transform: translateX(100%); }
.drawer--open.drawer--left, .drawer--open.drawer--right { transform: none; }

