/*
 * 签到面板 v3 · 设计语言
 * ------------------------------------------------------------------
 * 图标：Lucide（内联 sprite，stroke 型，随字色变化）
 * 色板：石墨蓝黑底 + 翡翠绿主色 + 琥珀/珊瑚语义色
 * 形态：16px 圆角 / 1px 发丝线 / 极轻玻璃质感
 * 动效：180ms cubic-bezier(.4,0,.2,1)，尊重 reduced-motion
 */

:root {
  --bg-0: #0b0f14;
  --bg-1: #11161d;
  --bg-2: #171d26;
  --panel: rgba(23, 29, 38, 0.72);
  --panel-hi: rgba(30, 37, 48, 0.85);
  --line: rgba(148, 163, 184, 0.09);
  --line-hi: rgba(148, 163, 184, 0.18);
  --txt-0: #f2f6fa;
  --txt-1: #c9d4e0;
  --txt-2: #93a1b2;
  --txt-3: #6b7a8c;
  --pri: #3ddc97;
  --pri-dim: #2bb87c;
  --pri-soft: rgba(61, 220, 151, 0.1);
  --pri-line: rgba(61, 220, 151, 0.26);
  --warn: #f7b955;
  --bad: #f87171;
  --info: #60a5fa;
  --violet: #a78bfa;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --sh-1: 0 2px 8px rgba(0, 0, 0, 0.24);
  --sh-2: 0 8px 28px rgba(0, 0, 0, 0.36);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font: 400 15px/1.62 -apple-system, BlinkMacSystemFont, 'Segoe UI',
        'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--txt-1);
  background:
    radial-gradient(980px 620px at 12% -12%, rgba(61, 220, 151, 0.07), transparent 58%),
    radial-gradient(820px 520px at 92% 4%, rgba(96, 165, 250, 0.06), transparent 60%),
    var(--bg-0);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(61, 220, 151, 0.22); color: var(--txt-0); }

/* 图标基类 */
.ic {
  width: 18px; height: 18px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }
.ic-xl { width: 30px; height: 30px; stroke-width: 1.7; }

/* ---------- 启动屏 ---------- */
.boot-splash {
  position: fixed; inset: 0;
  display: grid; place-items: center; gap: 16px;
  background: var(--bg-0);
  z-index: 9999;
  transition: opacity 0.35s var(--ease);
}
.boot-splash.hide { opacity: 0; pointer-events: none; }
.boot-brand {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--pri), var(--pri-dim));
  color: #05130c;
  box-shadow: 0 0 40px rgba(61, 220, 151, 0.32);
  animation: breathe 2s var(--ease) infinite;
}
.boot-brand .ic { width: 28px; height: 28px; stroke-width: 2.4; }
.boot-note { color: var(--txt-3); font-size: 12.5px; letter-spacing: 0.5px; }
@keyframes breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(61, 220, 151, 0.32); }
  50% { transform: scale(0.95); box-shadow: 0 0 24px rgba(61, 220, 151, 0.18); }
}

/* ---------- 布局 ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 224px 1fr;
  grid-template-areas: 'side main';
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar {
  grid-area: side;
  position: sticky; top: 0;
  height: 100vh;
  padding: 24px 14px;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 22, 29, 0.55), rgba(11, 15, 20, 0.2));
}

.main { grid-area: main; padding: 28px 32px 64px; min-width: 0; }

/* ---------- 品牌 ---------- */
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 0 8px 20px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--pri), var(--pri-dim));
  color: #05130c;
  box-shadow: 0 4px 16px rgba(61, 220, 151, 0.26);
  flex-shrink: 0;
}
.brand-mark .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.brand-name { font-size: 15px; font-weight: 650; color: var(--txt-0); letter-spacing: -0.15px; }
.brand-sub { font-size: 10.5px; color: var(--txt-3); letter-spacing: 0.6px; text-transform: uppercase; }

