/* =========================================================
   Sulian Theme - app.css
   原生实现，无构建依赖
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
  --brand: #10b981;
  --brand-2: #059669;
  --brand-soft: #ecfdf5;
  --brand-ring: rgba(16, 185, 129, .25);

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e6eaf2;
  --border-strong: #d5dbe6;

  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #ef4444;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 24px -8px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .28);

  --sidebar-w: 236px;
  --topbar-h: 62px;
}

html[data-color="blue"] {
  --brand: #3b82f6;
  --brand-2: #2563eb;
  --brand-soft: #eff6ff;
  --brand-ring: rgba(59, 130, 246, .25);
}

html[data-color="purple"] {
  --brand: #8b5cf6;
  --brand-2: #7c3aed;
  --brand-soft: #f5f3ff;
  --brand-ring: rgba(139, 92, 246, .25);
}

html[data-color="orange"] {
  --brand: #f97316;
  --brand-2: #ea580c;
  --brand-soft: #fff7ed;
  --brand-ring: rgba(249, 115, 22, .25);
}

html[data-color="dark"] {
  --brand: #6366f1;
  --brand-2: #4f46e5;
  --brand-soft: rgba(99, 102, 241, .14);
  --brand-ring: rgba(99, 102, 241, .3);

  --bg: #0b1120;
  --surface: #131a2a;
  --surface-2: #1a2337;
  --border: #24304a;
  --border-strong: #33405e;

  --text: #e8edf7;
  --text-2: #a3aec3;
  --text-3: #71809b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 28px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.3; }

code, pre, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.boot {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-3);
}

.boot-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}

.btn:hover { border-color: var(--brand); color: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px -8px var(--brand-ring);
}

.btn-primary:hover { color: #fff; filter: brightness(1.06); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--brand-2); }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .16s, box-shadow .16s;
}

.input::placeholder { color: var(--text-3); }

.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-error { background: rgba(239, 68, 68, .09); border-color: rgba(239, 68, 68, .3); color: var(--danger); }
.alert-ok { background: var(--brand-soft); border-color: var(--brand-ring); color: var(--brand-2); }
.alert-warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .32); color: #b45309; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.badge-ok { background: var(--brand-soft); color: var(--brand-2); border-color: var(--brand-ring); }
.badge-danger { background: rgba(239, 68, 68, .1); color: var(--danger); border-color: rgba(239, 68, 68, .28); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-head h3 { font-size: 15px; margin-right: auto; }
.card-head .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-body { padding: 20px; }

.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.empty svg { opacity: .45; margin-bottom: 8px; }

/* ---------- 登录 / 注册 ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(150deg, #0b1120 0%, #16233b 55%, #0b1120 100%);
  background-size: cover;
  background-position: center;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 18% 12%, var(--brand-ring), transparent 70%),
    radial-gradient(50% 45% at 88% 88%, rgba(99, 102, 241, .28), transparent 72%);
  pointer-events: none;
}

.auth-brand > * { position: relative; z-index: 1; }

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .3px;
}

.auth-logo img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: rgba(255, 255, 255, .12); }

.auth-logo .mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 18px;
}

.auth-hero h1 { font-size: 34px; line-height: 1.28; margin-bottom: 14px; }
.auth-hero p { color: rgba(255, 255, 255, .68); font-size: 15px; max-width: 30em; margin: 0 0 26px; }

.auth-features { display: grid; gap: 12px; max-width: 27em; }

.auth-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.auth-feature .ico {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.auth-feature b { font-size: 13.5px; display: block; }
.auth-feature span { font-size: 12.5px; color: rgba(255, 255, 255, .6); }

.auth-brand-footer { font-size: 12.5px; color: rgba(255, 255, 255, .45); }

.auth-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}

.auth-box { width: 100%; max-width: 398px; }

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s;
}

.auth-tab.active { background: var(--surface); color: var(--brand-2); box-shadow: var(--shadow-sm); }

.auth-title { font-size: 22px; margin-bottom: 6px; }
.auth-desc { color: var(--text-3); font-size: 13px; margin: 0 0 22px; }

.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-3); }

/* ---------- 应用外壳 ---------- */
.shell { min-height: 100vh; display: flex; }

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform .22s ease;
}

.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
}

