/* 湖畔天空主题：清晰、轻盈的半透明卡片
   2026-10-11：与「渐进式控制台外壳」调色板对齐——变量名保持不变，仅重指取值。
   旧绿色系 → 控制台蓝灰系：--pink --pink-light --pink-dark --bg --muted --dim --done --border --focus
   --text / --ok / --warn / --bad 保持原有色相，仅微调亮度以保证 AA 对比度。 */
:root {
  --pink: #337ecc;
  --pink-light: #ecf5ff;
  --pink-dark: #1d5c9e;
  --bg: #f4f7fa;
  --text: #1f2937;
  --muted: #586b80;
  --dim: #7b8c9e;
  --ok: #2f7d4f;
  --warn: #9a6018;
  --bad: #c0392f;
  --done: #2b6cb0;
  --border: rgba(51, 126, 204, 0.22);
  --code-bg: #102833;
  --code-text: #e8f8fb;
  --surface: rgba(252, 253, 255, 0.92);
  --surface-soft: rgba(249, 251, 254, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.97);
  --shadow: 0 18px 48px rgba(21, 63, 76, 0.14);
  --shadow-soft: 0 8px 24px rgba(21, 63, 76, 0.1);
  --focus: rgba(51, 126, 204, 0.34);

  /* 新增：统一圆角与投影层级（仅新增，不改动既有取值） */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-pill: 999px;
  --shadow-1: 0 4px 12px rgba(21, 63, 76, 0.07);
  --shadow-2: 0 8px 24px rgba(21, 63, 76, 0.1);
  --shadow-3: 0 18px 48px rgba(21, 63, 76, 0.14);
}

/* ══════════════════════════════════════════════════════════════════════
   系统设置页（2026-10-11 新增）
   目标：把原先挤在一起的功能分块排版，每块独立边框 + 标题 + 说明。
   ══════════════════════════════════════════════════════════════════════ */

/* 设置块：每个功能一块，间距宽松，别让用户一口气看 40 个输入框 */
.settings-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px 18px 18px;
  margin: 0 0 8px;
}
.settings-block > legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--pink-dark);
}
.settings-block > label {
  display: block;
  margin: 12px 0 0;
}
.settings-block > label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}
.settings-block input[type="text"],
.settings-block input[type="password"],
.settings-block input[type="number"],
.settings-block textarea {
  width: 100%;
  margin-top: 5px;
}
.settings-block .hint {
  margin: 10px 0 0;
  line-height: 1.65;
}
/* 设置页里各块之间留足呼吸感 */
#tab-syscfg .form + .form {
  margin-top: 18px;
}
#tab-syscfg .channel-title {
  margin-bottom: 6px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.settings-output {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.6;
  min-height: 38px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--muted);
}
.settings-output.ok { color: var(--ok); border-color: var(--ok); }
.settings-output.warn { color: var(--warn); border-color: var(--warn); }
.settings-output.bad { color: var(--bad); border-color: var(--bad); }

