/* ═══════════════════════════════════════════════════════════════
   Sky 自动化控制台 — 样式表
   双主题: Island Dark / Island Light (JetBrains)
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 主题切换时禁用所有过渡，防止闪烁 ── */
html.no-transition *,
html.no-transition *::before,
html.no-transition *::after {
  transition-duration: 0s !important;
}

/* ━━━━━━━━━━ Island Dark Beta (默认) ━━━━━━━━━━ */
:root, [data-theme="dark"] {
  --bg-base: #1e1f22;
  --bg-card: #2b2d30;
  --bg-inner: #313335;
  --bg-hover: #3c3f41;
  --border: #43454a;
  --border-dim: #393b40;
  --text: #bcbec4;
  --text-dim: #6f737a;
  --text-muted: #5a5d63;
  --text-bright: #dfe1e5;
  --accent: #5c8ed6;
  --accent2: #4d78cc;
  --accent-glow: rgba(77,120,204,.2);
  --success: #57a64a;
  --error: #f75464;
  --warn: #e5c07b;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "JetBrains Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, "Noto Sans Mono CJK SC", monospace;
  --shadow-card: 0 1px 3px rgba(0,0,0,.3);
  --shadow-popup: 0 8px 24px rgba(0,0,0,.45);
  /* compat aliases for JS inline styles */
  --glass-border: var(--border-dim);
  --glass: var(--bg-card);
  --glass-hover: var(--bg-hover);
}

/* ━━━━━━━━━━ Island Light Beta ━━━━━━━━━━ */
[data-theme="light"] {
  --bg-base: #f7f8fa;
  --bg-card: #ffffff;
  --bg-inner: #f0f1f2;
  --bg-hover: #e8eaed;
  --border: #d1d3d8;
  --border-dim: #e4e6ea;
  --text: #3d3f43;
  --text-dim: #6f737a;
  --text-muted: #9ca0a8;
  --text-bright: #1e1f22;
  --accent: #1a7dc4;
  --accent2: #2687d0;
  --accent-glow: rgba(26,125,196,.15);
  --success: #2da44e;
  --error: #cf222e;
  --warn: #bf8700;
  --shadow-card: 0 1px 3px rgba(0,0,0,.08);
  --shadow-popup: 0 8px 24px rgba(0,0,0,.12);
  --glass-border: var(--border-dim);
  --glass: var(--bg-card);
  --glass-hover: var(--bg-hover);
}

html {
  font-size: 15px;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

/* ── 服务器异常告警条 ── */
.server-alert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: .84rem;
  font-weight: 500;
  gap: 8px;
  animation: _alertSlide .25s ease;
  z-index: 120;
  position: relative;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.server-alert-bar.hidden { display: none; }
.server-alert-bar.warn {
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  color: var(--warn);
}
.server-alert-bar.error {
  background: color-mix(in srgb, var(--error) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--error) 30%, transparent);
  color: var(--error);
}
.server-alert-bar span { flex: 1; }
.server-alert-bar button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: .65;
  padding: 0 4px;
  line-height: 1;
}
.server-alert-bar button:hover { opacity: 1; }
@keyframes _alertSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-base);
  transition: background .35s ease, color .35s ease;
}

/* No decorative orbs */
body::before, body::after { display: none; }

/* ── 卡片 (glass compat) ── */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.glass:hover { background: var(--bg-card); }

/* ── 布局 ── */
.app {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin-bottom: 16px;
}
.header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-bright);
}
.header h1 i { font-size: 1rem; color: var(--accent); }

/* ── 状态指示灯 ── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}
.status-dot.ok { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.fail { background: var(--error); box-shadow: 0 0 6px var(--error); }
.status-dot.loading { background: var(--warn); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ── 队列状态 ── */
.queue-badge {
  font-size: .72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
  margin-left: 8px;
  font-weight: 500;
}
.queue-badge.idle {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}

/* ── 通用小按钮 ── */
.settings-btn {
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .82rem;
  transition: all .2s ease;
}
.settings-btn:hover {
  color: var(--text-bright);
  border-color: var(--border);
  background: var(--bg-hover);
}

