/* 时云AI 管理后台 — 黑白灰基调 + Apple 风柔和动画 */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bg: #f5f5f7;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
  --sidebar-bg: rgba(24, 24, 26, 0.85);
  --sidebar-text: #d1d1d6;
  --sidebar-text-2: #86868b;
  --accent: #0a0a0a;
  --accent-hover: #2c2c2e;
  --ok: #34c759;
  --err: #ff453a;
  --warn: #ff9f0a;
  --info: #64758c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Text', 'Segoe UI',
  'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 14px; color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(at 12% 12%, rgba(240, 240, 245, 0.9) 0px, transparent 45%),
    radial-gradient(at 88% 88%, rgba(230, 230, 238, 0.8) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; }

/* ==== 布局 ==== */
.app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; padding: 14px; gap: 14px; }

/* ==== 侧边栏 — 深色玻璃 ==== */
.sidebar {
  background: var(--sidebar-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
.brand { padding: 22px 22px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.brand-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.2px; }
.brand-tag { font-size: 10.5px; color: var(--sidebar-text-2); margin-top: 3px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }

.nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 14px; font-size: 13.5px;
  color: var(--sidebar-text-2); cursor: pointer; border-radius: 10px; margin-bottom: 2px;
  transition: background 220ms var(--ease-out), color 200ms var(--ease-out);
  position: relative; user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 2px;
  background: #fff; border-radius: 2px;
  animation: navBar 300ms var(--ease-out);
}
@keyframes navBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.nav-ico { display: inline-block; width: 16px; text-align: center; opacity: 0.85; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
}
.admin-info { flex: 1; min-width: 0; }
.admin-name { font-size: 13px; color: #fafafa; font-weight: 600; }
.admin-role { font-size: 10.5px; color: var(--sidebar-text-2); margin-top: 1px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.btn-logout {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: #d1d1d6;
  padding: 6px 12px; font-size: 12px; border-radius: 8px; cursor: pointer;
  transition: all 200ms var(--ease-out);
}
.btn-logout:hover { background: rgba(255, 69, 58, 0.15); border-color: rgba(255, 69, 58, 0.35); color: #ff6961; }

/* ==== 主内容区 ==== */
.main {
  overflow-y: auto;
  border-radius: 18px;
  padding: 28px 32px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
}

/* View 页面切换动画（对子元素触发，innerHTML 替换后新节点会跑动画） */
#view > * { animation: viewIn 380ms var(--ease-out) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 统计卡片错峰入场 */
.stats > .stat-card { animation: cardStagger 500ms var(--ease-spring) both; }
.stats > .stat-card:nth-child(1) { animation-delay: 40ms; }
.stats > .stat-card:nth-child(2) { animation-delay: 80ms; }
.stats > .stat-card:nth-child(3) { animation-delay: 120ms; }
.stats > .stat-card:nth-child(4) { animation-delay: 160ms; }
.stats > .stat-card:nth-child(5) { animation-delay: 200ms; }
.stats > .stat-card:nth-child(6) { animation-delay: 240ms; }
@keyframes cardStagger {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 表格行入场 */
.table-wrap tbody tr { animation: rowIn 420ms var(--ease-out) both; }
.table-wrap tbody tr:nth-child(1) { animation-delay: 20ms; }
.table-wrap tbody tr:nth-child(2) { animation-delay: 40ms; }
.table-wrap tbody tr:nth-child(3) { animation-delay: 60ms; }
.table-wrap tbody tr:nth-child(4) { animation-delay: 80ms; }
.table-wrap tbody tr:nth-child(5) { animation-delay: 100ms; }
.table-wrap tbody tr:nth-child(6) { animation-delay: 120ms; }
.table-wrap tbody tr:nth-child(7) { animation-delay: 140ms; }
.table-wrap tbody tr:nth-child(8) { animation-delay: 160ms; }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==== 页头 ==== */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; color: var(--text); }
.page-desc { color: var(--text-3); font-size: 13px; margin-top: 4px; }

/* ==== 工具栏 ==== */
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.toolbar > * { flex-shrink: 0; }

/* ==== 统计卡片 ==== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 20px 22px; border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}
.stat-label {
  font-size: 11.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600;
}
.stat-value {
  font-size: 30px; font-weight: 700; margin-top: 8px;
  color: var(--text); letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; font-weight: 500; }
.stat-sub.up { color: var(--ok); }
.stat-sub.up::before { content: '↑ '; font-weight: 700; }

/* ==== 收入条 ==== */
.rev-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 22px;
}
.rev-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 18px 22px; border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 320ms var(--ease-out);
  animation: cardStagger 500ms var(--ease-spring) both;
}
.rev-card:nth-child(1) { animation-delay: 20ms; }
.rev-card:nth-child(2) { animation-delay: 60ms; }
.rev-card:nth-child(3) { animation-delay: 100ms; }
.rev-card:nth-child(4) { animation-delay: 140ms; }
.rev-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06); }
.rev-card.rev-primary {
  background: linear-gradient(135deg, #1d1d1f 0%, #2c2c2e 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.rev-card.rev-primary .rev-label,
.rev-card.rev-primary .rev-sub { color: rgba(255,255,255,0.72); }
.rev-card.rev-primary .rev-value { color: #fff; }
.rev-label {
  font-size: 11.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600;
}
.rev-value {
  font-size: 26px; font-weight: 700; margin-top: 6px;
  color: var(--text); letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}
.rev-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ==== Dashboard 网格布局 ==== */
.dash-grid { display: grid; gap: 14px; margin-bottom: 22px; }
.dash-2col { grid-template-columns: 1fr 1fr; }
.dash-3col { grid-template-columns: 1fr 1fr 1.2fr; }
@media (max-width: 1100px) {
  .dash-2col, .dash-3col, .rev-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .dash-2col, .dash-3col, .rev-strip { grid-template-columns: 1fr; }
}

/* ==== 24 小时热力 ==== */
.bar-chart.hourly {
  gap: 2px; padding-bottom: 22px;
}
.bar-chart.hourly .hcell {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  position: relative; height: 100%;
}
.bar-chart.hourly .hbar {
  width: 100%; min-height: 2px;
  background: linear-gradient(180deg, #4a4a4c 0%, #1d1d1f 100%);
  border-radius: 3px 3px 0 0;
  transition: all 320ms var(--ease-out);
}
.bar-chart.hourly .hcell:hover .hbar {
  background: linear-gradient(180deg, #86868b 0%, #1d1d1f 100%);
  transform: scaleY(1.03);
}
.bar-chart.hourly .hlabel {
  position: absolute; bottom: -18px; font-size: 10px; color: var(--text-3);
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

/* ==== 饼图（套餐分布）==== */
.pie-wrap { display: flex; align-items: center; gap: 20px; padding: 4px 0; }
.pie {
  width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  position: relative;
}
.pie::after {
  content: ''; position: absolute; inset: 22%;
  background: rgba(255,255,255,0.94); border-radius: 50%;
}
.pie-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.leg-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.leg-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.leg-name { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==== Key Pool ==== */
.kp-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 2px; font-size: 13px;
}
.kp-name { color: var(--text-2); font-weight: 500; }
.kp-val { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ==== Top Users ==== */
.top-users { display: flex; flex-direction: column; gap: 6px; }
.tu-row {
  display: grid; grid-template-columns: 32px 1fr auto auto;
  gap: 10px; align-items: center; padding: 8px 4px;
  border-radius: 8px; transition: background 180ms var(--ease-out);
}
.tu-row:hover { background: rgba(0, 0, 0, 0.02); }
.tu-rank { font-size: 12px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tu-info { min-width: 0; }
.tu-name { font-size: 13px; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-uuid { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.tu-plan { font-size: 11px; }
.tu-calls { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }

/* ==== 表格容器 ==== */
.table-wrap {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 13px;
}
th {
  background: rgba(250, 250, 252, 0.5); font-weight: 600; color: var(--text-2); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
tr:last-child td { border-bottom: none; }
tr { transition: background 180ms var(--ease-out); }
tr:hover td { background: rgba(0, 0, 0, 0.02); }
td.mono { font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text-2); }
td.actions { white-space: nowrap; }

/* ==== 按钮 ==== */
.btn {
  padding: 8px 14px; font-size: 13px; border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(8px);
  color: var(--text); border-radius: 10px; cursor: pointer;
  transition: all 220ms var(--ease-out);
  font-weight: 500; letter-spacing: -0.1px;
}
.btn:hover {
  background: #fff; border-color: rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.btn:active { transform: translateY(0); transition-duration: 80ms; }

.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.btn-danger {
  color: var(--err); border-color: rgba(255, 69, 58, 0.28);
  background: rgba(255, 69, 58, 0.06);
}
.btn-danger:hover { background: rgba(255, 69, 58, 0.14); border-color: rgba(255, 69, 58, 0.4); color: #d70015; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

/* ==== 输入 ==== */
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  padding: 10px 13px; border: 1px solid var(--border); border-radius: 12px; font-size: 13px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px) saturate(180%);
  outline: none; font-family: inherit;
  transition: all 220ms var(--ease-out);
  color: var(--text);
  line-height: 1.5;
}
input:hover, select:hover, textarea:hover {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.85);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 0.7; }
input.search { min-width: 300px; }
/* toolbar 里的表单元素统一稍高一些 */
.toolbar input, .toolbar select { padding: 10px 14px; font-size: 13.5px; }
input::placeholder { color: var(--text-3); }

/* ==== 状态 tag ==== */
.tag {
  display: inline-block; padding: 3px 10px; font-size: 11.5px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.2px;
  transition: transform 180ms var(--ease-out);
}
.tag-active, .tag-ok { background: rgba(52, 199, 89, 0.12); color: #248a3d; }
.tag-banned, .tag-error { background: rgba(255, 69, 58, 0.12); color: #d70015; }
.tag-unused { background: rgba(0, 0, 0, 0.06); color: var(--text); border: 1px solid rgba(0, 0, 0, 0.08); }
.tag-used { background: rgba(0, 0, 0, 0.03); color: var(--text-3); }
.tag-revoked { background: rgba(255, 69, 58, 0.12); color: #d70015; }
.tag-disabled_manual, .tag-disabled_auto { background: rgba(255, 159, 10, 0.16); color: #b76b00; }
.tag-blocked { background: rgba(255, 69, 58, 0.12); color: #d70015; }

/* ==== 分页 ==== */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 13px; color: var(--text-3); }
.pagination-btns { display: flex; gap: 6px; }

/* ==== 弹窗（磨玻璃）==== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  animation: maskIn 220ms var(--ease-out); }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(20, 20, 22, 0.35);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
}
.modal-body {
  position: relative; background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px; padding: 28px 32px;
  min-width: 480px; max-width: 720px; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  animation: modalIn 380ms var(--ease-spring);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; }
.modal-desc { color: var(--text-3); font-size: 13px; margin-bottom: 22px; line-height: 1.5; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; font-size: 12.5px; margin-bottom: 8px;
  color: var(--text-2); font-weight: 600; letter-spacing: -0.1px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px) saturate(180%);
  color: var(--text);
  font-family: inherit;
  transition: all 220ms var(--ease-out);
  outline: none;
  line-height: 1.6;
}
.form-row textarea {
  min-height: 110px;
  resize: vertical;
  font-family: inherit;   /* 中文用主字体，不用 mono */
  font-size: 13.5px;
  line-height: 1.65;
}
.form-row textarea[id$="-sys"], .form-row textarea[id$="-ann"] {
  min-height: 140px;
}
.form-row input:hover, .form-row select:hover, .form-row textarea:hover {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.85);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}
.form-row input::placeholder, .form-row textarea::placeholder {
  color: var(--text-3);
  opacity: 0.75;
}
.form-hint {
  font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.6;
  padding-left: 2px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ==== Toast ==== */
.toast {
  position: fixed; top: 24px; right: 24px; z-index: 200; padding: 12px 18px;
  background: rgba(20, 20, 22, 0.92); backdrop-filter: blur(14px);
  color: #fff; border-radius: 12px; font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(-10px) scale(0.98);
  transition: all 280ms var(--ease-spring);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.toast.error { background: rgba(215, 0, 21, 0.92); }

/* ==== 详情面板 ==== */
.detail-grid { display: grid; grid-template-columns: 130px 1fr; gap: 12px 20px; font-size: 13px; }
.detail-grid > div:nth-child(odd) { color: var(--text-3); font-weight: 500; }
.detail-grid > div:nth-child(even) { color: var(--text); }

/* ==== 代码块 ==== */
.codes-list {
  max-height: 320px; overflow-y: auto;
  background: #1c1c1e; color: #f2f2f7;
  padding: 14px 16px; border-radius: 12px;
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Consolas, monospace;
  font-size: 12px; line-height: 1.9; white-space: pre;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==== 空状态 ==== */
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); font-size: 13px; }

/* ==== 图表 ==== */
.chart {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 24px 28px; border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.chart-title {
  font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-bottom: 20px;
  text-transform: uppercase; letter-spacing: 1px;
}
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 160px; }
.bar {
  flex: 1; border-radius: 8px 8px 0 0; position: relative; min-height: 4px;
  background: linear-gradient(180deg, #1d1d1f 0%, #48484a 100%);
  transition: transform 260ms var(--ease-out), background 260ms var(--ease-out);
  animation: barGrow 600ms var(--ease-spring);
  transform-origin: bottom;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar:hover { background: linear-gradient(180deg, #0a0a0a 0%, #3a3a3c 100%); transform: translateY(-2px); }
.bar-label { text-align: center; font-size: 11px; color: var(--text-3); margin-top: 8px; font-weight: 500; }
.bar-value {
  position: absolute; top: -20px; left: 0; right: 0; text-align: center;
  font-size: 11px; color: var(--text-2); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ==== 滚动条美化 ==== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28); background-clip: padding-box; border: 2px solid transparent;
}
.sidebar ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); }
.sidebar ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

/* ==== 敏感词分组 ==== */
.sw-groups { display: flex; flex-direction: column; gap: 12px; }
.sw-group {
  background: rgba(255,255,255,0.75); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0,0,0,0.05); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: box-shadow 260ms var(--ease-out);
}
.sw-group:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.05); }
.sw-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; cursor: pointer; user-select: none;
  transition: background 180ms var(--ease-out);
}
.sw-group-head:hover { background: rgba(0,0,0,0.02); }
.sw-group-title { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.sw-group-title b { font-size: 15px; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.sw-group-desc { color: var(--text-3); font-size: 12px; margin-left: 4px; }
.sw-chevron { color: var(--text-3); transition: transform 240ms var(--ease-out); }
.sw-group.open .sw-chevron { transform: rotate(180deg); }
.sw-group-body {
  max-height: 0; overflow: hidden;
  transition: max-height 320ms var(--ease-out);
}
.sw-group.open .sw-group-body { max-height: 1200px; }
.sw-chips {
  padding: 8px 16px 18px; display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.sw-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 4px 4px 10px; font-size: 12px; color: var(--text);
  background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.05);
  border-radius: 999px; letter-spacing: 0.02em;
  transition: all 160ms var(--ease-out);
}
.sw-chip:hover { background: #fff; border-color: rgba(0,0,0,0.14); }
.sw-chip button {
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.06); color: var(--text-3);
  cursor: pointer; font-size: 12px; line-height: 1; padding: 0;
  transition: all 160ms var(--ease-out); font-family: inherit;
}
.sw-chip button:hover { background: var(--err); color: #fff; }

/* ==== Key 能力标签（红色=不支持） ==== */
.cap-tag {
  display: inline-block; margin: 1px 3px 1px 0;
  padding: 1px 7px; font-size: 10.5px; font-weight: 600;
  background: rgba(255,69,58,0.14); color: #d70015;
  border: 1px solid rgba(255,69,58,0.28);
  border-radius: 5px; letter-spacing: 0.02em;
  font-family: 'JetBrains Mono','SF Mono',ui-monospace,monospace;
}

/* ==== 模型勾选 ==== */
.model-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 8px; max-height: 280px; overflow-y: auto;
  padding: 8px; background: rgba(0,0,0,0.02); border-radius: 10px;
}
.model-check {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,0.6); border: 1px solid transparent;
  transition: all 160ms var(--ease-out);
}
.model-check:hover { background: #fff; border-color: rgba(0,0,0,0.06); }
.model-check input { margin: 0; flex-shrink: 0; cursor: pointer; }
.model-check input:disabled { opacity: 0.3; }
.model-check .model-code {
  font-family: 'JetBrains Mono','SF Mono',ui-monospace,monospace;
  font-size: 12px; color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.model-check .model-name { font-size: 11px; color: var(--text-3); margin-left: auto; }

/* ==== 响应式 ==== */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
