/* ============================================================
   心跳漫步 · 提链工作台
   深石板底 + 暖琥珀主色 + 玻璃质感
   ============================================================ */

:root {
  color-scheme: dark;  /* 强制 select/滚动条/原生控件使用深色 UI（含弹出层） */
  /* 主色 */
  --bg-0: #0f1419;
  --bg-1: #161b22;
  --bg-2: #1a2128;
  --bg-3: #222a35;
  --surface: rgba(28, 35, 44, 0.72);
  --surface-strong: rgba(34, 42, 53, 0.92);
  --border: rgba(245, 158, 11, 0.14);
  --border-strong: rgba(245, 158, 11, 0.32);
  /* 文字 */
  --text-0: #f5f1ea;
  --text-1: #d6cec1;
  --text-2: #9c948a;
  --text-3: #6e655c;
  /* 品牌/状态 */
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --amber-glow: rgba(245, 158, 11, 0.32);
  --amber-soft: rgba(245, 158, 11, 0.08);
  --teal: #14b8a6;
  --coral: #f87171;
  --slate: #5b6cdb;
  /* 间距 */
  --gap-1: 6px;
  --gap-2: 10px;
  --gap-3: 14px;
  --gap-4: 18px;
  --gap-5: 24px;
  --radius-1: 6px;
  --radius-2: 10px;
  --radius-3: 14px;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 28px rgba(245, 158, 11, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: ui-sans-serif, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.01em;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(245, 158, 11, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
}

/* ============================================================
   背景：极光 + 网格
   ============================================================ */
.bg-aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
  transition: transform 0.12s linear;
}
.orb-1 {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, var(--amber), transparent 70%);
  top: -180px;
  right: -120px;
}
.orb-2 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #6e3b9e, transparent 70%);
  bottom: -200px;
  left: -100px;
  opacity: 0.35;
}
.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--teal), transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.18;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 20, 25, 0.92), rgba(15, 20, 25, 0.6));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar-left { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-0);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), #c45c1a);
  color: #1a120a;
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.brand-mark.small {
  width: 22px;
  height: 22px;
  font-size: 12px;
  border-radius: 7px;
}
.brand-mark i {
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}
.brand b {
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--amber), #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand small {
  display: block;
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.12em;
  margin-top: 1px;
}
.subnav { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid var(--border); }
.subnav-link {
  padding: 5px 12px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  color: var(--text-1);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: all 0.18s ease;
}
.subnav-link:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  transform: translateY(-1px);
}


/* ============================================================
   主工作区
   ============================================================ */
.workspace {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-3);
  padding: 16px 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-1);
  position: relative;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.4;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-heading.tight {
  margin-bottom: 8px;
}
.panel-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-0);
  text-transform: uppercase;
}
.panel-heading .quiet {
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--amber), #c45c1a);
  color: #1a120a;
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.hint-muted { color: var(--text-2); font-size: 11px; letter-spacing: 0.04em; }

/* ============================================================
   渠道网格（顶部，2 行）
   ============================================================ */
.rail-panel { padding: 14px 18px; }
.rail-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  background: rgba(28, 35, 44, 0.4);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  overflow: hidden;
}
.rail input { position: absolute; opacity: 0; pointer-events: none; }
.rail-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
}
.rail b {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-0);
  line-height: 1.2;
}
.rail small {
  font-size: 10px;
  color: var(--text-2);
  line-height: 1.3;
}
.rail:hover {
  border-color: var(--amber);
  transform: translateY(-1px);
  background: rgba(245, 158, 11, 0.06);
}
.rail.active {
  border-color: var(--amber);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(196, 92, 26, 0.08));
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.rail.active::after {
  content: "";
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}
.rail.active b { color: var(--amber-2); }
.rail-hint {
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ============================================================
   账号与代理（2 列）
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr);
  gap: 14px;
  padding: 14px 18px;
}
.token-block, .accounts-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#token {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}
.accounts-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.accounts-summary > div {
  padding: 8px 6px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: rgba(28, 35, 44, 0.4);
  text-align: center;
}
.accounts-summary small {
  display: block;
  font-size: 9px;
  color: var(--text-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.accounts-summary b {
  font-size: 16px;
  color: var(--text-0);
  font-weight: 700;
}
.batch-ok { color: var(--teal) !important; }
.batch-fail { color: var(--coral) !important; }
.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: none;
  overflow-y: visible;
  padding: 6px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.4);
  font-size: 12px;
  color: var(--text-1);
}
.accounts-list .empty-log {
  color: var(--text-3);
  text-align: center;
  padding: 14px 8px;
}
.accounts-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.ghost-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.18s ease;
}
.ghost-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}