/* ── 主题切换按钮 ── */
.theme-toggle {
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all .2s ease;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-hover);
}

/* ── 双列网格 ── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ── 卡片 ── */
.card { padding: 20px; }
.card-title {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-bright);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-dim);
}
.card-title .icon { font-size: 1rem; }
.card-title i { font-size: .95rem; color: var(--accent); }

/* ── 账号列表 ── */
.account-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: none;
}
.account-list::-webkit-scrollbar { display: none; }

.account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s ease;
  background: var(--bg-inner);
}
.account-item:hover { background: var(--bg-hover); border-color: var(--border-dim); }
.account-item.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-inner));
}
.account-item .avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
}
.account-item .info { flex: 1; min-width: 0; }
.account-item .info .name {
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-bright);
}
.account-item .info .sub { font-size: .72rem; color: var(--text-dim); }
.account-item .actions { display: flex; gap: 4px; }
.account-item .actions button {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: .85rem;
  border-radius: 4px;
  transition: color .2s;
}
.account-item .actions button:hover { color: var(--error); }

/* ── 添加按钮 ── */
.btn-add {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: .85rem;
  transition: all .2s ease;
}
.btn-add:hover { border-color: var(--accent); color: var(--accent); }

.empty-tip {
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
  padding: 24px 0;
}

/* ── 表单 ── */
.form-group { margin-bottom: 16px; }
.form-label {
  font-size: .78rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: block;
}

select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-bright);
  font-size: .88rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
select:focus, input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
select option { background: var(--bg-card); color: var(--text); }

/* ── OTP 验证码方框 ── */
.otp-container {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.otp-box {
  width: 42px !important;
  height: 50px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0 !important;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  color: var(--text-bright);
  caret-color: var(--accent);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .1s ease;
}
.otp-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: scale(1.05);
}
.otp-box.filled {
  border-color: var(--accent);
}
@media (max-width: 380px) {
  .otp-container { gap: 5px; }
  .otp-box { width: 36px !important; height: 44px; font-size: 1.1rem; }
}

/* ── 任务列表 ── */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-inner);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.task-item:hover { background: var(--bg-hover); }
.task-item.checked {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-inner));
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* checkbox */
.task-check {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.task-item.checked .task-check {
  border-color: var(--accent);
  background: var(--accent);
}
.task-item.checked .task-check::after {
  content: '\2713';
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}
.task-info .task-name { font-size: .85rem; color: var(--text-bright); }
.task-info .task-desc { font-size: .72rem; color: var(--text-muted); }

/* ── 执行按钮 ── */
.btn-run {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}
.btn-run:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-run:active { transform: scale(.98); }
.btn-run:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}
.btn-run.running {
  background: var(--error);
}

/* ── 执行面板 ── */
.exec-panel { padding: 0; overflow: hidden; }
.exec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-dim);
}
.exec-header .card-title { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.exec-actions { display: flex; align-items: center; gap: 10px; }
.exec-timer { font-size: .75rem; color: var(--text-muted); font-family: var(--mono); }

/* ── 任务卡片轨道 ── */
.task-track {
  padding: 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  transition: all .4s ease;
  scrollbar-width: none;
}
.task-track::-webkit-scrollbar { display: none; }

.exec-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 30px 0;
  width: 100%;
  font-size: .85rem;
}

/* 单个任务卡片 */
.task-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  min-width: 180px;
  transition: all .4s ease;
  animation: cardSlideIn .4s ease;
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}
.task-card.running {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-inner));
}
.task-card.done {
  animation: cardDone .6s ease forwards;
}
@keyframes cardDone {
  0%   { opacity: 1; transform: scale(1); }
  30%  { transform: scale(1.03); }
  100% { opacity: 0; transform: scale(.95) translateX(-10px); height: 0; padding: 0; margin: 0; min-width: 0; overflow: hidden; }
}
.task-card.fail {
  border-color: color-mix(in srgb, var(--error) 40%, transparent);
  background: color-mix(in srgb, var(--error) 6%, var(--bg-inner));
}