.sidebar-brand img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; }
.sidebar-brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff; font-size: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.sidebar-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }

.nav-group-title {
  padding: 12px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-bottom: 3px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
  text-decoration: none;
}

/* hover 仅在支持悬停的设备生效，避免触屏/点击后残留高亮被误认为“当前页” */
@media (hover: hover) {
  .nav-item:hover { background: var(--surface-2); color: var(--text); }
}
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand-2);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}
.nav-item svg { flex: 0 0 18px; }
.nav-item .dot { margin-left: auto; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.sidebar-foot .nav-item.tg { color: var(--brand-2); }

.sidebar-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.sidebar-mask.show { opacity: 1; pointer-events: auto; }

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar h2 { font-size: 16px; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}

.icon-btn:hover { color: var(--brand-2); border-color: var(--brand); }
.menu-toggle { display: none; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.user-chip img { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.user-chip .avatar-ph {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-2);
}
.user-chip .name { font-size: 13px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
}

.dropdown-menu .item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}

.dropdown-menu .item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown-menu .item.danger:hover { background: rgba(239, 68, 68, .09); color: var(--danger); }
.dropdown-menu .sep { height: 1px; margin: 5px 4px; background: var(--border); }
.dropdown-menu .head { padding: 9px 11px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border); margin-bottom: 5px; }

/* 顶栏「温馨提示」公告 */
.notice-menu { width: 300px; max-width: calc(100vw - 32px); }
.notice-menu .foot {
  display: block;
  margin-top: 4px;
  padding: 9px 11px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--brand);
  text-align: center;
}
.notice-menu .foot:hover { background: var(--surface-2); text-decoration: none; }
.notice-mini { display: flex; flex-direction: column; }
.mini-item { display: block; padding: 9px 11px; border-radius: 8px; }
.mini-item:hover { background: var(--surface-2); text-decoration: none; }
.mini-item b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-3); }
.mini-empty { padding: 16px 11px; font-size: 12.5px; color: var(--text-3); text-align: center; }

.content { flex: 1; padding: 24px 22px 40px; max-width: 1220px; width: 100%; }

.footer {
  padding: 18px 22px 28px;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
}

/* ---------- 用户中心 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  color: #fff;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 60%, #0f172a 145%);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .11);
}

.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero h1 { font-size: 21px; margin-bottom: 4px; }
.hero p { margin: 0; color: rgba(255, 255, 255, .8); font-size: 13.5px; }
.hero .actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

.hero .btn {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  backdrop-filter: blur(6px);
}

.hero .btn:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.hero .btn-primary { background: #fff; border-color: #fff; color: var(--brand-2); }
.hero .btn-primary:hover { color: var(--brand-2); filter: brightness(.97); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .2);
}

.hero-meta span.warn { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .42); font-weight: 600; }

.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px solid var(--brand-ring);
  color: var(--brand-2);
  font-size: 13px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* 会员等级卡片 */
.level-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-left: 4px solid var(--lv-color, var(--brand));
}
.lv-left { flex: 0 0 auto; }
.lv-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--lv-color, var(--brand));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.lv-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.lv-right { flex: 1; min-width: 0; }
.lv-progress { display: flex; flex-direction: column; gap: 6px; }
.lv-bar {
  height: 8px;
  border-radius: 5px;
  background: var(--surface-2);
  overflow: hidden;
}
.lv-fill {
  height: 100%;
  border-radius: 5px;
  transition: width .5s ease;
}
.lv-text { font-size: 12px; color: var(--text-2); }

.stat {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
}

.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.stat-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; letter-spacing: .02em; }

.stat-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-2);
}

