/* ==========================================================================
   微信助手 · 苹果风格毛玻璃 UI
   ========================================================================== */

:root {
  --bg: #070a13;
  --bg-soft: #0b1120;
  --text: #f4f7ff;
  --muted: #96a2bf;
  --muted-2: #6d7a99;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.085);
  --accent: #7c9cff;
  --accent-2: #a97bff;
  --accent-3: #4fd1ff;
  --ok: #45d99a;
  --warn: #ffb955;
  --danger: #ff6b81;
  --radius: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --gap: 22px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  --sidebar-w: 264px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
code, .mono {
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

::selection { background: rgba(124, 156, 255, 0.32); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ------------------------------------------------------------------ 背景光晕 */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: orbFloat 22s ease-in-out infinite;
}
.orb-1 { width: 560px; height: 560px; background: #3355ff; left: -10%; top: -14%; }
.orb-2 { width: 460px; height: 460px; background: #9b4dff; right: -8%; top: 2%; opacity: 0.42; animation-delay: -6s; }
.orb-3 { width: 520px; height: 520px; background: #009dff; left: 32%; bottom: -24%; opacity: 0.3; animation-delay: -12s; }
.orb-4 { width: 340px; height: 340px; background: #ff4fa3; right: 12%; bottom: -10%; opacity: 0.16; animation-delay: -18s; }

@keyframes orbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(24px, 36px, 0) scale(1.06); }
}

/* ------------------------------------------------------------------ 毛玻璃基础 */
.glass {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.032));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
}

/* ------------------------------------------------------------------ 布局 */
.sidebar {
  position: fixed;
  left: 22px;
  top: 22px;
  bottom: 22px;
  width: var(--sidebar-w);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow: hidden;
}

.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #6f8dff, #a575ff 60%, #ff7ac4);
  box-shadow: 0 8px 22px rgba(116, 128, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; }
.brand-sub {
  font-size: 9.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 2px;
}
.brand-text { min-width: 0; }
.side-close { display: none; }

.nav {
  flex: 1;
  overflow-y: auto;
  margin: 16px -6px 12px;
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav-group {
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 12px 7px;
}
.nav-group:first-child { padding-top: 2px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.nav-item .ico { opacity: 0.8; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: var(--text); }
.nav-item.active {
  background: linear-gradient(100deg, rgba(124, 156, 255, 0.24), rgba(169, 123, 255, 0.13));
  border-color: rgba(255, 255, 255, 0.11);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 8px 20px rgba(80, 100, 255, 0.12);
}
.nav-item.active .ico { opacity: 1; color: #cfd9ff; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 2.5px;
  border-radius: 4px;
  background: linear-gradient(180deg, #7c9cff, #b97bff);
}

.side-card {
  margin-top: auto;
  padding: 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.side-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.side-card-top .ico { color: var(--accent); }
.side-card-nums { display: flex; gap: 22px; margin: 12px 0 12px; }
.side-card-nums div { display: flex; flex-direction: column; gap: 2px; }
.side-card-nums b { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; }
.side-card-nums small { font-size: 11px; color: var(--muted-2); }
.side-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  transition: color 0.18s;
}
.side-card-link:hover { color: var(--accent); }

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 6px 2px;
  border-top: 1px solid var(--line-soft);
}
.side-user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-user-meta b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-meta span { font-size: 11px; color: var(--muted-2); }

.main {
  margin-left: calc(var(--sidebar-w) + 44px);
  padding: 22px 40px 64px;
  min-height: 100vh;
}
.page-body {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 1520px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  border-radius: 18px;
  margin-bottom: 24px;
  max-width: 1520px;
}
.page-head h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.top-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6f8dff, #a575ff);
  box-shadow: 0 6px 18px rgba(110, 120, 255, 0.35);
}
.menu-btn { display: none; }

.side-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(4, 7, 14, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
}
.side-overlay.show { opacity: 1; visibility: visible; }

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn .ico { flex: 0 0 auto; }
.btn-primary {
  background: linear-gradient(135deg, #6f8dff, #a575ff);
  box-shadow: 0 10px 26px rgba(104, 118, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(104, 118, 255, 0.42); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.11);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.10); }
.btn-danger { background: rgba(255, 107, 129, 0.14); border-color: rgba(255, 107, 129, 0.28); color: #ff9dab; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 10px; gap: 6px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; gap: 5px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 14.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn-icon-xs { width: 26px; height: 26px; border-radius: 8px; }
.btn-icon-danger:hover { background: rgba(255, 107, 129, 0.14); color: var(--danger); }

/* ------------------------------------------------------------------ 表单 */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
input[type="text"], input[type="password"], input[type="number"],
input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.65; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(150, 162, 191, 0.55); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(124, 156, 255, 0.6);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 0 0 3px rgba(124, 156, 255, 0.14);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2396a2bf' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
select option { background: #141a2b; color: #f4f7ff; }
select.sm { height: 34px; font-size: 12.5px; border-radius: 10px; padding: 0 32px 0 12px; background-position: right 10px center; }
.hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-status { font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ------------------------------------------------------------------ 卡片 */
.card { padding: 24px 26px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.card-title { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.link-more:hover { color: var(--accent); }
.inline-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.inline-link:hover { color: var(--accent); }

/* ------------------------------------------------------------------ 徽标 / 状态 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-blue { background: rgba(110, 150, 255, 0.14); color: #a9c0ff; border-color: rgba(110, 150, 255, 0.22); }
.badge-purple { background: rgba(169, 123, 255, 0.14); color: #cbb0ff; border-color: rgba(169, 123, 255, 0.24); }
.badge-green { background: rgba(69, 217, 154, 0.13); color: #7ce6b4; border-color: rgba(69, 217, 154, 0.22); }
.badge-amber { background: rgba(255, 185, 85, 0.13); color: #ffca7a; border-color: rgba(255, 185, 85, 0.22); }
.badge-red { background: rgba(255, 107, 129, 0.13); color: #ff9dab; border-color: rgba(255, 107, 129, 0.22); }
.badge-gray { background: rgba(255, 255, 255, 0.06); color: var(--muted); border-color: var(--line); }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-green { background: #45d99a; box-shadow: 0 0 8px rgba(69, 217, 154, 0.7); }
.dot-blue { background: #7c9cff; }
.dot-purple { background: #b07cff; }
.dot-amber { background: #ffb955; }
.dot-gray { background: #6d7a99; }
.muted { color: var(--muted); }
.text-warn { color: var(--warn); }

/* ------------------------------------------------------------------ 头像 */
.avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, rgba(111, 141, 255, 0.85), rgba(165, 117, 255, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.avatar-sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.avatar-xs { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.avatar-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 20px; }
.avatar-live { box-shadow: 0 0 0 3px rgba(69, 217, 154, 0.18), 0 8px 22px rgba(110, 120, 255, 0.3); }

/* ------------------------------------------------------------------ 仪表盘 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.stat-card { padding: 22px 24px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stat-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.ico-blue { background: rgba(110, 150, 255, 0.14); color: #9fb8ff; }
.ico-purple { background: rgba(169, 123, 255, 0.14); color: #cbb0ff; }
.ico-amber { background: rgba(255, 185, 85, 0.12); color: #ffca7a; }
.ico-green { background: rgba(69, 217, 154, 0.12); color: #7ce6b4; }
.stat-num { font-size: 34px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.stat-foot { font-size: 11.5px; color: var(--muted-2); margin-top: 12px; }
.stat-trend { font-size: 11.5px; color: var(--muted-2); }
.stat-mini .stat-label { margin-top: 0; margin-bottom: 8px; }
.stat-mini .stat-num { font-size: 28px; margin-bottom: 10px; }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: var(--gap); align-items: start; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 210px; padding: 8px 4px 0; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}
.bar { display: block; width: 13px; border-radius: 6px; min-height: 4px; transition: height 0.4s ease; }
.bar-out { background: linear-gradient(180deg, #8aa5ff, #4d6fff); box-shadow: 0 0 18px rgba(90, 120, 255, 0.35); }
.bar-in { background: linear-gradient(180deg, #c19cff, #7d4dff); box-shadow: 0 0 18px rgba(150, 100, 255, 0.3); }
.bar-label { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-soft);
  transition: 0.18s ease;
}
.quick-item:hover { background: rgba(255, 255, 255, 0.085); transform: translateY(-2px); }
.q-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.quick-item b { font-size: 12.5px; font-weight: 500; }
.quick-item small { font-size: 11px; color: var(--muted-2); }
.mini-summary {
  display: flex;
  gap: 30px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.mini-summary div { display: flex; flex-direction: column; gap: 2px; }
.mini-summary span { font-size: 11px; color: var(--muted-2); }
.mini-summary b { font-size: 19px; font-weight: 600; }

.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 2px; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: #7c9cff; margin-top: 6px; flex: 0 0 auto; box-shadow: 0 0 10px rgba(124, 156, 255, 0.6); }
.activity-main { flex: 1; min-width: 0; }
.activity-main b { font-size: 12.5px; font-weight: 500; }
.activity-main p { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

.account-list { display: flex; flex-direction: column; }
.account-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.account-row:last-child { border-bottom: none; }
.account-meta { flex: 1; min-width: 0; }
.account-meta b { display: block; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta span { font-size: 11px; color: var(--muted-2); }
.account-state { display: flex; align-items: center; gap: 8px; }
.account-state small { font-size: 10.5px; color: var(--muted-2); }

.notice {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 18px;
  background: linear-gradient(110deg, rgba(124, 156, 255, 0.16), rgba(169, 123, 255, 0.08));
  border-color: rgba(124, 156, 255, 0.22);
}
.notice-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cfdaff;
  background: rgba(124, 156, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.notice-body { flex: 1; min-width: 0; }
.notice-body b { font-size: 14px; font-weight: 600; }
.notice-body p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------------ 工具栏 / 搜索 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border-radius: 18px;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.toolbar-title { font-size: 14px; font-weight: 600; }
.toolbar-count { font-size: 11.5px; color: var(--muted-2); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .ico { position: absolute; left: 12px; color: var(--muted-2); pointer-events: none; }
.search-box input {
  width: 240px;
  height: 34px;
  padding-left: 35px;
  border-radius: 10px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.055);
}

/* ------------------------------------------------------------------ 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.03em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 15px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.032); }
tbody tr:last-child td { border-bottom: none; }
.ta-right { text-align: right; }

.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user b { display: block; font-size: 13px; font-weight: 500; }
.cell-user span { font-size: 11px; color: var(--muted-2); }
.cell-account b { display: block; font-size: 12.5px; font-weight: 500; }
.cell-account span { font-size: 11px; color: var(--muted-2); }
.cell-task b { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; }
.cell-task span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.cell-time b { display: block; font-size: 12.5px; font-weight: 500; }
.cell-time span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.cell-text { max-width: 260px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.cell-sub { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 4px; }
.cell-code { display: flex; align-items: center; gap: 6px; }
.code-text { font-size: 12px; letter-spacing: 0.02em; color: #cfdaff; }
.row-actions { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.mini-progress { width: 72px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.09); overflow: hidden; margin-bottom: 4px; }
.mini-progress span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7c9cff, #a97bff); }

/* ------------------------------------------------------------------ 选项卡 / 分页 */
.tabs { display: flex; gap: 4px; padding: 7px; border-radius: 16px; overflow-x: auto; }
.tab {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: 0.18s ease;
}
.tab:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.tab.active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.11);
  color: #fff;
}
.tab-num { font-size: 10.5px; color: var(--muted-2); }
.tab.active .tab-num { color: #cfd9ff; }

.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 18px 6px 4px; }
.pg {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}
.pg:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.pg.active { background: linear-gradient(135deg, #6f8dff, #a575ff); color: #fff; border-color: transparent; }
.pg.disabled { opacity: 0.35; pointer-events: none; }
.pager-info { margin-left: auto; font-size: 11.5px; color: var(--muted-2); }

/* ------------------------------------------------------------------ 空状态 */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; }
.empty-lg { padding: 70px 20px; }
.empty-ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a9b8e8;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}
.empty h3 { font-size: 16px; font-weight: 600; }
.empty p { font-size: 12.5px; color: var(--muted); max-width: 460px; line-height: 1.6; }
.empty .btn { margin-top: 8px; }

/* ------------------------------------------------------------------ 账号卡片 */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--gap); }
.account-card { display: flex; flex-direction: column; gap: 18px; padding: 22px; }
.account-card-head { display: flex; align-items: center; gap: 14px; }
.account-card-title { flex: 1; min-width: 0; }
.account-card-title b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-title span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-soft);
}
.account-card-stats div { min-width: 0; }
.account-card-stats b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-stats span { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }
.account-card-foot { display: flex; align-items: center; gap: 8px; }
.account-card-foot .btn-icon { margin-left: auto; }

/* ------------------------------------------------------------------ 消息列表 */
.msg-list { display: flex; flex-direction: column; }
.msg-row { display: flex; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
.msg-row:last-child { border-bottom: none; }
.msg-dir {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.msg-dir.out { background: rgba(110, 150, 255, 0.15); color: #a9c0ff; }
.msg-dir.in { background: rgba(169, 123, 255, 0.15); color: #cbb0ff; }
.msg-body { flex: 1; min-width: 0; }
.msg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-meta b { font-size: 13px; font-weight: 500; }
.msg-meta .mono { font-size: 10.5px; color: var(--muted-2); }
.msg-origin { font-size: 10.5px; color: var(--muted-2); }
.msg-content { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-top: 5px; word-break: break-word; }
.msg-time { font-size: 11px; color: var(--muted-2); white-space: nowrap; flex: 0 0 auto; }

/* ------------------------------------------------------------------ 词库 */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.lib-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.lib-head { display: flex; align-items: center; justify-content: space-between; }
.lib-uses { font-size: 10.5px; color: var(--muted-2); }
.lib-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.lib-content { font-size: 12.5px; color: var(--muted); line-height: 1.7; flex: 1; word-break: break-word; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 10.5px;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
}
.lib-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* ------------------------------------------------------------------ AI */
.ai-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--gap); align-items: start; }
.ai-side { display: flex; flex-direction: column; }
.ai-usage { display: flex; flex-direction: column; gap: 14px; }
.usage-item { padding-left: 14px; border-left: 2px solid rgba(124, 156, 255, 0.35); }
.usage-item b { font-size: 12.5px; font-weight: 500; }
.usage-item p { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; margin-top: 2px; }
.ai-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
}
.tone-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: 0.18s ease;
}
.chip-btn:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.chip-btn.active { background: rgba(124, 156, 255, 0.18); border-color: rgba(124, 156, 255, 0.35); color: #cfd9ff; }
.ai-writer { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.ai-writer-input, .ai-writer-output { display: flex; flex-direction: column; gap: 14px; }
.quick-prompts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--muted-2); }
.ai-writer .btn-primary { align-self: flex-start; }

/* ------------------------------------------------------------------ 卡密 */
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.api-hero { display: flex; gap: 40px; align-items: center; padding: 30px 32px; }
.api-hero-left { flex: 1.2; min-width: 0; }
.api-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: #a9c0ff;
  margin-bottom: 10px;
}
.api-hero h2 { font-size: 25px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; }
.api-hero p { font-size: 12.5px; color: var(--muted); margin-top: 8px; max-width: 520px; line-height: 1.6; }
.api-hero-right { flex: 1; min-width: 0; }
.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}
.copy-field .mono { flex: 1; font-size: 11.5px; color: #cfd9ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-hint { font-size: 11px; color: var(--muted-2); margin-top: 10px; line-height: 1.6; }

.api-flow { display: flex; align-items: stretch; gap: 10px; }
.flow-step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; min-width: 0; }
.flow-num { font-size: 11px; color: #a9c0ff; font-weight: 600; }
.flow-step b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.flow-step small { display: block; font-size: 10px; color: var(--muted-2); }
.flow-arrow { display: flex; align-items: center; color: var(--muted-2); flex: 0 0 auto; }

.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.doc-item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
  color: var(--muted);
}
.doc-item summary::-webkit-details-marker { display: none; }
.doc-item summary b { font-size: 13px; color: var(--text); font-weight: 600; }
.doc-item[open] summary { border-bottom: 1px solid var(--line-soft); }
.doc-method {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 6px;
  color: #7ce6b4;
  background: rgba(69, 217, 154, 0.12);
  border: 1px solid rgba(69, 217, 154, 0.2);
}
.doc-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.code-block {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: #c9d6ff;
  background: rgba(6, 10, 20, 0.55);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
}
.doc-note { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }
.doc-note code { color: #cfdaff; }

/* ------------------------------------------------------------------ 自动回复 */
.switch-row { display: flex; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.switch-row:last-of-type { border-bottom: none; }
.switch-text { flex: 1; min-width: 0; }
.switch-text b { display: block; font-size: 13px; font-weight: 500; }
.switch-text span { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  background: rgba(255, 185, 85, 0.07);
  border: 1px solid rgba(255, 185, 85, 0.16);
}
.hint-box .ico { color: var(--warn); flex: 0 0 auto; }
.match-list { display: flex; flex-direction: column; gap: 13px; }
.match-item { display: flex; align-items: flex-start; gap: 10px; }
.match-item p { font-size: 11.5px; color: var(--muted-2); line-height: 1.55; }
.match-item code { color: #cfdaff; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: 0.22s ease;
}
.switch span::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: 0.22s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.switch input:checked + span { background: linear-gradient(135deg, #6f8dff, #a575ff); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(18px); }
.switch-sm { width: 38px; height: 22px; }
.switch-sm span::after { width: 16px; height: 16px; }
.switch-sm input:checked + span::after { transform: translateX(16px); }

/* ------------------------------------------------------------------ 设置 */
.settings-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--gap); align-items: start; }
.info-list { display: flex; flex-direction: column; }
.info-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.info-list div:last-child { border-bottom: none; }
.info-list span { color: var(--muted-2); white-space: nowrap; }
.info-list b { font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.maint-list { display: flex; flex-direction: column; gap: 6px; }
.maint-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.maint-row:last-child { border-bottom: none; }
.maint-row > div { flex: 1; min-width: 0; }
.maint-row b { display: block; font-size: 12.5px; font-weight: 500; }
.maint-row span { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.alert-danger { background: rgba(255, 107, 129, 0.1); border: 1px solid rgba(255, 107, 129, 0.22); color: #ff9dab; }
.alert-success { background: rgba(69, 217, 154, 0.1); border: 1px solid rgba(69, 217, 154, 0.24); color: #7ce6b4; }

/* ------------------------------------------------------------------ 弹窗 / Toast */
.modal-host:empty { display: none; }
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 8, 15, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.18s ease;
}
.modal-panel {
  width: min(620px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(30, 37, 54, 0.94), rgba(15, 20, 32, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: popIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-panel.modal-wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-head h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.modal-body { display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.modal-foot .modal-left { margin-right: auto; font-size: 11.5px; color: var(--muted-2); }

.toast-host {
  position: fixed;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 86vw;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--text);
  background: rgba(24, 30, 46, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: toastIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.success { border-color: rgba(69, 217, 154, 0.3); }
.toast.error { border-color: rgba(255, 107, 129, 0.35); }
.toast .t-ico { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.toast.success .t-ico { background: rgba(69, 217, 154, 0.18); color: #7ce6b4; }
.toast.error .t-ico { background: rgba(255, 107, 129, 0.18); color: #ff9dab; }

/* ------------------------------------------------------------------ 登录 / 安装 */
.page-auth { display: flex; align-items: center; justify-content: center; padding: 32px 24px; min-height: 100vh; }
.auth-wrap { width: 100%; max-width: 1080px; }
.auth-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 30px;
  min-height: 640px;
}
.auth-form { display: flex; flex-direction: column; padding: 46px 50px; }
.auth-head { margin: 40px 0 28px; }
.auth-head h1 { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; }
.auth-head p { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.auth-login-form { display: flex; flex-direction: column; gap: 16px; }
.auth-login-form .btn { margin-top: 8px; }
.auth-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 30px;
  font-size: 11px;
  color: var(--muted-2);
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

.auth-visual {
  position: relative;
  padding: 52px 46px;
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 78% 12%, rgba(169, 123, 255, 0.32), transparent 55%),
    radial-gradient(circle at 12% 88%, rgba(60, 140, 255, 0.3), transparent 55%),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.visual-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 120, 255, 0.28), transparent 70%);
  top: 4%;
  right: -12%;
  filter: blur(30px);
}
.visual-content { position: relative; z-index: 1; }
.visual-tag {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: rgba(207, 217, 255, 0.72);
}
.visual-content h2 {
  font-size: 36px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.04em;
  margin: 16px 0 14px;
}
.visual-content > p {
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(210, 219, 245, 0.66);
  max-width: 340px;
}
.visual-list { display: flex; flex-direction: column; gap: 18px; margin: 36px 0; }
.visual-item { display: flex; gap: 14px; align-items: flex-start; }
.vi-icon {
  font-size: 10.5px;
  font-weight: 600;
  color: #b9c8ff;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}
.visual-item b { display: block; font-size: 13px; font-weight: 500; }
.visual-item small { display: block; font-size: 11px; color: rgba(210, 219, 245, 0.55); margin-top: 2px; }
.visual-foot { display: flex; align-items: center; gap: 12px; font-size: 10.5px; color: rgba(210, 219, 245, 0.5); }
.stacked-avatars { display: flex; }
.stacked-avatars span {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  background: linear-gradient(135deg, rgba(111, 141, 255, 0.9), rgba(169, 123, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-left: -6px;
}
.stacked-avatars span:first-child { margin-left: 0; }

.install-card { display: block; max-width: 860px; margin: 0 auto; padding: 44px 50px; min-height: auto; }
.install-head h1 { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; margin: 32px 0 8px; }
.install-head p { font-size: 12.5px; color: var(--muted); }
.install-form { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.form-section-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.install-form .btn { margin-top: 6px; }
.install-foot { font-size: 11px; color: var(--muted-2); text-align: center; line-height: 1.6; margin-top: 6px; }
.install-hero { text-align: center; padding: 36px 0 10px; }
.install-hero h1 { font-size: 26px; font-weight: 650; margin: 18px 0 8px; }
.install-hero p { font-size: 12.5px; color: var(--muted); }
.install-check {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7ce6b4;
  background: rgba(69, 217, 154, 0.12);
  border: 1px solid rgba(69, 217, 154, 0.28);
  box-shadow: 0 12px 30px rgba(69, 217, 154, 0.16);
}
.install-check svg { width: 26px; height: 26px; }
.install-tips {
  margin: 26px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.install-tips code { color: #cfdaff; }

/* ------------------------------------------------------------------ 动画 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ 选择联系人 */
.picker { display: flex; flex-direction: column; gap: 10px; }
.picker-top { display: flex; align-items: center; gap: 10px; }
.picker-top .search-box { flex: 1; }
.picker-top .search-box input { width: 100%; }
.pick-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
}
.pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12.5px;
  transition: background 0.15s ease;
}
.pick-item:hover { background: rgba(255, 255, 255, 0.055); }
.pick-item input { width: 15px; height: 15px; accent-color: #7c9cff; margin: 0; }
.pick-item b { font-weight: 500; }
.pick-item span { font-size: 10.5px; color: var(--muted-2); }
.pick-item .pi-meta { flex: 1; min-width: 0; overflow: hidden; }
.pick-item .pi-meta b, .pick-item .pi-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-empty { padding: 18px; text-align: center; font-size: 12px; color: var(--muted-2); }
.pick-count { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  color: #cfd9ff;
  background: rgba(124, 156, 255, 0.14);
  border: 1px solid rgba(124, 156, 255, 0.26);
}
.sel-chip button { background: none; border: none; color: inherit; cursor: pointer; padding: 0; line-height: 1; opacity: 0.7; }
.sel-chip button:hover { opacity: 1; }

/* 卡密结果列表 */
.code-result { display: flex; flex-direction: column; gap: 10px; }
.code-result textarea { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; min-height: 180px; }

/* ------------------------------------------------------------------ 程序更新 */
.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px;
  border-radius: 16px;
  border: 1px dashed rgba(124, 156, 255, 0.34);
  background: rgba(124, 156, 255, 0.055);
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
}
.upload-zone:hover, .upload-zone.has-file {
  border-color: rgba(124, 156, 255, 0.62);
  background: rgba(124, 156, 255, 0.10);
}
.upload-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone b { font-size: 14px; font-weight: 600; color: #dbe4ff; }
.upload-zone .upload-tip { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; max-width: 460px; }
.upload-ico {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a9b8e8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.upload-zone.has-file .upload-ico { color: #7ce6b4; background: rgba(69, 217, 154, 0.12); border-color: rgba(69, 217, 154, 0.25); }
.update-notes-row td { padding-top: 0; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.update-notes { display: block; font-size: 12px; color: var(--muted-2); line-height: 1.7; white-space: pre-wrap; max-width: 900px; }
.update-notes-row:hover { background: transparent; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1440px) {
  .main { padding-left: 32px; padding-right: 32px; }
  .search-box input { width: 190px; }
}

@media (max-width: 1180px) {
  .sidebar { transform: translateX(calc(-100% - 40px)); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
  .sidebar.open { transform: none; }
  .side-close { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; background: none; border: none; color: var(--muted); cursor: pointer; }
  .main { margin-left: 0; padding: 16px 24px 56px; }
  .menu-btn { display: inline-flex; }
  .topbar { top: 12px; }
  .stats-grid, .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .ai-grid, .settings-grid { grid-template-columns: 1fr; }
  .api-hero { flex-direction: column; align-items: stretch; gap: 22px; }
}

@media (max-width: 900px) {
  .auth-card { grid-template-columns: 1fr; min-height: auto; }
  .auth-visual { display: none; }
  .auth-form { padding: 34px 28px; }
  .install-card { padding: 30px 24px; }
  .api-flow { flex-wrap: wrap; }
  .flow-arrow { display: none; }
  .flow-step { flex: 1 1 45%; }
  .ai-writer { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .toolbar-left { flex: 1; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
}

@media (max-width: 720px) {
  .main { padding: 12px 14px 48px; }
  .topbar { padding: 12px 14px; gap: 12px; margin-bottom: 18px; }
  .page-head h1 { font-size: 18px; }
  .page-head p { display: none; }
  .top-chip { display: none; }
  .stats-grid, .stats-grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .notice { flex-direction: column; align-items: flex-start; }
  .notice .btn { width: 100%; }
  .quick-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .pager-info { display: none; }
  .card-head { flex-direction: column; gap: 12px; }
  .account-grid, .lib-grid { grid-template-columns: 1fr; }
  .msg-time { display: none; }
  .modal-panel { padding: 20px; border-radius: 20px; }
  .auth-wrap { max-width: 100%; }
  .auth-form { padding: 28px 22px; }
  .auth-head { margin: 28px 0 22px; }
}