/* ---------- 导航 ---------- */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--txt-2);
  font-size: 13.5px; font-weight: 450;
  text-decoration: none;
  cursor: pointer; user-select: none;
  border: 1px solid transparent;
  transition: all 0.18s var(--ease);
}
.nav-item:hover { background: rgba(148, 163, 184, 0.055); color: var(--txt-0); }
.nav-item:hover .ic { color: var(--txt-1); }
.nav-item.active {
  background: var(--pri-soft);
  color: var(--pri);
  border-color: var(--pri-line);
  font-weight: 550;
}
.nav-item .ic { color: var(--txt-3); transition: color 0.18s var(--ease); }
.nav-item.active .ic { color: var(--pri); }
.nav-item .lbl { flex: 1; }
.nav-item .cnt {
  padding: 1px 6px;
  border-radius: 20px;
  font-size: 10.5px; font-weight: 650;
  background: rgba(148, 163, 184, 0.14);
  color: var(--txt-2);
  font-variant-numeric: tabular-nums;
}
.nav-item.active .cnt { background: rgba(61, 220, 151, 0.2); color: var(--pri); }

/* ---------- 侧栏底部 ---------- */
.sidebar-foot {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #5b6cf9, var(--violet));
  color: #fff; font-size: 12.5px; font-weight: 700;
  flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-name {
  font-size: 12.5px; font-weight: 550; color: var(--txt-0);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-role { font-size: 10.5px; color: var(--txt-3); }
.icon-btn {
  background: none; border: 0; cursor: pointer;
  color: var(--txt-3);
  padding: 6px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  transition: 0.15s;
}
.icon-btn:hover { color: var(--bad); background: rgba(248, 113, 113, 0.1); }
.icon-btn:hover .ic { color: var(--bad); }

/* ---------- 页头 ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-title { font-size: 23px; font-weight: 700; color: var(--txt-0); letter-spacing: -0.5px; }
.page-sub { color: var(--txt-2); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px;
  border-radius: 10px;
  border: 1px solid var(--line-hi);
  background: var(--panel-hi);
  color: var(--txt-0);
  font: inherit; font-size: 13px; font-weight: 550;
  cursor: pointer;
  transition: all 0.16s var(--ease);
  white-space: nowrap; user-select: none;
}
.btn:hover { background: rgba(38, 46, 58, 0.92); border-color: rgba(148, 163, 184, 0.26); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn .ic { width: 16px; height: 16px; }

.btn-primary {
  background: linear-gradient(180deg, var(--pri), var(--pri-dim));
  border-color: rgba(61, 220, 151, 0.4);
  color: #04120a;
  box-shadow: 0 3px 14px rgba(61, 220, 151, 0.22);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #4ae6a4, #2fc488);
  box-shadow: 0 5px 20px rgba(61, 220, 151, 0.3);
}
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(148, 163, 184, 0.08); }
.btn-danger { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.28); color: var(--bad); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.16); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-sm); }
.btn.loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.loading .ic { opacity: 0; }
.btn.loading::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--sh-1);
  transition: border-color 0.2s var(--ease);
}
.card:hover { border-color: var(--line-hi); }
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-title {
  font-size: 15px; font-weight: 650; color: var(--txt-0); letter-spacing: -0.1px;
  display: flex; align-items: center; gap: 8px;
}
.card-title .ic { color: var(--txt-3); }
.card-sub { font-size: 12px; color: var(--txt-3); margin-top: 3px; }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  overflow: hidden;
  transition: all 0.2s var(--ease);
}
.stat-card::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--pri), transparent 68%);
  opacity: 0; transition: opacity 0.25s;
}
.stat-card:hover { border-color: var(--line-hi); transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat-card:hover::after { opacity: 1; }
.stat-label {
  font-size: 11px; color: var(--txt-3);
  letter-spacing: 0.5px; text-transform: uppercase; font-weight: 550;
  display: flex; align-items: center; gap: 5px;
}
.stat-label .ic { width: 13px; height: 13px; }
.stat-value {
  font-size: 28px; font-weight: 700; color: var(--txt-0);
  letter-spacing: -0.9px; line-height: 1.16;
  margin: 7px 0 2px;
  font-variant-numeric: tabular-nums;
}
.stat-value.pri { color: var(--pri); }
.stat-value.warn { color: var(--warn); }
.stat-value.bad { color: var(--bad); }
.stat-value .unit { font-size: 13px; font-weight: 500; color: var(--txt-2); margin-left: 2px; }
.stat-delta { font-size: 11.5px; color: var(--txt-3); }

/* ---------- 表单 ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.form-field { display: grid; gap: 6px; align-content: start; }
.form-field.wide { grid-column: 1 / -1; }
.form-label {
  font-size: 12px; font-weight: 550; color: var(--txt-1);
  display: flex; align-items: center; gap: 5px;
}
.form-label .ic { width: 13px; height: 13px; color: var(--txt-3); }
.form-hint { font-size: 11px; color: var(--txt-3); line-height: 1.55; }

.input, .textarea, .select {
  width: 100%;
  padding: 9px 12px;
  background: rgba(8, 12, 17, 0.62);
  border: 1px solid var(--line-hi);
  border-radius: 9px;
  color: var(--txt-0);
  font: inherit; font-size: 13px;
  transition: all 0.15s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.11);
  background: rgba(8, 12, 17, 0.85);
}
.input::placeholder, .textarea::placeholder { color: var(--txt-3); }
.textarea {
  resize: vertical; min-height: 76px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px; line-height: 1.65;
}
.select { cursor: pointer; }

/* ---------- 开关 ---------- */
.switch-row { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch-row input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  width: 38px; height: 21px;
  background: rgba(100, 116, 139, 0.3);
  border-radius: 20px;
  transition: background 0.2s var(--ease);
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
.switch-row input:checked + .switch { background: var(--pri); }
.switch-row input:checked + .switch::after { transform: translateX(17px); }
.switch-row input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.2); }
.switch-label { font-size: 12.5px; color: var(--txt-1); }

/* 小号开关（任务列表内） */
.switch.sm { width: 30px; height: 17px; }
.switch.sm::after { width: 13px; height: 13px; }
.switch-row input:checked + .switch.sm::after { transform: translateX(13px); }

/* ---------- 任务开关网格 ---------- */
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 9px 14px;
  padding: 4px 0;
}
.check {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--txt-2);
  cursor: pointer; user-select: none;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  transition: background 0.14s;
}
.check:hover { background: rgba(148, 163, 184, 0.05); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.def-off {
  font-style: normal; font-size: 10px; font-weight: 600;
  color: var(--warn);
  background: rgba(247, 185, 85, 0.13);
  padding: 1px 5px; border-radius: 4px;
  flex-shrink: 0;
}

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; margin: -4px -4px 0; padding: 0 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  padding: 9px 11px;
  text-align: left;
  font-size: 10.5px; font-weight: 650;
  color: var(--txt-3);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line-hi);
  white-space: nowrap;
}
.tbl td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  color: var(--txt-1);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover { background: rgba(148, 163, 184, 0.04); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .task-name { color: var(--txt-0); font-weight: 500; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px; font-weight: 650;
  border: 1px solid;
  white-space: nowrap;
}
.badge .ic { width: 11px; height: 11px; stroke-width: 2.6; }
.badge-ok { background: rgba(61, 220, 151, 0.11); color: var(--pri); border-color: rgba(61, 220, 151, 0.26); }
.badge-warn { background: rgba(247, 185, 85, 0.11); color: var(--warn); border-color: rgba(247, 185, 85, 0.26); }
.badge-bad { background: rgba(248, 113, 113, 0.11); color: var(--bad); border-color: rgba(248, 113, 113, 0.26); }
.badge-off { background: rgba(100, 116, 139, 0.11); color: var(--txt-3); border-color: rgba(100, 116, 139, 0.22); }
.badge-info { background: rgba(96, 165, 250, 0.11); color: var(--info); border-color: rgba(96, 165, 250, 0.26); }

/* ---------- 任务状态行 ---------- */
.task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  transition: background 0.12s;
}
.task-item:hover { background: rgba(148, 163, 184, 0.05); }
.task-ic {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  flex-shrink: 0;
}
.task-ic .ic { width: 13px; height: 13px; stroke-width: 2.5; }
.task-ic.ok { background: rgba(61, 220, 151, 0.13); color: var(--pri); }
.task-ic.skip { background: rgba(100, 116, 139, 0.13); color: var(--txt-3); }
.task-ic.bad { background: rgba(248, 113, 113, 0.13); color: var(--bad); }
.task-ic.auth { background: rgba(247, 185, 85, 0.13); color: var(--warn); }
.task-ic.off { background: rgba(100, 116, 139, 0.08); color: var(--txt-3); }
.task-ic.warn { background: rgba(247, 185, 85, 0.11); color: var(--warn); }
.task-item .nm { font-weight: 500; color: var(--txt-0); white-space: nowrap; }
.task-item.st-skip .nm,
.task-item.st-off .nm { color: var(--txt-3); }
.task-item .msg {
  flex: 1; color: var(--txt-2); font-size: 12.3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-item .gain {
  color: var(--pri); font-weight: 650; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.task-item .cost {
  color: var(--txt-3); font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.task-list { list-style: none; display: grid; gap: 1px; }

/* ---------- 账号块 ---------- */
.acc-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.acc-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.acc-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 7px; }
.acc-head .who {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--txt-0); font-size: 13.5px; font-weight: 650;
}
.acc-head .who .ic { width: 14px; height: 14px; color: var(--txt-3); }
.acc-head .spacer { flex: 1 1 auto; }
.acc-head .mini { font-size: 11.5px; color: var(--txt-3); }
.accent { color: var(--pri); }
.summary { font-size: 13.5px; color: var(--txt-0); margin-bottom: 3px; }
.muted { color: var(--txt-2); }
.small { font-size: 12.5px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 40px 18px; color: var(--txt-3); }
.empty .ic { width: 34px; height: 34px; stroke-width: 1.5; opacity: 0.4; margin-bottom: 10px; }
.empty-text { font-size: 13px; }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed; top: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 9px;
  z-index: 9998; max-width: 360px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-md);
  background: var(--panel-hi);
  border: 1px solid var(--line-hi);
  box-shadow: var(--sh-2);
  backdrop-filter: blur(16px);
  font-size: 13px;
  pointer-events: auto;
  animation: toast-in 0.26s var(--ease);
}
.toast.out { animation: toast-out 0.22s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px) scale(0.97); } }
.toast .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-ok .ic { color: var(--pri); }
.toast-warn .ic { color: var(--warn); }
.toast-err .ic { color: var(--bad); }
.toast-info .ic { color: var(--info); }
.toast-msg { color: var(--txt-0); line-height: 1.55; }