.stat-value { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.stat-value small { font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat-hint { margin-top: 6px; font-size: 12px; color: var(--text-3); }

/* 流量报表统计 */
.sub-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.mini-stat { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.mini-stat span { display: block; font-size: 11.5px; color: var(--text-3); }
.mini-stat b { display: block; margin-top: 5px; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 10px;
}

.progress > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .5s ease;
}

.progress.warn > i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress.danger > i { background: linear-gradient(90deg, #fb7185, #ef4444); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* 订阅信息 */
.sub-row { display: flex; gap: 20px; flex-wrap: wrap; }

.sub-qr {
  flex: 0 0 150px;
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
  display: grid;
  place-items: center;
}

.sub-qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sub-qr .ph { color: #94a3b8; font-size: 12px; text-align: center; }

.sub-body { flex: 1; min-width: 250px; }

.sub-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.copy-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 10px;
}

.copy-field .val {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 订阅按钮分组 */
.sub-btns { display: flex; flex-direction: column; gap: 10px; }
.sub-btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sub-group-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  padding-right: 4px;
  border-right: 1px solid var(--border);
  margin-right: 2px;
}

/* 图表 */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap canvas { display: block; width: 100%; height: 220px; }

.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

.chart-tip {
  position: absolute;
  display: none;
  transform: translate(-50%, -100%);
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}

.chart-tip b { font-weight: 700; }

/* 公告 */
.notice-list { display: flex; flex-direction: column; }

.notice-item { padding: 13px 0; border-bottom: 1px dashed var(--border); }
.notice-item:last-child { border-bottom: none; }
.notice-item .t { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.notice-item .c { margin-top: 5px; color: var(--text-2); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.notice-item .d { margin-top: 6px; font-size: 12px; color: var(--text-3); }

/* 富文本块（教程 / 指引 / 知识库） */
.rich { color: var(--text-2); font-size: 13.5px; word-break: break-word; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich h1, .rich h2, .rich h3, .rich h4 { color: var(--text); margin: 18px 0 8px; font-size: 15px; }
.rich p { margin: 8px 0; }
.rich ol, .rich ul { margin: 8px 0; padding-left: 20px; }
.rich li { margin: 5px 0; }
.rich img { max-width: 100%; border-radius: 10px; }
.rich code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.rich pre { background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: 10px; overflow: auto; }
.rich a { word-break: break-all; }
.rich blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.rich table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.rich th, .rich td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
.rich th { background: var(--surface-2); }

/* 建设中 */
.placeholder { padding: 64px 24px; text-align: center; }
.placeholder .ico {
  width: 62px; height: 62px; margin: 0 auto 16px;
  border-radius: 18px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-2);
}
.placeholder h3 { font-size: 17px; margin-bottom: 6px; }
.placeholder p { color: var(--text-3); font-size: 13.5px; margin: 0; }

/* 骨架屏 */
.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 提示条 */
.toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, .92);
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease;
}

.toast.ok { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.toast.err { background: linear-gradient(135deg, #f87171, #ef4444); }

@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- 商店 ---------- */
.shop-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: var(--shadow);
}

.shop-banner:hover { text-decoration: none; }
.shop-banner .sb-left { flex: 1; min-width: 0; }
.shop-banner p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .82); }
.shop-banner h2 { font-size: 19px; margin: 6px 0 10px; }
.shop-banner h2 b { font-size: 22px; }
.shop-banner .sb-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-banner .badge { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .38); color: #fff; }
.shop-banner .sb-right { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.plan-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}

.plan-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-ring); }

.plan-hot {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 13px;
  border-bottom-left-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #ef4444);
}

.plan-save {
  align-self: flex-start;
  margin: -8px 0 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #b45309;
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .32);
}

.plan-head { display: flex; align-items: center; gap: 8px; }
.plan-name { font-size: 15.5px; font-weight: 700; }

.plan-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid var(--brand-ring);
}

.plan-price { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 16px; flex-wrap: wrap; }
.plan-price .cur { font-size: 15px; font-weight: 700; color: var(--brand-2); }
.plan-price .num { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--brand-2); }
.plan-price .dur { font-size: 12.5px; color: var(--text-3); }

.plan-price .plan-classify {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.plan-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 14px; }
.plan-specs .spec { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; }
.plan-specs .spec span { color: var(--text-3); }
.plan-specs .spec b { font-weight: 600; }

.plan-periods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.period-chip {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}

.period-chip:hover { border-color: var(--brand-ring); }
.period-chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-2); font-weight: 600; }
.period-chip.period-reset {
  border-style: dashed;
  color: var(--warn);
  background: #fffbeb;
}
.period-chip.period-reset.on {
  background: #fff7ed;
  border-color: var(--warn);
  color: #c2410c;
}

.plan-cap { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }

/* 限购进度条 */
.cap-bar { margin-bottom: 12px; }
.cap-bar-track {
  height: 6px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 6px;
}
.cap-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .4s ease;
}
.cap-bar-text { font-size: 11.5px; color: var(--text-3); }
.plan-content { font-size: 12.5px; margin-bottom: 14px; }
.plan-content > :first-child { margin-top: 0; }
.plan-content > :last-child { margin-bottom: 0; }
.plan-card .btn-block { margin-top: auto; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  padding: 20px;
  background: rgba(15, 23, 42, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .18s;
  overflow-y: auto;
}

.modal-mask.show { opacity: 1; }

.modal {
  width: 100%;
  max-width: 440px;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.98);
  transition: transform .2s;
}

.modal-mask.show .modal { transform: none; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 { font-size: 15px; }
.modal-body { padding: 20px; }

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.co-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.co-plan b { font-size: 14px; }
.co-plan span { font-size: 12.5px; color: var(--text-3); }

.co-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.co-rows > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); }
.co-rows > div b { font-weight: 600; color: var(--text); }
.co-rows .co-total { padding-top: 10px; border-top: 1px dashed var(--border); font-size: 14px; }
.co-rows .co-total b { font-size: 19px; color: var(--brand-2); }

.coupon-row { display: flex; gap: 8px; margin-bottom: 10px; }
.coupon-row .input { flex: 1; }

.co-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 14px 0 8px; }

.pay-list { display: flex; flex-direction: column; gap: 8px; }

.pay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s;
}

.pay-item:hover { border-color: var(--brand-ring); }
.pay-item.on { border-color: var(--brand); background: var(--brand-soft); }
.pay-item input { accent-color: var(--brand); }
.pay-item img { width: 22px; height: 22px; object-fit: contain; }
.pay-item .ph { display: inline-flex; color: var(--text-3); }
.pay-item .nm { font-weight: 600; }
.pay-item .fee { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

.pay-done {
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid var(--brand-ring);
  color: var(--brand-2);
}

.pay-done svg { width: 26px; height: 26px; }
.pay-desc { margin: 0 0 16px; text-align: center; font-size: 13.5px; color: var(--text-2); }

.qr-pay { text-align: center; }
.qr-img { width: 200px; height: 200px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.qr-raw { padding: 12px; word-break: break-all; font-size: 13px; background: var(--surface-2); border-radius: 10px; }
.qr-tip { margin: 14px 0; font-size: 12.5px; color: var(--text-3); }

/* ---------- 第三阶段：订单 / 邀请 / 工单 / 知识库 / 账号 ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.strong { font-weight: 700; color: var(--text); }
.card-text { color: var(--text-2); font-size: 13.5px; line-height: 1.75; margin: 0 0 14px; }
.confirm-text { color: var(--text-2); font-size: 13.5px; line-height: 1.7; margin: 0; }

.badge-warn { background: rgba(245, 158, 11, .12); color: #b45309; border-color: rgba(245, 158, 11, .32); }
.badge-muted { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .16s ease;
}
.tab:hover { border-color: var(--border-strong); color: var(--text); }
.tab.on { background: var(--brand-soft); border-color: var(--brand-ring); color: var(--brand-2); }
.tab i {
  font-style: normal; font-size: 11px; min-width: 18px; text-align: center;
  padding: 1px 5px; border-radius: 999px; background: var(--surface-2); color: var(--text-3);
}
.tab.on i { background: rgba(16, 185, 129, .16); color: var(--brand-2); }

.order-list, .ticket-list, .code-list, .session-list { display: flex; flex-direction: column; gap: 10px; }
.order-item, .ticket-item, .code-item, .session-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease;
}
.order-item:hover, .ticket-item:hover, .code-item:hover, .session-item:hover {
  border-color: var(--border-strong); box-shadow: var(--shadow-sm);
}
.ticket-item { color: inherit; text-decoration: none; }
.ticket-item:hover { color: inherit; }
.tk-main, .oi-main, .ci-left, .si-main { min-width: 0; flex: 1; }
.oi-title, .tk-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.oi-title b, .tk-title b { font-size: 14px; }
.oi-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-3); }
.oi-meta .mono { color: var(--text-2); }
.oi-right { text-align: right; flex: 0 0 auto; }
.oi-price { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.oi-right .btn-row { justify-content: flex-end; }

/* 充值入口按钮 */
.stat-act { margin-top: 12px; }

/* 充值弹窗 */
.recharge-modal { display: flex; flex-direction: column; gap: 18px; }

.rc-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.rc-amt {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: all .16s ease;
}
.rc-amt:hover { border-color: var(--border-strong); }
.rc-amt.on {
  border-color: var(--brand-2);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}
.rc-amt-v { font-size: 17px; font-weight: 700; color: var(--text); }
.rc-amt-b { font-size: 11.5px; color: var(--brand-2); font-weight: 600; }

.rc-custom label {
  display: block; font-size: 13px; color: var(--text-2);
  font-weight: 600; margin-bottom: 8px;
}
.rc-input {
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .16s ease;
}
.rc-input:focus-within { border-color: var(--brand-2); }
.rc-unit {
  padding: 0 12px; font-size: 16px; font-weight: 700; color: var(--text-3);
  border-right: 1px solid var(--border);
}
.rc-input input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 12px 14px; font-size: 16px; font-weight: 700; color: var(--text);
}
.rc-hint { margin-top: 6px; font-size: 12px; color: var(--text-3); }

.recharge-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.rs-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.rs-row span { color: var(--text-3); }
.rs-row b { font-size: 15px; font-weight: 700; color: var(--text); }
.rs-bonus b { color: var(--brand-2); }
.rs-tip em { font-style: normal; color: var(--text-3); font-size: 12.5px; }
.rs-total {
  padding-top: 10px; margin-top: 2px;
  border-top: 1px dashed var(--border);
}
.rs-total b { font-size: 18px; color: var(--brand-2); }

.rc-rules {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: rgba(16, 185, 129, .04);
}
.rc-rules-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--brand-2);
  margin-bottom: 8px;
}
.rc-rule-list { margin: 0; padding-left: 18px; }
.rc-rule-list li { font-size: 12.5px; color: var(--text-2); line-height: 1.9; }