/* ============================================================
   代理池（左右 50/50）
   ============================================================ */
.proxy-panel { padding: 14px 18px; }
.proxy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.proxy-grid.single {
  grid-template-columns: minmax(0, 1fr);
}
.proxy-pool-input {
  min-height: 130px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}
.proxy-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* ============================================================
   表单字段通用
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span {
  font-size: 11px;
  color: var(--text-1);
  letter-spacing: 0.06em;
}
.field small {
  font-size: 10px;
  color: var(--text-2);
  margin-left: 6px;
}
textarea, input, select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.6);
  color: var(--text-0);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
textarea:focus, input:focus, select:focus {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
textarea::placeholder, input::placeholder {
  color: var(--text-3);
}
select {
  color-scheme: dark;
  background-color: #151b22;
  color: #f5f1ea;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23f59e0b' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  padding-right: 30px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
select option,
select optgroup {
  background-color: #151b22;
  color: #f5f1ea;
}
select option:checked,
select option:hover {
  background-color: #5b4930;
  color: #fff7e0;
}
.field-note {
  font-size: 11px;
  color: var(--text-2);
}

/* ============================================================
   选项面板
   ============================================================ */
.options-panel { padding: 14px 18px; }
.options-row {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-1);
  background: rgba(28, 35, 44, 0.4);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { font-size: 12px; color: var(--text-0); display: block; }
.choice small { font-size: 10px; color: var(--text-2); }
.choice:hover { border-color: var(--amber); }
.choice.active {
  border-color: var(--amber);
  background: var(--amber-soft);
}
.choice.active b { color: var(--amber-2); }
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.toggles-row {
  display: grid;
  grid-template-columns: 24px 1fr 24px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.4);
  margin-bottom: 10px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; }
.switch span {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.switch span::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: var(--text-2);
  border-radius: 50%;
  transition: all 0.2s ease;
}
.switch input:checked + span {
  background: rgba(245, 158, 11, 0.6);
}
.switch input:checked + span::before {
  left: 19px;
  background: var(--amber);
}
.toggles-row b { font-size: 13px; color: var(--text-0); display: block; margin-bottom: 2px; }
.toggles-row small { font-size: 11px; color: var(--text-2); }
.inline-note { font-size: 11px; color: var(--text-2); margin: 4px 0 0; }
.region-auto-hint {
  font-size: 11px;
  color: var(--amber-2);
  margin: -4px 0 10px;
  padding-left: 6px;
  border-left: 2px solid var(--amber);
}
.conditional-fields { margin-top: 8px; }
.conditional-fields[hidden] { display: none; }
.optional-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-2);
  font-size: 9px;
  margin-left: 6px;
}
.block-tags { display: flex; gap: 8px; }
.local-save-tag, .required-tag {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.local-save-tag {
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}
.required-tag {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-2);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ============================================================
   行动按钮
   ============================================================ */
.actions-row:not([hidden]) {
  display: flex;
  gap: 10px;
  align-items: center;
}
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-1);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  font-family: inherit;
}
.primary-button {
  background: linear-gradient(135deg, var(--amber), #c45c1a);
  color: #1a120a;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 36px var(--amber-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.primary-button:active { transform: translateY(0); }
.primary-button i {
  font-style: normal;
  transition: transform 0.2s ease;
}
.primary-button:hover i { transform: translateX(3px); }
.secondary-button {
  background: rgba(28, 35, 44, 0.6);
  border: 1px solid var(--border);
  color: var(--text-1);
}
.secondary-button:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}
.primary-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   日志面板（底部）
   ============================================================ */
.progress-value {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  color: var(--amber);
  font-weight: 700;
}
.progress-track {
  height: 4px;
  background: rgba(28, 35, 44, 0.6);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--teal));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-stage {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.progress-stage #progressStage { color: var(--text-0); font-weight: 600; }
/* ============================================================
   状态徽章
   ============================================================ */
.status-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status-badge.idle {
  background: rgba(110, 101, 92, 0.2);
  color: var(--text-2);
  border: 1px solid rgba(110, 101, 92, 0.3);
}
.status-badge.running {
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: pulse 1.6s ease-in-out infinite;
}
.status-badge.done {
  background: rgba(20, 184, 166, 0.16);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.4);
}
.status-badge.error {
  background: rgba(248, 113, 113, 0.16);
  color: var(--coral);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

/* ============================================================
   结果面板
   ============================================================ */

/* ============================================================
   页脚
   ============================================================ */
footer {
  position: relative;
  z-index: 1;
  padding: 22px 24px 36px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-2);
}
footer .brand-mark { vertical-align: middle; margin-right: 8px; }
footer b { color: var(--text-1); margin-right: 6px; }
footer small { color: var(--text-3); }
footer p { font-size: 11px; margin-top: 6px; color: var(--text-3); }