.task-card .tc-name { font-size: .85rem; font-weight: 500; white-space: nowrap; color: var(--text-bright); }
.task-card .tc-status { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* ── 状态环 ── */
.status-ring {
  width: 34px; height: 34px;
  flex-shrink: 0;
  position: relative;
}
.status-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.status-ring .ring-bg {
  fill: none;
  stroke: var(--border-dim);
  stroke-width: 3;
}
.status-ring .ring-fg {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 3;
  stroke-dasharray: 94.25;
  stroke-dashoffset: 94.25;
  stroke-linecap: round;
  transition: stroke-dashoffset .5s ease, stroke .3s;
}
.task-card.waiting .ring-fg {
  stroke: var(--text-muted);
  stroke-dashoffset: 70;
}
.task-card.running .status-ring svg {
  animation: ringSpin 1.8s linear infinite;
}
.task-card.running .ring-fg {
  stroke: var(--accent);
  transition: stroke-dashoffset .5s ease, stroke .3s;
}
@keyframes ringSpin {
  from { transform: rotate(-90deg); }
  to   { transform: rotate(270deg); }
}
.task-card.done .status-ring svg { animation: none; transform: rotate(-90deg); }
.task-card.done .ring-fg { stroke: var(--success); stroke-dashoffset: 0; }
.task-card.fail .status-ring svg { animation: none; transform: rotate(-90deg); }
.task-card.fail .ring-fg { stroke: var(--error); stroke-dashoffset: 0; }

.status-ring .ring-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
}
.task-card.done .ring-icon { color: var(--success); animation: checkPop .4s ease .3s both; }
.task-card.fail .ring-icon { color: var(--error); }
@keyframes checkPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── 每日任务方框 ── */
.quest-container {
  padding: 0 20px 20px;
  display: flex;
  gap: 12px;
  overflow: hidden;
}
.quest-container.hidden { display: none; }

.quest-box-wrapper {
  display: flex;
  height: 72px;
  gap: 8px;
  transition: all 1.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform-origin: left center;
  flex-shrink: 0;
}
.quest-box-wrapper.completed {
  opacity: 0; width: 0; margin: 0; padding: 0;
  transform: scale(0.8) translateX(-20px);
}

.quest-name-box {
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 14px;
  min-width: 110px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-bright);
}

.quest-status-box {
  width: 72px; height: 72px;
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.quest-status-box svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.quest-status-box .ring-bg { fill: none; stroke: var(--border-dim); stroke-width: 4; }
.quest-status-box .ring-fg {
  fill: none; stroke: var(--success); stroke-width: 4;
  stroke-dasharray: 125.6; stroke-dashoffset: 125.6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease-in-out;
}
.quest-status-box.active .ring-fg { stroke-dashoffset: 0; }

.quest-status-box .check-icon {
  position: absolute; color: var(--success); font-size: 1.4rem;
  opacity: 0; transform: scale(0);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.quest-status-box.active .check-icon { opacity: 1; transform: scale(1); transition-delay: 1.5s; }

/* ── 跑图进度面板 ── */
.pickup-panel {
  padding: 0 20px 20px;
  display: flex;
  gap: 16px;
  max-height: 480px;
}
.pickup-panel.hidden { display: none; }

.pickup-scroll-wrap {
  flex: 1;
  height: 300px; max-height: 300px;
  overflow-y: auto; overflow-x: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  position: relative;
  scrollbar-width: none;
}
.pickup-scroll-wrap::-webkit-scrollbar { display: none; }
.pickup-scroll-wrap::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 36px;
  background: linear-gradient(to bottom, var(--bg-inner), transparent);
  z-index: 1; pointer-events: none;
}

.pickup-scroll {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pickup-line-box {
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pickupSlideUp 0.25s ease;
  flex-wrap: nowrap;
  min-height: 0;
}
@keyframes pickupSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.pickup-line-box .level-name {
  font-size: .78rem; font-weight: 500; color: var(--text-bright);
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pickup-line-box .fail-name { color: var(--error); }
.pickup-line-box .level-prog { font-family: var(--mono); font-size: .75rem; color: var(--text-muted); flex-shrink: 0; }
.pickup-line-box .level-stats { font-family: var(--mono); font-size: .75rem; display: flex; gap: 8px; flex-shrink: 0; }
.pickup-line-box .stat-col { color: var(--success); }
.pickup-line-box .stat-alr { color: var(--text-dim); }
.pickup-line-box.fail {
  border-color: color-mix(in srgb, var(--error) 30%, transparent);
  background: color-mix(in srgb, var(--error) 5%, var(--bg-hover));
}

/* ── 计数器 ── */
.pickup-counters {
  display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
}
.counter-divider { height: 1px; background: var(--border-dim); margin: 0 8px; }
.counter-box { padding: 14px 18px; text-align: center; min-width: 90px; }
.counter-label { font-size: .72rem; color: var(--text-muted); margin-bottom: 4px; }
.counter-value {
  font-size: 1.5rem; font-weight: 700; font-family: var(--mono);
  color: var(--text-bright); transition: transform .15s;
}
.counter-value.bounce { animation: counterBounce .4s ease; }
@keyframes counterBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3) translateY(-4px); }
  60%  { transform: scale(.95); }
  100% { transform: scale(1); }
}

