/* 飞向半人马 · Token 聚合转发平台 UI
   视觉升级 V1.0（docs/19）：深空蓝 · 工程极简——单品牌色浅色梯度 / 描边卡片 / 近黑代码块 / 等宽数字
   主色锚点 #3E54F5 沿用 RightGain Digital Indigo；深空阶 800/900/950 仅用于登录页品牌区 */
:root {
  /* ===== 品牌色（深空蓝梯度） ===== */
  --color-primary-50: #eef0ff; --color-primary-100: #dce3ff; --color-primary-200: #b8c5ff;
  --color-primary-300: #8fa1ff; --color-primary-400: #667bff; --color-primary-500: #3e54f5;
  --color-primary-600: #2e40d9; --color-primary-700: #2331a8;
  --color-primary-800: #1c277e; --color-primary-900: #141d57; --color-primary-950: #0d1338;
  /* ===== 中性色阶（slate 冷调，10 级） ===== */
  --neutral-0: #ffffff; --neutral-50: #f8f9fc; --neutral-100: #f4f5f9; --neutral-150: #f1f2f7;
  --neutral-200: #e5e7eb; --neutral-300: #d1d5db; --neutral-400: #94a3b8; --neutral-500: #64748b;
  --neutral-600: #475569; --neutral-900: #0f172a;
  /* 语义别名（模板引用零改动） */
  --color-bg-canvas: var(--neutral-50); --color-bg-surface: var(--neutral-0);
  --color-bg-sunken: var(--neutral-100); --color-bg-hover: var(--neutral-150);
  --color-border-default: var(--neutral-200); --color-border-strong: var(--neutral-300);
  --color-text-primary: var(--neutral-900); --color-text-secondary: var(--neutral-600);
  --color-text-tertiary: var(--neutral-500); /* #94a3b8→#64748b：对比度 2.9→4.8:1（无障碍修复，裁决 1） */
  /* ===== 语义色 ===== */
  --color-success: #22c55e; --color-success-bg: #f0fdf4; --color-success-600: #15803d;
  --color-warning: #f59e0b; --color-warning-bg: #fffbeb; --color-warning-600: #b45309;
  --color-danger: #ef4444; --color-danger-bg: #fef2f2; --color-danger-600: #b91c1c;
  --color-info-bg: var(--color-primary-50);
  /* ===== 图表序列（分类 6 色 + 基线；单系列恒用 chart-1 纯色；success 绿专色专用） ===== */
  --chart-1: #3e54f5; --chart-2: #8fa1ff; --chart-3: #0891b2;
  --chart-4: #7c3aed; --chart-5: #d97706; --chart-6: #059669; --chart-base: var(--neutral-300);
  /* 品牌渐变（单色相）与深空面板 */
  --brand-grad: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
  --brand-grad-space: linear-gradient(168deg, #141d57 0%, #0d1338 52%, #080d26 100%);
  /* ===== 字体 ===== */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", 'Segoe UI', system-ui, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Menlo, "JetBrains Mono", Consolas, monospace;
  /* ===== 圆角（控件 8 / 卡片 12 / 容器 16） ===== */
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-pill: 9999px;
  /* ===== 阴影（浮层专用；卡片走描边） ===== */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .08);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, .12);
  --shadow-focus: 0 0 0 3px rgba(62, 84, 245, .18);
  /* ===== 动效（克制，≤200ms） ===== */
  --duration-fast: 120ms; --duration-base: 200ms;
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  /* ===== 布局 ===== */
  --layout-header-h: 60px; --layout-sidebar-w: 240px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font: 400 14px/1.6 var(--font-sans); color: var(--color-text-primary); background: var(--color-bg-canvas); -webkit-font-smoothing: antialiased; }
a { color: var(--color-primary-500); text-decoration: none; }
::selection { background: var(--color-primary-100); }
/* inline code（.code 块为 div，不受影响） */
code { background: var(--color-bg-sunken); border: 1px solid var(--color-border-default); border-radius: var(--radius-xs);
  padding: 1px 5px; font-family: var(--font-mono); font-size: .92em; }
.tnum { font-variant-numeric: tabular-nums; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--color-primary-500); outline-offset: 1px; }