/* ============================================================
   响应式（小屏回退）
   ============================================================ */
@media (max-width: 1100px) {
  .rail-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .grid-2, .proxy-grid, .options-grid, .toggles-row { grid-template-columns: minmax(0, 1fr); }
  .toggles-row { grid-template-columns: 24px 1fr; }
  .rail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   滚动条
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(245, 158, 11, 0.5); }

/* ============================================================
   旧元素（（背景噪声纸保留透明）
   ============================================================ */
.paper-noise { display: none; }

/* ============================================================
   顶栏：24 格小时热力图 + 统计卡
   ============================================================ */
.hour-grid {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.4);
}
.hour-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: rgba(252, 211, 77, 0.5);
  border: 1px solid rgba(252, 211, 77, 0.75);
  transition: all 0.2s ease;
  position: relative;
}
.hour-cell.has-success {
  background: var(--teal);
  box-shadow: 0 0 6px rgba(20, 184, 166, 0.4);
}
.hour-cell.is-current {
  border: 1px solid var(--amber);
  background: var(--amber-soft);
}
.hour-cell.is-current.has-success {
  background: var(--teal);
  border-color: var(--teal);
}
.hour-cell:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  color: var(--text-1);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.stat-card {
  display: grid;
  grid-template-columns: 1fr;
  padding: 8px 14px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.5);
  min-width: 130px;
  gap: 2px;
}
.stat-card .stat-num {
  font-family: ui-monospace, monospace;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-card .stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.08em;
}
.stat-card .stat-sub {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-3);
  border-top: 1px dashed var(--border);
  padding-top: 4px;
  margin-top: 2px;
}
.stat-card .stat-sub b { color: var(--text-1); font-weight: 600; }
.stat-success { border-left: 2px solid var(--teal); }
.stat-success .stat-num { color: var(--teal); }
.stat-inflight { border-left: 2px solid var(--amber); }
.stat-inflight .stat-num { color: var(--amber); }

/* ============================================================
   渠道品牌图标（真实品牌配色 SVG）
   ============================================================ */