/* ── 通知 ── */
.notif-overlay {
  position: fixed; top: 20px; right: 20px; z-index: 200;
  animation: notifSlideIn .4s ease;
}
.notif-overlay.hidden { display: none; }
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: none; }
}
.notif-popup {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 22px; max-width: 360px;
  box-shadow: var(--shadow-popup);
}
.notif-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.notif-body { flex: 1; }
.notif-title { font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-bright); }
.notif-text { font-size: .78rem; color: var(--text-dim); line-height: 1.5; }
.notif-btn {
  align-self: center; padding: 6px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-inner); color: var(--text);
  font-size: .78rem; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.notif-btn:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }

/* ── 结果条 ── */
.result-bar {
  padding: 12px 20px;
  border-top: 1px solid var(--border-dim);
  display: flex; align-items: center; gap: 10px; font-size: .85rem;
}
.result-bar.success { background: color-mix(in srgb, var(--success) 8%, transparent); color: var(--success); }
.result-bar.error   { background: color-mix(in srgb, var(--error) 8%, transparent); color: var(--error); }
.result-bar .icon   { font-size: 1rem; }
.result-bar.hidden  { display: none; }

/* ── 进度脉冲 ── */
.progress-wrap { overflow: hidden; border-radius: 2px; margin-top: -1px; }
.progress-wrap.hidden { display: none; }
.progress-pulse {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: progressPulse 1.5s infinite;
  border-radius: 2px;
}
@keyframes progressPulse {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── 门禁全屏遮罩 ── */
.gate-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.gate-overlay.show { opacity: 1; pointer-events: auto; }

/* ── 模态框 ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal {
  width: 90%; max-width: 420px; padding: 28px;
  position: relative; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-popup);
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.modal h2 {
  font-size: 1rem; margin-bottom: 18px; font-weight: 600;
  color: var(--text-bright); display: flex; align-items: center; gap: 8px;
}
.modal h2 i { font-size: .95rem; color: var(--accent); }
.modal .form-group { margin-bottom: 14px; }

.modal-btns { display: flex; gap: 10px; margin-top: 20px; }
.modal-btns button {
  flex: 1; padding: 10px; border-radius: var(--radius-sm);
  border: none; font-size: .85rem; cursor: pointer; transition: all .2s;
}
.modal-btns .btn-cancel {
  background: var(--bg-inner); color: var(--text-dim); border: 1px solid var(--border-dim);
}
.modal-btns .btn-cancel:hover { background: var(--bg-hover); color: var(--text); }
.modal-btns .btn-confirm {
  background: var(--accent); color: #fff;
}
.modal-btns .btn-confirm:hover { filter: brightness(1.1); }

/* ── 保存遮罩 ── */
.save-overlay {
  display: none;
  position: absolute; inset: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg-card) 95%, transparent);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.save-overlay.active { display: flex; }
