/* ===================== 设计变量 ===================== */
:root {
  --bg: #0b0e13;
  --panel: #131820;
  --panel-2: #1a212c;
  --panel-3: #202836;
  --line: #26303f;
  --line-soft: #1d2531;
  --text: #e8eef6;
  --muted: #8a97a9;
  --accent: #2aabee;
  --accent-soft: #12293a;
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --sidebar: 244px;
}
[data-theme="light"] {
  --bg: #eef4fa;
  --panel: #ffffff;
  --panel-2: #f2f5f9;
  --panel-3: #e8edf4;
  --line: #d8e0ea;
  --line-soft: #e8edf4;
  --text: #16202e;
  --muted: #62718a;
  --accent: #1d92cf;
  --accent-soft: #e2f2fb;
  --shadow: 0 6px 24px rgba(16, 32, 60, .10);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
a { color: var(--accent); }
::selection { background: var(--accent); color: #fff; }

/* ===================== 骨架 ===================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 6px 20px; }
.logo {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px;
  background: linear-gradient(135deg, #2aabee, #22d3ee);
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(42, 171, 238, .38);
}
.brand-name { font-size: 14.5px; font-weight: 600; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tab {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; color: var(--muted);
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font: inherit; font-size: 13.5px; text-align: left;
  transition: background .15s, color .15s;
}
.tab i { font-style: normal; width: 16px; text-align: center; opacity: .85; }
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.is-active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
[data-theme="light"] .tab.is-active { color: var(--accent); }

.side-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.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: 18px;
  padding: 14px 26px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 18px; }
.page-head .hint { margin: 2px 0 0; }
.nav-toggle { display: none; }
main { padding: 22px 26px 60px; max-width: 1400px; width: 100%; }

/* ===================== 页面切换（关键！）===================== */
.pane { display: none !important; }
.pane.is-active { display: block !important; }

/* ===================== 概览 ===================== */
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; transition: transform .15s, border-color .15s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 600; line-height: 1.25; letter-spacing: -.5px; }
.stat-foot { font-size: 11.5px; color: var(--muted); }
.stat-card.warn .stat-value { color: var(--warn); }
.two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.mini-list { display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow: auto; }
.mini-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent;
}
.mini-row:hover { background: var(--panel-2); border-color: var(--line); }
.mini-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .when { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* ===================== 卡片与表单 ===================== */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 0 0 16px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 14.5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 13px; margin-bottom: 13px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
label.inline { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 13px; }
/* 复选框/单选框不能被全局的 width:100% 拉宽 —— 否则在 flex 行里会把旁边的文字挤成 0 宽 */
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; flex: 0 0 16px; margin: 0; accent-color: var(--accent); cursor: pointer;
}
input, select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13px; font-family: inherit;
  width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
textarea { resize: vertical; margin-bottom: 11px; line-height: 1.5; }
.mono { font-family: Consolas, "Courier New", monospace; }
.hidden { display: none !important; }
.subform { border-top: 1px dashed var(--line); padding-top: 15px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 7px; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.inputrow { display: flex; gap: 8px; align-items: center; }
.inputrow input { flex: 1; }

.btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-size: 13px;
  transition: background .15s, border-color .15s, transform .06s; white-space: nowrap;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); color: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.btn.ghost { background: transparent; }
.btn.mini { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn .spin {
  display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hint { color: var(--muted); font-size: 12px; }
.state { font-size: 13px; margin: 0 0 6px; }
b { color: var(--text); }

/* ===================== 状态标记 ===================== */
.pill { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--line); white-space: nowrap; display: inline-block; }
.pill-grey { color: var(--muted); }
.pill-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pill-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.pill-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tag {
  display: inline-block; background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 8px; font-size: 11px; color: var(--accent); margin: 2px 3px 0 0;
}
[data-theme="light"] .tag { color: var(--accent); }
.warn-text { color: var(--warn); }

/* 套餐到期提醒条 */
.notice {
  margin: 0 18px 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line));
}
.notice b { color: var(--warn); }
.notice.bad {
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
}
.notice.bad b { color: var(--bad); }