/* ---------- 登录 / 初始化 ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; }
.auth-card {
  width: 100%; max-width: 388px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 30px;
  backdrop-filter: blur(20px);
  box-shadow: var(--sh-2);
}
.auth-logo {
  width: 52px; height: 52px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 15px;
  background: linear-gradient(140deg, var(--pri), var(--pri-dim));
  color: #05130c;
  box-shadow: 0 6px 26px rgba(61, 220, 151, 0.28);
}
.auth-logo .ic { width: 25px; height: 25px; stroke-width: 2.3; }
.auth-title { text-align: center; font-size: 19px; font-weight: 700; color: var(--txt-0); margin-bottom: 5px; }
.auth-sub { text-align: center; font-size: 12.5px; color: var(--txt-3); margin-bottom: 24px; }
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-size: 12px; font-weight: 550;
  color: var(--txt-2); margin-bottom: 6px;
}
.auth-btn { width: 100%; margin-top: 4px; padding: 11px; font-size: 14px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 11.5px; color: var(--txt-3); }

.auth-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.auth-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.13;
  animation: drift 20s var(--ease) infinite;
}
.auth-orb.o1 { width: 400px; height: 400px; background: #3ddc97; top: -12%; left: -10%; }
.auth-orb.o2 { width: 360px; height: 360px; background: #3b82f6; top: 52%; right: -12%; animation-delay: -7s; }
.auth-orb.o3 { width: 300px; height: 300px; background: #8b5cf6; bottom: -10%; left: 32%; animation-delay: -14s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(26px, -34px) scale(1.05); }
  66% { transform: translate(-22px, 22px) scale(0.97); }
}

/* ---------- 扫码弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  z-index: 9997;
  animation: fade-in 0.2s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 420px;
  background: var(--bg-1);
  border: 1px solid var(--line-hi);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.24s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title {
  font-size: 16px; font-weight: 700; color: var(--txt-0);
  display: flex; align-items: center; gap: 8px;
}
.modal-title .ic { color: var(--pri); width: 18px; height: 18px; }

.qr-box {
  position: relative;
  width: 248px; height: 248px;
  margin: 0 auto 16px;
  background: #fff;
  border-radius: 14px;
  display: grid; place-items: center;
  padding: 12px;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.16);
}
.qr-box canvas, .qr-box img, .qr-box table { width: 100% !important; height: 100% !important; display: block; }
.qr-box .qr-mask {
  position: absolute; inset: 0;
  border-radius: 14px;
  background: rgba(11, 15, 20, 0.9);
  display: grid; place-items: center; gap: 8px;
  color: var(--txt-1);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}
.qr-box .qr-mask .ic { width: 30px; height: 30px; color: var(--txt-2); }
.qr-box .qr-mask.ok { background: rgba(11, 15, 20, 0.94); }

.qr-status {
  text-align: center;
  font-size: 12.5px;
  color: var(--txt-2);
  min-height: 20px;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.qr-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pri);
  animation: blink 1.4s var(--ease) infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.qr-steps {
  font-size: 11.5px; color: var(--txt-3);
  line-height: 1.7;
  background: rgba(148, 163, 184, 0.05);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.qr-steps b { color: var(--txt-2); font-weight: 600; }

/* ---------- 日志 ---------- */
.log-view {
  background: rgba(4, 7, 11, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  max-height: 520px;
  overflow: auto;
  font: 12px/1.72 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
.log-line { display: block; padding: 1px 0; word-break: break-all; }
.log-line.l-ok { color: #6ee7b7; }
.log-line.l-err { color: #fca5a5; }
.log-line.l-warn { color: #fcd34d; }
.log-line.l-info { color: var(--txt-2); }
.log-line.l-debug { color: var(--txt-3); }

/* ---------- 图表 ---------- */
.chart-box { position: relative; height: 200px; margin: 0 -4px; }
.chart-svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ---------- 错误提示块 ---------- */
.errors {
  margin-top: 13px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--bad);
  font-size: 12.5px;
}
.errors strong { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.errors ul { margin: 0; padding-left: 18px; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 30px; padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--txt-3); font-size: 11.5px;
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
}
.foot .ic { width: 12px; height: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; grid-template-areas: 'main'; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: auto;
    flex-direction: row;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(11, 15, 20, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    border-right: 0;
    z-index: 100;
  }
  .brand, .sidebar-foot { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav-item { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 10.5px; flex: 1; }
  .nav-item .lbl { flex: none; }
  .nav-item .cnt { display: none; }
  .nav-item .ic { width: 19px; height: 19px; }
  .main { padding: 18px 14px 96px; }
  .page-title { font-size: 20px; }
  .stat-value { font-size: 24px; }
  .card { padding: 16px 15px; border-radius: 14px; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 13px 14px; }
  .task-item { flex-wrap: wrap; }
  .task-item .msg { flex: 1 1 100%; white-space: normal; }
  .checks { grid-template-columns: 1fr; }
  .toast-stack { left: 12px; right: 12px; max-width: none; }
  .modal { padding: 20px 18px; }
  .qr-box { width: 216px; height: 216px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.3); background-clip: content-box; }