.save-spinner { position: relative; width: 52px; height: 52px; }
.save-spinner svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.spin-track { stroke: var(--border-dim); }
.spin-arc {
  stroke: var(--accent); stroke-linecap: round;
  animation: spinArc 1s linear infinite; transform-origin: center;
}
@keyframes spinArc { to { transform: rotate(360deg); } }
.spin-check { opacity: 0; }
.check-bg { stroke: var(--success); }
.check-mark { stroke: var(--success); stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48; }
.save-spinner.done .spin-ring { display: none; }
.save-spinner.done .spin-check { opacity: 1; animation: popIn .35s ease; }
.save-spinner.done .check-mark { animation: drawCheck .4s ease .15s forwards; }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.save-spinner.fail .spin-ring { display: none; }
.save-spinner.fail .spin-check { opacity: 1; }
.save-spinner.fail .check-bg { stroke: var(--error); }
.save-spinner.fail .check-mark { display: none; }
.save-text { color: var(--text-dim); font-size: .85rem; }

/* ── License 输入 ── */
.license-input { display: flex; gap: 8px; }
.license-input input { flex: 1; }
.license-input button {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: none; background: var(--accent); color: #fff;
  cursor: pointer; font-weight: 600; font-size: .82rem;
  transition: all .2s;
}
.license-input button:hover { filter: brightness(1.1); }

.license-mode-row { display: flex; align-items: center; gap: 10px; }

.mode-toggle-btn {
  min-width: 74px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 12px; background: var(--bg-inner);
  color: var(--text-dim); font-size: .78rem; cursor: pointer; transition: all .2s;
}
.mode-toggle-btn.on {
  border-color: var(--success); color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, var(--bg-inner));
}

/* ── Tabs ── */
.tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  background: var(--bg-inner); border-radius: var(--radius-sm); padding: 3px;
}
.tab {
  flex: 1; padding: 8px; text-align: center; border-radius: 4px;
  cursor: pointer; font-size: .82rem; color: var(--text-dim); transition: all .2s;
}
.tab.active {
  background: var(--bg-card); color: var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

/* ── 平台选择 ── */
.platform-pick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 120px; padding: 24px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-inner);
  color: var(--text); font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.platform-pick-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-inner));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ── 安全验证 ── */
.verify-box {
  padding: 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
  margin-top: 10px;
}
.verify-url {
  width: 100%; min-height: 88px; resize: vertical;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-base); color: var(--text);
  padding: 10px 12px; font-size: .78rem; font-family: var(--mono);
  line-height: 1.35; word-break: break-all; margin-bottom: 10px;
}
.verify-actions { display: flex; gap: 10px; margin-bottom: 10px; }
.verify-actions button {
  flex: 1; border: none; border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer; font-size: .85rem; font-weight: 600;
}
.verify-meta { font-size: .8rem; color: var(--text-dim); margin-bottom: 6px; }
.verify-tip { font-size: .78rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════
   V2 布局系统 — 侧边栏 / 底部导航 / 视图
   ═══════════════════════════════════════════ */

/* ── App Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* ── 侧边栏 (桌面端) ── */
.sidebar {
  display: none;
  flex-direction: column;
  width: 220px;
  min-width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-dim);
  padding: 0;
  z-index: 100;
  position: fixed;
  top: 0; left: 0; bottom: 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
}
.sidebar-brand i { font-size: 1.15rem; color: var(--accent); }
.brand-text { flex: 1; }
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: .88rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all .18s ease;
  position: relative;
  text-align: left;
}
.nav-item i { font-size: 1.15rem; }
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.nav-unread {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--error); position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
}
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-health { display: flex; align-items: center; gap: 8px; }
.sidebar-theme-btn {
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .95rem; transition: all .2s;
}
.sidebar-theme-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ── 内容区域 ── */
.content-area {
  flex: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── 移动顶部栏 ── */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-dim);
  position: sticky;
  top: 0;
  z-index: 90;
}
.mobile-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}
.mobile-header-left i { color: var(--accent); }
.mobile-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 视图容器 ── */
.view {
  display: none;
  flex: 1;
  padding: 16px;
  padding-bottom: 90px; /* 底部导航栏空间 */
  animation: viewFadeIn .25s ease;
}
.view.active { display: block; }
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 底部导航栏 (移动端) ── */
.bottom-bar {
  position: fixed;
  bottom: 12px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  z-index: 100;
  /* 玻璃拟态 */
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  box-shadow: 0 4px 20px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.04) inset;
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .68rem;
  font-family: var(--font);
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 20px;
  transition: all .2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn i { font-size: 1.3rem; transition: all .2s ease; }