.rail-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 35, 44, 0.4);
  border: 1px solid var(--border);
  padding: 4px;
  color: var(--text-1);
}
.rail-icon svg { width: 100%; height: 100%; display: block; }
.ic-hosted { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.ic-ph { background: rgba(0, 56, 168, 0.15); }
.ic-paypal { color: #003087; background: #fff; border-color: rgba(0, 48, 135, 0.4); }
.ic-ideal { color: #cc0066; background: rgba(204, 0, 102, 0.12); }
.ic-upi { color: #097939; background: rgba(9, 121, 57, 0.12); }
.ic-pix { color: #32bcad; background: rgba(50, 188, 173, 0.12); }
.ic-momo { color: #a50064; background: rgba(165, 0, 100, 0.12); }
.ic-gcash { color: #0073e6; background: rgba(0, 115, 230, 0.12); }
.ic-kakao { color: #ffe600; background: rgba(255, 230, 0, 0.16); }
.ic-gopay { color: #00aa13; background: rgba(0, 170, 19, 0.12); }
.ic-card { color: #1a73e8; background: rgba(26, 115, 232, 0.12); }
.ic-grab { color: #00b14f; background: rgba(0, 177, 79, 0.12); }
.ic-twint { color: #009ee3; background: rgba(0, 158, 227, 0.12); }
.ic-blik { color: #e8023a; background: rgba(232, 2, 58, 0.12); }

/* ============================================================
   顶栏响应式
   ============================================================ */
@media (max-width: 1180px) {
  .hour-grid { display: none; }
}
@media (max-width: 880px) {
  .stat-card { min-width: 100px; }
  .topbar-left { flex-direction: column; align-items: flex-start; gap: 6px; }
  .subnav { border-left: none; padding-left: 0; }
}

/* ============================================================
   B 区域：Token 解析按钮组
   ============================================================ */
.token-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.token-actions .primary-button,
.token-actions .secondary-button {
  padding: 6px 12px;
  font-size: 12px;
}
.token-actions .primary-button i { font-style: normal; }
.token-stats {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.5);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-2);
}
.token-stats b { color: var(--text-1); font-weight: 600; min-width: 14px; text-align: center; }
.token-stats small { color: var(--text-3); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.header-stage {
  font-size: 11px;
  color: var(--text-2);
  padding: 5px 10px;
  border-radius: var(--radius-1);
  background: rgba(15, 20, 25, 0.3);
  border: 1px solid var(--border);
  margin: 4px 0 2px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.header-stage > span:first-child { color: var(--text-1); font-weight: 600; }
.progress-track.slim { height: 4px; margin: 0 0 8px; }

/* ============================================================
   C 区域：账号卡片
   ============================================================ */
.account-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(28, 35, 44, 0.5), rgba(20, 25, 32, 0.5));
  transition: border-color 0.2s ease, background 0.2s ease;
}
.account-card.is-running { border-color: var(--amber); background: rgba(245, 158, 11, 0.04); }
.account-card.is-done { border-color: var(--teal); background: rgba(20, 184, 166, 0.06); }
.account-card.is-error { border-color: var(--coral); background: rgba(248, 113, 113, 0.06); }
.account-card.is-cancelled { opacity: 0.6; border-style: dashed; }

.account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-idx {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(15, 20, 25, 0.7);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-2); flex-shrink: 0;
}
.account-card.is-running .account-idx { background: var(--amber); color: #0f1419; border-color: var(--amber); }
.account-card.is-done .account-idx { background: var(--teal); color: #0f1419; border-color: var(--teal); }
.account-card.is-error .account-idx { background: var(--coral); color: #0f1419; border-color: var(--coral); }

.account-email {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-plan {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}
.account-plan.free { background: rgba(148, 163, 184, 0.12); color: var(--text-2); border-color: rgba(148, 163, 184, 0.25); }
.account-plan.plus { background: rgba(245, 158, 11, 0.15); color: var(--amber); border-color: rgba(245, 158, 11, 0.3); }
.account-plan.team { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.3); }

.account-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  flex-shrink: 0;
}
.account-status.queued { color: var(--text-3); border: 1px solid var(--text-3); }
.account-status.running { color: var(--amber); background: rgba(245, 158, 11, 0.1); border: 1px solid var(--amber); }
.account-status.done { color: var(--teal); background: rgba(20, 184, 166, 0.12); border: 1px solid var(--teal); }
.account-status.error { color: var(--coral); background: rgba(248, 113, 113, 0.12); border: 1px solid var(--coral); }
.account-status.cancelled { color: var(--text-3); border: 1px dashed var(--text-3); }

.account-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-3);
  align-items: center;
}
.account-meta b { color: var(--text-1); font-weight: 500; }
.account-meta .channel-tag {
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  font-size: 10px;
}

.account-artifact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  background: rgba(15, 20, 25, 0.45);
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
}
.account-artifact.hidden { display: none; }
.account-artifact-text {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.account-artifact-url {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--teal);
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 4px;
  padding: 6px 8px;
  word-break: break-all;
  user-select: all;
  max-height: 60px;
  overflow-y: auto;
}
.account-artifact-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.account-artifact-actions a, .account-artifact-actions button {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.account-artifact-actions a:hover, .account-artifact-actions button:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}
.account-artifact-qr {
  width: 110px; height: 110px;
  background: #fff;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.account-artifact-qr canvas, .account-artifact-qr img { width: 100px; height: 100px; image-rendering: pixelated; }

.account-log {
  display: none;
  flex-direction: column;
  gap: 2px;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--text-2);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  padding: 6px 8px;
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid var(--border);
}
.account-log.shown { display: flex; }
.account-log-line { display: flex; gap: 6px; }
.account-log-time { color: var(--text-3); flex-shrink: 0; }
.account-log-error { color: var(--coral); }
.account-log-success { color: var(--teal); }
.account-log-major { color: var(--amber-2); font-weight: 600; }

.account-toggle-log {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
}
.account-toggle-log:hover { color: var(--amber); border-color: var(--amber); }

.account-progress {
  height: 3px;
  background: rgba(15, 20, 25, 0.5);
  border-radius: 2px;
  overflow: hidden;
}
.account-progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #fb923c);
  width: 0%;
  transition: width 0.3s ease;
}
.account-card.is-done .account-progress > i { background: var(--teal); }
.account-card.is-error .account-progress > i { background: var(--coral); }
/* 释放任务按钮（meta 行内，珊瑚色） */
.account-release {
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
  color: var(--coral);
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.account-release:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: var(--coral);
}
.account-release:disabled { opacity: 0.6; cursor: wait; }
/* 代理测试按钮（琥珀色描边） */
.proxy-test-btn {
  margin-left: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-1);
  border: 1px solid var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.proxy-test-btn:hover { background: var(--amber); color: #0f1419; }
.proxy-test-btn:disabled { opacity: 0.5; cursor: wait; }

/* 代理测试结果区 */
.proxy-test-result {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(15, 20, 25, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-1);
}
.proxy-test-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.proxy-test-header > span:first-child { color: var(--text-1); flex: 1; }
.proxy-test-header b { color: var(--text-0); font-weight: 600; }
.proxy-test-stats { display: inline-flex; gap: 8px; }
.proxy-test-stat {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.proxy-test-stat.ok { background: rgba(20, 184, 166, 0.15); color: var(--teal); }
.proxy-test-stat.fail { background: rgba(248, 113, 113, 0.15); color: var(--coral); }
.mini-btn {
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.mini-btn:hover { color: var(--amber); border-color: var(--amber); }

.proxy-test-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.proxy-test-item {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 4px;
  border-left: 3px solid var(--text-3);
  background: rgba(15, 20, 25, 0.4);
  font-size: 11px;
  font-family: ui-monospace, monospace;
}
.proxy-test-item.ok { border-left-color: var(--teal); }
.proxy-test-item.fail { border-left-color: var(--coral); }
.proxy-test-idx { color: var(--text-3); }
.proxy-test-host { color: var(--text-1); font-weight: 600; }
.proxy-test-detail { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxy-test-latency { color: var(--text-3); font-size: 10px; }
/* 危险 ghost 按钮（清空全部锁） */
.ghost-btn.danger {
  color: var(--coral);
  border-color: rgba(248, 113, 113, 0.4);
}
.ghost-btn.danger:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--coral);
}
.ghost-btn.danger:disabled { opacity: 0.5; cursor: wait; }
/* 账号队列中间的操作按钮区 */
.batch-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 4px;
}
.batch-controls {
  flex-wrap: wrap;  /* 按钮多时换行不挤 */
  gap: 10px;
}
.batch-controls .primary-button,
.batch-controls .secondary-button {
  padding: 10px 22px;
  font-size: 14px;
}
.batch-controls .ghost-btn {
  padding: 8px 14px;  /* 辅助按钮稍小 */
  font-size: 13px;
  margin-left: auto;  /* 第一个复制按钮贴右侧 */
}
.batch-controls .ghost-btn.danger {
  margin-left: 0;  /* 紧随其后 */
}
.batch-controls .secondary-button {
  background: rgba(248,248,248,0.04);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-1);
}
.batch-controls .secondary-button:hover {
  background: rgba(248,113,113,0.08);
  border-color: var(--coral);
  color: var(--coral);
}