@media (max-width: 480px) {
  .rc-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tk-arrow { color: var(--text-3); flex: 0 0 auto; transition: transform .16s ease; }
.ticket-item:hover .tk-arrow { color: var(--brand-2); transform: translateX(2px); }
.tk-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.code-item .ci-left { display: flex; flex-direction: column; gap: 3px; }
.code-item .ci-left b { font-size: 14px; letter-spacing: .04em; }
.code-item .ci-left span { font-size: 12px; color: var(--text-3); }
.code-item .btn-row { flex: 0 0 auto; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 11px 14px; text-align: left; white-space: nowrap; }
.table thead th { background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 600; }
.table tbody tr + tr td { border-top: 1px solid var(--border); }
.table tbody tr:hover td { background: var(--surface-2); }
.table .strong { color: var(--brand-2); }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pg-info { font-size: 12.5px; color: var(--text-3); }

.kv-list { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface); }
.kv span { color: var(--text-3); font-size: 13px; }
.kv b { font-size: 13.5px; font-weight: 600; word-break: break-all; text-align: right; }

.kb { display: flex; flex-direction: column; gap: 10px; }
.kb-group { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kb-head {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; background: var(--surface-2); border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text); text-align: left;
}
.kb-head span { flex: 1; }
.kb-count {
  font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-3);
}
.kb-head svg { transition: transform .18s ease; color: var(--text-3); }
.kb-group.open .kb-head svg { transform: rotate(180deg); }
.kb-list { display: none; }
.kb-group.open .kb-list { display: block; }
.kb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  color: var(--text-2); text-decoration: none; font-size: 13px;
  transition: background .16s ease, color .16s ease;
}
.kb-item:hover { background: var(--surface-2); color: var(--brand-2); }
.kb-item svg { flex: 0 0 auto; color: var(--brand-2); opacity: .8; }
.kb-item span { flex: 1; }
.kb-item time { font-size: 12px; color: var(--text-3); }