.tab-btn span { line-height: 1.2; }
.tab-btn.active {
  color: var(--accent);
}
.tab-btn.active i { transform: scale(1.1); }
.tab-btn:active { transform: scale(.92); }
.tab-unread {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--error);
  position: absolute;
  top: 4px; right: 12px;
}

/* ── 账号选择器 (执行页) ── */
.account-selector { position: relative; }
.account-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-inner);
  border: 1px solid var(--border-dim);
  cursor: pointer;
  transition: all .2s;
}
.account-current:hover { border-color: var(--border); background: var(--bg-hover); }
.account-current-name {
  font-size: .88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.account-current i { color: var(--text-dim); font-size: 1.1rem; flex-shrink: 0; transition: transform .2s ease; }
.account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-popup);
  z-index: 80;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  animation: dropdownSlide .2s ease;
}
.account-dropdown::-webkit-scrollbar { display: none; }
.account-dropdown.hidden { display: none; }
@keyframes dropdownSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
  font-size: .85rem;
}
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.dropdown-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-item-tag {
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-inner);
  color: var(--text-dim);
  margin-left: 8px;
  flex-shrink: 0;
}
.dropdown-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
}

/* ── 聊天容器 ── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  height: calc(100dvh - 140px);
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-dim);
  border-radius: var(--radius) var(--radius) 0 0;
}
.chat-header .card-title { margin-bottom: 0; }
.chat-online-count { font-size: .78rem; color: var(--text-muted); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-base);
}
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-dim);
  border-radius: 0 0 var(--radius) var(--radius);
}
.chat-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-dim);
  background: var(--bg-inner);
  color: var(--text);
  font-size: .88rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input:disabled { opacity: .5; cursor: not-allowed; }
.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { filter: brightness(1.1); }
.chat-send-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── 聊天头部布局 ── */
.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
  transition: background .3s;
}
.chat-status-dot.connected { background: var(--success); }
.chat-status-dot.disconnected { background: var(--error); }
.chat-nick-btn {
  background: none;
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  padding: 4px 12px;
  color: var(--text-dim);
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all .2s;
}
.chat-nick-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── 聊天气泡 ── */
.chat-bubble {
  max-width: 78%;
  padding: 8px 14px;
  border-radius: 14px;
  position: relative;
  word-break: break-word;
}
.chat-bubble.other {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-bottom-left-radius: 4px;
}
.chat-bubble.self {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border-dim));
  border-bottom-right-radius: 4px;
}
.bubble-nick {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}
.bubble-text {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.45;
}
.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}
.bubble-time {
  font-size: .7rem;
  color: var(--text-muted);
}
.bubble-reply-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .8rem;
  padding: 0;
  opacity: 0;
  transition: opacity .2s;
}
.chat-bubble:hover .bubble-reply-btn { opacity: 1; }
.bubble-reply-btn:hover { color: var(--accent); }

/* ── 回复引用 ── */
.bubble-reply {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-inner));
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 6px;
  font-size: .78rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.reply-nick { color: var(--accent); font-weight: 600; }

/* ── 回复条 ── */
.chat-reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
  border-top: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border-dim));
  font-size: .82rem;
  color: var(--text-dim);
}
.chat-reply-bar.hidden { display: none; }
.reply-bar-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
}
.reply-bar-close:hover { color: var(--error); }

/* ── 系统消息 ── */
.chat-system-msg {
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  padding: 6px 0;
  font-style: italic;
}

/* ── 管理员气泡 ── */
.chat-bubble.admin {
  background: linear-gradient(135deg, color-mix(in srgb, var(--warn) 12%, var(--bg-card)), color-mix(in srgb, var(--warn) 6%, var(--bg-card)));
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border-dim));
}
.chat-bubble.admin .bubble-nick { color: var(--warn); }
.admin-tag {
  display: inline-block;
  font-size: .65rem;
  background: var(--warn);
  color: #1e1f22;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
  font-weight: 700;
  vertical-align: middle;
}