/* ---------- 布局：浅色侧栏（AppShell 规范）---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; width: var(--layout-sidebar-w); height: 100vh; flex-shrink: 0; overflow-y: auto;
  display: flex; flex-direction: column; background: var(--color-bg-surface); border-right: 1px solid var(--color-border-default); padding: 0 12px 16px; }
.sidebar .brand { display: flex; gap: 12px; align-items: center; height: var(--layout-header-h); border-bottom: 1px solid var(--color-border-default); margin-bottom: 12px; padding: 0 4px; }
.sidebar .brand b { color: var(--color-text-primary); font-size: 16px; font-weight: 600; display: block; line-height: 1.25; white-space: nowrap; }
.sidebar .brand span { font-size: 11px; color: var(--color-text-tertiary); letter-spacing: .04em; white-space: nowrap; }
/* 品牌徽标（TASK-LOGO-FINAL-20261012-S8U4，用户原图提取）：logo-light.png 为白色图形+真透明底；
   浅底品牌区=品牌蓝渐变 tile（--brand-grad，与主按钮同语言）承载反白 logo，深空区直接融入深底（.brand-mark-space）；
   图为纯图形无文字，故保留右侧品牌文字 */
.logo-tile { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--brand-grad);
  display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.sidebar .brand span.logo-tile { padding: 0; letter-spacing: 0; }
.logo-tile img { width: 30px; height: 30px; object-fit: contain; display: block; }
.nav { padding: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav .sec { font-size: 11px; font-weight: 600; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 5px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-md);
  color: var(--color-text-secondary); font-size: 14px; font-weight: 500; transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); }
.nav a::before { content: ''; position: absolute; left: 0; top: 50%; width: 4px; height: 0; border-radius: 0 2px 2px 0;
  background: var(--color-primary-500); transform: translateY(-50%); transition: height var(--duration-base) var(--ease-standard); }