/* ── 主题选择卡片 ── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.theme-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.theme-card:hover { transform: translateY(-1px); }
.theme-card.active {
  border-color: var(--pink);
  box-shadow: var(--shadow-1);
}
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card b { font-size: 14px; }
.theme-card small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.theme-swatch {
  height: 46px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, .12);
}
/* 每个色板用各自主题的真实配色，让用户一眼看出差别 */
.theme-swatch-default { background: linear-gradient(135deg, #337ecc, #ecf5ff 60%, #f4f7fa); }
/* 1.0.4：删掉 dark / eye / mono 三套 —— 它们与 default 是**同一版式只换颜色**，
   属于重复 UI。空出来的位置换成 5 套完整版式主题。 */
.theme-swatch-anime { background: linear-gradient(135deg, #ff6fb5, #ded4ff 60%, #fff7fc); }
.theme-swatch-bluewhite { background: linear-gradient(135deg, #1a73e8, #ffffff 55%, #eef4fd); }
.theme-swatch-neko { background: linear-gradient(135deg, #f785b0, #ffe9d9 60%, #fff8f4); }
.theme-swatch-tech { background: linear-gradient(135deg, #05080f, #22d3ee 62%, #818cf8); }
.theme-swatch-sakura { background: linear-gradient(135deg, #e08aa6, #ffdde8 60%, #fff9fb); }

/* ── 代理测试表 ── */
.proxy-test-wrap {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.proxy-test-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.proxy-test-wrap th,
.proxy-test-wrap td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.proxy-test-wrap thead th {
  position: sticky;
  top: 0;
  background: var(--pink-light);
  z-index: 1;
}
.sys-proxy-status.ok { color: var(--ok); font-weight: 600; }
.sys-proxy-status.bad { color: var(--bad); font-weight: 600; }
.sys-proxy-ip { color: var(--muted); }

/* 设置/配置页里的行内跳转按钮（长得像链接，但仍是按钮，键盘可达） */
.link-btn {
  margin-top: 10px;
  padding: 4px 10px;
  font-size: 13px;
  background: transparent;
  color: var(--pink-dark);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.link-btn:hover { border-style: solid; background: var(--pink-light); }

/* hint 的状态色：用于「已配置 / 未配置 / 配置不全」这类一句话提示 */
.hint.ok { color: var(--ok); }
.hint.warn { color: var(--warn); }
.hint.bad { color: var(--bad); }


/* ══════════════════════════════════════════════════════════════════════
   主题系统（2026-10-11 新增）

   实现方式：只覆盖 :root 的同一组 CSS 变量，不改任何组件规则。
   切换器把一个 data-theme 写到 <html> 上，样式表按属性选择器覆盖即可。

   四个可选主题：
     default  湖畔蓝（原样，不覆盖）
     dark     暗黑科技风 —— 深色底 + 霓虹青/紫，挂机盯屏
     eye      护眼米绿 —— 暖色低蓝光，夜间长时间操作
     mono     高对比纯黑白 —— 极简，去掉装饰色
   主题名与 app.js 的 THEMES 常量必须一致。
   ══════════════════════════════════════════════════════════════════════ */

/* ── ① 暗黑科技风：深色底 + 霓虹青/紫 ── */
html[data-theme="dark"] {
  --pink: #22d3ee;            /* 霓虹青作为主色 */
  --pink-light: #12303a;
  --pink-dark: #67e8f9;
  --bg: #0a0f14;
  --text: #e6f1f5;
  --muted: #8ba3ad;
  --dim: #64798a;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --done: #a78bfa;            /* 霓虹紫作为"完成"色 */
  --border: rgba(34, 211, 238, 0.22);
  --code-bg: #060a0e;
  --code-text: #a5f3fc;
  --surface: rgba(17, 26, 34, 0.92);
  --surface-soft: rgba(13, 21, 28, 0.82);
  --surface-strong: rgba(20, 31, 40, 0.97);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.45);
  --focus: rgba(34, 211, 238, 0.45);
  --shadow-1: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-3: 0 18px 48px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(900px 480px at 96% 0%, rgba(167, 139, 250, 0.10), transparent 62%),
    var(--bg);
}
html[data-theme="dark"] header {
  background: linear-gradient(135deg, #12303a, #0f1a24);
}
html[data-theme="dark"] .log-box {
  background: #05090c;
}

/* ── ② 护眼米绿：暖色低蓝光 ── */
html[data-theme="eye"] {
  --pink: #4a7c59;
  --pink-light: #eef4e6;
  --pink-dark: #38603f;
  --bg: #f6f3e8;              /* 米色底 */
  --text: #2f3a2c;
  --muted: #6b7358;
  --dim: #8c9179;
  --ok: #3f7a45;
  --warn: #96702a;
  --bad: #a8523f;
  --done: #4a7c59;
  --border: rgba(74, 124, 89, 0.24);
  --code-bg: #2a3327;
  --code-text: #e9f0e2;
  --surface: rgba(253, 251, 243, 0.94);
  --surface-soft: rgba(249, 247, 236, 0.86);
  --surface-strong: rgba(255, 254, 248, 0.98);
  --shadow: 0 18px 48px rgba(78, 70, 45, 0.16);
  --shadow-soft: 0 8px 24px rgba(78, 70, 45, 0.12);
  --focus: rgba(74, 124, 89, 0.35);
  --shadow-1: 0 4px 12px rgba(78, 70, 45, 0.1);
  --shadow-2: 0 8px 24px rgba(78, 70, 45, 0.12);
  --shadow-3: 0 18px 48px rgba(78, 70, 45, 0.16);
}
html[data-theme="eye"] header {
  background: linear-gradient(135deg, #eef4e6, #faf7ee);
}

/* ── ③ 高对比纯黑白：去装饰 ── */
html[data-theme="mono"] {
  --pink: #111111;
  --pink-light: #f2f2f2;
  --pink-dark: #000000;
  --bg: #ffffff;
  --text: #000000;
  --muted: #4a4a4a;
  --dim: #6b6b6b;
  --ok: #0a5c2a;
  --warn: #6b4a00;
  --bad: #9b1414;
  --done: #111111;
  --border: #000000;
  --code-bg: #000000;
  --code-text: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-strong: #ffffff;
  --shadow: none;
  --shadow-soft: none;
  --focus: #000000;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
}
html[data-theme="mono"] header {
  background: #ffffff;
  border-bottom-color: #000000;
}
html[data-theme="mono"] * {
  box-shadow: none !important;
  text-shadow: none !important;
}
/* 纯黑白下去掉渐变与圆角装饰 */
html[data-theme="mono"] .card,
html[data-theme="mono"] button,
html[data-theme="mono"] input,
html[data-theme="mono"] textarea,
html[data-theme="mono"] select {
  border-radius: 0;
  background-image: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

header {
  background: linear-gradient(135deg, var(--pink-light), #fff);
  padding: 14px 22px;
  border-bottom: 2px solid var(--pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 8px; }
.brand h1 { margin: 0; font-size: 20px; color: var(--pink-dark); }
.brand .sub { color: var(--muted); font-size: 12px; }
.brand-link {
  color: var(--pink-dark);
  font-weight: 600;
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--pink-light), #fff);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.brand-link:hover {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
  border-color: var(--pink-dark);
  box-shadow: 0 2px 8px rgba(211, 77, 128, 0.3);
}
.brand-link::after {
  content: " ↗";
  font-size: 9px;
  opacity: 0.6;
}

/* 顶部告警横幅（熔断 / 严重错误） */
.alert-banner {
  background: linear-gradient(135deg, #fce4e4, #fff4e1);
  border-bottom: 2px solid var(--bad);
  padding: 10px 22px;
  font-size: 13px;
  color: #8a2020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}
.alert-banner.hidden { display: none; }
.alert-banner::before {
  content: "⚠️ ";
}
.alert-banner button {
  border: 1px solid var(--bad);
  background: white;
  color: var(--bad);
  padding: 3px 10px;
  font-size: 12px;
}
.bell { font-size: 22px; animation: ring 2s ease-in-out infinite; }

@keyframes ring {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-15deg); }
}

.stats { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
}
.pill b { color: var(--pink-dark); margin-right: 4px; }
.pill.ok b { color: var(--ok); }
.pill.warn b { color: var(--warn); }
.pill.done b { color: var(--done); }
.pill.bad b { color: var(--bad); }

main {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  padding: 16px;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 900px) { main { grid-template-columns: 1fr; } }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(211, 77, 128, 0.06);
}

.card h2 { margin: 0 0 10px; font-size: 16px; color: var(--pink-dark); }
.card hr { border: 0; border-top: 1px dashed var(--border); margin: 18px 0; }

.hint { color: var(--muted); font-size: 12px; margin: 0 0 8px; line-height: 1.6; }
code { background: var(--pink-light); padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--pink-dark); }

textarea, input, select {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: white;
  color: var(--text);
}
textarea { resize: vertical; font-size: 12px; }

textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 111, 163, 0.12);
}

.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: block; font-size: 13px; color: var(--muted); }
.form label small { color: #b89bab; font-weight: normal; margin-left: 6px; }
.form label input, .form label select { margin-top: 4px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
fieldset legend { color: var(--pink-dark); font-size: 13px; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.check input { width: auto; }
.check small { color: #b89bab; }

button {
  font-family: inherit;
  font-size: 13px;
  border: 1.5px solid var(--border);
  background: white;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: all .15s;
}
button:hover { border-color: var(--pink); color: var(--pink-dark); }
button.primary {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
  border-color: var(--pink-dark);
}
button.primary:hover { filter: brightness(1.1); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.row { display: flex; gap: 10px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.result { color: var(--muted); font-size: 12px; }
.result.ok { color: var(--ok); }
.result.bad { color: var(--bad); }
.result.warn { color: #9a620f; }

.import-actions {
  align-items: center;
  gap: 8px;
}

button.registered-import-btn {
  color: #226b4a;
  background: linear-gradient(135deg, #edf9f2, #dff2e8);
  border-color: #8bc5a3;
  font-weight: 650;
}

button.registered-import-btn:hover {
  color: #17563a;
  background: linear-gradient(135deg, #e4f6ec, #d2ecdd);
  border-color: #67ad85;
}

button.url-mailbox-import-btn {
  color: #5b4b91;
  background: linear-gradient(135deg, #f6f2ff, #ece5fb);
  border-color: #b9a5df;
  font-weight: 650;
}

button.url-mailbox-import-btn:hover {
  color: #473776;
  background: linear-gradient(135deg, #f0eaff, #e3d9f7);
  border-color: #9f86d0;
}

button.delivery-zip-btn {
  color: #245f79;
  background: linear-gradient(135deg, #eef8fb, #dff1f6);
  border-color: #8abfd0;
  font-weight: 650;
}

button.delivery-zip-btn:hover {
  color: #174d65;
  background: linear-gradient(135deg, #e5f5f9, #d3ebf2);
  border-color: #68a9bd;
}

.import-mode-hint {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* 日志框 */
.log {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.operation-flow {
  margin: 0 0 10px;
  padding: 10px 12px;
  color: #285264;
  background: linear-gradient(135deg, rgba(231, 247, 250, 0.96), rgba(244, 251, 249, 0.96));
  border: 1px solid rgba(43, 143, 178, 0.28);
  border-radius: 11px;
}

.operation-flow.hidden { display: none; }

.operation-flow-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 22px;
}

.operation-flow-label {
  padding: 3px 8px;
  color: #17607c;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(43, 143, 178, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.operation-flow-stage {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-flow-count {
  color: #607984;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.operation-flow-track {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(43, 143, 178, 0.13);
  border-radius: 999px;
}

.operation-flow-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2b8fb2, #54b89a);
  border-radius: inherit;
  transition: width 180ms ease;
}

.operation-flow.ok { border-color: rgba(55, 153, 101, 0.34); }
.operation-flow.ok .operation-flow-bar { background: #43a871; }
.operation-flow.warn { border-color: rgba(202, 137, 35, 0.38); }
.operation-flow.warn .operation-flow-bar { background: #d59a37; }
.operation-flow.err { border-color: rgba(196, 75, 83, 0.36); }
.operation-flow.err .operation-flow-bar { background: #cf6269; }
.log .line.err { color: #ff8e9c; }
.log .line.warn { color: #ffd28e; }
.log .line.ok { color: #b8f4c5; }
.log .line.evt { color: #f8b8ff; font-weight: bold; }
.log .line.dim { color: #8fa3ad; }
.log .line.stage { color: #7fd4e8; font-weight: 600; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
}
.tab {
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 14px;
  border-radius: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}
.tab.active {
  color: var(--pink-dark);
  border-bottom-color: var(--pink);
  font-weight: 600;
}

.tab-content { padding-top: 10px; }
.tab-content.hidden { display: none; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th, td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
th { color: var(--muted); font-weight: 600; background: var(--pink-light); }
tbody tr:hover { background: #fffaf7; }

td .status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.status.available { background: #e6f5ea; color: var(--ok); }
.status.in_use   { background: #fff4e1; color: var(--warn); }
.status.done     { background: #e2f0fb; color: var(--done); }
.status.failed   { background: #fce4e4; color: var(--bad); }
.status.running  { background: #fff4e1; color: var(--warn); }

.plus-status,
.phone-status {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.plus-status.plus { background: #fff1d6; color: #a95a0c; }
.plus-status.eligible { background: #e6f5ea; color: var(--ok); }
.plus-status.ineligible { background: #f5e8ee; color: var(--muted); }
.plus-status.http_401 { background: #f4edf8; color: #75508c; }
.plus-status.http_402 { background: #fff1d6; color: #a95a0c; }
.plus-status.http_403 { background: #f8d7da; color: #a61b29; }
.plus-status.banned { background: #f8d7da; color: #a61b29; }
.plus-status.login_expired { background: #f4edf8; color: #75508c; }
.plus-status.restricted { background: #fff1d6; color: #a95a0c; }
.plus-status.expired { background: #fce4e4; color: var(--bad); }
.plus-status.other { background: #e2f0fb; color: var(--done); }
.plus-status.unknown,
.plus-status.unchecked,
.plus-status.legacy_free { background: #f5e8ee; color: var(--muted); }
.plus-status.manual {
  border-color: #e8a15e;
  border-style: dashed;
}
button.plus-status.manual-adjust {
  margin: 0;
  line-height: 1.4;
  border-color: #c8b5bf;
  border-style: dashed;
  cursor: pointer;
}
button.plus-status.manual-adjust:hover,
button.plus-status.manual-adjust:focus-visible {
  background: #fff1d6;
  border-color: #e8a15e;
  color: #a95a0c;
}
button.plus-status.auth-repair-status {
  margin: 0;
  line-height: 1.4;
  border-color: #9d7dcc;
  border-style: dashed;
  cursor: pointer;
}
button.plus-status.auth-repair-status:hover,
button.plus-status.auth-repair-status:focus-visible {
  background: #eadff2;
  border-color: #75508c;
  color: #5f3c77;
  outline: 2px solid rgba(117, 80, 140, 0.24);
  outline-offset: 2px;
}
.phone-status.bound { background: #e6f5ea; color: var(--ok); }
.phone-status.required { background: #fff1d6; color: #a95a0c; }
.phone-status.not_required { background: #e2f0fb; color: var(--done); }
.phone-status.login_required { background: #f4edf8; color: #75508c; }
.phone-status.failed { background: #fce4e4; color: var(--bad); }
.phone-status.unknown, .phone-status.unchecked { background: #edf1f3; color: var(--muted); }

td button { padding: 3px 8px; font-size: 11px; margin-right: 4px; }

/* 注册结果：紧凑行布局，完整 RT 仍保留在“凭证”弹窗中 */
#tab-registered { overflow-x: auto; }
#regTable { min-width: 990px; font-size: 11px; }
#regTable th,
#regTable td { padding: 5px 6px; vertical-align: middle; }
#regTable th:first-child,
#regTable td:first-child { width: 34px; text-align: center; }
#regTable th:nth-child(2),
#regTable td:nth-child(2) { min-width: 185px; white-space: nowrap; }
#regTable th:nth-child(3),
#regTable th:nth-child(4),
#regTable td:nth-child(3),
#regTable td:nth-child(4) { width: 92px; white-space: nowrap; }
#regTable th:nth-child(5),
#regTable td:nth-child(5) { width: 72px; white-space: nowrap; }
#regTable th:nth-child(6),
#regTable td:nth-child(6) { width: 72px; white-space: nowrap; }
#regTable th:nth-child(7),
#regTable td:nth-child(7) { width: 78px; white-space: nowrap; }
#regTable th:nth-child(8),
#regTable td:nth-child(8) { width: 125px; white-space: nowrap; }
#regTable th:last-child,
#regTable td:last-child { width: 270px; white-space: nowrap; }
#regTable button.copy-cell {
  min-width: 0;
  padding: 3px 6px;
  white-space: nowrap;
}
.reg-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}
.reg-actions button {
  margin: 0;
  padding: 3px 6px;
  line-height: 1.25;
  white-space: nowrap;
}
button.cockpit-btn {
  border-color: #a9d7e5;
  color: #26738b;
}

/* 模态框 */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}
.modal.hidden { display: none; }
.modal-body {
  background: white;
  width: 80%; max-width: 800px;
  max-height: 80vh;
  border-radius: 12px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--pink-light);
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; flex: 1; color: var(--pink-dark); }
.credential-download {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1.5px solid rgba(35, 104, 126, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 3px 9px rgba(21, 63, 76, 0.06);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.credential-download:hover {
  color: #15526b;
  border-color: #4d9eb8;
  background: white;
}
.credential-download.hidden { display: none; }
.modal pre {
  margin: 0; padding: 16px;
  background: var(--code-bg);
  color: var(--code-text);
  overflow: auto;
  font-size: 12px;
  flex: 1;
}

.password-modal-body {
  width: min(92vw, 560px);
}
.password-modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}
.password-modal-content > label:not(.check) {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #31505d;
  font-weight: 600;
}
.password-modal-content input[type="password"],
.password-modal-content input[type="text"] {
  width: 100%;
}
.password-target {
  margin: 0;
  padding: 9px 11px;
  overflow: hidden;
  color: #174f67;
  background: rgba(224, 243, 246, 0.78);
  border: 1px solid rgba(35, 104, 126, 0.16);
  border-radius: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.password-visibility {
  align-self: flex-start;
}
.password-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 38px;
}
.password-modal-actions .result {
  flex: 1;
}

.delivery-zip-modal-body {
  width: min(92vw, 620px);
}

.delivery-zip-picker input[type="file"] {
  width: 100%;
  padding: 9px;
  color: #31505d;
  background: rgba(247, 252, 253, 0.9);
  border: 1px dashed rgba(35, 104, 126, 0.35);
  border-radius: 9px;
}

.delivery-zip-picker input[type="file"]:focus-visible {
  outline: 2px solid rgba(43, 143, 178, 0.42);
  outline-offset: 2px;
}

.delivery-zip-summary {
  padding: 12px 14px;
  color: #1f6548;
  background: linear-gradient(135deg, #effaf4, #e4f5ec);
  border: 1px solid #a6d4b9;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.delivery-zip-summary.hidden { display: none; }

.delivery-zip-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.delivery-zip-actions {
  flex-wrap: wrap;
}

/* 凭证模态框：每个字段独立卡片 + 复制按钮 */
.cred-fields {
  padding: 14px 16px;
  overflow: auto;
  flex: 1;
}
.cred-row {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.cred-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--pink-light);
}
.cred-label {
  font-weight: 600;
  color: var(--pink-dark);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  flex: 1;
}
.cred-meta {
  font-size: 11px;
  color: var(--muted);
}
.cred-copy {
  padding: 3px 10px;
  font-size: 11px;
}
.cred-copy.copied { background: #e2f0fb; color: var(--done); border-color: var(--done); }
.cred-val {
  margin: 0;
  padding: 10px 12px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
/* 2FA 当前验证码输出行（纯前端计算，密钥不出浏览器） */
.cred-totp-now {
  padding: 8px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-top: 1px dashed var(--border);
}
.cred-totp-now.ok {
  color: var(--done);
  background: #f2fbf6;
}
.cred-totp-now.bad {
  color: var(--bad, #c0392b);
  background: #fdf3f2;
}

/* 行内快捷复制按钮（注册结果表里 access/session/refresh 列） */
button.copy-cell {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--ok);
  padding: 2px 8px;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
button.copy-cell:hover {
  background: #e6f5ea;
  border-style: solid;
}
button.copy-cell.copied {
  background: #e2f0fb;
  color: var(--done);
  border-color: var(--done);
}

/* 注册完成后状态栏的快捷复制按钮 */
button.quick-copy {
  background: linear-gradient(135deg, #fff, var(--pink-light));
  border: 1.5px solid var(--pink);
  color: var(--pink-dark);
  padding: 4px 12px;
  font-size: 12px;
  margin-top: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
button.quick-copy:hover { filter: brightness(1.05); }
button.quick-copy.copied { background: #e2f0fb; color: var(--done); border-color: var(--done); }

/* Plus 检测按钮 */
.plus-btn, button.quick-plus {
  background: #fff4e6;
  border: 1.5px solid #e8a15e;
  color: #b3580a;
  font-weight: 600;
}
.plus-btn:hover, button.quick-plus:hover { background: #ffe8d2; border-color: #d98734; }

.phone-check-btn,
button.phone-bind-btn {
  background: #eaf7f1;
  border-color: #7fbea0;
  color: #28714e;
  font-weight: 600;
}
.phone-check-btn:hover,
button.phone-bind-btn:hover { background: #dff2e8; border-color: #5fae86; }

.credential-complete-btn,
button.credential-complete-btn {
  background: #eef3ff;
  border-color: #9aafe0;
  color: #365a9d;
  font-weight: 600;
}
.credential-complete-btn:hover,
button.credential-complete-btn:hover {
  background: #e3ebff;
  border-color: #7897d3;
}

.auth-repair-btn,
button.auth-repair-btn {
  background: #f4edf8;
  border-color: #aa8abb;
  color: #674078;
  font-weight: 600;
}
.auth-repair-btn:hover,
button.auth-repair-btn:hover {
  background: #eadff2;
  border-color: #8e69a2;
}

.banned-select-btn,
button.banned-select-btn {
  background: #fff0f1;
  border-color: #d9a4aa;
  color: #9b303b;
  font-weight: 600;
}
.banned-select-btn:hover,
button.banned-select-btn:hover,
.banned-select-btn:focus-visible,
button.banned-select-btn:focus-visible {
  background: #fbe3e6;
  border-color: #bf737d;
  color: #81232d;
}

.gpt-password-btn,
button.gpt-password-btn {
  background: #f4efff;
  border-color: #b8a0de;
  color: #69459a;
  font-weight: 600;
}
.gpt-password-btn:hover,
button.gpt-password-btn:hover {
  background: #ebe2fb;
  border-color: #9d7dcc;
}
button.gpt-password-btn.configured {
  background: #edf7f1;
  border-color: #91c6a8;
  color: #2c704c;
}

.registered-toolbar {
  gap: 6px;
  margin: 6px 0 8px;
}
.registered-toolbar button {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.15;
}
.registered-toolbar .check {
  min-height: 30px;
  padding: 0 2px;
  font-size: 12px;
}

/* Plus 模态框 */
.plus-body { padding: 16px; overflow: auto; flex: 1; }
.plus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.plus-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.plus-card.highlight {
  background: linear-gradient(135deg, #fff8d6, #ffe8d2);
  border-color: #e8983c;
}
.plus-card .k { color: var(--muted); font-size: 11px; }
.plus-card .v { font-size: 14px; margin-top: 4px; font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; }
.plus-card .v.big { font-size: 18px; font-weight: 600; color: var(--pink-dark); }
.plus-card .v.small { font-size: 10px; }
.plus-body h4 { margin: 14px 0 6px; color: var(--pink-dark); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  background: #f5e8ee;
  color: var(--text);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.chip-hot {
  background: linear-gradient(135deg, #ffe8d2, #ffd2b6);
  color: #b3580a;
  font-weight: 600;
}
.hit-list {
  margin: 4px 0 0;
  padding-left: 22px;
  font-size: 12px;
}
.hit-list li {
  margin-bottom: 4px;
  line-height: 1.8;
}
.hit-list code {
  background: var(--pink-light);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--pink-dark);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
}
.verdict {
  background: linear-gradient(135deg, #fff8d6, #ffe8d2);
  border: 1px solid #e8983c;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 4px 0;
  font-size: 13px;
  color: #b3580a;
}
.weight-strong { color: #e53935; font-weight: bold; font-size: 10px; }
.weight-medium { color: #ff9800; font-weight: bold; font-size: 10px; }
.weight-weak { color: var(--muted); font-size: 10px; }

/* Auto-Loop 控制条 */
.auto-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--pink-light), #fff);
  border: 1.5px dashed var(--pink);
  border-radius: 10px;
}
.auto-bar .auto-title {
  font-weight: 600;
  color: var(--pink-dark);
  margin-right: 4px;
}
.auto-bar button { padding: 4px 12px; font-size: 12px; }
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.inline-check input {
  width: 60px;
  padding: 4px 6px;
  font-size: 12px;
}

.auto-status {
  display: block;
  font-size: 12px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  width: 100%;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.auto-status b.ok  { color: var(--ok); }
.auto-status b.bad { color: var(--bad); }
.auto-status code {
  background: var(--pink-light);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--pink-dark);
  font-size: 11px;
}
.auto-msg {
  color: var(--muted);
  font-size: 11px;
}
.auto-meta {
  color: var(--muted);
  font-size: 11px;
}
.auto-worker {
  margin-top: 4px;
  padding: 4px 8px;
  background: var(--pink-light);
  border-left: 3px solid var(--pink);
  font-size: 11px;
  border-radius: 3px;
}
.auto-worker code {
  background: white;
  padding: 0 4px;
  border-radius: 3px;
  color: var(--pink-dark);
}

/* 命中试用资格时的"立即支付"框 */
.pay-box {
  margin: 14px 0;
  padding: 14px;
  border: 2px solid #e8983c;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8d6, #ffe8d2);
}
.pay-head {
  font-size: 14px;
  font-weight: 700;
  color: #b3580a;
  margin-bottom: 8px;
}
.pay-url-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.pay-link {
  flex: 1;
  min-width: 0;
  display: inline-block;
  padding: 6px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--pink-dark);
  text-decoration: none;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.pay-link:hover { background: var(--pink-light); }
button.pay-copy {
  background: white;
  border: 1.5px solid #e8983c;
  color: #b3580a;
  padding: 5px 12px;
  font-weight: 600;
}
button.pay-copy.copied { background: #e2f0fb; color: var(--done); border-color: var(--done); }
.pay-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.pay-meta code {
  background: white;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text);
}

/* probe 探测结果表 */
.probe-table {
  width: 100%;
  font-size: 11px;
  margin-top: 4px;
}
.probe-table th, .probe-table td {
  padding: 4px 8px;
}
.probe-table code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  color: var(--muted);
}
.plus-body details {
  margin-top: 8px;
  background: var(--code-bg);
  border-radius: 6px;
}
.plus-body details summary {
  padding: 6px 10px;
  color: var(--code-text);
  cursor: pointer;
  font-size: 12px;
}
.plus-body details pre {
  margin: 0;
  padding: 10px;
  color: var(--code-text);
  font-size: 11px;
  max-height: 300px;
  overflow: auto;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 4px;
}
.pagination button {
  padding: 4px 14px;
  font-size: 13px;
}
.pagination button:disabled {
  opacity: .4;
  cursor: default;
}
.pagination span {
  font-size: 13px;
  color: var(--dim);
}

/* 韩国 KAKAO 订单 */
.kakao-orders-wrap {
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.kakao-module { max-width: 100%; }
.kakao-module fieldset { padding: 14px; }
.kakao-timeouts > label,
.kakao-mode-row > label { flex: 1 1 180px; }
#kakaoOrdersTable {
  min-width: 1180px;
  margin: 0;
  font-size: 11px;
}
#kakaoOrdersTable th,
#kakaoOrdersTable td {
  padding: 6px 8px;
}
#kakaoOrdersTable td:nth-child(3) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* GCASH 提炼扫码 */
.channel-title {
  margin: 0 0 12px;
  color: var(--pink-dark);
}
.gcash-title { color: #176c63; }
.gcash-module { max-width: 100%; }
.gcash-module fieldset { padding: 14px; }
.gcash-timeouts > label { flex: 1 1 180px; }
.gcash-file-picker {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 84px;
  padding: 15px 18px;
  border: 1.5px dashed rgba(23, 108, 99, 0.48);
  border-radius: 12px;
  background: rgba(231, 248, 244, 0.72);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.gcash-file-picker:hover,
.gcash-file-picker:focus-within {
  border-color: #168b77;
  background: rgba(219, 245, 238, 0.92);
  transform: translateY(-1px);
}
.gcash-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.gcash-file-picker span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.gcash-file-picker small {
  overflow: hidden;
  color: var(--dim);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcash-file-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #1ba78e, #176c63);
  border-radius: 11px;
  font-size: 23px;
  box-shadow: 0 7px 18px rgba(23, 108, 99, 0.2);
}
.gcash-submit-row { margin-top: 12px; }
.gcash-account-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  color: #145f57;
  background: rgba(221, 246, 240, 0.88);
  border: 1px solid rgba(23, 108, 99, 0.25);
  border-radius: 9px;
}
.gcash-account-context.hidden { display: none; }
.gcash-account-context code {
  min-width: 0;
  overflow: hidden;
  color: #104e48;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcash-account-context button {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 3px 8px;
}
.gcash-orders-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
#gcashOrdersTable {
  min-width: 850px;
  margin: 0;
  font-size: 11px;
}
#gcashOrdersTable th,
#gcashOrdersTable td { padding: 7px 9px; }
#gcashOrdersTable td:first-child {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#gcashOrdersTable td:nth-child(2) {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 注册结果行内支付渠道菜单 */
.channel-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.channel-choice-btn::after {
  content: "▾";
  color: var(--dim);
  font-size: 9px;
  transition: transform .15s ease;
}
.channel-choice-btn[aria-expanded="true"]::after { transform: rotate(180deg); }
.channel-menu {
  position: fixed;
  z-index: 2600;
  display: grid;
  width: 210px;
  gap: 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(95, 144, 157, 0.32);
  border-radius: 11px;
  box-shadow: 0 14px 34px rgba(26, 71, 82, 0.2);
  backdrop-filter: blur(12px);
}
.channel-menu.hidden { display: none; }
.channel-menu > button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 0;
  padding: 8px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}
.channel-menu > button:hover,
.channel-menu > button:focus-visible {
  background: rgba(224, 243, 247, 0.82);
  outline: 2px solid rgba(41, 132, 148, 0.28);
  outline-offset: -2px;
}
.channel-menu > button > span:last-child { display: grid; gap: 2px; min-width: 0; }
.channel-menu small { color: var(--dim); font-size: 10px; font-weight: 400; }
.channel-menu-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  font-weight: 800;
}
.channel-menu-icon.kakao { color: #4a3810; background: #fee500; }
.channel-menu-icon.gcash { background: linear-gradient(145deg, #2d75e8, #1856b8); }

/* 2026-07-28：风景背景 + 卡片化视觉层级 */
html {
  min-height: 100%;
  background: #dcece8;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgba(240, 249, 249, 0.28), rgba(229, 242, 237, 0.46));
  line-height: 1.55;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("/static/scenic-background.png") center 42% / cover no-repeat;
  opacity: 0.38;
  transform: scale(1.015);
}

body::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(244, 251, 252, 0.54) 0%, rgba(239, 248, 246, 0.64) 52%, rgba(229, 241, 237, 0.78) 100%),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.42), transparent 38%);
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 24px;
  background: rgba(247, 252, 252, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 24px rgba(22, 69, 83, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}

.brand {
  gap: 10px;
}

.brand h1 {
  color: #174e66;
  font-size: 21px;
  letter-spacing: 0.01em;
}

.brand .sub {
  color: #496672;
}

.brand-link {
  color: #15526b;
  background: rgba(232, 247, 248, 0.84);
  border-color: rgba(43, 143, 178, 0.16);
}

.brand-link:hover {
  background: linear-gradient(135deg, #2f9ab9, #247998);
  border-color: #247998;
  box-shadow: 0 5px 14px rgba(36, 121, 152, 0.24);
}

.stats {
  gap: 9px;
}

.pill {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(45, 111, 130, 0.2);
  box-shadow: 0 4px 12px rgba(21, 63, 76, 0.07);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.alert-banner {
  position: relative;
  z-index: 19;
  background: rgba(255, 247, 235, 0.96);
  border-bottom: 1px solid rgba(199, 67, 67, 0.42);
  box-shadow: 0 8px 20px rgba(95, 46, 35, 0.1);
}

main {
  grid-template-columns: minmax(330px, 0.68fr) minmax(0, 1.82fr);
  gap: 20px;
  padding: 22px;
  max-width: 1680px;
  align-items: start;
}

.card {
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  backdrop-filter: blur(20px) saturate(1.08);
}

.workspace-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-panel,
.data-panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 17px;
  box-shadow: var(--shadow-soft);
}

.content-panel {
  padding: 17px;
}

.data-panel {
  padding: 10px;
}

.card h2,
.tab-content h3,
.plus-body h4 {
  color: #174f67;
  letter-spacing: 0.01em;
}

.card h2 {
  margin-bottom: 12px;
  font-size: 17px;
}

.hint {
  color: #4b6671;
}

p.hint {
  padding: 9px 11px;
  background: rgba(229, 245, 248, 0.7);
  border-left: 3px solid rgba(43, 143, 178, 0.6);
  border-radius: 4px 11px 11px 4px;
}

code {
  background: rgba(219, 241, 244, 0.88);
  color: #175670;
}

textarea,
input,
select {
  min-height: 42px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(35, 104, 126, 0.24);
  border-radius: 10px;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(20, 63, 77, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
  min-height: 88px;
}

textarea:hover,
input:hover,
select:hover {
  border-color: rgba(43, 143, 178, 0.46);
}

textarea:focus,
input:focus,
select:focus {
  border-color: #2b8fb2;
  background: white;
  box-shadow: 0 0 0 3px var(--focus);
}

button,
a {
  touch-action: manipulation;
}

button {
  min-height: 38px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(35, 104, 126, 0.22);
  border-radius: 10px;
  box-shadow: 0 3px 9px rgba(21, 63, 76, 0.06);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button:hover {
  color: #15526b;
  border-color: #4d9eb8;
  background: white;
  box-shadow: 0 6px 14px rgba(21, 82, 107, 0.13);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button.primary {
  background: linear-gradient(135deg, #319bbc, #24799a);
  border-color: #24799a;
  box-shadow: 0 8px 18px rgba(36, 121, 154, 0.22);
}

button.primary:hover {
  background: linear-gradient(135deg, #35a4c7, #216d8c);
  filter: none;
  color: white;
}

button:disabled {
  opacity: 0.46;
  box-shadow: none;
  transform: none;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(43, 143, 178, 0.42);
  outline-offset: 2px;
}

.form > label:not(.check),
.form > .row > label:not(.check),
fieldset {
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(35, 104, 126, 0.17);
  border-radius: 13px;
}

fieldset {
  padding: 14px;
}

fieldset legend {
  color: #174f67;
  font-weight: 600;
}

.check {
  min-height: 34px;
  color: #425f6c;
}

.check input[type="checkbox"],
.check input[type="radio"] {
  min-height: auto;
  accent-color: #2b8fb2;
}

.log {
  height: 300px;
  padding: 14px 15px;
  background: rgba(13, 38, 49, 0.96);
  border: 1px solid rgba(120, 195, 210, 0.2);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(16, 40, 51, 0.15);
}

.tabs {
  gap: 6px;
  margin-top: 0;
  padding: 6px;
  background: rgba(225, 241, 243, 0.72);
  border: 1px solid rgba(35, 104, 126, 0.14);
  border-radius: 13px;
}

.tab {
  min-height: 40px;
  margin-bottom: 0;
  padding: 8px 13px;
  color: #47636e;
  border: 1px solid transparent;
  border-radius: 9px;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: none;
}

.tab.active {
  color: white;
  background: linear-gradient(135deg, #319bbc, #24799a);
  border-color: rgba(27, 104, 133, 0.68);
  box-shadow: 0 6px 14px rgba(36, 121, 154, 0.22);
}

.tab-content {
  margin-top: 10px;
  padding: 14px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(35, 104, 126, 0.14);
  border-radius: 13px;
}

table {
  color: #263f49;
}

th {
  color: #415f6b;
  background: rgba(214, 237, 240, 0.82);
}

tbody tr:hover {
  background: rgba(226, 244, 242, 0.64);
}

.auto-bar {
  padding: 12px;
  background: linear-gradient(135deg, rgba(220, 242, 245, 0.88), rgba(245, 251, 249, 0.92));
  border: 1px solid rgba(43, 143, 178, 0.34);
  border-radius: 13px;
}

.auto-status,
.plus-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(35, 104, 126, 0.17);
  border-radius: 10px;
}

.auto-worker {
  background: rgba(224, 243, 246, 0.9);
  border-left-color: #2b8fb2;
}

.kakao-orders-wrap {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(35, 104, 126, 0.17);
  border-radius: 11px;
}

.gcash-orders-wrap {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(23, 108, 99, 0.2);
  border-radius: 11px;
}

.modal {
  z-index: 40;
  background: rgba(8, 30, 38, 0.56);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.modal-body {
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(7, 30, 39, 0.28);
}

.modal-head,
.cred-row-head {
  background: rgba(224, 243, 246, 0.92);
}

.modal-head h3,
.cred-label {
  color: #174f67;
}

.plus-card,
.cred-row {
  border-radius: 11px;
}

/* 账号表格保持紧凑，避免通用表单尺寸把每一行撑高 */
#poolTable th,
#poolTable td,
#regTable th,
#regTable td {
  padding: 5px 7px;
  vertical-align: middle;
  line-height: 1.35;
}

#poolTable input[type="checkbox"],
#regTable input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  box-shadow: none;
}

#poolTable td button,
#regTable td button,
#regTable button.copy-cell {
  min-height: 28px;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.2;
  box-shadow: none;
}

#poolTable td .status,
#regTable td .plus-status,
#regTable td .phone-status {
  padding: 2px 7px;
  line-height: 1.25;
}

#regTable .reg-actions {
  gap: 3px;
}

#regTable .reg-actions button {
  margin: 0;
  white-space: nowrap;
}

@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  header,
  .card,
  .pill {
    background: rgba(250, 253, 252, 0.97);
  }
}

@media (max-width: 1100px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
}

@media (max-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .card {
    border-radius: 18px;
  }

  .log {
    height: 250px;
  }
}

/* 操作按钮不参与横向压缩，避免不换行文字越过自身边框 */
#regTable .reg-actions {
  min-width: max-content;
}

#regTable .reg-actions button {
  flex: 0 0 auto;
  min-width: max-content;
}

@media (max-width: 600px) {
  body::before {
    background-position: left center;
    opacity: 0.32;
  }

  header {
    position: relative;
    padding: 12px 14px;
  }

  .brand {
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand h1 {
    font-size: 19px;
  }

  .brand .sub {
    flex-basis: 100%;
    padding-left: 32px;
    line-height: 1.6;
  }

  .stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pill {
    text-align: center;
  }

  main {
    padding: 10px;
  }

  .card {
    padding: 10px;
    border-radius: 16px;
  }

  .workspace-card {
    gap: 10px;
  }

  .content-panel {
    padding: 13px;
  }

  .data-panel {
    padding: 7px;
  }

  .content-panel,
  .data-panel,
  .tab-content {
    border-radius: 13px;
  }

  textarea,
  input,
  select {
    font-size: 16px;
  }

  .form > .row > label:not(.check) {
    flex: 1 1 100% !important;
  }

  .tabs {
    padding: 5px;
  }

  .tab {
    min-height: 44px;
  }

  button:not(td button) {
    min-height: 42px;
  }

  .modal-body {
    width: calc(100% - 24px);
    max-height: 88vh;
    max-height: 88dvh;
  }

  .modal-head {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bell {
    animation: none;
  }
}

/* Cockpit Tools 自动导出 */
.cockpit-export-module {
  background: linear-gradient(135deg, #f8fdff, #fff);
  border-color: #cce6ee;
}
.cockpit-security-note { margin: 8px 0 0; }

/* 账号表：桌面端高密度，窄屏保留可点击面积 */
#tab-pool,
#tab-registered {
  overflow-x: auto;
}

#poolTable,
#regTable {
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.25;
}

#poolTable { min-width: 620px; }
#regTable { min-width: 1070px; }

#poolTable th,
#poolTable td,
#regTable th,
#regTable td {
  height: 40px;
  padding: 4px 7px;
  vertical-align: middle;
}

#poolTable thead th,
#regTable thead th {
  height: 38px;
  white-space: nowrap;
}

#poolTable input[type="checkbox"],
#regTable input[type="checkbox"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  accent-color: var(--pink);
  box-shadow: none;
}

#poolTable th:first-child,
#poolTable td:first-child,
#regTable th:first-child,
#regTable td:first-child {
  width: 36px;
  text-align: center;
}

#poolTable th:nth-child(2),
#poolTable td:nth-child(2) { width: 215px; }
#poolTable th:nth-child(3),
#poolTable td:nth-child(3) { width: 82px; }
#poolTable th:nth-child(5),
#poolTable td:nth-child(5) { width: 160px; }
#poolTable td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#regTable th:nth-child(2),
#regTable td:nth-child(2) { width: 180px; }
#regTable th:nth-child(3),
#regTable td:nth-child(3),
#regTable th:nth-child(4),
#regTable td:nth-child(4) { width: 78px; }
#regTable th:nth-child(5),
#regTable td:nth-child(5) { width: 62px; }
#regTable th:nth-child(6),
#regTable td:nth-child(6) { width: 68px; }
#regTable th:nth-child(7),
#regTable td:nth-child(7) { width: 78px; }
#regTable th:nth-child(8),
#regTable td:nth-child(8) { width: 118px; }
#regTable th:last-child,
#regTable td:last-child { width: 345px; }

#poolTable .account-email,
#regTable .account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

#poolTable td .status,
#regTable .plus-status,
#regTable .phone-status {
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.25;
}

.pool-actions,
.reg-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
}

#poolTable td button,
#regTable td button {
  width: auto;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  box-shadow: none;
  white-space: nowrap;
}

#regTable button.copy-cell {
  width: 100%;
  padding-inline: 5px;
  font-variant-numeric: tabular-nums;
}

#regTable button.sale-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 64px;
  min-height: 24px;
  height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 650;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

#regTable button.sale-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.78;
}

#regTable button.sale-status.unsold {
  color: #257a50;
  background: #e7f6ed;
  border-color: #91c9a7;
}

#regTable button.sale-status.unsold:hover {
  color: #17663f;
  background: #d9f0e2;
  border-color: #6db58a;
}

#regTable button.sale-status.sold {
  color: #6f7d82;
  background: #edf1f2;
  border-color: #cbd4d7;
}

#regTable button.sale-status.sold:hover {
  color: #526166;
  background: #e2e8ea;
  border-color: #aebcc0;
}

#regTable button.sale-status:active { transform: translateY(1px); }
#regTable button.sale-status:focus-visible {
  outline: 2px solid rgba(43, 143, 178, 0.42);
  outline-offset: 2px;
}

#regTable button.plus-status.manual-adjust,
#regTable button.plus-status.auth-repair-status {
  min-height: 24px;
  height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
}

#regTable td:nth-child(8),
#regTable button.copy-cell {
  font-variant-numeric: tabular-nums;
}

#regTable th:nth-child(n+3),
#regTable td:nth-child(n+3) {
  text-align: center;
}

@media (max-width: 600px) {
  #poolTable th,
  #poolTable td,
  #regTable th,
  #regTable td {
    height: 44px;
  }

  #poolTable td button,
  #regTable td button {
    min-height: 36px;
    height: 36px;
  }


  #regTable button.sale-status,
  #regTable button.plus-status.manual-adjust,
  #regTable button.plus-status.auth-repair-status {
    min-height: 30px;
    height: 30px;
  }

  .registered-toolbar button {
    min-height: 34px;
    padding: 5px 8px;
  }
}

/* 注册结果：本地多格式文件下载 */
.registered-file-export {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(360px, 2fr) auto;
  align-items: center;
  gap: 10px 14px;
  margin: 8px 0;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(232, 246, 249, 0.94), rgba(247, 252, 250, 0.96));
  border: 1px solid rgba(43, 143, 178, 0.26);
  border-radius: 12px;
}

.registered-file-export-head {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.registered-file-export-head > div {
  display: grid;
  gap: 1px;
}

.registered-file-export-head strong {
  color: #174f67;
  font-size: 13px;
}

.registered-file-export-head span,
.registered-file-export-count {
  color: #56717c;
  font-size: 10px;
  line-height: 1.4;
}

.registered-file-export-count b {
  color: #216f8c;
  font-variant-numeric: tabular-nums;
}

.registered-export-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.export-format-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 3px 8px;
  color: #365f70;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(49, 127, 150, 0.22);
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.export-format-option:hover {
  color: #185f7a;
  background: #fff;
  border-color: rgba(43, 143, 178, 0.48);
}

.export-format-option:focus-within {
  outline: 2px solid rgba(43, 143, 178, 0.34);
  outline-offset: 1px;
}

.export-format-option input {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: #2b8fb2;
  box-shadow: none;
}

.registered-file-export-btn {
  min-width: 150px;
  margin: 0;
  white-space: nowrap;
}

#regTable .download-files-btn {
  color: #216f8c;
  background: #eef8fb;
  border-color: #a9d5e1;
}

#regTable .download-files-btn:hover {
  color: #15556e;
  background: #e2f3f7;
  border-color: #72b8cc;
}

@media (max-width: 1000px) {
  .registered-file-export {
    grid-template-columns: minmax(150px, 0.65fr) minmax(330px, 2fr);
  }

  .registered-file-export-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .registered-file-export {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .registered-file-export-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .registered-export-formats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-format-option {
    min-width: 0;
    min-height: 36px;
    border-radius: 9px;
  }

  .registered-file-export-btn {
    width: 100%;
  }
}

/* 2026-08-13：渐进式控制台外壳。业务 DOM 与事件保持原样，仅增强导航和布局。 */
:root {
  --sidebar-width: 232px;
  --console-bg: #f4f7fa;
  --console-panel: #ffffff;
  --console-line: #dfe6ee;
  --console-ink: #1f2937;
  --console-muted: #6b7789;
  --console-primary: #337ecc;
  --console-primary-soft: #ecf5ff;
  --console-sidebar: #172332;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 9px 14px;
  color: white;
  background: var(--console-primary);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 45, 78, 0.24);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.app-main {
  min-width: 0;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 32;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  padding: 17px 12px 14px;
  color: #d8e1eb;
  background: linear-gradient(180deg, #1b2a3a 0%, var(--console-sidebar) 72%, #111c28 100%);
  box-shadow: 8px 0 30px rgba(19, 35, 51, 0.12);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 8px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #409eff, #337ecc);
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(51, 126, 204, 0.3);
  font-weight: 800;
}

.sidebar-brand > span:last-child,
.sidebar-foot > span:last-child {
  display: grid;
  gap: 1px;
}

.sidebar-brand strong {
  color: #f7fafc;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.sidebar-brand small,
.sidebar-foot small {
  color: #8fa1b4;
  font-size: 10px;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  padding-top: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.sidebar-nav-title {
  margin: 11px 10px 5px;
  color: #718398;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

button.sidebar-nav-item {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  padding: 7px 10px;
  color: #b9c6d4;
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  text-align: left;
}

button.sidebar-nav-item > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: #8fa5bb;
  border-radius: 6px;
  font-weight: 700;
}

button.sidebar-nav-item:hover,
button.sidebar-nav-item.active {
  color: white;
  background: rgba(64, 158, 255, 0.16);
  transform: none;
  box-shadow: none;
}

button.sidebar-nav-item.active {
  box-shadow: inset 3px 0 0 #409eff;
}

button.sidebar-nav-item.active > span {
  color: #a8d5ff;
  background: rgba(64, 158, 255, 0.13);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 9px 1px;
  color: #c6d2dd;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
}

.sidebar-health-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: #5ac787;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(90, 199, 135, 0.12);
}

.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

.app-main > header {
  min-height: 68px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--console-line);
  box-shadow: 0 2px 12px rgba(22, 42, 62, 0.06);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.workspace-kicker,
.section-kicker {
  color: #8a97a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-main > header .brand h1 {
  color: var(--console-ink);
  font-size: 18px;
  line-height: 1.25;
}

.app-main > header .bell {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--console-primary-soft);
  border-radius: 9px;
  font-size: 16px;
}

.app-main .pill {
  padding: 5px 10px;
  background: #f7f9fc;
  border-color: var(--console-line);
  border-radius: 7px;
  box-shadow: none;
}

.app-main main {
  grid-template-columns: minmax(310px, 0.72fr) minmax(0, 2fr);
  gap: 16px;
  max-width: 1760px;
  padding: 18px;
}

.app-main .card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.app-main .workspace-card {
  gap: 14px;
}

.app-main .content-panel,
.app-main .data-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--console-line);
  border-radius: 10px;
  box-shadow: 0 3px 14px rgba(28, 46, 66, 0.06);
}

.app-main .content-panel {
  padding: 16px;
}

.app-main .data-panel {
  padding: 12px;
}

.app-main .card h2 {
  color: var(--console-ink);
  font-size: 15px;
}

.data-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 10px;
}

.data-panel-head h2 {
  margin: 1px 0 0;
}

.data-panel-note {
  color: var(--console-muted);
  font-size: 11px;
}

.app-main .tabs {
  position: sticky;
  top: 74px;
  z-index: 8;
  gap: 2px;
  margin: 0;
  padding: 4px;
  background: #f4f7fa;
  border: 1px solid var(--console-line);
  border-radius: 8px;
}

.app-main .tab {
  min-height: 34px;
  padding: 6px 10px;
  color: #5f6d7e;
  border-radius: 6px;
  font-size: 12px;
}

.app-main .tab.active {
  color: var(--console-primary);
  background: white;
  border-color: #d7e7f7;
  box-shadow: 0 2px 7px rgba(33, 81, 132, 0.09);
}

.app-main .tab-content {
  margin-top: 10px;
  padding: 12px;
  background: white;
  border-color: var(--console-line);
  border-radius: 8px;
}

.app-main button.primary {
  background: #409eff;
  border-color: #409eff;
  box-shadow: 0 3px 9px rgba(64, 158, 255, 0.2);
}

.app-main button.primary:hover {
  background: #337ecc;
  border-color: #337ecc;
}

.app-main textarea,
.app-main input,
.app-main select {
  border-color: #d8e0e9;
  border-radius: 7px;
}

.app-main textarea:focus,
.app-main input:focus,
.app-main select:focus {
  border-color: #409eff;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
}

.registered-toolbar {
  align-items: stretch;
  gap: 7px;
  margin: 0 0 9px;
  padding: 8px;
  background: #f5f7fa;
  border: 1px solid var(--console-line);
  border-radius: 8px;
}

.toolbar-cluster {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 17px 7px 6px;
  background: white;
  border: 1px solid #e1e7ee;
  border-radius: 7px;
}

.toolbar-filter-group {
  flex: 1 1 100%;
}

.toolbar-check-group,
.toolbar-credential-group {
  flex: 1 1 auto;
}

.toolbar-danger-group {
  flex: 0 1 auto;
  border-color: #f2d1d4;
}

.toolbar-cluster-label {
  position: absolute;
  top: 3px;
  left: 8px;
  color: #8a97a8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.toolbar-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px 5px;
  background: #f4f7fa;
  border-radius: 6px;
}

.registered-toolbar .toolbar-filter-options .check {
  min-height: 27px;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
}

.registered-toolbar .toolbar-filter-options .check:has(input:checked) {
  color: #2569a9;
  background: white;
  box-shadow: 0 1px 4px rgba(33, 81, 132, 0.1);
}

.registered-toolbar button {
  min-height: 29px;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: none;
}

.settings-page > .form {
  max-width: 920px;
}

.settings-page fieldset {
  padding: 15px;
  border-color: var(--console-line);
}

.settings-page > h3 {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--console-line);
}

.app-main table thead th {
  color: #4e5d6e;
  background: #f4f7fa;
  border-bottom-color: #dce4ec;
}

.app-main table tbody tr:hover {
  background: #f7fbff;
}

.app-main .log {
  height: 270px;
  background: #152633;
  border-radius: 8px;
}

@media (max-width: 1240px) {
  :root { --sidebar-width: 208px; }

  .app-main main {
    grid-template-columns: minmax(0, 1fr);
  }

  .controls-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 880px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    width: min(82vw, 260px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    padding: 0;
  }

  .sidebar-backdrop:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 31;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(11, 24, 38, 0.48);
    border: 0;
    border-radius: 0;
  }

  .app-main > header {
    position: sticky;
    padding: 9px 12px;
  }

  .controls-card {
    display: flex;
  }

  .app-main .tabs {
    top: 68px;
  }
}

@media (max-width: 600px) {
  .app-main > header .brand .bell,
  .workspace-kicker,
  .data-panel-note {
    display: none;
  }

  .app-main > header .brand {
    width: auto;
    flex: 1;
  }

  .app-main > header .brand .sub {
    flex-basis: auto;
    padding-left: 0;
    font-size: 10px;
  }

  .app-main .stats {
    grid-template-columns: repeat(5, minmax(64px, 1fr));
    flex-basis: 100%;
    overflow-x: auto;
  }

  .app-main main {
    padding: 8px;
  }

  .app-main .content-panel,
  .app-main .data-panel {
    padding: 10px;
    border-radius: 8px;
  }

  .data-panel-head {
    padding-bottom: 7px;
  }

  .app-main .tabs {
    top: 0;
  }

  .app-main .tab-content {
    padding: 8px;
  }

  .toolbar-cluster,
  .toolbar-filter-group,
  .toolbar-check-group,
  .toolbar-credential-group,
  .toolbar-danger-group {
    flex: 1 1 100%;
  }

  .toolbar-cluster > button {
    flex: 1 1 auto;
  }

  .toolbar-filter-options {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .registered-toolbar .toolbar-filter-options .check {
    justify-content: center;
  }
}

/* 2026-08-14：侧栏统一为独立工作区视图，一次只展示一个业务板块。 */
.app-main main {
  display: block;
  width: 100%;
  min-height: calc(100dvh - 69px);
  max-width: 1760px;
  margin: 0 auto;
  overflow-x: hidden;
}

.app-main .workspace-card {
  display: block;
  width: 100%;
}

.app-main .workspace-card.workspace-card-hidden,
.app-main .workspace-view.hidden,
.app-main .data-panel.hidden,
.workspace-tabs-source {
  display: none !important;
}

.app-main .content-panel,
.app-main .data-panel {
  width: 100%;
  min-width: 0;
  padding: 20px;
}

.app-main .content-panel > h2,
.data-panel-head h2 {
  outline: none;
}

.app-main .content-panel > h2:focus-visible,
.data-panel-head h2:focus-visible {
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.2);
}

.data-panel-head {
  min-height: 58px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--console-line);
}

.app-main .data-panel > .tab-content {
  margin-top: 0;
  padding: 18px 0 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-main .import-panel,
.app-main .registration-panel {
  min-height: min(690px, calc(100dvh - 105px));
}

.app-main .log-panel {
  min-height: calc(100dvh - 105px);
}

.app-main .log-panel .log {
  height: calc(100dvh - 205px);
  min-height: 420px;
}

/* 2026-10-11：实时日志工具栏（日志级别 / 清屏 / 行数统计 / 自动继续倒计时）。 */
.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.log-level-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--console-muted);
  font-size: 12px;
}

.log-toolbar select {
  min-height: 32px;
  padding: 4px 8px;
  color: var(--console-ink);
  background: white;
  border: 1px solid var(--console-line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.log-toolbar select:hover {
  border-color: var(--console-primary);
}

.log-toolbar select:focus-visible {
  border-color: var(--console-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
}

.log-toolbar button {
  min-height: 32px;
  padding: 4px 12px;
  color: var(--console-ink);
  background: white;
  border: 1px solid var(--console-line);
  border-radius: 6px;
  box-shadow: none;
  font-size: 12px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.log-toolbar button:hover {
  color: var(--console-primary);
  background: var(--console-primary-soft);
  border-color: var(--console-primary);
}

.log-toolbar button:focus-visible {
  border-color: var(--console-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
}

.log-stats {
  margin-left: auto;
  color: var(--console-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.log-countdown {
  padding: 3px 10px;
  color: var(--warn);
  background: var(--console-primary-soft);
  border: 1px solid rgba(51, 126, 204, 0.28);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.log-countdown.hidden {
  display: none;
}

.log.log-compact {
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .log-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .log-level-label {
    justify-content: space-between;
  }

  .log-toolbar select,
  .log-toolbar button {
    width: 100%;
  }

  .log-stats {
    margin-left: 0;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .log-toolbar select,
  .log-toolbar button {
    transition: none;
  }
}

.table-scroll {
  max-width: 100%;
  margin-top: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--console-line);
  border-radius: 8px;
  background: white;
}

.table-scroll:focus-visible {
  outline: 3px solid rgba(64, 158, 255, 0.2);
  outline-offset: 2px;
}

.table-scroll table {
  margin-top: 0;
  border: 0;
  border-radius: 0;
}

.table-scroll table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.registered-table-scroll {
  max-height: calc(100dvh - 315px);
}

@media (max-width: 1240px) {
  .app-main main {
    display: block;
  }

  .controls-card {
    display: block;
  }
}

@media (max-width: 880px) {
  body.sidebar-open {
    overflow: hidden;
  }

  button.sidebar-nav-item {
    min-height: 44px;
  }

  .app-sidebar {
    width: min(86vw, 300px);
  }

  .app-main .content-panel,
  .app-main .data-panel {
    padding: 16px;
  }

  .app-main .import-panel,
  .app-main .registration-panel,
  .app-main .log-panel {
    min-height: calc(100dvh - 96px);
  }
}

@media (max-width: 600px) {
  .app-main main {
    min-height: calc(100dvh - 76px);
  }

  .app-main .content-panel,
  .app-main .data-panel {
    padding: 12px;
  }

  .app-main .data-panel > .tab-content {
    padding-top: 12px;
  }

  .app-main .log-panel .log {
    height: calc(100dvh - 175px);
    min-height: 360px;
  }

  .registered-table-scroll {
    max-height: none;
  }
}

/* 2026-08-14：注册结果页快捷工作台（实时日志 + 邮箱查询）。 */
.registered-command-center {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.7fr);
  gap: 10px;
  margin-bottom: 10px;
}

.registered-live-card,
.registered-search-card {
  min-width: 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--console-line);
  border-radius: 8px;
}

.registered-command-head {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.registered-command-head > div:first-child {
  display: grid;
  gap: 1px;
}

.registered-command-head strong {
  color: #304154;
  font-size: 13px;
}

.registered-command-kicker {
  color: #8a97a8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.registered-command-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.registered-command-actions button {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: none;
}

.registered-live-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 3px;
  color: #4f6b5a;
  font-size: 10px;
  white-space: nowrap;
}

.registered-live-state i {
  width: 7px;
  height: 7px;
  background: #45b97c;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(69, 185, 124, 0.14);
}

.app-main .registered-live-log {
  height: 132px;
  min-height: 132px;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.55;
}

.registered-live-log:empty::before {
  color: #79909e;
  content: "等待实时任务日志…";
}

.registered-live-card.is-collapsed .registered-live-log {
  display: none;
}

.registered-live-card.is-collapsed .registered-command-head {
  margin-bottom: 0;
}

.registered-search-card {
  display: flex;
  flex-direction: column;
}

.registered-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.registered-search-row input {
  min-width: 0;
  flex: 1 1 auto;
  height: 36px;
  margin: 0;
}

.registered-search-row button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 6px 11px;
  box-shadow: none;
}

.registered-search-result {
  min-height: 18px;
  margin-top: 8px;
  color: var(--console-muted);
  font-size: 11px;
}

.registered-search-result.ok {
  color: #278151;
}

.registered-search-result.warn {
  color: #a36b12;
}

.registered-search-result.bad {
  color: #bd3d45;
}

@media (max-width: 1020px) {
  .registered-command-center {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .registered-live-card,
  .registered-search-card {
    padding: 9px;
  }

  .registered-command-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .registered-live-state {
    flex-basis: 100%;
    justify-content: flex-end;
  }

  .registered-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .app-main .registered-live-log {
    height: 116px;
    min-height: 116px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2026-10-11 视觉打磨层（纯增量）
   - 只新增规则：不重命名、不删除任何既有类名 / id / 选择器。
   - 统一使用新增的 --radius-* / --shadow-* 层级令牌。
   - 该层位于文件末尾，按层叠顺序覆盖既有同权重声明。
   安全边界：不触碰 #logPanel / #registrationPanel / #logToolbar / .log-toolbar /
   .log-stats / .log-countdown / .log .line.* —— 那些规则由另一处维护。
   不含 @import、外部字体、外链图片或 CDN 资源。
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 页头 / 品牌 / 统计药丸 ─────────────────────────────────────────── */

header {
  padding: 13px 22px;
  gap: 10px 14px;
  box-shadow: var(--shadow-1);
}

.brand {
  min-width: 0;
  gap: 10px;
  line-height: 1.2;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.brand .sub {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.45;
}

/* 铃铛：仅在首次加载时轻响三下，不常驻动画 */
.bell {
  animation: bell-ring-once 1.9s cubic-bezier(0.36, 0.07, 0.19, 0.97) 1 both;
  transform-origin: 50% 8%;
  display: inline-block;
}

@keyframes bell-ring-once {
  0% { transform: rotate(0); }
  8% { transform: rotate(-14deg); }
  20% { transform: rotate(11deg); }
  32% { transform: rotate(-8deg); }
  44% { transform: rotate(5deg); }
  56% { transform: rotate(-2deg); }
  68%, 100% { transform: rotate(0); }
}

.stats {
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.stats .pill {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
  padding: 4px 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.stats .pill b {
  font-weight: 800;
}

/* ── 2. 按钮：统一的悬停抬升 / 按下 / 焦点环 ───────────────────────────── */

button {
  transition: background-color 0.16s ease, border-color 0.16s ease,
    box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

button:focus-visible {
  outline: none;
  border-color: var(--console-primary);
  box-shadow: 0 0 0 3px var(--focus);
}

/* 主按钮用更深的一点渐变，保证白字 AA 对比度 */
button.primary {
  background: linear-gradient(135deg, var(--console-primary), var(--pink-dark));
  border-color: var(--pink-dark);
  color: #fff;
  font-weight: 600;
}

button.primary:hover:not(:disabled) {
  filter: none;
  background: linear-gradient(135deg, #3b89d6, #17518c);
  border-color: #14456f;
  box-shadow: 0 6px 16px rgba(29, 92, 158, 0.28);
}

button:disabled {
  transform: none;
  box-shadow: none;
}

/* 内联 / 表格内小按钮与侧栏项不做位移动画，避免抖动 */
.tab:hover,
#regTable .reg-actions button:hover,
.registered-command-actions button:hover,
button.plus-status:hover,
button.plus-status.manual-adjust:hover,
button.plus-status.auth-repair-status:hover {
  transform: none;
}

/* ── 3. 表单控件：高度 / 圆角 / 焦点环 / 禁用态 ─────────────────────────── */

textarea,
:where(input:not([type="checkbox"]):not([type="radio"])),
select {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
  line-height: 1.4;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease;
}

textarea {
  min-height: 96px;
}

/* 复选框 / 单选框：清除上面的控件高度与内距，且不覆盖既有尺寸规则
   （:where() 让本条保持零权重，原 .export-format-option input 等仍可生效） */
:where(input[type="checkbox"], input[type="radio"]) {
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
}

select {
  padding-right: 10px;
}

textarea:hover:not(:disabled),
:where(input:not([type="checkbox"]):not([type="radio"])):hover:not(:disabled),
select:hover:not(:disabled) {
  border-color: rgba(51, 126, 204, 0.42);
}

textarea:focus,
:where(input:not([type="checkbox"]):not([type="radio"])):focus,
select:focus {
  outline: none;
  border-color: var(--console-primary);
  box-shadow: 0 0 0 3px var(--focus);
}

textarea:disabled,
input:disabled,
select:disabled {
  background: #f1f4f8;
  border-color: var(--console-line);
  color: var(--console-muted);
  cursor: not-allowed;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--console-primary);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--console-primary);
  outline-offset: 2px;
}

fieldset {
  border-radius: var(--radius-lg);
}

fieldset legend {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.form label small,
.check small {
  color: var(--dim);
}

/* ── 4. 面板 / 卡片：统一圆角 · 背景 · 阴影层级 ────────────────────────── */

.content-panel,
.data-panel {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--console-line);
  box-shadow: var(--shadow-2);
}

.registered-live-card,
.registered-search-card {
  border-radius: var(--radius-lg);
  background: #f8fafc;
  border-color: var(--console-line);
  box-shadow: var(--shadow-1);
}

/* ── 5. 表格：斑马纹 · 悬停高亮 · 更实的表头 ───────────────────────────── */

table {
  font-variant-numeric: tabular-nums;
}

thead th,
th {
  letter-spacing: 0.02em;
}

tbody tr:nth-child(even) {
  background: rgba(51, 126, 204, 0.035);
}

tbody tr:hover {
  background: rgba(51, 126, 204, 0.08);
}

/* ── 6. 状态胶囊：尺寸 / 内距 / 圆角 / 字重统一 ───────────────────────── */

.pill,
.status,
.plus-status,
.phone-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: middle;
}

.pill {
  padding: 4px 11px;
  font-size: 12px;
}

/* .stats 内的药丸尺寸已在第 1 节单独给出 */
.stats .pill {
  padding: 4px 11px;
}

/* ── 7. 滚动条：日志框与表格滚动区（侧栏既有 scrollbar-color 不变） ───── */

.log,
.registered-live-log,
.table-scroll,
#tab-registered,
#tab-pool {
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 152, 178, 0.55) transparent;
}

.log::-webkit-scrollbar,
.registered-live-log::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar,
#tab-registered::-webkit-scrollbar,
#tab-pool::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.log::-webkit-scrollbar-track,
.registered-live-log::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track,
#tab-registered::-webkit-scrollbar-track,
#tab-pool::-webkit-scrollbar-track {
  background: transparent;
}

.log::-webkit-scrollbar-thumb,
.registered-live-log::-webkit-scrollbar-thumb {
  background: rgba(150, 185, 205, 0.34);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background-clip: content-box;
}

.log::-webkit-scrollbar-thumb:hover,
.registered-live-log::-webkit-scrollbar-thumb:hover {
  background: rgba(170, 205, 224, 0.55);
  background-clip: content-box;
}

.table-scroll::-webkit-scrollbar-thumb,
#tab-registered::-webkit-scrollbar-thumb,
#tab-pool::-webkit-scrollbar-thumb {
  background: rgba(122, 148, 174, 0.4);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background-clip: content-box;
}

.table-scroll::-webkit-scrollbar-thumb:hover,
#tab-registered::-webkit-scrollbar-thumb:hover,
#tab-pool::-webkit-scrollbar-thumb:hover {
  background: rgba(92, 122, 152, 0.62);
  background-clip: content-box;
}

.table-scroll::-webkit-scrollbar-corner,
#tab-registered::-webkit-scrollbar-corner,
#tab-pool::-webkit-scrollbar-corner {
  background: transparent;
}

/* ── 8. 深色表面（.log / .channel-menu / 侧栏）文字对比度保障 ──────────── */

.app-main .log,
.app-main .registered-live-log {
  color: #e8f8fb;
  scrollbar-color: rgba(125, 168, 188, 0.45) transparent;
}

.channel-menu {
  color: var(--text);
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--console-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
}

.channel-menu > button {
  color: var(--text);
}

.channel-menu small {
  color: var(--console-muted);
}

.app-sidebar {
  color: #dbe3ec;
}

.sidebar-brand small,
.sidebar-foot small {
  color: #9aabbd;
}

/* ── 9. 新增 FlareSolverr 面板的少量排版收尾（不改动业务 id / 类名） ───── */

#tab-flarecfg {
  min-width: 0;
}

#tab-flarecfg .hint {
  overflow-wrap: anywhere;
}

#tab-flarecfg .hint code {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 12px;
  vertical-align: baseline;
}

#tab-flarecfg fieldset {
  margin-bottom: 2px;
}

#tab-flarecfg input[type="number"] {
  max-width: 220px;
}

/* 新增组件的自有隐藏规则（本文件没有全局 .hidden） */
.flare-cfg-result.hidden {
  display: none;
}

/* ── 10. 响应式：≤1180px 与 ≤720px 不溢出 ─────────────────────────────── */

@media (max-width: 1180px) {
  header {
    padding: 12px 16px;
  }

  .stats {
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
  }

  .brand {
    flex: 1 1 240px;
  }

  .stats .pill {
    padding: 3px 9px;
  }

  #tab-flarecfg .row button {
    flex: 0 0 auto;
  }
}

@media (max-width: 720px) {
  header {
    padding: 11px 13px;
    gap: 9px;
  }

  .brand {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .brand h1 {
    font-size: 18px;
  }

  .stats {
    width: 100%;
    justify-content: flex-start;
    border-radius: var(--radius-lg);
  }

  .stats .pill {
    flex: 0 0 auto;
    padding: 3px 9px;
    font-size: 11px;
  }

  #tab-flarecfg .hint {
    font-size: 12px;
    line-height: 1.6;
  }

  #tab-flarecfg .hint code {
    padding: 4px 8px;
    font-size: 11px;
  }

  #tab-flarecfg input[type="number"] {
    max-width: none;
  }

  #tab-flarecfg .row {
    gap: 8px;
  }

  #tab-flarecfg .row button {
    flex: 1 1 auto;
    min-width: 132px;
  }

  #tab-flarecfg fieldset {
    padding: 11px 12px;
  }

  .table-scroll {
    border-radius: var(--radius-md);
  }
}

/* ── 11. 动效偏好：关闭位移与铃铛动画 ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  button,
  input,
  select,
  textarea {
    transition: none;
  }

  button:hover:not(:disabled),
  button:active:not(:disabled) {
    transform: none;
    box-shadow: none;
  }

  .bell {
    animation: none;
    transform: none;
  }
}

/* ───────────────────────────────────────────────────────────────
   2026-10-11：行内「补RT」按钮的结果态
   app.js 会给补 RT 按钮切换 operation-ok / operation-warn / operation-error
   （成功 / 拿到凭证但没 RT / 失败），但此前这三个类没有任何样式，
   用户点完「补RT」完全看不到反馈。这里按主题的 ok / warn / bad 三态补齐，
   3~4 秒后由 JS 自动移除。
   ─────────────────────────────────────────────────────────────── */
#regTable button.operation-ok,
.reg-actions button.operation-ok {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

#regTable button.operation-warn,
.reg-actions button.operation-warn {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
}

#regTable button.operation-error,
.reg-actions button.operation-error {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

/* 结果态常常发生在按钮被禁用（刚点过）期间，别让通用 disabled 的透明度把它压暗 */
#regTable button.operation-ok:disabled,
#regTable button.operation-warn:disabled,
#regTable button.operation-error:disabled,
.reg-actions button.operation-ok:disabled,
.reg-actions button.operation-warn:disabled,
.reg-actions button.operation-error:disabled {
  opacity: 1;
}

/* ───────────────────────────────────────────────────────────────
   2026-10-11：注册任务页内联的「Cloudflare 破限」折叠面板

   破限是注册能不能跑起来的前置条件，所以从设置页搬到了注册任务页，
   做成默认折叠的 <details>：不占地，但一眼能看到开没开。
   ─────────────────────────────────────────────────────────────── */
.flare-inline-panel {
  margin: 10px 0 4px;
  padding: 0;
  background: var(--surface-soft, rgba(249, 251, 254, 0.8));
  border: 1px solid var(--console-line, #dfe6ee);
  border-left: 3px solid var(--console-primary, #337ecc);
  border-radius: var(--radius-md, 8px);
}

.flare-inline-panel[open] {
  padding-bottom: 10px;
  background: var(--surface-strong, rgba(255, 255, 255, 0.97));
}

.flare-inline-panel > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-md, 8px);
  user-select: none;
}

.flare-inline-panel > summary::-webkit-details-marker { display: none; }

.flare-inline-panel > summary::before {
  content: "▸";
  color: var(--console-primary, #337ecc);
  font-size: 11px;
  transition: transform 160ms ease;
}

.flare-inline-panel[open] > summary::before {
  transform: rotate(90deg);
}

.flare-inline-panel > summary:hover {
  background: var(--console-primary-soft, #ecf5ff);
}

.flare-inline-panel > summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus, rgba(51, 126, 204, 0.34));
}

.flare-inline-title { flex: 0 0 auto; }

/* 状态徽标：收起时也能看出破限到底开没开 */
.flare-inline-state {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flare-inline-state.off {
  color: var(--console-muted, #6b7789);
  background: rgba(107, 119, 137, 0.12);
}

.flare-inline-state.on {
  color: #fff;
  background: var(--ok, #2f7d4f);
}

.flare-inline-panel .hint {
  margin: 0 12px 8px;
}

.flare-inline-panel .form {
  margin: 0 12px;
}

.flare-inline-panel .hint code {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  vertical-align: bottom;
}

.flare-inline-panel code {
  word-break: break-all;
}

/* 清缓存按钮跟在一段说明文字里，做小一点，别抢主按钮的视觉权重 */
.flare-inline-panel .hint button {
  margin-left: 6px;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: var(--radius-sm, 6px);
}

@media (max-width: 720px) {
  .flare-inline-state { max-width: 45%; }
  .flare-inline-panel .row { flex-direction: column; align-items: stretch; }
}

/* ══════════════════════════════════════════════════════════════════════════
   更新日志页（1.0.4 新增）
   ══════════════════════════════════════════════════════════════════════════ */

.changelog-panel { display: flex; flex-direction: column; gap: 14px; }

.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  font-size: 13px;
  color: var(--muted);
}
.changelog-meta .cl-version b {
  color: var(--pink);
  font-size: 16px;
  letter-spacing: 0.4px;
}
.changelog-meta .cl-next {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--pink-light);
  color: var(--pink-dark);
}
.changelog-meta .cl-count { margin-left: auto; }

.changelog-list { display: flex; flex-direction: column; gap: 16px; }

.cl-release {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.cl-release.current { border-left-color: var(--pink); }

.cl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}
.cl-ver {
  font-size: 17px;
  font-weight: 700;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
}
.cl-rel-title { font-weight: 600; color: var(--text); }
.cl-rel-date { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.cl-badge {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.cl-body { padding: 6px 16px 14px; }

.cl-section { padding: 10px 0; }
.cl-section + .cl-section { border-top: 1px dashed var(--border); }

.cl-kind {
  display: inline-block;
  min-width: 44px;
  margin-bottom: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  border: 1px solid transparent;
}
.cl-kind-feat { background: #e8f6ee; color: #1f7a4d; border-color: #bfe6d1; }
.cl-kind-fix  { background: #fdecec; color: #b03535; border-color: #f6cccc; }
.cl-kind-perf { background: #eaf1fd; color: #22539c; border-color: #c9dbf7; }
.cl-kind-ui   { background: #f3ecfd; color: #6a3fae; border-color: #ddcdf6; }
.cl-kind-note { background: #f2f4f7; color: #5b6875; border-color: #dde3ea; }

.cl-items {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cl-items li {
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--text);
}
.cl-items li b { color: var(--pink-dark); }

/* 深色主题下的标签对比度 */
html[data-theme="tech"] .cl-kind-feat { background: rgba(52,211,153,.16); color: #6ee7b7; border-color: rgba(52,211,153,.34); }
html[data-theme="tech"] .cl-kind-fix  { background: rgba(248,113,113,.16); color: #fca5a5; border-color: rgba(248,113,113,.34); }
html[data-theme="tech"] .cl-kind-perf { background: rgba(129,140,248,.16); color: #a5b4fc; border-color: rgba(129,140,248,.34); }
html[data-theme="tech"] .cl-kind-ui   { background: rgba(167,139,250,.16); color: #c4b5fd; border-color: rgba(167,139,250,.34); }
html[data-theme="tech"] .cl-kind-note { background: rgba(148,163,184,.16); color: #cbd5e1; border-color: rgba(148,163,184,.34); }
html[data-theme="tech"] .cl-items li b { color: #67e8f9; }
html[data-theme="terminal"] .cl-items li b { color: #00ff9c; }
html[data-theme="terminal"] .cl-badge { background: #00ff9c; color: #000; }

/* 日志档位标签（工具栏里那个「档位」字样的颜色） */
.log-stats { font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════════════════════════════════
   凭证探活（1.0.4 新增）
   ══════════════════════════════════════════════════════════════════════════ */

.verify-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.verify-status.ok      { background: #e8f6ee; color: #1f7a4d; border-color: #bfe6d1; }
.verify-status.bad     { background: #fdecec; color: #b03535; border-color: #f6cccc; }
.verify-status.warn    { background: #fdf4e3; color: #96631a; border-color: #f2ddb4; }
.verify-status.unchecked { background: #f2f4f7; color: #6b7789; border-color: #dde3ea; }

.verify-stats {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.verify-stats.bad { color: var(--bad); font-weight: 600; }

button.verify-one-btn,
button.verify-btn {
  border: 1px solid var(--border);
  background: var(--surface-strong);
}
button.verify-one-btn:hover,
button.verify-btn:hover { border-color: var(--pink); color: var(--pink-dark); }

/* 深色主题下的探活标签对比度 */
html[data-theme="tech"] .verify-status.ok      { background: rgba(52,211,153,.16); color: #6ee7b7; border-color: rgba(52,211,153,.34); }
html[data-theme="tech"] .verify-status.bad     { background: rgba(248,113,113,.16); color: #fca5a5; border-color: rgba(248,113,113,.34); }
html[data-theme="tech"] .verify-status.warn    { background: rgba(251,191,36,.16); color: #fcd34d; border-color: rgba(251,191,36,.34); }
html[data-theme="tech"] .verify-status.unchecked { background: rgba(148,163,184,.16); color: #cbd5e1; border-color: rgba(148,163,184,.34); }
html[data-theme="terminal"] .verify-status.ok  { background: rgba(0,255,156,.14); color: #00ff9c; }
html[data-theme="terminal"] .verify-status.bad { background: rgba(255,77,77,.16); color: #ff8080; }

/* 接码状态：登录会话过期（1.0.41 新增）—— 账号没毛病，只是会话过期，用中性色区分 */
.phone-status.session_expired {
  background: #fdf4e3;
  color: #96631a;
  border-color: #f2ddb4;
}

/* 试用 / 折扣活动徽标（1.0.41）—— 跟在「账号资格」后面 */
.promo-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.promo-badge.go   { background: #e8f6ee; color: #1f7a4d; border-color: #bfe6d1; }
.promo-badge.plus { background: #fdf0e4; color: #9a6018; border-color: #f2ddb4; }
html[data-theme="tech"] .promo-badge.go   { background: rgba(52,211,153,.16); color: #6ee7b7; border-color: rgba(52,211,153,.34); }
html[data-theme="tech"] .promo-badge.plus { background: rgba(251,191,36,.16); color: #fcd34d; border-color: rgba(251,191,36,.34); }

/* alert-banner 错误变体（1.0.41）—— 号池 critical 时用红色 */
.alert-banner.err {
  background: linear-gradient(135deg, #fce4e4, #ffeaea);
  border-bottom-color: #c0392b;
  color: #8a2020;
}
.alert-banner.err::before { content: "🛑 "; }
.alert-banner.warn {
  background: linear-gradient(135deg, #fdf4e3, #fff9e6);
  border-bottom-color: #e67e22;
  color: #8a5a10;
}
.alert-banner.warn::before { content: "⚠️ "; }

/* 顶部常驻号池信息（1.0.41）—— 跟着导航栏右侧 */
.pool-header-info {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pool-header-info.ok      { background: #e8f6ee; color: #1f7a4d; }
.pool-header-info.warning { background: #fdf4e3; color: #96631a; }
.pool-header-info.critical{ background: #fce4e4; color: #8a2020; }
html[data-theme="tech"] .pool-header-info.ok       { background: rgba(52,211,153,.16); color: #6ee7b7; }
html[data-theme="tech"] .pool-header-info.warning  { background: rgba(251,191,36,.16); color: #fcd34d; }
html[data-theme="tech"] .pool-header-info.critical { background: rgba(248,113,113,.16); color: #fca5a5; }

/* ── 运行记录：失败分类统计（1.0.41 稳定性建议 #6）────────────────────── */
.run-category-stats { margin: 0 0 12px; }
.run-cat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.run-cat-total {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}
.run-cat-total b { color: var(--text); }
.run-cat-stat {
  display: inline-flex;
  flex-direction: column;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 11px;
  line-height: 1.35;
}
.run-cat-stat b { font-size: 11px; }
.run-cat-stat span { opacity: .8; }
.run-cat-stat.network   { background: #fdeee6; color: #9a4a1c; border-color: #f6d5c2; }
.run-cat-stat.account   { background: #fce4e4; color: #8a2020; border-color: #f2c9c9; }
.run-cat-stat.transient { background: #fdf4e3; color: #96631a; border-color: #f2ddb4; }
.run-cat-stat.unknown   { background: #eceff3; color: #55606e; border-color: #d8dee6; }
html[data-theme="tech"] .run-cat-stat.network   { background: rgba(251,146,60,.16);  color: #fdba74; border-color: rgba(251,146,60,.32); }
html[data-theme="tech"] .run-cat-stat.account   { background: rgba(248,113,113,.16); color: #fca5a5; border-color: rgba(248,113,113,.32); }
html[data-theme="tech"] .run-cat-stat.transient { background: rgba(251,191,36,.16);  color: #fcd34d; border-color: rgba(251,191,36,.32); }
html[data-theme="tech"] .run-cat-stat.unknown   { background: rgba(148,163,184,.16); color: #cbd5e1; border-color: rgba(148,163,184,.32); }

/* 表格里的分类小标签 */
.run-cat-chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.run-cat-chip.none      { color: var(--muted); background: transparent; }
.run-cat-chip.network   { background: #fdeee6; color: #9a4a1c; }
.run-cat-chip.account   { background: #fce4e4; color: #8a2020; }
.run-cat-chip.transient { background: #fdf4e3; color: #96631a; }
.run-cat-chip.unknown   { background: #eceff3; color: #55606e; }
html[data-theme="tech"] .run-cat-chip.network   { background: rgba(251,146,60,.18);  color: #fdba74; }
html[data-theme="tech"] .run-cat-chip.account   { background: rgba(248,113,113,.18); color: #fca5a5; }
html[data-theme="tech"] .run-cat-chip.transient { background: rgba(251,191,36,.18);  color: #fcd34d; }
html[data-theme="tech"] .run-cat-chip.unknown   { background: rgba(148,163,184,.18); color: #cbd5e1; }