/* ── "我的"页面 ── */
.my-profile-card { margin-bottom: 16px; }
.my-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}
.my-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-inner));
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700;
  flex-shrink: 0;
}
.my-info { flex: 1; min-width: 0; }
.my-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-sub {
  font-size: .82rem;
  color: var(--text-dim);
  margin-top: 4px;
}
#viewMy .card { margin-bottom: 12px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dim);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: .88rem; color: var(--text); }

/* ── Toast 轻提示 ── */
.sky-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 10px 22px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg-card) 90%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-dim);
  color: var(--text);
  font-size: .85rem;
  z-index: 9000;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
}
.sky-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 响应式 ── */

/* 移动端 (≤768px) — 底部导航可见，侧边栏隐藏 */
@media (max-width: 768px) {
  .sidebar { display: none !important; }
  .content-area { margin-left: 0; }
  .bottom-bar { display: flex; }
  .mobile-header { display: flex; }

  .main-grid { grid-template-columns: 1fr; }
  html { font-size: 14px; }
  .task-track { flex-wrap: wrap; }
  .task-card { min-width: 140px; flex: 1; }
  .pickup-panel { flex-direction: column; max-height: 400px; }
  .pickup-scroll-wrap { height: 200px; max-height: 200px; }
  .pickup-counters { flex-direction: row; justify-content: center; }
  .counter-box { flex: 1; }
  .notif-overlay { left: 10px; right: 10px; top: 10px; }
  .notif-popup { max-width: 100%; }
  .stats-grid { grid-template-columns: 1fr !important; }
}

/* 平板 (769px – 1023px) — 底部导航，无侧栏 */
@media (min-width: 769px) and (max-width: 1023px) {
  .sidebar { display: none !important; }
  .content-area { margin-left: 0; max-width: 800px; margin: 0 auto; }
  .bottom-bar { display: flex; max-width: 420px; left: 50%; right: auto; transform: translateX(-50%); }
  .mobile-header { display: flex; }
  .main-grid { grid-template-columns: 1fr 1fr; }
  .view { padding: 16px 24px; }
}

/* 桌面端 (≥1024px) — 侧边栏可见，底部导航隐藏 */
@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .content-area { margin-left: 220px; }
  .bottom-bar { display: none; }
  .mobile-header { display: none; }
  .view { padding: 24px 32px; padding-bottom: 32px; max-width: 900px; }
  .task-card { min-width: 200px; }
  .chat-container { height: calc(100vh - 80px); }
}

/* ── 卡密 Badge ── */
.license-badge {
  font-size: .72rem; padding: 3px 10px; border-radius: 4px;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn); font-family: var(--mono); white-space: nowrap;
}

/* ── 统计面板 ── */
.stats-panel { padding: 0; overflow: hidden; margin-top: 16px; }
.stats-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border-dim);
  display: flex; justify-content: space-between; align-items: center;
}
.stats-header .card-title { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.stats-grid {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.stats-empty {
  color: var(--text-muted); text-align: center; padding: 20px 0;
  width: 100%; font-size: .85rem; grid-column: 1 / -1;
}
.stat-card {
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--bg-inner); border: 1px solid var(--border-dim);
  animation: cardSlideIn .4s ease;
}
.stat-account-name {
  font-size: .78rem; color: var(--text-dim); margin-bottom: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-candle-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.stat-candle-count { font-size: 1.5rem; font-weight: 700; font-family: var(--mono); color: var(--warn); }
.stat-candle-unit { font-size: .82rem; color: var(--text-muted); }
.stat-drops { font-size: .72rem; color: var(--text-muted); font-family: var(--mono); }
.stat-tasks-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.stat-badge { font-size: .7rem; padding: 2px 8px; border-radius: 4px; }
.stat-badge.done {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}
.stat-badge.pending {
  background: var(--bg-inner); color: var(--text-muted);
  border: 1px solid var(--border-dim);
}

/* ── Form hint ── */
.form-hint { font-size: .78rem; color: var(--text-muted); }