.nav a:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
.nav a.on { background: var(--color-primary-50); color: var(--color-primary-600); }
.nav a.on::before { height: 20px; }
/* 线性 SVG 图标（内联 currentColor，零图标库依赖） */
.nav a .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: var(--color-bg-sunken); color: var(--color-text-secondary); flex-shrink: 0; transition: var(--duration-fast); }
.nav a .ic svg { width: 17px; height: 17px; display: block; }
.nav a.on .ic { background: var(--color-primary-100); color: var(--color-primary-600); }
.sidebar .foot { padding: 12px 8px 0; border-top: 1px solid var(--color-border-default); font-size: 12px; }
.sidebar .foot .u { color: var(--color-text-primary); font-weight: 600; margin-bottom: 2px; }
.sidebar .foot button { margin-top: 8px; color: var(--color-text-secondary); } /* 浅色侧栏：深色文字（QC 实证 #e2e8f0 在白底 1.23:1 不可读） */
.sidebar .foot { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#side-balance { font-variant-numeric: tabular-nums; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--layout-header-h); padding: 0 32px;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border-default); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 18px; font-weight: 700; line-height: 1.2; }
.topbar .sub { color: var(--color-text-tertiary); font-size: 12px; margin-top: 1px; }
.content { padding: 24px 32px 64px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ---------- 卡片 / 统计（描边优先，hover 仅描边加深，不抬升） ---------- */
.card { background: var(--color-bg-surface); border: 1px solid var(--color-border-default); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 18px; transition: border-color var(--duration-fast) var(--ease-standard); }
.card:hover { border-color: var(--color-border-strong); }
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .hint { font-size: 12px; color: var(--color-text-tertiary); font-weight: 400; margin-left: auto; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; } /* grid item 默认 min-width:auto 会被 white-space:pre 内容撑破（移动端 P1 根因） */
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c5 { grid-template-columns: repeat(5, 1fr); }
.stat { background: var(--color-bg-surface); border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); padding: 16px 18px; }
.stat .k { color: var(--color-text-tertiary); font-size: 12px; font-weight: 500; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .v small { font-size: 12px; color: var(--color-text-tertiary); font-weight: 400; margin-left: 3px; }
.stat .d { font-size: 12px; color: var(--color-text-tertiary); margin-top: 3px; }
/* 焦点卡：primary-600 纯色实底（裁决 3：去营销化渐变与发光阴影） */
.stat.hl { background: var(--color-primary-600); border-color: transparent; color: #fff; }
.stat.hl .v { color: #fff; font-size: 18px; }
.stat.hl .k, .stat.hl .d { color: rgba(255, 255, 255, .78); }
.stat.hl .v small { color: rgba(255, 255, 255, .78); }
.stat.hl a, .stat.hl .k a, .stat.hl .d a { color: #cdd8ff; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface); color: var(--color-text-primary); border-radius: var(--radius-md); padding: 8px 15px;
  font: 500 13px/1 var(--font-sans); cursor: pointer; transition: all var(--duration-fast) var(--ease-standard); white-space: nowrap; }
.btn:hover { background: var(--color-bg-hover); border-color: var(--color-border-strong); }
.btn.pri { background: var(--color-primary-500); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.btn.pri:hover { background: var(--color-primary-600); border-color: transparent; }
.btn.danger { color: var(--color-danger-600); border-color: rgba(239, 68, 68, .3); }
.btn.danger:hover { background: var(--color-danger-bg); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--color-text-secondary); }
.btn.ghost:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 输入 ---------- */
.input, select.input, textarea.input { border: 1px solid var(--color-border-default); border-radius: var(--radius-md);
  padding: 8px 12px; font: 400 13px var(--font-sans); background: var(--color-bg-surface); color: var(--color-text-primary);
  outline: none; min-width: 0; transition: border-color var(--duration-fast), box-shadow var(--duration-fast); }
.input:focus { border-color: var(--color-primary-500); box-shadow: var(--shadow-focus); }
.tbl .input { padding: 4px 6px; border-radius: var(--radius-sm); font-size: 12px; }
label.fl { display: block; font-size: 12.5px; color: var(--color-text-secondary); margin: 10px 0 5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--color-text-tertiary); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  padding: 9px 10px; border-bottom: 1px solid var(--color-border-default); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid #f2f4f8; vertical-align: middle; }
.tbl tr:hover td { background: var(--color-bg-canvas); }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; }
.tbl .mono { font-family: var(--font-mono); font-size: 12px; }

/* ---------- 徽章 / 状态 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--radius-pill); font-size: 12px; padding: 2px 10px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.badge.ok { background: var(--color-success-bg); color: var(--color-success-600); }
.badge.warn { background: var(--color-warning-bg); color: var(--color-warning-600); }
.badge.err { background: var(--color-danger-bg); color: var(--color-danger-600); }
.badge.info { background: var(--color-info-bg); color: var(--color-primary-600); }
.badge.gray { background: var(--color-bg-sunken); color: var(--color-text-secondary); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--color-success); box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }
.dot.err { background: var(--color-danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.dot.warn { background: var(--color-warning); }

/* ---------- Tabs / 代码块（一等公民：语言标签 + 块内复制） ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border-default); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: none; background: none; padding: 9px 14px; font: 500 13px var(--font-sans); color: var(--color-text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--duration-fast); }
.tabs button:hover { color: var(--color-text-primary); }
.tabs button.on { color: var(--color-primary-600); border-color: var(--color-primary-500); font-weight: 600; }
.code { position: relative; background: #14161f; color: #d5dcf5; border-radius: var(--radius-md); padding: 14px 16px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; overflow-x: auto; white-space: pre; border: 1px solid rgba(255, 255, 255, .06); }
.code.has-lang { padding-top: 34px; }
.code .lang { position: absolute; top: 9px; left: 14px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: #6b7599; font-family: var(--font-mono); user-select: none; }
.code .copy-btn { position: absolute; top: 7px; right: 8px; border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #aab3d6; }
.code .copy-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff; }

/* ---------- 弹层 / Toast ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 1500; }
.modal { background: var(--color-bg-surface); border-radius: var(--radius-lg); padding: 24px; width: min(560px, 92vw);
  max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-xl); }
.modal h3 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
#toast-root { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--neutral-900); color: #fff; border-radius: var(--radius-md); padding: 11px 16px; font-size: 13px;
  box-shadow: var(--shadow-lg); max-width: 380px; animation: slidein .2s var(--ease-standard); }
.toast.ok { background: #166534; } .toast.err { background: #991b1b; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }

/* ---------- 杂项组件 ---------- */
.empty { text-align: center; color: var(--color-text-tertiary); padding: 42px 0; font-size: 13px; }
.empty .big { font-size: 34px; margin-bottom: 8px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 12.5px; color: var(--color-text-tertiary); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; min-width: 0; } /* overflow:hidden 会裁掉柱 hover tooltip（QC 实证），移动端防溢出在 768 断点内处理 */
.bars .bar { flex: 1; background: var(--chart-1); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; transition: background var(--duration-fast); }
.bars .bar:hover { background: var(--color-primary-600); }
.bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--neutral-900); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: var(--radius-sm); white-space: nowrap; margin-bottom: 4px; }
.bars .lbl { display: flex; gap: 6px; margin-top: 6px; width: 100%; } /* 占满柱区宽度，标签在对应柱下居中 */
.bars .lbl span { flex: 1; text-align: center; font-size: 11px; color: var(--color-text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline { display: flex; height: 14px; border-radius: var(--radius-pill); overflow: hidden; margin: 8px 0 4px; }
.timeline div { height: 100%; }
.tl-legend { display: flex; gap: 12px; font-size: 11px; color: var(--color-text-tertiary); flex-wrap: wrap; }
.tl-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; vertical-align: -1px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 14px; font-size: 13px; }
.kv .k { color: var(--color-text-tertiary); }
/* 提示条：默认中性灰底；品牌语义用 .note.brand；警示用 .note.warn */
.note { background: var(--color-bg-sunken); border: 1px solid var(--color-border-default); border-radius: var(--radius-md);
  padding: 10px 14px; font-size: 12.5px; color: var(--color-text-secondary); margin: 10px 0; }
.note.brand { background: var(--color-primary-50); border-color: rgba(62, 84, 245, .18); color: #3a4a7c; }
.note.warn { background: var(--color-warning-bg); border-color: rgba(245, 158, 11, .25); color: #7c4a03; }
.note b { font-weight: 600; }
.plan { border: 1.5px solid var(--color-border-default); border-radius: var(--radius-lg); padding: 24px; position: relative; background: var(--color-bg-surface);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast); }
.plan.pop { border-color: var(--color-primary-500); box-shadow: 0 0 0 3px rgba(62, 84, 245, .10); }
.plan.cur { border-color: var(--color-primary-500); box-shadow: 0 0 0 3px rgba(62, 84, 245, .12); }
.plan .tag { position: absolute; top: -11px; left: 20px; background: var(--color-primary-600); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: var(--radius-pill); }
.plan .nm { font-size: 15px; font-weight: 600; }
.plan .pr { font-size: 30px; font-weight: 700; margin: 8px 0 2px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.plan .pr small { font-size: 13px; color: var(--color-text-tertiary); font-weight: 400; }
.plan .pt { color: var(--color-primary-600); font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.plan ul { list-style: none; margin: 12px 0; font-size: 12.5px; color: var(--color-text-secondary); }
.plan ul li { padding: 3px 0 3px 18px; position: relative; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--color-success-600); }

/* ---------- 登录页：左右分栏（左深空品牌区 + 右白底表单） ---------- */
.login-split { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 45%) 1fr; }
.login-side { position: relative; overflow: hidden; background: var(--brand-grad-space); color: #fff; display: flex; }
.login-side::before { /* 星点场：三层 radial-gradient 平铺，纯 CSS 零素材 */
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 255, 255, .30) 1px, transparent 1.4px),
    radial-gradient(rgba(184, 197, 255, .45) 1.5px, transparent 2.2px);
  background-size: 148px 148px, 96px 96px, 236px 236px;
  background-position: 0 0, 34px 62px, 82px 18px;
}
.login-side::after { /* 右下品牌光晕，极轻 */
  content: ''; position: absolute; right: -18%; bottom: -24%; width: 64%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(62, 84, 245, .28), transparent 72%);
}
.ls-inner { position: relative; z-index: 1; display: flex; flex-direction: column; padding: 56px; width: 100%; }
.ls-brand { display: flex; gap: 12px; align-items: center; }
.ls-brand b { font-size: 20px; font-weight: 700; letter-spacing: .01em; }
/* 深空区：透明底白色 logo，直接融入深空渐变 */
.brand-mark-space { width: 44px; height: 44px; object-fit: contain; flex: none; }
.ls-slogan { font-size: 28px; font-weight: 700; letter-spacing: -.01em; margin: auto 0 14px; }
.ls-desc { font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .62); max-width: 380px; }
.star-track { position: absolute; top: 15%; right: 8%; width: min(220px, 38%); opacity: .9; }
.ls-stats { display: flex; gap: 36px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); }
.login-stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.login-stat .k { font-size: 11px; color: rgba(255, 255, 255, .5); margin-top: 2px; }
.login-main { display: grid; place-items: center; padding: 48px 24px; background: var(--color-bg-surface); }
.login-form { width: min(400px, 100%); }
.login-form .brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.login-form .brand b { font-size: 17px; font-weight: 700; }
.login-form h2 { font-size: 20px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.01em; }
.login-form .slog { color: var(--color-text-tertiary); font-size: 12.5px; margin-bottom: 18px; }
.login-form .input { height: 44px; padding: 0 14px; font-size: 14px; }
.login-form textarea.input { height: auto; padding: 8px 12px; }
.login-form #login-btn { width: 100%; height: 44px; margin-top: 18px; font-size: 14px; }
.login-foot { margin-top: 16px; font-size: 12px; color: var(--color-text-tertiary); text-align: center; }
/* 管理端登录等居中卡场景（admin renderLogin 复用） */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 408px; background: var(--color-bg-surface); border: 1px solid var(--color-border-default);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 36px 34px 26px; }
.login-card .brand { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.login-card h2 { font-size: 20px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.01em; }
.login-card .slog { color: var(--color-text-tertiary); font-size: 12.5px; margin-bottom: 18px; }

/* ---------- 模型卡 / 状态条 ---------- */
.model-card { border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); padding: 18px 20px; background: var(--color-bg-surface);
  transition: border-color var(--duration-fast) var(--ease-standard); }