/* 知识库：页头 / 搜索 / 问答 */
.kb-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
}
.kb-hero-ico {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-2);
}
.kb-hero-ico svg { width: 22px; height: 22px; }
.kb-hero-text h3 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.kb-hero-text p { margin: 0; font-size: 12.5px; color: var(--text-3); }
.kb-search { position: relative; margin-bottom: 12px; }
.kb-search-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--text-3);
  pointer-events: none;
}
.kb-search-ico svg { width: 15px; height: 15px; }
.kb-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px 9px 34px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
}
.kb-search input:focus { border-color: var(--brand); background: var(--surface); }
.kb-noresult { padding: 22px 0; text-align: center; font-size: 13px; color: var(--text-3); }
.kb-faq { padding: 4px 0; }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:first-child { border-top: 0; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  font-size: 13.5px;
  color: var(--text);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.faq-q:hover { background: var(--surface-2); }
.faq-mark {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-2);
}
.faq-title { flex: 1; }
.faq-q svg { flex: 0 0 auto; color: var(--text-3); transition: transform .18s ease; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { display: none; padding: 2px 14px 14px 41px; }
.faq-item.open .faq-a { display: block; }

.msg-list { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.msg.me { align-items: flex-end; }
.msg-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.msg.me .msg-bubble { background: var(--brand-soft); border-color: var(--brand-ring); color: var(--brand-2); }
.msg-time { font-size: 11.5px; color: var(--text-3); }
.tk-reply-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tk-reply-foot .btn { align-self: flex-end; }
.tk-reply-foot #tk-reply-msg:empty { display: none; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; cursor: pointer;
}
.switch-row + .switch-row { border-top: 1px solid var(--border); }
.switch-row > span { font-size: 13.5px; font-weight: 600; color: var(--text); display: flex; flex-direction: column; gap: 3px; }
.switch-row em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--text-3); }
.switch {
  appearance: none; -webkit-appearance: none;
  width: 42px; height: 24px; border-radius: 999px; flex: 0 0 auto;
  background: var(--border-strong); position: relative; cursor: pointer;
  transition: background .18s ease;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-sm); transition: transform .18s ease;
}
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(18px); }

.session-item .si-main { display: flex; align-items: center; gap: 12px; }
.session-item .si-main svg { flex: 0 0 auto; color: var(--text-3); }
.session-item .si-main b { display: block; font-size: 13.5px; }
.session-item .si-main span { font-size: 12px; color: var(--text-3); }

/* ---------- 节点列表 / 兑换中心 ---------- */
.node-group + .node-group { margin-top: 18px; }

.node-group-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--text);
}
.node-group-head::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.node-group-head i {
  font-style: normal; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-3);
}

.node-list { display: grid; gap: 8px; }

.node-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease;
}
.node-item:hover { border-color: var(--brand-ring); box-shadow: var(--shadow-sm); }
.nd-main { min-width: 0; }
.nd-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nd-name b { font-size: 13.5px; }
.nd-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; font-size: 12px; color: var(--text-3); }
.nd-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }

.rd-card {
  margin-top: 14px; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.rd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-head b { font-size: 15px; }
.rd-desc { margin: 8px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.rd-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.rd-meta em { font-style: normal; color: var(--text-2); }
.rd-label { margin: 16px 0 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.rd-card .btn-block { margin-top: 16px; }
.rd-tip { margin: 14px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.7; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { padding: 34px 26px; gap: 22px; }
  .auth-hero h1 { font-size: 25px; }
  .auth-features { display: none; }
}

@media (max-width: 720px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px 14px 32px; }
  .user-chip .name { display: none; }
  .user-chip { padding: 4px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 18px; }
  .level-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero .actions { margin-left: 0; width: 100%; }
  .sub-qr { flex: 0 0 100%; width: 100%; max-width: 190px; margin: 0 auto; }
  .sub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-banner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px; }
  .shop-banner h2 { font-size: 17px; }
  .shop-banner .sb-right { font-size: 13px; }
  .modal-mask { padding: 12px; }
  .order-item, .ticket-item, .code-item, .session-item { flex-direction: column; align-items: stretch; gap: 10px; }
  .node-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .oi-right { text-align: left; }
  .oi-right .btn-row { justify-content: flex-start; }
  .tk-arrow { display: none; }
  .msg-bubble { max-width: 92%; }
  .kv { flex-direction: column; align-items: flex-start; gap: 4px; }
  .kv b { text-align: left; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-specs { grid-template-columns: minmax(0, 1fr); }
  .modal-foot .btn { flex: 1; justify-content: center; }
}