/* ===================== 导航角标 / 分段控件 ===================== */
.nav-badge {
  margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--panel-3); color: var(--muted); border: 1px solid var(--line);
}
.nav-badge.busy { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.nav-badge:empty { display: none; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-btn { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.seg-btn.is-active { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.edit-pen { color: var(--muted); font-size: 11px; opacity: 0; transition: opacity .15s; }
.acc-name { cursor: pointer; }
.acc-name:hover .edit-pen { opacity: 1; }
.acc-name:hover .acc-name-text { text-decoration: underline dotted; }

/* ===================== 表格 ===================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
/* 任务结果动辄几百行，给个滚动区，别把整页拉成几千像素 */
#runItemsWrap, .table-wrap.tall { max-height: 460px; overflow: auto; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; }
.tbl tbody tr:hover td { background: var(--panel-2); }
.tbl tr:last-child td { border-bottom: 0; }
.w44 { width: 40px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input { flex: 1; min-width: 200px; }
.bulkbar {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  padding: 9px 13px; border-radius: var(--radius-sm); margin-bottom: 12px;
}
.mini { width: auto; min-width: 150px; padding: 6px 10px; font-size: 12.5px; }

/* ===================== 账号选择芯片 ===================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  background: var(--panel-2); padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); }

/* ===================== 进度条 ===================== */
.progress { height: 6px; background: var(--panel-3); border-radius: 999px; overflow: hidden; margin: 4px 0 10px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #22d3ee); transition: width .4s ease; }

/* ===================== 二维码 ===================== */
.qrbox { display: flex; gap: 22px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.qrbox img { width: 200px; height: 200px; background: #fff; border-radius: 10px; padding: 8px; }
.qrside { flex: 1; min-width: 220px; }
.qrside input { margin-bottom: 8px; }

/* ===================== 日志 ===================== */
.logs { max-height: 60vh; overflow: auto; font-family: Consolas, monospace; font-size: 12.5px; }
.logline { padding: 6px 9px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 11px; }
.logline:hover { background: var(--panel-2); }
.logline .t { color: var(--muted); white-space: nowrap; }
.logline .lv { width: 46px; }
.logline.info .lv { color: var(--ok); }
.logline.warn .lv { color: var(--warn); }
.logline.error .lv { color: var(--bad); }

/* ===================== 弹窗 ===================== */
.modal { position: fixed; inset: 0; background: rgba(4, 8, 14, .62); backdrop-filter: blur(2px);
         display: flex; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.modal-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  width: min(760px, 94vw); max-height: 82vh; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.modal-box.small { width: min(430px, 94vw); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 17px 19px; overflow: auto; }
#uiModalDesc { white-space: pre-wrap; }   /* 多行报告能正常换行 */

/* ---- 「用 Bot 发」的卡片预览：效果就跟 Telegram 里长一样 ---- */
.tgprev { max-width: 380px; border-radius: 14px; overflow: hidden;
          background: #182533; color: #e9eef5; box-shadow: var(--shadow);
          border: 1px solid rgba(255,255,255,.08); }
.tgprev-img { display: block; width: 100%; max-height: 340px; object-fit: cover; background: #0e1621; }
.tgprev-text { padding: 10px 13px; font-size: 13.5px; line-height: 1.55;
               white-space: pre-wrap; word-break: break-word; }
.tgprev-btns { padding: 0 9px 9px; display: flex; flex-direction: column; gap: 6px; }
.tgprev-btn { background: rgba(64,124,190,.28); border: 0; color: #8ec7ff;
              padding: 9px; border-radius: 9px; font-size: 13px; cursor: default; font-family: inherit; }
.tgprev-via { padding: 0 13px 10px; font-size: 11.5px; color: #7d8b9c; }
.tgprev-cap { margin-top: 8px; }
.modal-body h4 { margin: 16px 0 8px; font-size: 13px; color: var(--warn); }

/* 账号 2FA 弹窗：二次确认框必须压在「改 2FA」框上面，否则按钮点不到 */
#twofaModal { z-index: 310; }
#uiModal { z-index: 330; }

/* ===================== 群选择弹窗 ===================== */
.dlg-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dlg-tools input { flex: 1; min-width: 180px; }
.dlg-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dlg-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.dlg-row:last-child { border-bottom: 0; }
.dlg-row:hover { background: var(--panel-2); }
.dlg-row.on { background: var(--accent-soft); }
.dlg-row.dim .dlg-title { color: var(--muted); }
.dlg-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-kind { color: var(--muted); font-size: 12px; width: 42px; }
.dlg-target { width: 230px; font-size: 12px; color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-row.dim .dlg-target { color: var(--muted); }
.dlg-foot { margin-top: 12px; }

/* ===================== 其它 ===================== */
.preview { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 13px; margin: 0 0 11px; color: var(--ok); }
.warncard { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.warncard h2 { color: var(--warn); }
.warncard .steps { margin: 10px 0 12px; padding-left: 22px; color: var(--text); font-size: 13px; }
.warncard .steps li { margin: 5px 0; }
.unmatched { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
             padding: 10px 12px; font-size: 12px; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-3); border: 1px solid var(--line); padding: 11px 20px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 320; max-width: 70vw; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }

/* ===================== 响应式 ===================== */
@media (max-width: 1080px) {
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: auto; flex: none; height: auto; position: static;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px;
  }
  .brand { padding-bottom: 12px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .nav-badge { margin-left: 6px; }
  .tab { white-space: nowrap; }
  .side-foot { flex-direction: row; align-items: center; justify-content: space-between; border-top: 0; padding-top: 10px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .topbar { flex-wrap: wrap; padding: 12px 16px; }
  main { padding: 16px 16px 50px; }
  .statsbar { justify-content: flex-start; margin-left: 0; width: 100%; }
  .page-head { flex: 1; }
}

.proxy-cell { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; }

.chart { display: flex; align-items: flex-end; gap: 14px; height: 168px; padding: 6px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.chart-bar { width: 16px; border-radius: 4px 4px 0 0; background: var(--panel-3); min-height: 3px; transition: height .4s ease; }
.chart-bar.ok { background: linear-gradient(180deg, #22d3ee, var(--accent)); }
.chart-day { font-size: 11px; color: var(--muted); }
.chart-val { font-size: 11px; color: var(--text); height: 14px; }

.shortcut-hint { font-size: 11px; color: var(--muted); line-height: 1.7; }
.shortcut-hint b { color: var(--text); }
.proxy-tag { background: color-mix(in srgb, #22d3ee 16%, transparent); color: #22d3ee; }
[data-theme="light"] .proxy-tag { color: #0e7490; }

/* ===================== Telegram 元素 ===================== */
.tg-avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px; user-select: none;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.12);
}
.tg-avatar.sm { width: 26px; height: 26px; flex-basis: 26px; font-size: 11.5px; }
.tg-avatar.lg { width: 46px; height: 46px; flex-basis: 46px; font-size: 19px; }
.tg-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tg-cell .tg-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-cell .tg-sub { font-size: 11.5px; color: var(--muted); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--muted); }
.dot.on { background: #4dcd5e; box-shadow: 0 0 0 3px rgba(77,205,94,.16); }
.dot.off { background: #f85149; box-shadow: 0 0 0 3px rgba(248,81,73,.16); }
.dot.slow { background: #e3b341; box-shadow: 0 0 0 3px rgba(227,179,65,.16); }

.nav svg { width: 17px; height: 17px; flex: 0 0 17px; fill: currentColor; opacity: .85; }
.tab.is-active svg { opacity: 1; }

/* Telegram 风格消息气泡 */
.bubble-wrap { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 12px; }
.bubble {
  position: relative; max-width: 460px; padding: 8px 13px 7px;
  background: linear-gradient(135deg, #2b5278, #2aabee); color: #fff;
  border-radius: 14px 14px 14px 4px; box-shadow: 0 3px 12px rgba(0,0,0,.22);
  word-break: break-word; white-space: pre-wrap; font-size: 13.5px; line-height: 1.5;
}
[data-theme="light"] .bubble { background: linear-gradient(135deg, #2aabee, #4fc3f7); }
.bubble-meta { display: block; text-align: right; font-size: 11px; opacity: .78; margin-top: 3px; }
.bubble-check { margin-left: 5px; letter-spacing: -2px; }
.bubble-empty { color: var(--muted); font-size: 12.5px; }

/* 二维码卡片（仿 Telegram 登录页） */
.qr-card { background: #fff; border-radius: 16px; padding: 14px 14px 10px; text-align: center; }
.qr-card img { width: 190px; height: 190px; display: block; }
.qr-card .qr-hint { color: #4a5b6e; font-size: 12px; padding-top: 6px; }
.tg-steps { list-style: none; counter-reset: tgs; padding: 0; margin: 12px 0; }
.tg-steps li { counter-increment: tgs; position: relative; padding-left: 30px; font-size: 13px; color: var(--muted); margin: 7px 0; }
.tg-steps li::before {
  content: counter(tgs); position: absolute; left: 0; top: 0; width: 20px; height: 20px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 11px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line);
}

/* 群 / 频道 徽标 */
.peer-badge { font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--panel-3); color: var(--muted); }
.peer-badge.ch { background: rgba(42,171,238,.16); color: #2aabee; }
.peer-badge.gp { background: rgba(77,205,94,.16); color: #4dcd5e; }

.varrow { margin: -4px 0 10px; }
.varrow .btn.mini { font-size: 12px; }

/* ===================== 账号详情抽屉 ===================== */
.drawer-mask { position: fixed; inset: 0; background: rgba(4,8,14,.45); z-index: 90; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(480px, 94vw);
  background: var(--panel); border-left: 1px solid var(--line); z-index: 95;
  display: flex; flex-direction: column; box-shadow: -14px 0 40px rgba(0,0,0,.35);
  transform: translateX(102%); transition: transform .26s cubic-bezier(.3,.8,.4,1);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-title { flex: 1; min-width: 0; }
.drawer-title h2 { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { padding: 16px 18px 40px; overflow: auto; flex: 1; }
.drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.dstat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.dstat .k { font-size: 11px; color: var(--muted); }
.dstat .v { font-size: 19px; font-weight: 600; }
.dstat.bad .v { color: var(--bad); }
.dstat.warn .v { color: var(--warn); }
.dstat.ok .v { color: var(--ok); }
.drawer-info { font-size: 12.5px; }
.drawer-info .kv { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.drawer-info .kv .k { width: 84px; color: var(--muted); flex: 0 0 84px; }
.drawer-info .kv .v { flex: 1; word-break: break-all; }
.drawer-h { font-size: 12.5px; color: var(--muted); margin: 18px 0 8px; font-weight: 500; }
.mini-chart { height: 92px; gap: 8px; }
.mini-chart .chart-bar { width: 12px; }
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; align-items: flex-start; }
.tl-ico { width: 22px; flex: 0 0 22px; text-align: center; }
.tl-main { flex: 1; min-width: 0; }
.tl-target { word-break: break-all; }
.tl-when { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ===================== 巡检面板 ===================== */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px;
         border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.alert .a-ico { font-size: 15px; line-height: 1.3; }
.alert .a-hint { color: var(--muted); font-size: 12px; }
.alert.danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 9%, var(--panel)); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 9%, var(--panel)); }
.alert.info { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }

.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 12px; }
.fleet-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: var(--panel-2); cursor: pointer;
              transition: transform .14s, border-color .14s; }
.fleet-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.fleet-card.danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.fleet-card.warn { border-color: color-mix(in srgb, var(--warn) 42%, var(--line)); }
.fleet-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fleet-name { flex: 1; min-width: 0; }
.fleet-name .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fleet-name .s { font-size: 11.5px; color: var(--muted); }
.score-ring { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; display: grid; place-items: center;
              background: conic-gradient(var(--rc) calc(var(--pct) * 1%), var(--panel-3) 0); }
.score-ring > span { width: 37px; height: 37px; border-radius: 50%; background: var(--panel-2); display: grid;
                     place-items: center; font-size: 13.5px; font-weight: 600; color: var(--rc); }
.fleet-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.fleet-meta b { color: var(--text); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-bottom: 9px; }
.spark i { flex: 1; background: var(--panel-3); border-radius: 2px; min-height: 2px; }
.spark i.has { background: var(--accent); }
.fleet-risks { display: flex; flex-direction: column; gap: 3px; }
.fleet-risks .r { font-size: 11.5px; color: var(--warn); }
.fleet-risks .r.danger { color: var(--bad); }
.fleet-risks .r.good { color: var(--ok); }
.preset-row { background: var(--panel-2); border: 1px dashed var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }

/* ===================== 发送方式选择卡 ===================== */
.pickcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
/* 任务页那五张：做成一行紧凑按钮，别占半屏 */
.pickcards-5 { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.pickcards-5 .pickcard { flex-direction: row; align-items: center; gap: 7px;
  padding: 10px 12px; border-radius: 10px; }
.pickcards-5 .pc-ico { font-size: 15px; }
.pickcards-5 .pc-title { font-size: 13px; font-weight: 600; }
.pickcards-5 .pc-desc { display: none; }
.pickcards-5 .pickcard.is-active { border-color: var(--accent); }
.pickcard {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 16px; color: var(--text); font: inherit;
  transition: border-color .15s, transform .12s, background .15s;
}
.pickcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.pickcard.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pickcard .pc-ico { font-size: 20px; }
.pickcard .pc-title { font-size: 14.5px; font-weight: 600; }
.pickcard .pc-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.chart-empty { display: flex; align-items: center; justify-content: center; height: 100%;
               color: var(--muted); font-size: 12.5px; }

/* 计算结果里的换行要真的换行 */
.preview { white-space: pre-line; }
/* 短列不要被挤成竖排 */
.nowrap { white-space: nowrap; }

/* 计算结果里的换行要真的换行 */
.preview { white-space: pre-line; }
/* 短列不要被挤成竖排 */
.nowrap { white-space: nowrap; }

/* ===================== 行内菜单 ===================== */
.menu-wrap { position: relative; display: inline-block; margin-left: 5px; }
.menu {
  display: none; position: fixed; z-index: 300;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 4px; min-width: 132px;
}
.menu-wrap.open .menu { display: block; }
.menu button {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  color: var(--text); font: inherit; font-size: 13px; padding: 7px 11px;
  border-radius: 7px; cursor: pointer;
}
.menu button:hover { background: var(--panel-2); }
.menu button.danger { color: var(--bad); }
.menu button.danger:hover { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.ellipsis { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* 表格行更紧凑 */
.tbl td { padding: 8px 10px; }

/* ===================== 帮助提示 ===================== */
.q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 5px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted);
  font-size: 10px; line-height: 1; cursor: pointer; user-select: none;
}
.q:hover { border-color: var(--accent); color: var(--accent); }
.q.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.field-help {
  display: none; margin: 6px 0 0; padding: 8px 10px; font-size: 12px; line-height: 1.65;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; font-weight: 400;
}
.field-help.on { display: block; }
/* 新手引导 */
.guide { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
.guide h2 { color: var(--accent); }
.guide ol { margin: 10px 0 0; padding-left: 22px; font-size: 13px; line-height: 1.9; }
.guide ol li b { color: var(--accent); }
.guide .fold { cursor: pointer; color: var(--muted); font-size: 12px; }

/* 弹窗里的行：复选框固定宽度，标题才能真正拿到剩余空间 */
.dlg-pick { width: 16px !important; height: 16px !important; flex: 0 0 16px !important; }
.peer-badge { white-space: nowrap; }
/* 弹窗加载中的样子 */
.dlg-loading { display: flex; align-items: center; justify-content: center; gap: 10px;
               padding: 40px 0; color: var(--muted); font-size: 13px; }

/* 能发言检查结果 */
.cs-account { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-bottom: 10px; background: var(--panel-2); }
.cs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cs-reason { margin-top: 8px; }
.cs-tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; margin-bottom: 5px;
          background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); }
.cs-list { display: flex; flex-wrap: wrap; gap: 5px; }
.cs-item { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--panel-3); color: var(--muted); }

.cs-reason-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.cs-ico { font-size: 15px; }
.cs-reason-name { font-size: 13px; color: var(--text); }
.cs-reason { border-left: 3px solid color-mix(in srgb, var(--bad) 45%, var(--line)); padding-left: 11px; margin-top: 12px; }
.cs-reason-head .cs-leave { margin-left: auto; }

.mini-row.clickable .chev { color: var(--muted); opacity: 0; transition: opacity .15s, transform .15s; font-size: 16px; }
.mini-row.clickable:hover .chev { opacity: 1; transform: translateX(2px); }

/* ===================== 防止横向溢出 ===================== */
/* 网格/弹性子项默认 min-width:auto，长文本会撑破容器导致整页横向滚动。
   这几条把它们的收缩下限放开，交给内部的 ellipsis 去截断。 */
.two-col > *,
.cards-row > *,
.grid > *,
.card-head > *,
.fleet-grid > *,
.chips > * { min-width: 0; }
/* 概览的两栏在窄屏下变一栏 */
@media (max-width: 1180px) { .two-col { grid-template-columns: 1fr; } }
/* 卡片头里的长提示不要撑破 */
.card-head .row { min-width: 0; flex-wrap: wrap; }
.card-head .hint { overflow: hidden; text-overflow: ellipsis; }

/* 退出群：检查结果的分类块 */
.lv-cat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 10px; background: var(--panel-2); }
.lv-cat .lv-item { display: block; margin: 5px 0; font-size: 12.5px; }
.lv-cat .lv-title { font-size: 12.5px; }

/* 任务详情：让每个任务一眼看出「是什么任务」 */
.run-plan { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 8px 0; font-size: 12.5px; line-height: 1.75; }
#runEdit { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin: 8px 0; }

/* 黑名单列表 */
.block-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.block-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bcBlockList { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px;
  max-height: 260px; overflow: auto; background: var(--panel-2); }

/* 推广效果 */
.promo-item { border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
.promo-item:last-child { border-bottom: 0; }
.promo-bars { height: 46px; display: flex; align-items: flex-end; gap: 2px; margin: 6px 0 4px; }
.promo-bars .hint { margin-left: 8px; align-self: center; }

/* 登录页 / 用户管理浮层 */
.login-screen { position: fixed; inset: 0; z-index: 200; display: flex;
  align-items: center; justify-content: center; background: var(--bg); }
.login-box { width: 340px; padding: 26px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); }
.login-box h1 { font-size: 18px; margin: 0 0 6px; }
.login-box label { display: block; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.login-box input { width: 100%; margin-top: 5px; }
.admin-box { width: min(1120px, 96vw); max-height: 88vh; overflow: auto; padding: 22px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.admin-id { display: flex; align-items: center; gap: 10px; flex: 1 1 360px; min-width: 0; }
.admin-id b { flex: 0 0 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-id .admin-label { flex: 1 1 auto; min-width: 40px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.admin-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.account-line { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }

/* ===================== 网页聊天 ===================== */
.chat-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 12px; }
.chat-side { display: flex; flex-direction: column; padding: 12px; }
.chat-list { overflow: auto; max-height: 520px; display: flex; flex-direction: column; gap: 2px; }
.chat-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px;
  cursor: pointer; font-size: 13px; }
.chat-row:hover { background: var(--panel-2); }
.chat-row.is-active { background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chat-row .cr-main { min-width: 0; flex: 1; }
.chat-row .cr-title { display: flex; align-items: center; gap: 6px; }
.chat-row .cr-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .cr-last { color: var(--muted); font-size: 11.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.chat-unread { background: var(--accent); color: #fff; font-size: 11px; border-radius: 999px;
  padding: 1px 7px; flex: 0 0 auto; }
.chat-main { display: flex; flex-direction: column; padding: 12px; min-height: 520px; }
.chat-head { font-size: 13px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.chat-msgs { flex: 1; overflow: auto; max-height: 420px; padding: 10px 2px; display: flex;
  flex-direction: column; gap: 6px; }
.msg { max-width: 74%; padding: 8px 12px; border-radius: 12px; font-size: 13px;
  white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.msg.in { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); }
.msg.out { align-self: flex-end; background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.msg .meta { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.msg.sys { align-self: center; background: none; border: 0; color: var(--muted); font-size: 11.5px; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding-top: 8px;
  border-top: 1px solid var(--line-soft); }
.chat-input textarea { flex: 1; resize: vertical; }
@media (max-width: 900px) { .chat-wrap { grid-template-columns: 1fr; } }
/* 导航分组小标题 */
.nav-sep { margin: 10px 12px 6px; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  font-size: 11.5px; color: var(--accent); text-decoration: underline; }
/* 账号页底部的 Bot 一栏（Bot 不能当号用，单独摆） */
.bot-strip { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line);
  border-radius: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; }
.bot-strip .hint { margin: 0; }



/* ===================== 视觉升级（一层深色科技感，不动结构） ===================== */
:root {
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 1px 0 rgba(255,255,255,.03) inset;
}

/* 顶栏和侧栏一点渐变，整页不再是一块死黑 */
.sidebar {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, var(--accent) 8%), var(--panel));
}
.topbar {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, var(--panel)), transparent);
  backdrop-filter: blur(8px);
}

/* 导航：活跃项加一条竖光条，眼睛一眼找到自己在哪 */
.tab { position: relative; transition: background .16s, color .16s, transform .16s; }
.tab:hover { transform: translateX(2px); }
.tab.is-active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent));
}
.nav-sep {
  text-transform: uppercase; font-weight: 600; opacity: .65;
  border-top: 1px solid var(--line-soft); padding-top: 10px;
}

/* 卡片：悬浮有回应，标题更清爽 */
.card { transition: box-shadow .2s, border-color .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.card-head h2 { letter-spacing: -.2px; }

/* 输入框焦点：一圈淡光，知道自己在哪个框里 */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* 主按钮：一点渐变，比纯色更有质感 */
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff 12%), var(--accent));
  border-color: color-mix(in srgb, var(--accent) 70%, #000 10%);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn { transition: background .16s, border-color .16s, transform .1s, filter .16s; }
.btn:active { transform: translateY(1px); }

/* 动作卡片：选中时亮起来，鼠标放上去有抬升 */
.pickcard { transition: border-color .18s, transform .18s, box-shadow .18s; }
.pickcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pickcard.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow);
}
.pc-ico { display: inline-flex; align-items: center; justify-content: center; }
.pc-ico svg { width: 18px; height: 18px; fill: var(--accent); }

/* 表头粘住，长表格滚动时不迷路 */
.tbl thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }

/* 滚动条细一点，别那么土 */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 35%, var(--line)) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 10px; border: 2px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 55%, var(--line)); background-clip: content-box; }

/* 提示条 / 气泡再顺一点 */
.msg.out { box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 22%, transparent); }
.chat-row.is-active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }


/* ==========================================================================
   V2 整页重做 —— 一层覆盖在上面，所有旧类名继续有效
   色调：深海军蓝底 + 青蓝强调；层次靠三档面板色拉开，不再靠边框堆
   ========================================================================== */

:root {
  --bg:        #070b14;
  --panel:     #0d1422;
  --panel-2:   #111a2b;
  --panel-3:   #162034;
  --line:      rgba(120, 160, 220, .14);
  --line-soft: rgba(120, 160, 220, .08);
  --text:      #e8eef8;
  --muted:     #8695ad;
  --accent:    #35b6f5;
  --ok:        #45d483;
  --warn:      #f0b332;
  --bad:       #ff6b6b;
  --radius:    16px;
  --radius-sm: 11px;
  --shadow:    0 18px 40px -18px rgba(0, 0, 0, .85);
  --glow:      0 0 0 1px rgba(53, 182, 245, .18), 0 12px 34px -14px rgba(53, 182, 245, .35);
}
[data-theme="light"] {
  --bg:        #f4f7fc;
  --panel:     #ffffff;
  --panel-2:   #f7fafd;
  --panel-3:   #eef3fa;
  --line:      rgba(20, 60, 110, .14);
  --line-soft: rgba(20, 60, 110, .07);
  --text:      #10213a;
  --muted:     #5d7392;
}

body {
  background:
    radial-gradient(1200px 600px at 18% -10%, rgba(53, 182, 245, .10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(120, 90, 250, .08), transparent 55%),
    var(--bg);
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  letter-spacing: .1px;
}

/* ---------- 侧栏 ---------- */
.sidebar {
  background: linear-gradient(180deg, rgba(53, 182, 245, .06), transparent 22%), var(--panel);
  border-right: 1px solid var(--line);
}
.brand { padding: 12px 16px 10px; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(145deg, #35b6f5, #1d7fd0 70%);
  box-shadow: 0 8px 20px -8px rgba(53, 182, 245, .9);
  font-weight: 800; letter-spacing: -.5px;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.nav { padding: 4px 9px 8px; gap: 2px; }
.tab {
  border-radius: 10px; padding: 7px 11px; font-size: 13px; line-height: 1.25;
  color: var(--muted); border: 1px solid transparent;
}
.tab svg { width: 16px; height: 16px; opacity: .85; }
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.is-active {
  background: linear-gradient(90deg, rgba(53, 182, 245, .16), rgba(53, 182, 245, .04));
  color: var(--text); border-color: rgba(53, 182, 245, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.tab.is-active svg { fill: var(--accent); opacity: 1; }
.tab.is-active::before { display: none; }        /* V1 的竖条换成整块高亮 */
.nav-sep {
  margin: 8px 11px 2px; font-size: 10px; font-weight: 700;
  letter-spacing: .12em; color: var(--muted); opacity: .8;
  border-top: 1px solid var(--line-soft); padding-top: 7px; line-height: 1.1;
}
.nav-badge {
  background: rgba(53, 182, 245, .18); color: var(--accent);
  border: 1px solid rgba(53, 182, 245, .3); font-weight: 700;
}
.side-foot { padding-top: 9px; gap: 7px; border-top: 1px solid var(--line-soft); }
/* 底部三个操作按钮排一行，别再一个占一行 */
.foot-actions { gap: 6px; }
.foot-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 12px; white-space: nowrap; }

/* ---------- 顶栏 + 页面标题 ---------- */
.main { background: transparent; }
.topbar {
  padding: 20px 24px 14px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(7, 11, 20, .92), rgba(7, 11, 20, .55));
  backdrop-filter: blur(10px);
}
.topbar h1 { font-size: 21px; font-weight: 750; letter-spacing: -.5px; }
.topbar h1::before {
  content: ""; display: inline-block; width: 4px; height: 19px; margin-right: 10px;
  border-radius: 3px; vertical-align: -3px;
  background: linear-gradient(180deg, var(--accent), rgba(53, 182, 245, .25));
}
#pageSub { margin-top: 4px; font-size: 12.5px; }

/* ---------- 卡片 ---------- */
main { padding: 18px 24px 40px; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent 40%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px;
}
.card-head { align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }
.card:hover { border-color: rgba(53, 182, 245, .26); box-shadow: var(--shadow); }

/* 数字卡：重点数字给点颜色和体量 */
.cards-row { gap: 14px; }
.stat-card {
  border-radius: var(--radius); padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 55%), var(--panel-2);
  border: 1px solid var(--line);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.stat-label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.stat-value {
  font-size: 32px; font-weight: 750; letter-spacing: -1px; line-height: 1.15;
  background: linear-gradient(180deg, #fff, #b9d4ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .stat-value { background: linear-gradient(180deg, #10213a, #3c5a80); -webkit-background-clip: text; background-clip: text; }
.stat-card.warn .stat-value { background: linear-gradient(180deg, #ffd479, #f0a318); -webkit-background-clip: text; background-clip: text; }

/* ---------- 控件 ---------- */
.btn {
  border-radius: 10px; font-weight: 600; letter-spacing: .1px;
  border: 1px solid var(--line); background: var(--panel-2);
}
.btn.mini { border-radius: 9px; }
.btn.primary {
  background: linear-gradient(180deg, #43bff8, #1e93d6);
  border-color: rgba(30, 147, 214, .8); color: #04121d;
  box-shadow: 0 10px 22px -12px rgba(53, 182, 245, .95);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 107, 107, .07); }
input, select, textarea {
  border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
input:hover, select:hover, textarea:hover { border-color: rgba(53, 182, 245, .3); }
.seg { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; }
.seg-btn { font-weight: 600; }
.seg-btn.is-active {
  background: linear-gradient(180deg, rgba(53, 182, 245, .22), rgba(53, 182, 245, .1));
  color: var(--text); box-shadow: inset 0 0 0 1px rgba(53, 182, 245, .35);
}
.chip { border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.chip.on { border-color: rgba(53, 182, 245, .5); background: rgba(53, 182, 245, .12); }
.pill { border-radius: 999px; font-weight: 600; }
.pill-ok { color: var(--ok); border-color: rgba(69, 212, 131, .35); background: rgba(69, 212, 131, .1); }
.pill-warn { color: var(--warn); border-color: rgba(240, 179, 50, .35); background: rgba(240, 179, 50, .1); }
.pill-bad { color: var(--bad); border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .1); }
.pickcard {
  border-radius: 13px; background: var(--panel-2);
  border: 1px solid var(--line); padding: 13px 14px;
}
.pickcard.is-active {
  background: linear-gradient(180deg, rgba(53, 182, 245, .14), rgba(53, 182, 245, .03));
  border-color: rgba(53, 182, 245, .5); box-shadow: var(--glow);
}
.pc-title { font-weight: 700; }

/* ---------- 表格 ---------- */
.tbl { font-size: 13px; }
.tbl th {
  background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .08em;
}
.tbl td { border-bottom: 1px solid var(--line-soft); }
.tbl tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .012); }
.tbl tbody tr:hover td { background: rgba(53, 182, 245, .07); }
.mini-row {
  border-radius: 10px; padding: 9px 10px; border: 1px solid transparent;
}
.mini-row:hover { background: var(--panel-2); border-color: var(--line-soft); }

/* ---------- 聊天 ---------- */
.chat-wrap { grid-template-columns: 320px 1fr; }
.chat-row { border-radius: 11px; }
.chat-row.is-active {
  background: linear-gradient(90deg, rgba(53, 182, 245, .16), rgba(53, 182, 245, .04));
  border-color: rgba(53, 182, 245, .35);
}
.msg { border-radius: 14px; box-shadow: none; }
.msg.out {
  background: linear-gradient(180deg, rgba(53, 182, 245, .26), rgba(53, 182, 245, .16));
  border-color: rgba(53, 182, 245, .32);
}
.msg.in { background: var(--panel-2); }

/* ---------- 动效（轻，不晃眼） ---------- */
@keyframes paneIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pane.is-active { animation: paneIn .22s ease-out; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin {
  width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  animation: spin .7s linear infinite; margin-right: 6px; vertical-align: -1px;
}
.toast {
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(16, 24, 40, .96); backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  /* 重要：底色是固定深色的，字色必须也固定为浅色，
     否则浅色主题下会变成「深字配深底」——完全看不见，像个空白弹窗 */
  color: #eef3ff;
}
.notice { border-radius: 12px; }
.issue-line { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line);
              font-size: 12.5px; line-height: 1.5; align-items: flex-start; }
.issue-line:last-child { border-bottom: 0; }
.issue-line .it { color: var(--muted); flex: 0 0 auto; font-family: Consolas, monospace; }
.issue-line .iw { color: var(--warn); flex: 0 0 auto; }
.issue-line .im { flex: 1; word-break: break-all; white-space: pre-wrap; }
.progress { border-radius: 999px; overflow: hidden; }
.progress-bar { background: linear-gradient(90deg, #35b6f5, #45d483); }
@media (prefers-reduced-motion: reduce) { .pane.is-active { animation: none; } .card:hover, .stat-card:hover, .pickcard:hover { transform: none; } }


/* 侧栏布局：导航多到装不下时，中间滚动、底部永远露出来 */
.sidebar {
  display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0;
}
.brand { flex: 0 0 auto; }
.nav { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding-bottom: 8px; }
.nav { scrollbar-width: thin; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.side-foot { flex: 0 0 auto; }
@media (max-height: 840px) {
  /* 矮屏（1366x768 这类笔记本最常见）：再压一档，保证 13 个标签一屏全露出来 */
  .tab { padding: 6px 10px; font-size: 12.5px; }
  .nav-sep { margin: 6px 10px 1px; padding-top: 5px; font-size: 9.5px; }
  .brand { padding: 10px 16px 8px; }
  .brand .logo { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
  .brand-name { font-size: 14px; }
  .brand-sub { display: none; }
  .shortcut-hint { display: none; }        /* 矮屏优先保证功能标签看得见 */
  .side-foot { gap: 6px; }
  .side-foot .btn.mini { min-height: 28px; }
}
@media (max-height: 740px) {
  /* 720p 的老笔记本/投影：再挤一档，13 个标签一个都不能少 */
  .tab { padding: 5px 10px; font-size: 12px; }
  .nav { padding: 2px 9px 4px; gap: 1px; }
  .nav-sep { margin: 4px 10px 0; padding-top: 4px; }
  .side-foot { gap: 4px; padding-top: 6px; }
  .side-foot .btn.mini { min-height: 24px; font-size: 11.5px; }
  .account-line { font-size: 11px; }
}


/* ===================== 手机端（<=860px 一套完整布局） ===================== */
@media (max-width: 860px) {
  .shell { flex-direction: column; min-height: 100vh; }

  /* 顶部：品牌一行 + 横向可滑的功能标签 */
  .sidebar {
    width: auto; flex: none; height: auto; position: sticky; top: 0; z-index: 60;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 10px 12px 8px; backdrop-filter: blur(12px);
    background: linear-gradient(180deg, rgba(7, 11, 20, .96), rgba(7, 11, 20, .86));
  }
  .brand { padding: 0 0 8px; }
  .brand .logo { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
  .brand-name { font-size: 14px; }
  .brand-sub { display: none; }

  /* 手机上一屏全露：自动换行的小格子，不用横着滑也能看到「任务」「日志」 */
  .nav {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 6px; padding: 2px 0 6px; margin: 0; overflow: visible;
  }
  .nav .nav-sep { display: none; }            /* 手机上不要分组标题，省地方 */
  .tab {
    justify-content: center; padding: 6px 4px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--panel-2);
    min-height: 34px; position: relative;
  }
  .tab .nav-label { font-size: 12.5px; }
  .tab .nav-badge { position: absolute; top: -5px; right: -4px; margin: 0; font-size: 10px; padding: 0 5px; }
  .tab.is-active {
    background: linear-gradient(180deg, rgba(53, 182, 245, .3), rgba(53, 182, 245, .14));
    border-color: rgba(53, 182, 245, .55); color: #fff;
  }
  /* 手机上标签只留文字，图标太挤 */
  .tab svg { display: none; }

  .side-foot {
    flex-direction: row; gap: 8px; align-items: center; flex-wrap: wrap;
    border-top: 1px solid var(--line-soft); padding-top: 8px; margin-top: 2px;
  }
  .side-foot .btn.mini { flex: 1 1 auto; min-height: 36px; }
  .account-line, .shortcut-hint { flex: 1 1 100%; font-size: 11px; }

  /* 内容区 */
  .topbar { padding: 12px 14px 10px; }
  .topbar h1 { font-size: 18px; }
  main { padding: 12px 14px 40px; }
  .card { padding: 14px; border-radius: 14px; margin-bottom: 12px; }
  .cards-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-value { font-size: 24px; }
  .pickcards-5 { grid-template-columns: repeat(2, 1fr); }
  .two-col, .grid { grid-template-columns: 1fr; }

  /* 手指点得准：按钮和输入都加高 */
  .btn { min-height: 40px; padding: 9px 14px; }
  .btn.mini { min-height: 34px; padding: 7px 10px; }
  input, select, textarea { min-height: 40px; font-size: 15px; }  /* 15px 以下 iOS 会自动放大页面 */
  .seg { width: 100%; overflow-x: auto; }
  .seg-btn { flex: 1 0 auto; min-height: 36px; }

  /* 表格横滑，别把页面撑破 */
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .tbl { min-width: 560px; }

  /* 聊天铺满一屏 */
  .chat-wrap { grid-template-columns: 1fr; }
  .chat-side { max-height: 42vh; }
  .chat-main { min-height: 46vh; }
  .chat-input textarea { min-height: 44px; }
  .msg { max-width: 88%; }

  /* 弹窗占满宽，按钮大 */
  .admin-box { width: 96vw; max-height: 92vh; padding: 16px; }
  .admin-row { gap: 6px; }
  .admin-row .btn { flex: 1 1 auto; }
  .modal-box, .dlg-box { width: 94vw; max-width: 94vw; }
  .toast { bottom: 14px; max-width: 92vw; }
}

/* 超小屏（<=520px）：数字卡单列，更好读 */
@media (max-width: 520px) {
  .cards-row, .pickcards-5 { grid-template-columns: 1fr; }
  .stat-value { font-size: 26px; }
}

@media (max-width: 860px) {
  /* 手机头部再压紧：提示藏起来，按钮排成一行 */
  .shortcut-hint { display: none; }
  .side-foot { gap: 6px; }
  .side-foot .btn.mini { flex: 0 1 auto; font-size: 12px; padding: 6px 10px; min-height: 32px; }
  .side-foot .account-line { flex: 1 1 100%; order: 9; margin: 0; }
}

/* ===================== 任务明细名单（点统计卡进来） ===================== */
.stat-card { position: relative; }
.stat-card.is-sel {                    /* 当前正在看哪一类的名单 */
  border-color: rgba(53, 182, 245, .55);
  background: linear-gradient(180deg, rgba(53, 182, 245, .14), transparent 62%), var(--panel-2);
  box-shadow: var(--glow);
}
.stat-card .stat-foot b { color: var(--muted); font-weight: 600; }
.stat-card:hover .stat-foot b, .stat-card.is-sel .stat-foot b { color: var(--accent); }
.mini-list.ov-detail { max-height: 620px; }   /* 明细要能一屏多看几条，比「最近任务」高 */
.ov-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px 6px; border-bottom: 1px solid var(--line-soft);
}
.ov-bar .grow { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); }
.ov-bar .grow b { color: var(--text); }
.ov-tools {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft); margin-bottom: 2px;
}

@media (max-width: 860px) {
  .mini-list.ov-detail { max-height: 460px; }
  .ov-bar, .ov-tools { padding-left: 2px; padding-right: 2px; }
  .ov-tools .btn.mini { flex: 0 1 auto; }
}



/* ===================== V3 高级感精修（2026-10-06） =====================
   基调：降噪 · 提质感 · 克制用色 —— 更接近高端 SaaS 的"高级感"
   覆盖 V2 的赛博感（高饱和青蓝 + 强发光），改用中性深灰底 + 精致靛蓝
   ==================================================================== */
:root {
  --bg:        #0b0d12;
  --panel:     #11141b;
  --panel-2:   #161a23;
  --panel-3:   #1c212c;
  --line:      rgba(150, 165, 190, .12);
  --line-soft: rgba(150, 165, 190, .07);
  --text:      #e7ebf2;
  --muted:     #7e8aa0;
  --accent:    #5b8cff;
  --accent-soft: rgba(91, 140, 255, .10);
  --ok:        #38cf8c;
  --warn:      #e2ac4a;
  --bad:       #ef6262;
  --shadow:    0 1px 2px rgba(0,0,0,.45), 0 16px 40px -20px rgba(0,0,0,.7);
  --glow:      0 0 0 1px rgba(91,140,255,.10);
}

/* 背景光晕：几乎不可察，只剩氛围 */
body {
  background:
    radial-gradient(1100px 560px at 14% -8%, rgba(91, 140, 255, .045), transparent 58%),
    radial-gradient(820px 480px at 100% -4%, rgba(150, 115, 255, .04), transparent 55%),
    var(--bg);
}

/* logo：更精致的靛蓝渐变 */
.brand .logo {
  background: linear-gradient(145deg, #78a2ff, #4c78e8 72%);
  box-shadow: 0 6px 18px -8px rgba(91, 140, 255, .65);
}

/* 侧栏活跃项：更克制的底色 */
.tab.is-active {
  background: linear-gradient(90deg, rgba(91, 140, 255, .15), rgba(91, 140, 255, .03));
  border-color: rgba(91, 140, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.tab.is-active svg { fill: var(--accent); opacity: 1; }

/* 顶栏标题竖光条颜色跟随新 accent */
.topbar h1::before { background: linear-gradient(180deg, var(--accent), rgba(91,140,255,.25)); }

/* 卡片：纯色底 + 细边框，去掉 V2 的顶部渐变（更干净） */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.card:hover {
  border-color: rgba(150,165,190,.22);
  box-shadow: var(--shadow);
}

/* 统计卡：hover 更细腻，数字用等宽数字对齐 */
.stat-card {
  background: var(--panel);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(91,140,255,.35);
  box-shadow: var(--shadow);
}
.stat-value { font-variant-numeric: tabular-nums; }

/* 主按钮：靛蓝渐变 + 微弱投影 */
.btn.primary {
  background: linear-gradient(180deg, #6d9aff, #4a76e8);
  border-color: rgba(91,140,255,.45);
  box-shadow: 0 4px 14px -6px rgba(91,140,255,.55);
}
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 6px 18px -6px rgba(91,140,255,.65); }

/* 输入焦点环更克制 */
input:focus, select:focus, textarea:focus {
  border-color: rgba(91,140,255,.5);
  box-shadow: 0 0 0 3px rgba(91,140,255,.14);
}

/* 滚动条跟随新 accent */
* { scrollbar-color: rgba(91,140,255,.28) transparent; }
::-webkit-scrollbar-thumb { background: rgba(91,140,255,.22); }
::-webkit-scrollbar-thumb:hover { background: rgba(91,140,255,.4); }

/* 徽标 / 标签颜色跟随 */
.nav-badge { background: rgba(91,140,255,.16); color: var(--accent); border-color: rgba(91,140,255,.28); }
.tag { color: var(--accent); }
.peer-badge.ch { background: rgba(91,140,255,.14); color: var(--accent); }

/* 图表条跟随新 accent */
.chart-bar.ok { background: linear-gradient(180deg, #78a2ff, var(--accent)); }

/* 气泡：Telegram 风格保留，换更精致的蓝 */
.bubble { background: linear-gradient(135deg, #2f6de0, #4a86f0); }



/* ===================== V4 通透高级感（2026-10-06 二改） =====================
   解决"一片黑"：背景加蓝紫渐变光晕 · 卡片玻璃拟态 · 层次拉开 · accent 蓝紫渐变
   ==================================================================== */
:root {
  --bg:        #0e1220;
  --panel:     #161b2a;
  --panel-2:   #1b2132;
  --panel-3:   #222a3e;
  --line:      rgba(140, 160, 205, .16);
  --line-soft: rgba(140, 160, 205, .09);
  --text:      #eef1f8;
  --muted:     #8b97ad;
  --accent:    #6d8bff;
  --accent-2:  #a78bfa;
  --accent-soft: rgba(109, 139, 255, .13);
  --ok:        #3ddc97;
  --warn:      #f0b543;
  --bad:       #ff6b6b;
  --shadow:    0 2px 6px rgba(0,0,0,.4), 0 20px 48px -22px rgba(0,0,0,.75);
  --glow:      0 0 0 1px rgba(109,139,255,.14), 0 14px 38px -16px rgba(109,139,255,.4);
}

/* 背景：明显的蓝紫渐变光晕，让"深色"不再是死黑 */
body {
  background:
    radial-gradient(1000px 540px at 12% -8%, rgba(109, 139, 255, .20), transparent 60%),
    radial-gradient(820px 500px at 100% -4%, rgba(167, 139, 250, .15), transparent 58%),
    radial-gradient(900px 640px at 50% 112%, rgba(59, 130, 246, .12), transparent 62%),
    var(--bg);
}

/* logo：蓝紫渐变，品牌感 */
.brand .logo {
  background: linear-gradient(135deg, #6d8bff, #a78bfa);
  box-shadow: 0 8px 22px -8px rgba(109, 139, 255, .8);
}

/* 侧栏：渐变 + 玻璃 */
.sidebar {
  background: linear-gradient(180deg, rgba(109, 139, 255, .08), transparent 24%), rgba(14, 18, 32, .72);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
}

/* 侧栏活跃项：蓝紫渐变高亮，一眼看到 */
.tab.is-active {
  background: linear-gradient(90deg, rgba(109, 139, 255, .22), rgba(167, 139, 250, .08));
  border-color: rgba(109, 139, 255, .32);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.tab.is-active svg { fill: #9db4ff; opacity: 1; }

/* 顶栏标题竖光条：蓝紫渐变 */
.topbar h1::before { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }

/* 卡片：玻璃拟态，比背景亮、有通透感 */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)), var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.card:hover {
  border-color: rgba(140, 160, 205, .26);
  box-shadow: var(--shadow);
}

/* 统计卡：玻璃 + hover 光 */
.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)), var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 139, 255, .45);
  box-shadow: var(--glow);
}
.stat-value { font-variant-numeric: tabular-nums; letter-spacing: -.5px; }

/* 主按钮：蓝紫渐变 + 投影 */
.btn.primary {
  background: linear-gradient(135deg, #6d8bff, #5a72f2);
  border-color: rgba(109, 139, 255, .5);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(109, 139, 255, .8);
}
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 8px 22px -8px rgba(109, 139, 255, .9); }

/* 输入焦点环 */
input:focus, select:focus, textarea:focus {
  border-color: rgba(109, 139, 255, .55);
  box-shadow: 0 0 0 3px rgba(109, 139, 255, .16);
}

/* 滚动条 */
* { scrollbar-color: rgba(109,139,255,.32) transparent; }
::-webkit-scrollbar-thumb { background: rgba(109,139,255,.26); }
::-webkit-scrollbar-thumb:hover { background: rgba(109,139,255,.45); }

/* 徽标 / 标签 / 图表 跟随蓝紫 */
.nav-badge { background: rgba(109,139,255,.2); color: #b3c4ff; border-color: rgba(109,139,255,.32); }
.tag { color: #a8baff; }
.peer-badge.ch { background: rgba(109,139,255,.18); color: #a8baff; }
.chart-bar.ok { background: linear-gradient(180deg, #8fa7ff, var(--accent)); }
.bubble { background: linear-gradient(135deg, #3d6ff0, #6d8bff); }
.proxy-tag { background: rgba(109,139,255,.16); color: #9db4ff; }



/* ===================== V5 浅色高级感主题（2026-10-06 三改） =====================
   白底 + 克制靛蓝 + 精致留白，参考 Linear/Notion/飞书的高端浅色
   ==================================================================== */
[data-theme="light"] {
  --bg:        #f6f7f9;
  --panel:     #ffffff;
  --panel-2:   #f3f4f6;
  --panel-3:   #eceef3;
  --line:      rgba(15, 23, 42, .10);
  --line-soft: rgba(15, 23, 42, .06);
  --text:      #151a24;
  --muted:     #667085;
  --accent:    #4f6bf2;
  --accent-2:  #7c5cf0;
  --accent-soft: rgba(79, 107, 242, .10);
  --ok:        #16a34a;
  --warn:      #d97706;
  --bad:       #dc2626;
  --shadow:    0 1px 2px rgba(16, 24, 40, .05), 0 16px 40px -20px rgba(16, 24, 40, .16);
  --glow:      0 0 0 1px rgba(79, 107, 242, .12), 0 12px 30px -16px rgba(79, 107, 242, .35);
}

[data-theme="light"] body {
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(79, 107, 242, .07), transparent 60%),
    radial-gradient(820px 480px at 100% -4%, rgba(124, 92, 240, .05), transparent 55%),
    var(--bg);
}

[data-theme="light"] .sidebar {
  background: #fbfbfd;
  border-right: 1px solid var(--line);
}
[data-theme="light"] .brand .logo {
  background: linear-gradient(135deg, #5b78f5, #8a6bf2);
  box-shadow: 0 6px 16px -6px rgba(79, 107, 242, .55);
}
[data-theme="light"] .tab.is-active {
  background: linear-gradient(90deg, rgba(79, 107, 242, .12), rgba(79, 107, 242, .03));
  border-color: rgba(79, 107, 242, .22);
  color: var(--accent);
}
[data-theme="light"] .tab.is-active svg { fill: var(--accent); }

[data-theme="light"] .card {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
[data-theme="light"] .card:hover { border-color: rgba(79, 107, 242, .3); box-shadow: var(--shadow); }

[data-theme="light"] .stat-card {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
[data-theme="light"] .stat-card:hover { border-color: rgba(79, 107, 242, .4); box-shadow: var(--glow); }

[data-theme="light"] .btn.primary {
  background: linear-gradient(135deg, #5b78f5, #4f6bf2);
  border-color: rgba(79, 107, 242, .4);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(79, 107, 242, .5);
}

[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(246, 247, 249, .92), rgba(246, 247, 249, .6));
  backdrop-filter: blur(10px);
}
[data-theme="light"] .topbar h1::before { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }

[data-theme="light"] input, [data-theme="light"] select, [data-theme="light"] textarea {
  background: #ffffff;
  border-color: var(--line);
}
[data-theme="light"] .nav-badge { background: rgba(79,107,242,.12); color: var(--accent); border-color: rgba(79,107,242,.25); }



/* ===================== V6 UI 活力动效（2026-10-06） =====================
   让界面"活"起来：入场淡入上移 · 卡片光泽扫过 · logo/光晕渐变流动 · 微交互
   全部克制：平滑 ease-out、小幅度、有节奏，不花哨
   ==================================================================== */

/* 1. 页面内容入场：切页时卡片依次淡入上移 */
.pane.is-active .card,
.pane.is-active .stat-card,
.pane.is-active .fleet-card,
.pane.is-active .mini-row,
.pane.is-active .alert {
  animation: v6-fade-up .45s cubic-bezier(.22, .7, .3, 1) both;
}
.pane.is-active .card:nth-child(2), .pane.is-active .stat-card:nth-child(2) { animation-delay: .04s; }
.pane.is-active .card:nth-child(3), .pane.is-active .stat-card:nth-child(3) { animation-delay: .08s; }
.pane.is-active .card:nth-child(4), .pane.is-active .stat-card:nth-child(4) { animation-delay: .12s; }
.pane.is-active .card:nth-child(5), .pane.is-active .stat-card:nth-child(5) { animation-delay: .16s; }
.pane.is-active .card:nth-child(6), .pane.is-active .stat-card:nth-child(6) { animation-delay: .20s; }

@keyframes v6-fade-up {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 2. 卡片光泽扫过（hover 时一道光从左到右滑过） */
.stat-card, .card, .fleet-card, .pickcard {
  position: relative;
  overflow: hidden;
}
.stat-card::after, .card::after, .fleet-card::after, .pickcard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg,
      transparent 38%,
      rgba(255, 255, 255, .10) 48%,
      rgba(255, 255, 255, .16) 52%,
      rgba(255, 255, 255, .10) 62%,
      transparent 72%);
  transform: translateX(-120%);
  transition: transform .7s cubic-bezier(.22, .7, .3, 1);
}
.stat-card:hover::after, .card:hover::after, .fleet-card:hover::after, .pickcard:hover::after {
  transform: translateX(120%);
}

/* 3. logo 蓝紫渐变流动 */
.brand .logo {
  background: linear-gradient(135deg, #6d8bff, #a78bfa, #6d8bff);
  background-size: 220% 220%;
  animation: v6-logo-flow 5s ease infinite;
}
@keyframes v6-logo-flow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* 4. 背景光晕缓慢漂移（呼吸感） */
body {
  animation: v6-bg-drift 16s ease-in-out infinite alternate;
}
@keyframes v6-bg-drift {
  0%   { background-position: 0% 0%, 100% 0%, 50% 110%; }
  100% { background-position: 6% 4%, 94% 6%, 50% 90%; }
}

/* 5. 主按钮 hover 微抬升 + 光感 */
.btn.primary {
  transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
}
.btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 10px 26px -8px rgba(109, 139, 255, .9);
}
.btn.primary:active { transform: translateY(0) scale(.98); }

/* 6. 侧栏导航项 hover 平滑 + 活跃项光点 */
.tab { transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease; }
.tab:hover { transform: translateX(3px); }

/* 7. 状态点呼吸（在线/离线小圆点微微脉冲） */
.dot.on, .dot.off, .dot.slow {
  animation: v6-pulse 2.4s ease-in-out infinite;
}
@keyframes v6-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(77, 205, 94, .12); }
  50%      { box-shadow: 0 0 0 6px rgba(77, 205, 94, .05); }
}

/* 8. 图表条高度过渡（数据变化时平滑生长） */
.chart-bar { transition: height .5s cubic-bezier(.22, .7, .3, 1); }

/* 9. 减少动效（系统偏好） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
