/* ══════════════════════════════════════════════════════════════
   MonkeyCode 签到中心 · 视觉沿用原项目的深色面板语言
   bg #101114 / card #181b20 / accent #6c4dff / green #4ade80 / red #ff8a95
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg: #101114;
  --bg-2: #17191d;
  --bg-3: #14161a;
  --card: #181b20;
  --hover: #20242b;
  --active: #272c34;

  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.06);
  --line-3: rgba(255, 255, 255, 0.16);

  --text: #d2d3e0;
  --text-2: #8b8f9e;
  --text-3: #5f6472;

  --accent: #6c4dff;
  --accent-2: #7d61ff;
  --blue: #3b82f6;
  --green: #00b96b;
  --green-fg: #4ade80;
  --yellow: #fbbf24;
  --red: #f14c4c;
  --red-soft: #ff8a95;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 14px;

  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --font: "PingFang SC", -apple-system, "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", Consolas, ui-monospace, monospace;

  --sidebar-w: 232px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(108, 77, 255, 0.35); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); background-clip: content-box; }

/* ══════════════ 布局 ══════════════ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #0c0d10;
  border-right: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line-2);
}

.logo {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6c4dff, #a78bfa);
  box-shadow: 0 4px 14px rgba(108, 77, 255, 0.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
  flex: 0 0 auto;
}

.sb-brand .bn { min-width: 0; }
.sb-brand h1 {
  margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-brand p { margin: 1px 0 0; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-nav { flex: 1 1 auto; overflow-y: auto; padding: 10px 8px 14px; }

.nav-group-title {
  padding: 12px 10px 6px;
  font-size: 10.5px;
  letter-spacing: .8px;
  color: var(--text-3);
  text-transform: uppercase;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  height: 34px;
  padding: 0 10px;
  margin-bottom: 2px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 12.8px;
  border: 1px solid transparent;
  transition: background .14s, color .14s;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); text-decoration: none; }
.nav-item.on {
  background: linear-gradient(90deg, rgba(108, 77, 255, 0.22), rgba(108, 77, 255, 0.06));
  color: #fff;
  border-color: rgba(108, 77, 255, 0.34);
}
.nav-item.on svg { color: #c4b5fd; }
.nav-item svg { flex: 0 0 auto; opacity: .85; }
.nav-item .lbl { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .badge {
  font-size: 9.5px; padding: 1px 5px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-3);
}
.nav-item.disabled { opacity: .45; cursor: not-allowed; }
.nav-item.disabled:hover { background: transparent; color: var(--text-2); }

.sb-foot {
  border-top: 1px solid var(--line-2);
  padding: 10px;
  flex: 0 0 auto;
}

.quota-mini {
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--text-2);
}
.quota-mini b { color: var(--text); font-variant-numeric: tabular-nums; }
.quota-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 6px; overflow: hidden; }
.quota-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6c4dff, #a78bfa); }

.sb-user {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: var(--r-lg);
  transition: background .14s;
}
.sb-user:hover { background: rgba(255,255,255,.05); }
.avatar {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #374151, #4b5563);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; color: #fff; flex: 0 0 auto;
}
.sb-user .un { flex: 1 1 auto; min-width: 0; }
.sb-user .un b { display: block; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .un span { display: block; font-size: 10px; color: var(--text-3); }
.icon-btn {
  width: 26px; height: 26px; border-radius: 7px;
  border: 0; background: transparent; color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,138,149,.12); color: var(--red-soft); }

/* ══════════════ 主区 ══════════════ */
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: rgba(16, 17, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
  min-height: 60px;
}
.hamburger {
  display: none;
  width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer;
}
.tb-title { min-width: 0; }
.tb-title h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.tb-title p { margin: 1px 0 0; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tb-stats { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tb-stat {
  display: flex; align-items: baseline; gap: 5px;
  padding: 4px 9px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11.5px; color: var(--text-2);
  white-space: nowrap;
}
.tb-stat b { font-size: 13px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tb-stat.ok b { color: var(--green-fg); }
.tb-stat.bad b { color: var(--red-soft); }

.content { padding: 16px 20px 40px; flex: 1 1 auto; min-height: 0; }

/* ══════════════ 通用组件 ══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s, opacity .14s;
  text-decoration: none;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); border-color: var(--line-3); text-decoration: none; }
.btn:active:not(:disabled) { background: var(--active); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 500; }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.ghost { color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { color: var(--text); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.tiny { height: 22px; padding: 0 8px; font-size: 11.5px; border-color: transparent; color: var(--text-2); }
.btn.tiny:hover:not(:disabled) { color: var(--text); }
.btn.danger { color: var(--red-soft); border-color: rgba(255, 138, 149, 0.28); }
.btn.danger:hover:not(:disabled) { background: rgba(255, 138, 149, 0.12); border-color: rgba(255, 138, 149, 0.45); }
.btn.block { width: 100%; }
.btn.busy { pointer-events: none; opacity: .7; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .9; }
.btn.busy .dot { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 16px 18px;
}
.card.pad-0 { padding: 0; overflow: hidden; }

.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h2 { margin: 0; font-size: 13px; font-weight: 600; }
.card-head .hint { font-size: 11.5px; color: var(--text-3); }
.card-head .sp { flex: 1; }
.card-body { padding: 14px 16px; }

.grid { display: grid; gap: 12px; }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 左右分栏（左侧内容稍宽），窄屏自动折叠 */
.grid.split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.grid.split-slim { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }

/* 统计卡 */
.stat-card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.stat-card .k { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat-card .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 6px; letter-spacing: -.3px; }
.stat-card .x { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.stat-card.ok .v { color: var(--green-fg); }
.stat-card.bad .v { color: var(--red-soft); }
.stat-card.accent { border-color: rgba(108, 77, 255, 0.28); background: linear-gradient(180deg, rgba(108, 77, 255, .10), rgba(24, 27, 32, .6)); }
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 77, 255, .16), transparent 70%);
  pointer-events: none;
}

/* 表单项 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field .tip { font-size: 11px; color: var(--text-3); line-height: 1.6; }

input[type=text], input[type=password], input[type=email], input[type=number], input[type=url],
input[type=time], input[type=date], select, textarea {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #12141a;
  color: var(--text);
  font-size: 12.8px;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
textarea { height: auto; min-height: 76px; padding: 8px 10px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(108, 77, 255, .65);
  box-shadow: 0 0 0 3px rgba(108, 77, 255, .14);
}
input::placeholder, textarea::placeholder { color: #4a4f5c; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%); background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* 开关 */
.switch {
  position: relative; width: 38px; height: 21px; flex: 0 0 auto;
  border-radius: 999px; border: 1px solid var(--line);
  background: #24272e; cursor: pointer; padding: 0;
  transition: background .16s, border-color .16s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: #9aa0ae; transition: transform .16s, background .16s;
}
.switch[aria-checked="true"] { background: rgba(108, 77, 255, .85); border-color: transparent; }
.switch[aria-checked="true"]::after { transform: translateX(17px); background: #fff; }

.set-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.set-row:last-child { border-bottom: 0; }
.set-row .sl { flex: 1 1 auto; min-width: 0; }
.set-row .sl b { display: block; font-size: 12.8px; font-weight: 500; }
.set-row .sl span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.55; }
.set-row.sub { background: rgba(255,255,255,.015); margin: 0 -16px; padding: 12px 16px; }

/* 标签 / 徽章 */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; line-height: 16px;
  border: 1px solid var(--line); color: var(--text-2);
  white-space: nowrap;
}
.chip.wechat { color: #4ade80; border-color: rgba(74,222,128,.28); background: rgba(74,222,128,.08); }
.chip.alipay { color: #6fb6ff; border-color: rgba(111,182,255,.28); background: rgba(59,130,246,.08); }
.chip.douyin { color: #c4b5fd; border-color: rgba(196,181,253,.28); background: rgba(139,92,246,.10); }
.chip.gray { color: var(--text-3); }
.chip.accent { color: #c4b5fd; border-color: rgba(196,181,253,.3); background: rgba(139,92,246,.10); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; border: 1px solid var(--line); color: var(--text-2);
  white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.success { color: var(--green-fg); border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.08); }
.pill.already { color: #7dd3fc; border-color: rgba(125,211,252,.28); background: rgba(125,211,252,.07); }
.pill.expired { color: var(--red-soft); border-color: rgba(255,138,149,.35); background: rgba(255,138,149,.1); }
.pill.failed  { color: var(--yellow); border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.08); }
.pill.idle    { color: var(--text-3); }
.pill.busy    { color: #c4b5fd; border-color: rgba(196,181,253,.3); background: rgba(139,92,246,.1); }
.pill.busy::before { animation: pulse 1s infinite; }

/* ══════════════ 账号卡片 ══════════════ */
.acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.acct {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 14px 14px 10px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: background .15s, border-color .15s, transform .15s;
}
.acct:hover { background: var(--hover); border-color: var(--line); }
.acct.invalid {
  border-color: rgba(255, 138, 149, .32);
  background: linear-gradient(180deg, rgba(255,138,149,.07), rgba(255,138,149,.02));
  box-shadow: 0 0 0 1px rgba(255,138,149,.16), 0 0 16px rgba(255,138,149,.08);
}
.acct.invalid::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 2px; border-radius: 2px; background: var(--red-soft);
}
.acct.off { opacity: .6; }
.acct.busy { border-color: rgba(108, 77, 255, .45); }

.acct-top { display: flex; align-items: center; gap: 10px; }
.acct-avatar {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #6c4dff, #a78bfa);
  flex: 0 0 auto;
}
.acct-avatar.alipay { background: linear-gradient(135deg, #1677ff, #4da6ff); }
.acct-avatar.douyin { background: linear-gradient(135deg, #1f2937, #4b5563); }
.acct-id { min-width: 0; flex: 1 1 auto; }
.acct-alias { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-nick { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

.acct-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acct-points { font-size: 11.5px; color: var(--text-3); }
.acct-points b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; margin-right: 3px; }
.acct-meta { font-size: 11px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }

.acct-actions {
  display: flex; gap: 4px;
  padding-top: 9px; margin-top: 2px;
  border-top: 1px solid var(--line-2);
}
.acct-actions .btn { flex: 1 1 0; height: 24px; font-size: 11.5px; border-color: transparent; color: var(--text-2); padding: 0 4px; }
.acct-actions .btn:hover:not(:disabled) { background: rgba(255,255,255,.07); color: var(--text); }
.acct-actions .btn.danger:hover:not(:disabled) { color: var(--red-soft); background: rgba(255,138,149,.1); }

/* 空状态 */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 54px 20px; color: var(--text-2); text-align: center;
}
.empty-mark {
  width: 62px; height: 62px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line-3); color: var(--text-3); margin-bottom: 6px;
}
.empty h3 { margin: 0; font-size: 14px; color: var(--text); font-weight: 600; }
.empty p { margin: 0 0 12px; font-size: 12px; color: var(--text-3); max-width: 420px; }

/* ══════════════ 表格 ══════════════ */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 12.3px; }
table.tb th {
  text-align: left; font-weight: 500; color: var(--text-3);
  padding: 9px 12px; border-bottom: 1px solid var(--line-2);
  white-space: nowrap; font-size: 11.5px; background: rgba(255,255,255,.012);
}
table.tb td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tr:hover td { background: rgba(255, 255, 255, 0.022); }
table.tb td.right, table.tb th.right { text-align: right; }
table.tb td.mono, .mono { font-family: var(--mono); font-size: 11.8px; }
.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.strong { color: var(--text); font-weight: 500; }
.tnum { font-variant-numeric: tabular-nums; }
.ellip { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 行内代码 */
code {
  font-family: var(--mono);
  font-size: 11.6px;
  background: rgba(108, 77, 255, .12);
  border: 1px solid rgba(108, 77, 255, .18);
  color: #cfc4ff;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.code code { background: transparent; border: 0; padding: 0; color: inherit; white-space: pre; }
.tb code { white-space: nowrap; }

.lv { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; }
.lv i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.lv.info i { background: #7dd3fc; }
.lv.success i { background: var(--green-fg); }
.lv.warn i { background: var(--yellow); }
.lv.error i { background: var(--red-soft); }
.lv.success { color: var(--green-fg); }
.lv.error { color: var(--red-soft); }
.lv.warn { color: var(--yellow); }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar .sp { flex: 1; }
.toolbar .filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar select, .toolbar input[type=date] { height: 30px; font-size: 12.2px; width: auto; min-width: 120px; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--text-3); }
.pager .sp { flex: 1; }
.pager a, .pager span.cur {
  min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none;
}
.pager span.cur { background: rgba(108,77,255,.16); border-color: rgba(108,77,255,.35); color: #fff; }
.pager a:hover { background: rgba(255,255,255,.06); text-decoration: none; }

/* 提示条 */
.banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-size: 12.3px;
  line-height: 1.7;
  margin-bottom: 14px;
  color: var(--text-2);
}
.banner.accent { border-color: rgba(108,77,255,.3); background: linear-gradient(90deg, rgba(108,77,255,.12), rgba(108,77,255,.03)); color: #cfc4ff; }
.banner.warn { border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.07); color: #fcd34d; }
.banner.ok { border-color: rgba(74,222,128,.28); background: rgba(74,222,128,.07); color: #86efac; }
.banner.err { border-color: rgba(255,138,149,.3); background: rgba(255,138,149,.08); color: #ffb3ba; }
.banner b { color: #fff; font-weight: 600; }
.banner code { background: rgba(0,0,0,.3); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 11.5px; color: #d9d5ff; }

/* 代码块 */
.code {
  position: relative;
  background: #0c0e12;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 11px 13px;
  font-family: var(--mono);
  font-size: 11.8px;
  color: #b7bdc9;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.75;
}
.code .k { color: #c4b5fd; }
.copy-btn {
  position: absolute; right: 8px; top: 8px;
  height: 22px; padding: 0 8px; font-size: 11px;
  border-radius: 5px; border: 1px solid var(--line);
  background: rgba(30,33,40,.9); color: var(--text-2); cursor: pointer;
}
.copy-btn:hover { color: #fff; border-color: var(--line-3); }

/* ══════════════ 弹窗 ══════════════ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(6, 7, 9, .68);
  backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.dialog {
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  background: #15181d;
  border: 1px solid var(--line-3);
  border-radius: 16px;
  box-shadow: var(--shadow);
  animation: pop .16s ease-out;
}
.dialog.narrow { max-width: 440px; }
.dialog.wide { max-width: 680px; }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: .6; } to { transform: none; opacity: 1; } }

.dialog-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}
.dialog-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.dialog-head .x {
  margin-left: auto; width: 26px; height: 26px; border-radius: 7px;
  border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 13px;
}
.dialog-head .x:hover { background: rgba(255,255,255,.07); color: var(--text); }
.dialog-body { padding: 16px; overflow-y: auto; }
.dialog-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-2);
}
.dialog-foot .sp { flex: 1; }

.segmented {
  display: inline-flex; gap: 3px; padding: 3px;
  background: #101318; border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.segmented button {
  height: 26px; padding: 0 13px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 12.2px; cursor: pointer;
}
.segmented button.on { background: rgba(108, 77, 255, .88); color: #fff; }

.guide {
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  padding: 11px 13px; font-size: 11.8px; color: var(--text-3); line-height: 1.85;
  background: rgba(255,255,255,.014);
}
.guide b { color: var(--text-2); font-weight: 500; }
.guide ol { margin: 6px 0 0; padding-left: 18px; }
.guide .mini { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ══════════════ Toast ══════════════ */
.toast-wrap {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 15px;
  border-radius: var(--r-lg);
  background: #1c1f26;
  border: 1px solid var(--line-3);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  font-size: 12.5px;
  color: var(--text);
  animation: toastIn .22s ease-out;
  max-width: 78vw;
}
.toast.success { border-color: rgba(74,222,128,.35); color: #b9f6cf; }
.toast.error { border-color: rgba(255,138,149,.38); color: #ffc2c8; }
.toast.warn { border-color: rgba(251,191,36,.35); color: #fde68a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ══════════════ 登录/注册 ══════════════ */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 18px;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(108, 77, 255, .22), transparent 62%),
    radial-gradient(760px 460px at 100% 4%, rgba(59, 130, 246, .13), transparent 58%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 880px;
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: rgba(21, 24, 29, .9);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
}
.auth-side {
  padding: 34px 30px;
  background:
    radial-gradient(400px 300px at 0% 0%, rgba(108,77,255,.28), transparent 70%),
    linear-gradient(160deg, #16121f, #101114 65%);
  border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column;
}
.auth-side .logo { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 16px; }
.auth-side h1 { margin: 0 0 8px; font-size: 20px; font-weight: 600; letter-spacing: .3px; }
.auth-side p { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.85; }
.auth-side ul { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.auth-side li { display: flex; gap: 8px; font-size: 12.2px; color: var(--text-2); align-items: flex-start; }
.auth-side li svg { color: #8b7bff; flex: 0 0 auto; margin-top: 2px; }
.auth-side .foot { margin-top: auto; font-size: 11px; color: var(--text-3); padding-top: 22px; }

.auth-form { padding: 34px 30px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.auth-form .sub { margin: 0 0 20px; font-size: 12px; color: var(--text-3); }
.auth-form .field { margin-bottom: 13px; }
.auth-form .btn.primary { height: 36px; margin-top: 6px; }
.auth-switch { margin-top: 16px; font-size: 12px; color: var(--text-3); text-align: center; }

/* 插件页步骤 */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; }
.step .n {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(108,77,255,.16); border: 1px solid rgba(108,77,255,.35);
  color: #c4b5fd; font-size: 11.5px; display: flex; align-items: center; justify-content: center;
}
.step .sc { flex: 1 1 auto; min-width: 0; }
.step .sc b { font-size: 12.8px; font-weight: 500; }
.step .sc p { margin: 3px 0 8px; font-size: 11.8px; color: var(--text-3); line-height: 1.7; }

/* 工具类 */
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .center { align-items: center; }
.hidden { display: none !important; }
.right { text-align: right; }
.small { font-size: 11.5px; }
.w100 { width: 100%; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

/* ══════════════ 响应式 ══════════════ */
@media (max-width: 1080px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25;
  }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .tb-stats { display: none; }
  .content { padding: 12px 12px 32px; }
  .topbar { padding: 10px 12px; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .grid.c4, .grid.c3, .grid.c2 { grid-template-columns: 1fr; }
  .grid.split, .grid.split-slim { grid-template-columns: 1fr; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .dialog { max-width: none; }
  .hide-sm { display: none !important; }
  table.tb { font-size: 11.9px; }
  table.tb th, table.tb td { padding: 8px; }
  table.tb .ellip { white-space: normal; max-width: 46vw !important; }
  .tb-title h1 { font-size: 14px; }
  .tb-title p { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   v2 新增：站点标识 / 站点卡片 / 移动端加固
   ══════════════════════════════════════════════════════════════ */

/* MT论坛 的专属配色（橙），与 MonkeyCode 的紫区分开 */
.chip.mt { color: #fdba74; border-color: rgba(251, 146, 60, .32); background: rgba(251, 146, 60, .10); }
.acct-avatar.mt { background: linear-gradient(135deg, #f97316, #fb923c); }
.acct-assets { display: flex; flex-wrap: wrap; gap: 5px; }

/* 工作台的站点卡片 */
.site-card { min-width: 0; }
.site-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.site-kpi {
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 9px 10px;
  min-width: 0;
}
.site-kpi span { display: block; font-size: 10.5px; color: var(--text-3); }
.site-kpi b { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.site-kpi b.bad { color: var(--red-soft); }
.site-kpi em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }

/* 提示列表 */
.tip-list { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 12px; line-height: 1.95; }
.tip-list li { margin-bottom: 2px; }

/* ── 移动端加固：禁止横向溢出 ── */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
.main, .content, .card, .stat-card, .acct, .dialog, .tb-wrap, .table-wrap, .site-card {
  min-width: 0;
}
.grid > *, .flex > * { min-width: 0; }
.content { width: 100%; }
img, svg, canvas, video { max-width: 100%; }
pre, .code { max-width: 100%; overflow-x: auto; }
input, select, textarea, button { max-width: 100%; }
.mono, .code, .set-row .sl span { word-break: break-word; }
.table-wrap { -webkit-overflow-scrolling: touch; }
table.tb { max-width: 100%; }
.toolbar { row-gap: 8px; }

@media (max-width: 860px) {
  .site-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-row { flex-wrap: nowrap; align-items: flex-start; }
  .set-row .sl { min-width: 0; }
  .set-row .switch, .set-row .pill { margin-top: 2px; flex: 0 0 auto; }
  .set-row input[type=time], .set-row input[type=number] { width: 118px !important; flex: 0 0 118px; }
  .stat-card { padding: 11px 12px; border-radius: 12px; }
  .stat-card .v { font-size: 20px; margin-top: 4px; }
  .acct-actions { flex-wrap: wrap; }
  .acct-actions .btn { flex: 1 1 44%; }
  .acct-actions form { flex: 1 1 44%; }
  .modal { padding: 12px; align-items: flex-end; }
  .dialog { max-height: 88vh; border-radius: 16px 16px 12px 12px; }
  .topbar { min-height: 52px; }
  .content { padding: 10px 10px 28px; }
  .card { padding: 13px 13px; border-radius: 12px; }
  .card-head { padding: 10px 12px; }
  .card-body { padding: 12px; }
}

@media (max-width: 420px) {
  body { font-size: 12.5px; }
  .site-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-kpi:nth-child(3) { grid-column: span 2; }
  .stat-card .v { font-size: 19px; }
  .toolbar { gap: 6px; }
  .toolbar .btn { height: 28px; font-size: 12px; padding: 0 10px; }
  .acct-grid { grid-template-columns: 1fr; }
  .sb-brand h1 { font-size: 12.5px; }
  .dialog-body { padding: 12px; }
  .pager { flex-wrap: wrap; }
}

/* 长命令/路径在提示条里允许折行，避免被裁切 */
.banner code, .banner .mono { white-space: normal; word-break: break-all; }

@media (max-width: 860px) {
  /* 表格里的按钮在手机上竖排，避免把表格撑得过宽 */
  table.tb .flex.gap8 { flex-direction: column; gap: 4px; }
  table.tb .flex.gap8 .btn { width: 100%; }
}

/* 额度购买入口 */
.buy-box {
  background: linear-gradient(180deg, rgba(251, 146, 60, .10), rgba(251, 146, 60, .03));
  border: 1px solid rgba(251, 146, 60, .28);
  border-radius: var(--r-xl);
  padding: 12px 14px;
}
.buy-txt b { display: block; font-size: 13px; }
.buy-txt span { display: block; font-size: 11.8px; color: var(--text-2); margin-top: 3px; line-height: 1.7; }
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent-2); font: inherit; text-decoration: underline;
}
.linklike:hover { color: #a48bff; }


/* 卡密批量操作条 */
.bulk-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-top: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(108,77,255,.10), rgba(108,77,255,.03));
}
.bulk-bar b { color: var(--text); }
table.tb input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }
@media (max-width: 860px) {
  .bulk-bar { flex-wrap: wrap; }
  .bulk-bar .btn { flex: 1 1 44%; }
  /* 路径/命令这类长串在手机上折行，不要横向裁切 */
  .set-row .code { white-space: pre-wrap; word-break: break-all; }
}