.model-card:hover { border-color: var(--color-border-strong); }
.model-card .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.model-card .hd b { font-size: 14px; font-family: var(--font-mono); font-weight: 600; }
.model-card .ctx { font-size: 12px; color: var(--color-text-tertiary); margin-bottom: 10px; }
.mini-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-tbl td { padding: 4px 6px; border-bottom: 1px dashed #eef0f5; }
.mini-tbl tr:last-child td { border-bottom: none; }
.mini-tbl td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-secondary); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--color-bg-surface); border: 1px solid var(--color-border-default);
  border-radius: var(--radius-pill); padding: 3px 12px; font-size: 12px; }
.side-strip { display: flex; gap: 14px; align-items: center; background: var(--color-bg-surface); color: var(--color-text-secondary);
  border: 1px solid var(--color-border-default); border-radius: var(--radius-md); padding: 9px 16px; font-size: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.side-strip b { color: var(--color-text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.side-strip .live { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 980px) {
  .grid.c4, .grid.c5 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: 1fr; }
  .sidebar { width: 64px; padding: 0 8px 12px; }
  .sidebar .brand { display: none; }
  .nav a span.t, .sidebar .foot .u, .nav .sec, .sidebar .foot { display: none; }
  .nav a { justify-content: center; padding: 8px; }
  .topbar, .content { padding-left: 14px; padding-right: 14px; }
}

/* 登录页移动端：深空区折叠为顶带 */
@media (max-width: 860px) {
  .login-split { grid-template-columns: 1fr; align-items: start; }
  .login-side { min-height: 176px; }
  .ls-inner { padding: 0 24px; flex-direction: row; align-items: center; }
  .ls-slogan, .ls-desc, .star-track, .ls-stats { display: none; }
  /* 折叠带：隐藏的 slogan 仍带 margin:auto 会把顶带撑到 203px（>176 基线），移动带重置 */
  .ls-slogan { margin: 0; }
  .brand-mark-space { width: 30px; height: 30px; }
  .login-main { padding: 32px 20px; }
}

/* ===== 渠道管理表：操作列防截断（作用域仅限 .channel-tbl）=====
   根因：长 base_url 不换行 + 10 列总宽超出卡片，table-wrap 横向滚动导致操作列被切到视口外 */
.channel-tbl th, .channel-tbl td { padding-left: 8px; padding-right: 8px; }
.channel-tbl .ch-url { overflow-wrap: anywhere; word-break: break-all; }
.channel-tbl td:last-child { white-space: nowrap; }

/* ===== 接入文档页：长 URL / 内联 code 断行 + 表格横滚兜底（验收 TASK-VISUAL-UPGRADE-20261012-P1V9）=====
   根因：390px 下文档表格单元格内不可断长 URL（http://…）把表 min-content 顶到 315+，首列被压至单字竖排；
   .note 内联 code（/v1/responses 等）不可断把 note 撑到 418，连带 shell scrollWidth=518 撑破视口。
   作用域严格收窄到 .docs-view（文档页卡片，见 pgDocs）；桌面 1440 宽容器内无断行点故渲染不变。
   双 Base URL 表 4 列在 390px 下天然放不下 → 保最小可用列宽、由 table-wrap 容器内横滚（非页面溢出）。 */
.docs-view .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.docs-view .tbl { min-width: 0; }
.docs-view .tbl td { overflow-wrap: anywhere; word-break: break-word; }
.docs-view .tbl td.mono, .docs-view .tbl code { word-break: break-all; } /* URL/错误码等长 token 任意点可断 */
.docs-view .note { overflow-wrap: anywhere; word-break: break-word; }
.docs-view .note code { word-break: break-all; }
@media (max-width: 768px) {
  .docs-view .docs-base-tbl { min-width: 560px; } /* 4 列保底：产品/URL/Key 类型/计费，放不下时容器内横滚 */
  .docs-base-tbl th:nth-child(1), .docs-base-tbl td:nth-child(1) { width: 96px; white-space: nowrap; }  /* 产品名不竖排 */
  .docs-base-tbl th:nth-child(2), .docs-base-tbl td:nth-child(2) { width: 190px; }                     /* URL 列：localhost:300x 可单行 */
  .docs-base-tbl th:nth-child(3), .docs-base-tbl td:nth-child(3) { width: 96px; white-space: nowrap; }  /* Key 类型不被截断 */
  .docs-view .docs-cache-tbl { min-width: 520px; }
  .docs-cache-tbl th:nth-child(1), .docs-cache-tbl td:nth-child(1),
  .docs-cache-tbl th:nth-child(2), .docs-cache-tbl td:nth-child(2) { white-space: nowrap; }             /* 厂商名 / 触发方式不碎字 */
  .docs-view .docs-err-tbl { min-width: 520px; }
  .docs-err-tbl th:nth-child(1), .docs-err-tbl td:nth-child(1),
  .docs-err-tbl th:nth-child(2), .docs-err-tbl td:nth-child(2) { white-space: nowrap; }                 /* HTTP / code 不碎字 */
}

/* ===== 移动端适配补齐（视觉审查 P1/P2 修复）===== */
.code { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } /* 代码块任何宽度不撑破容器（P1 m1 主因） */
@media (max-width: 768px) {
  .grid.c2, .grid.c3, .grid.c4, .grid.c5 { grid-template-columns: 1fr; }   /* KPI 网格降 1 列 */
  .topbar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .topbar .row { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .stat .v { font-size: 18px; }
  .stat.hl .v { font-size: 18px; word-break: break-all; }
  .tbl th, .tbl td { padding: 7px 6px; }
  .kv { grid-template-columns: 100px 1fr; font-size: 12px; }
  .modal { width: 94vw; padding: 16px; }
  .side-strip { font-size: 11px; padding: 8px 10px; }
  .top-actions-wrap, #top-actions { flex-wrap: wrap; }
  .plan { padding: 16px; }
  .bars { height: 80px; overflow: hidden; }
  .timeline { min-width: 0; }
  .row { gap: 6px; }
  .btn { padding: 10px 16px; font-size: 12.5px; } /* 触控加高 */
  .btn.sm { padding: 6px 10px; }
}

/* ===== 系统配置页（设置项标签 + 来源徽章同行）===== */
.set-row { margin-bottom: 12px; }
.set-label { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
