/* ==========================================================================
   我爱云代挂 · 设计系统
   深色为主 + 多主题（暗夜/简约白/海蓝/墨黑/日落橙/樱花粉/森野绿/赛博紫）
   ========================================================================== */

:root {
  --bg: #0b0f1d;
  --bg-2: #111a33;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .075);
  --panel-solid: #141c31;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #e8eefc;
  --muted: #93a0bd;
  --faint: #6b7899;
  --primary: #4f8cff;
  --primary-2: #6ea8ff;
  --accent: #8b5cf6;
  --ok: #35c98a;
  --warn: #f5a623;
  --danger: #ff5d6c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --sidebar-bg: rgba(8, 13, 28, .72);
  --input-bg: rgba(6, 10, 22, .55);
  --hero: radial-gradient(1200px 600px at 20% -10%, #1a2a55 0%, transparent 60%),
          radial-gradient(900px 500px at 110% 10%, #16324a 0%, transparent 55%),
          #0b0f1d;
  --grad: linear-gradient(135deg, var(--primary), var(--accent));
}

/* ==========================================================================
   简约白 —— 浅底 + 细描边 + 克制阴影，主色一层品牌蓝
   ========================================================================== */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9; --bg-2: #ffffff;
  --panel: #ffffff; --panel-2: #f5f7fa; --panel-solid: #ffffff;
  --line: #e6e9ef; --line-strong: #d3d9e4;
  --text: #1a2233; --muted: #667085; --faint: #98a2b3;
  --primary: #2f6bff; --primary-2: #2b5fd9; --accent: #6d5cff;
  --sidebar-bg: #ffffff; --input-bg: #ffffff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px rgba(16, 24, 40, .06);
  --hero: radial-gradient(900px 420px at 12% -12%, #eaf0ff 0%, transparent 60%),
          radial-gradient(700px 360px at 108% -5%, #f0ecff 0%, transparent 55%),
          #f6f7f9;
}
/* 背景：固定渐变 + 轻微网格，浅色下更干净 */
:root[data-theme="light"] body { background-attachment: fixed; }

/* 侧栏：白底细分割线，选中态用淡蓝块而不是深色 */
:root[data-theme="light"] .sidebar { box-shadow: 1px 0 0 rgba(16, 24, 40, .04); backdrop-filter: none; }
:root[data-theme="light"] .nav a { color: #55607a; }
:root[data-theme="light"] .nav a:hover { background: #f2f5fa; color: var(--text); }
:root[data-theme="light"] .nav a.active {
  background: #eaf0ff; color: var(--primary-2); font-weight: 650;
}
:root[data-theme="light"] .brand .mark,
:root[data-theme="light"] .login-card .logo { box-shadow: 0 8px 18px rgba(47, 107, 255, .22); }

/* 提示信息：浅底 + 深色字，保证对比度 */
:root[data-theme="light"] .alert-err { background: #fef3f4; border-color: #f8d3d8; color: #a8212f; }
:root[data-theme="light"] .alert-warn { background: #fffaeb; border-color: #fbe3b2; color: #8a5a00; }
:root[data-theme="light"] .alert-ok { background: #f0fdf5; border-color: #b9ecd0; color: #0a6b45; }
:root[data-theme="light"] .alert-info { background: #eff4ff; border-color: #d4e0ff; color: #1c46a8; }

/* 徽标 */
:root[data-theme="light"] .badge { background: #eef1f6; color: #5b6577; }
:root[data-theme="light"] .badge.ok { background: #e8f8ef; color: #0b6b45; }
:root[data-theme="light"] .badge.warn { background: #fdf4e3; color: #91600a; }
:root[data-theme="light"] .badge.err { background: #fdeef0; color: #a8212f; }
:root[data-theme="light"] .badge.info { background: #eaf0ff; color: #1c46a8; }

/* 卡片与表格 */
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
:root[data-theme="light"] .card:hover { border-color: #d7dde8; }
:root[data-theme="light"] .stat { background: #ffffff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
:root[data-theme="light"] .stat.accent {
  background: linear-gradient(135deg, #eef3ff, #f3efff);
  border-color: #d5e1ff;
}
:root[data-theme="light"] .task { background: #ffffff; border-color: #e9edf3; }
:root[data-theme="light"] .task:hover { border-color: #d7dde8; }
:root[data-theme="light"] .acc-card { background: #ffffff; border-color: #e9edf3; }
:root[data-theme="light"] .account-card { background: #ffffff; border-color: #e9edf3; }
:root[data-theme="light"] th { background: #f7f9fc; color: #667085; border-bottom-color: #e9edf3; }
:root[data-theme="light"] td { border-bottom-color: #eef1f5; }
:root[data-theme="light"] tbody tr:nth-child(even) td { background: transparent; }
:root[data-theme="light"] tbody tr:hover td { background: #f6f9ff; }
:root[data-theme="light"] .table-wrap { border-color: #e9edf3; }
:root[data-theme="light"] .progress { background: #eceff4; }

/* 按钮：白底描边，hover 淡灰；主按钮实心蓝 */
:root[data-theme="light"] .btn { background: #ffffff; border-color: #dde2ea; color: #344054; }
:root[data-theme="light"] .btn:hover { background: #f4f6f9; border-color: #cfd6e2; }
:root[data-theme="light"] .btn.ghost { background: transparent; border-color: transparent; color: #475467; }
:root[data-theme="light"] .btn.ghost:hover { background: #f2f5fa; color: var(--text); }
:root[data-theme="light"] .btn.primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(47, 107, 255, .24);
}
:root[data-theme="light"] .btn.primary:hover { background: #245bdb; border-color: #245bdb; filter: none; }
:root[data-theme="light"] .btn.danger { background: #ffffff; border-color: #f0c8cd; color: #b4232f; }
:root[data-theme="light"] .btn.danger:hover { background: #fdf3f4; border-color: #e6aab2; }
:root[data-theme="light"] .btn.ok { background: #ffffff; border-color: #bfe9d1; color: #0b6b45; }

/* 表单：白底、聚焦蓝色描边 */
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea { background: #ffffff; border-color: #dde2ea; }
:root[data-theme="light"] input:hover,
:root[data-theme="light"] select:hover { border-color: #cfd6e2; }
:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 107, 255, .14); }
:root[data-theme="light"] input::placeholder { color: #a3adbd; }
:root[data-theme="light"] .switch span { background: #d7dce5; }
:root[data-theme="light"] .tabs { background: #f1f4f9; }
:root[data-theme="light"] .tabs button.active { background: #ffffff; box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }

/* 主题面板与弹窗 */
:root[data-theme="light"] .theme-panel { box-shadow: 0 16px 40px rgba(16, 24, 40, .14); }
:root[data-theme="light"] .modal { box-shadow: 0 24px 60px rgba(16, 24, 40, .18); }
:root[data-theme="light"] .modal-wrap { background: rgba(23, 35, 60, .32); }
:root[data-theme="light"] .toast { box-shadow: 0 12px 30px rgba(16, 24, 40, .14); }

/* 登录页：左文案 + 右白卡 */
:root[data-theme="light"] .login-intro h1 { color: #101828; }
:root[data-theme="light"] .login-intro h1 span { background: linear-gradient(135deg, #2f6bff, #6d5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .intro-eyebrow { color: var(--primary); }
:root[data-theme="light"] .intro-number { background: #eef3ff; border-color: #d8e3ff; color: var(--primary-2); }
:root[data-theme="light"] .intro-footer { border-top-color: #e6e9ef; }
:root[data-theme="light"] .login-card {
  background: #ffffff; border-color: #e6e9ef;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 20px 44px rgba(16, 24, 40, .08);
  backdrop-filter: none;
}
:root[data-theme="light"] .login-foot { color: #98a2b3; }

/* 任务行：白底卡片上再叠白任务行会糊成一片，改用极浅灰底 + 细边 */
:root[data-theme="light"] .task { background: #fbfcfe; border-color: #e9edf3; }
:root[data-theme="light"] .task:hover { background: #ffffff; border-color: #d7dde8; }
:root[data-theme="light"] .task .btn.ghost { color: #475467; border-color: #dde2ea; background: #fff; }
:root[data-theme="light"] .task .btn.ghost:hover { background: #f4f6f9; }
/* 顶部工具条里的图标按钮不要抢视线 */
:root[data-theme="light"] .theme-trigger { background: #fff; border-color: #dde2ea; color: #344054; }
/* 二维码在浅色主题下加个边框，避免白底白边 */
:root[data-theme="light"] .qr-box svg,
:root[data-theme="light"] .qr-box img { border: 1px solid #e6e9ef; }
:root[data-theme="light"] .qr-link { background: #f7f9fc; border-color: #e9edf3; }

/* 滚动条 */
:root[data-theme="light"] .sidebar::-webkit-scrollbar-thumb { background: rgba(16, 24, 40, .16); }
/* 海蓝 */
:root[data-theme="ocean"] {
  --bg: #061a24; --bg-2: #0a2430;
  --panel: rgba(86, 214, 255, .055); --panel-2: rgba(86, 214, 255, .09); --panel-solid: #0b2b38;
  --line: rgba(120, 220, 255, .16); --line-strong: rgba(120, 220, 255, .3);
  --text: #e6fbff; --muted: #8fb9c6; --faint: #6b94a3;
  --primary: #22c1d6; --primary-2: #5fdbe8; --accent: #3b82f6;
  --sidebar-bg: rgba(4, 22, 30, .78); --input-bg: rgba(3, 18, 26, .6);
  --hero: radial-gradient(1000px 520px at 15% -10%, #0d3a4d 0%, transparent 62%),
          radial-gradient(800px 420px at 110% 10%, #124a3f 0%, transparent 55%), #061a24;
}
/* 墨黑 */
:root[data-theme="ink"] {
  --bg: #0d0d0f; --bg-2: #151518;
  --panel: rgba(255, 255, 255, .04); --panel-2: rgba(255, 255, 255, .075); --panel-solid: #17171c;
  --line: rgba(255, 255, 255, .11); --line-strong: rgba(255, 255, 255, .2);
  --text: #f2f2f5; --muted: #9a9aa6; --faint: #74747f;
  --primary: #b3b3c2; --primary-2: #d9d9e4; --accent: #8a8a99;
  --sidebar-bg: rgba(10, 10, 12, .85); --input-bg: rgba(0, 0, 0, .45);
  --hero: radial-gradient(900px 480px at 20% -10%, #24242c 0%, transparent 62%),
          radial-gradient(700px 360px at 110% 0%, #1c1c22 0%, transparent 55%), #0d0d0f;
}
:root[data-theme="ink"] .btn.primary { background: #f2f2f5; color: #111114; }
/* 日落橙（参考站同款主色） */
:root[data-theme="sunset"] {
  --bg: #1b1008; --bg-2: #27170c;
  --panel: rgba(255, 176, 102, .06); --panel-2: rgba(255, 176, 102, .1); --panel-solid: #24140a;
  --line: rgba(255, 180, 110, .16); --line-strong: rgba(255, 180, 110, .32);
  --text: #ffeadb; --muted: #c3a08a; --faint: #97765f;
  --primary: #ff8a3d; --primary-2: #ffb066; --accent: #ff5f6d;
  --sidebar-bg: rgba(24, 13, 6, .8); --input-bg: rgba(20, 10, 4, .6);
  --hero: radial-gradient(1000px 520px at 15% -10%, #4a2410 0%, transparent 62%),
          radial-gradient(800px 420px at 110% 10%, #3a1a20 0%, transparent 55%), #1b1008;
}
/* 樱花粉 */
:root[data-theme="sakura"] {
  --bg: #fff5f8; --bg-2: #ffffff;
  --panel: #ffffff; --panel-2: #fdeef4; --panel-solid: #ffffff;
  --line: #f6dbe6; --line-strong: #efc7d7;
  --text: #442133; --muted: #916076; --faint: #b1899a;
  --primary: #f06292; --primary-2: #f06292; --accent: #a78bfa;
  --sidebar-bg: #ffffff; --input-bg: #ffffff;
  --hero: radial-gradient(900px 420px at 15% -10%, #ffe3ee 0%, transparent 62%),
          radial-gradient(700px 360px at 110% 0%, #f3e6ff 0%, transparent 55%), #fff5f8;
}
/* 森野绿 */
:root[data-theme="forest"] {
  --bg: #07150f; --bg-2: #0c2118;
  --panel: rgba(94, 220, 150, .06); --panel-2: rgba(94, 220, 150, .1); --panel-solid: #0c2118;
  --line: rgba(120, 230, 170, .16); --line-strong: rgba(120, 230, 170, .3);
  --text: #e6fff1; --muted: #8fbba4; --faint: #648a76;
  --primary: #34d399; --primary-2: #6ee7b7; --accent: #22c55e;
  --sidebar-bg: rgba(5, 18, 12, .8); --input-bg: rgba(4, 16, 10, .6);
  --hero: radial-gradient(1000px 520px at 15% -10%, #0f3b2a 0%, transparent 62%),
          radial-gradient(800px 420px at 110% 10%, #13352a 0%, transparent 55%), #07150f;
}
/* 赛博紫 */
:root[data-theme="cyber"] {
  --bg: #0b0716; --bg-2: #150d28;
  --panel: rgba(180, 120, 255, .06); --panel-2: rgba(180, 120, 255, .1); --panel-solid: #150d28;
  --line: rgba(190, 140, 255, .18); --line-strong: rgba(190, 140, 255, .32);
  --text: #f3e9ff; --muted: #ac9bc9; --faint: #82719d;
  --primary: #a855f7; --primary-2: #c084fc; --accent: #6366f1;
  --sidebar-bg: rgba(10, 5, 20, .82); --input-bg: rgba(8, 4, 18, .6);
  --hero: radial-gradient(1000px 520px at 15% -10%, #2a1050 0%, transparent 62%),
          radial-gradient(800px 420px at 110% 10%, #1a2a5e 0%, transparent 55%), #0b0716;
}

/* ==========================================================================
   基础
   ========================================================================== */
* { box-sizing: border-box; }
/* 关键：.modal-wrap / .theme-panel 用 display:flex 布局，会盖过 UA 的 [hidden]{display:none}，
   必须显式兜住，否则遮罩层会一直盖在整页上（页面看起来是黑的、糊的） */
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0;
  background: var(--hero);
  background-attachment: fixed;
  color: var(--text);
  transition: background .2s ease, color .2s ease;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 650; letter-spacing: .2px; }
p { margin: 0 0 10px; color: var(--muted); line-height: 1.7; }
code {
  background: rgba(127, 127, 127, .16); padding: 2px 6px; border-radius: 6px;
  font-family: ui-monospace, Consolas, monospace; font-size: .92em;
}
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.right { text-align: right; }
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hidden { display: none !important; }

/* 首屏加载 */
.boot {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.boot-logo {
  width: 62px; height: 62px; border-radius: 18px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 28px; font-weight: 800; color: #fff;
  box-shadow: 0 10px 30px rgba(79, 140, 255, .45);
  animation: boot-pulse 1.6s ease-in-out infinite;
}
@keyframes boot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ==========================================================================
   布局
   ========================================================================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex: 0 0 232px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(120, 140, 180, .35); border-radius: 3px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; padding: 0 4px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--grad); display: grid; place-items: center;
  font-weight: 800; color: #fff; font-size: 16px;
  box-shadow: 0 6px 16px rgba(15, 191, 208, .28);
  overflow: hidden;
}
/* 品牌 logo 图片：贴满容器并裁成圆形/圆角 */
.brand .mark img,
.login-card .logo img,
.boot-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.brand .mark img { border-radius: 10px; }
.login-card .logo, .boot-logo { overflow: hidden; }
.brand-sub { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-size: 13px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active {
  background: linear-gradient(90deg, rgba(79, 140, 255, .24), rgba(139, 92, 246, .14));
  color: var(--text); font-weight: 600;
}
.nav a svg { flex: none; opacity: .9; }
.nav .sep { margin: 10px 11px 4px; font-size: 11px; color: var(--faint); letter-spacing: .12em; }

.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; border-radius: 10px;
}
.sidebar-user-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sidebar-user-caption { font-size: 11px; color: var(--faint); }
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-version { font-size: 11px; color: var(--faint); padding: 8px 6px 0; }

.main { flex: 1; min-width: 0; padding: 24px 30px 60px; }

.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-heading .title { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.page-heading .sub { color: var(--muted); font-size: 12px; margin-top: 5px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   卡片 / 栅格 / 统计
   ========================================================================== */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
  transition: border-color .18s, box-shadow .18s;
}
.card:hover { border-color: var(--line-strong); }
.card + .card { margin-top: 16px; }
.card > h3, .card-title { font-size: 15px; margin-bottom: 14px; font-weight: 650; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15px; }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
/* 内容高度差异很大时，让卡片贴合自身内容，避免一侧出现大片留白 */
.grid.align-start { align-items: start; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .card { margin-top: 0; }
.grid.cols-2 > .card { display: flex; flex-direction: column; }
/* 卡片内主体自然高度，多余的空白交给卡片本身，避免右侧被拉高时左侧内容悬空 */
.grid.cols-2 > .card > .btn:last-child { margin-top: auto; }
/* 账号小卡片：与表格行同风格（白底 + 细边），不再用填充色 */
.acc-card { background: transparent; border: 1px solid var(--line); }
.acc-card:hover { border-color: var(--line-strong); }
:root[data-theme="light"] .acc-card { background: #ffffff; }
:root[data-theme="light"] .acc-card .uin { color: var(--text); }
.grid > .stat { height: 100%; }

.stat {
  padding: 16px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.stat .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 24px; font-weight: 750; margin-top: 6px; letter-spacing: .3px; line-height: 1.2; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .hint { font-size: 11px; color: var(--faint); margin-top: 5px; }
/* 强调卡片使用主题色（color-mix 让每个主题都自动适配） */
.stat.accent {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 26%, transparent),
    color-mix(in srgb, var(--accent) 14%, transparent));
  border-color: color-mix(in srgb, var(--primary) 38%, transparent);
}
/* 任务行里的次要按钮在深色主题下容易看起来像禁用，这里保持可读的描边和文字色 */
:root:not([data-theme="light"]):not([data-theme="sakura"]) .task .btn.ghost {
  color: var(--text);
  border-color: var(--line-strong);
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: transform .08s, background .15s, border-color .15s, filter .15s;
}
.btn:hover { background: rgba(127, 127, 127, .14); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px rgba(79, 140, 255, .22);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger {
  color: var(--danger); border-color: rgba(255, 93, 108, .38); background: transparent;
}
.btn.danger:hover { background: rgba(255, 93, 108, .12); border-color: rgba(255, 93, 108, .55); }
.btn.ok { color: var(--ok); border-color: rgba(53, 201, 138, .4); background: rgba(53, 201, 138, .1); }
.btn.warn { border-color: rgba(245, 166, 35, .5); color: var(--warn); background: rgba(245, 166, 35, .08); }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

/* ==========================================================================
   表单
   ========================================================================== */
.form { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 150px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: 40px;
  background: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, .18);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; accent-color: var(--primary); }
input[type=search]::-webkit-search-cancel-button { filter: invert(.5); }
.field .req { color: var(--danger); margin-left: 2px; }

/* 浏览器自动填充不破坏主题 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset;
  caret-color: var(--text);
}

/* 开关 */
.switch { position: relative; display: inline-flex; width: 44px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(127, 127, 127, .32); transition: background .18s ease;
}
.switch span::after {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  transition: transform .18s ease;
}
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .45; }
.switch:hover input:not(:disabled) + span { box-shadow: 0 0 0 3px rgba(79, 140, 255, .14); }
/* 简约白：关闭态要能看清是「关」而不是一片浅灰，滑块加描边与底色分离 */
:root[data-theme="light"] .switch span {
  background: #ccd3df;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .06);
}
:root[data-theme="light"] .switch span::after {
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .28), 0 0 0 1px rgba(16, 24, 40, .06);
}
:root[data-theme="light"] .switch input:checked + span {
  background: var(--primary);
  box-shadow: none;
}

/* ==========================================================================
   表格
   ========================================================================== */
.table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 11px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: rgba(127, 127, 127, .08); }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: rgba(127, 127, 127, .035); }
tbody tr:hover td { background: rgba(79, 140, 255, .07); }
td.wrap { white-space: normal; min-width: 240px; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.empty { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.pager .btn[disabled] { opacity: .45; pointer-events: none; }

/* ==========================================================================
   徽标 / 进度
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: rgba(127, 127, 127, .16); color: var(--muted);
}
.badge.ok { background: rgba(53, 201, 138, .16); color: #7ff0bf; }
.badge.warn { background: rgba(245, 166, 35, .16); color: #ffd591; }
.badge.err { background: rgba(255, 93, 108, .16); color: #ffb3ba; }
.badge.info { background: rgba(79, 140, 255, .16); color: #a9c8ff; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.progress { height: 7px; border-radius: 999px; background: rgba(127, 127, 127, .22); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .3s; }
.progress.done > i { background: linear-gradient(90deg, #22c55e, #16a34a); }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-wrap {
  min-height: 100vh; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: center; gap: 56px;
  padding: 40px 8vw; max-width: 1440px; margin: 0 auto;
}
.login-intro { max-width: 520px; }
.intro-eyebrow {
  display: inline-block; color: var(--primary-2); font-size: 13px; font-weight: 600;
  letter-spacing: .1em; margin-bottom: 18px;
}
.login-intro h1 { font-size: 44px; line-height: 1.25; letter-spacing: .5px; margin-bottom: 18px; }
.login-intro h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-intro > p { font-size: 15px; margin-bottom: 30px; }
.intro-features { display: flex; flex-direction: column; gap: 18px; margin-bottom: 30px; }
.intro-features > div { display: flex; gap: 14px; align-items: flex-start; }
.intro-number {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--panel-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--primary-2);
}
.intro-features h3 { font-size: 15px; margin: 0 0 4px; }
.intro-features p { font-size: 13px; margin: 0; }
.intro-footer { font-size: 13px; color: var(--faint); padding-top: 18px; border-top: 1px solid var(--line); }

.login-card {
  width: 100%; max-width: 460px; justify-self: end;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.login-card .logo {
  width: 52px; height: 52px; border-radius: 16px; margin-bottom: 14px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #fff;
  box-shadow: 0 10px 26px rgba(15, 191, 208, .3);
  overflow: hidden;
}
.login-card h2 { font-size: 22px; margin-bottom: 4px; }
.login-card .brand-sub { font-size: 12px; margin-bottom: 12px; }
.login-card > p { font-size: 13px; }

.tabs {
  display: flex; gap: 4px; background: rgba(127, 127, 127, .12);
  padding: 4px; border-radius: 12px; margin-bottom: 16px;
}
.tabs button {
  flex: 1; border: none; background: transparent; color: var(--muted);
  padding: 8px 4px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.tabs button.active { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.16); }
.login-foot { margin-top: 16px; display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }

/* ==========================================================================
   主题选择器
   ========================================================================== */
.theme-picker { position: relative; }
.theme-trigger { font-size: 12px; padding: 8px 11px; }
.theme-trigger svg { width: 15px; height: 15px; }
.theme-trigger .theme-chevron { width: 13px; height: 13px; }
.theme-panel {
  position: fixed; z-index: 70; width: 268px;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; box-shadow: var(--shadow);
}
.theme-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.theme-panel-heading h3 { font-size: 14px; margin: 0 0 2px; }
.theme-panel-heading p { font-size: 11.5px; margin: 0; }
.theme-close { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 4px; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.theme-option {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 8px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  color: var(--text); font-size: 12px; text-align: left;
}
.theme-option:hover { border-color: var(--line-strong); }
.theme-option[aria-pressed="true"] { border-color: var(--primary); background: rgba(79, 140, 255, .1); }
.theme-swatch { width: 22px; height: 16px; border-radius: 5px; overflow: hidden; flex: none; display: flex; }
.theme-swatch i { flex: 1; }
.theme-option-check { width: 13px; height: 13px; margin-left: auto; opacity: 0; }
.theme-option[aria-pressed="true"] .theme-option-check { opacity: 1; }
.t-dark i:nth-child(1) { background: #0b0f1d; } .t-dark i:nth-child(2) { background: #4f8cff; }
.t-light i:nth-child(1) { background: #f4f6fb; } .t-light i:nth-child(2) { background: #2f6bff; }
.t-ocean i:nth-child(1) { background: #061a24; } .t-ocean i:nth-child(2) { background: #22c1d6; }
.t-ink i:nth-child(1) { background: #0d0d0f; } .t-ink i:nth-child(2) { background: #b3b3c2; }
.t-sunset i:nth-child(1) { background: #1b1008; } .t-sunset i:nth-child(2) { background: #ff8a3d; }
.t-sakura i:nth-child(1) { background: #fff5f8; } .t-sakura i:nth-child(2) { background: #f06292; }
.t-forest i:nth-child(1) { background: #07150f; } .t-forest i:nth-child(2) { background: #34d399; }
.t-cyber i:nth-child(1) { background: #0b0716; } .t-cyber i:nth-child(2) { background: #a855f7; }

/* ==========================================================================
   任务行
   ========================================================================== */
.task {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 10px 12px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.task + .task { margin-top: 8px; }
.task-main { flex: 1; min-width: 0; }
.task-name { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.task .progress { flex: 0 0 120px; }
.task > .btn { flex: 0 0 auto; min-width: 58px; }
@media (max-width: 760px) {
  .task { flex-wrap: wrap; }
  .task .progress { order: 3; flex-basis: 100%; }
  .task .switch { margin-left: auto; }
}

/* 账号卡片（移动端 / 概览） */
.acc-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: var(--panel-2);
}
.acc-card + .acc-card { margin-top: 10px; }
.acc-card .uin { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.acc-card .acc-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }

.account-cards { display: none; }
@media (max-width: 860px) {
  .accounts-table { display: none; }
  .account-cards { display: block; margin-top: 12px; }
  .account-card {
    border: 1px solid var(--line); border-radius: 14px; padding: 14px;
    background: var(--panel-2); margin-bottom: 10px;
    display: flex; flex-direction: column; gap: 10px;
  }
  .account-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
  .account-card-uin { font-size: 16px; font-weight: 700; }
  .account-card-nick { font-size: 12px; color: var(--muted); margin-top: 3px; }
  .account-card-stats { display: flex; gap: 18px; }
  .account-card-stats div { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--faint); }
  .account-card-stats strong { font-size: 13px; color: var(--text); }
  .account-card-meta { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
}

/* ==========================================================================
   弹层 / 提示
   ========================================================================== */
.modal-wrap {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 8, 18, .68);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  width: 100%; max-width: 520px;
  background: var(--panel-solid);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; box-shadow: var(--shadow);
  max-height: 86vh; overflow: auto;
}
.modal h3 { margin-bottom: 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal p { font-size: 13px; }

.toast-wrap {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 220px; max-width: 380px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--panel-solid); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow); font-size: 13px;
  animation: slideIn .18s ease-out;
}
.toast.ok { border-color: rgba(53, 201, 138, .45); border-left: 3px solid var(--ok); }
.toast.err { border-color: rgba(255, 93, 108, .5); border-left: 3px solid var(--danger); }
@keyframes slideIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.alert {
  display: flex; gap: 9px; padding: 11px 13px; border-radius: 11px;
  font-size: 13px; margin-bottom: 14px; border: 1px solid transparent;
}
.alert-err { background: rgba(255, 93, 108, .12); border-color: rgba(255, 93, 108, .35); color: #ffb3ba; }
.alert-warn { background: rgba(245, 166, 35, .12); border-color: rgba(245, 166, 35, .35); color: #ffd591; }
.alert-ok { background: rgba(53, 201, 138, .12); border-color: rgba(53, 201, 138, .35); color: #7ff0bf; }
.alert-info { background: rgba(79, 140, 255, .12); border-color: rgba(79, 140, 255, .3); color: #a9c8ff; }
:root[data-theme="light"] .alert-err, :root[data-theme="light"] .alert-warn,
:root[data-theme="light"] .alert-ok, :root[data-theme="light"] .alert-info { color: var(--text); }

.kv { display: grid; grid-template-columns: 104px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

/* 二维码 */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; }
.qr-box img, .qr-box svg { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; image-rendering: pixelated; }
.qr-hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.qr-link {
  width: 100%; font-size: 11.5px; word-break: break-all; color: var(--muted);
  background: rgba(127, 127, 127, .08); border: 1px solid var(--line); border-radius: 9px; padding: 9px;
  max-height: 76px; overflow: auto;
}

/* 导入账号弹窗里的实例列表：带边框的滚动盒，行与行之间留白 */
/* 可勾选项（导入账号列表 / 任务勾选）：基础是横向 flex，内容区自适应 */
.task-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 13px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.task-item:hover { border-color: var(--line-strong); background: var(--panel); }
.task-item input[type="checkbox"] { accent-color: var(--primary); flex: none; }

.import-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px;
  max-height: 300px;
  overflow-y: auto;
  background: transparent;
}
.import-box .task-item { background: var(--panel-2); padding: 10px 12px; border-color: var(--line); align-items: flex-start; }
.import-box .task-item + .task-item { margin-top: 6px; }
.import-box .task-item .badge { margin-left: 2px; }
.import-box .muted { line-height: 1.5; }

/* 后台筛选栏：输入框不再被拉满整行 */.filter-bar { gap: 10px; margin-bottom: 14px; align-items: center; }
.filter-bar > input,
.filter-bar > select { width: auto; flex: 1 1 200px; min-width: 150px; max-width: 280px; }
.filter-bar > .btn { flex: 0 0 auto; }
@media (max-width: 520px) {
  .filter-bar > input,
  .filter-bar > select { flex-basis: 100%; max-width: none; }
}

/* 分页/筛选条 */
.account-filters { display: grid; grid-template-columns: 1.2fr .9fr .9fr auto; gap: 12px; align-items: end; }
.account-filter-actions { display: flex; gap: 8px; }
.account-list-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: space-between; margin: 14px 0 10px; font-size: 12px; color: var(--muted);
}

/* 开场小标题 */
.section-lead { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-wrap { grid-template-columns: 1fr; justify-items: center; gap: 30px; padding: 32px 20px; }
  .login-intro { display: none; }
  .login-card { justify-self: center; }
}
@media (max-width: 860px) {
  .grid.cols-2 { grid-template-columns: 1fr; }
  .account-filters { grid-template-columns: 1fr 1fr; }
  .sidebar {
    position: sticky; top: 0; z-index: 30;
    width: auto; flex: none; height: auto;
    padding: 10px 12px 8px;
    border-right: none; border-bottom: 1px solid var(--line);
    gap: 10px;
  }
  .layout { flex-direction: column; }
  .brand { font-size: 14px; }
  .brand .mark { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
  .brand-sub { display: none; }
  .nav {
    flex-direction: row; gap: 6px;
    overflow-x: auto; padding-bottom: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 7px 11px; font-size: 13px; border-radius: 999px; white-space: nowrap; }
  .nav a svg { display: none; }
  .nav .sep { display: none; }
  .sidebar-footer { margin-top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 0; padding-top: 0; }
  .sidebar-version { display: none; }
  .sidebar-user { flex: 1; padding: 0; }
  .main { padding: 16px 14px 40px; }
  .topbar .page-heading .title { font-size: 19px; }
  .card { padding: 14px; border-radius: 14px; }
  .stat .value { font-size: 20px; }
  .modal-wrap { padding: 10px; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: 16px 16px 12px 12px; padding: 16px; }
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .toast { width: 100%; max-width: none; }
  table { min-width: 560px; }
  th, td { padding: 9px 10px; font-size: 12px; }
  .kv { grid-template-columns: 92px 1fr; }
  .login-card { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .grid.cols-4, .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .account-filters { grid-template-columns: 1fr; }
  .login-card h2 { font-size: 19px; }
  .page-actions .btn { flex: 1; }
}
