:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --ink: #161922;
  --ink-2: #3c4356;
  --muted: #808898;
  --line: #e8ebf4;
  --brand: #5b6cff;
  --brand-2: #9b5bff;
  --ok: #24b47e;
  --danger: #e5484d;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, .05), 0 4px 12px rgba(20, 24, 40, .04);
  --shadow-md: 0 8px 28px rgba(20, 24, 40, .10);
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(91, 108, 255, .18); }

.app { display: flex; height: 100vh; overflow: hidden; }

/* ---------- 侧栏 ---------- */
.side {
  width: 268px;
  flex: 0 0 268px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; }
.logo {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(91, 108, 255, .35);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b { font-size: 15px; letter-spacing: .3px; }
.brand-txt span { font-size: 9.5px; letter-spacing: 1.6px; color: var(--muted); margin-top: 3px; }

.side-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.group-label {
  font-size: 11px; letter-spacing: 1px; color: #9aa1b2;
  padding: 12px 8px 8px; display: flex; align-items: center; justify-content: space-between;
  text-transform: uppercase;
}
.group-label.row span { text-transform: none; font-size: 12px; color: var(--ink-2); letter-spacing: 0; font-weight: 600; }
.mini {
  border: 0; background: #f1f3fa; color: var(--brand);
  padding: 4px 9px; border-radius: 8px; font-size: 12px; cursor: pointer; font-weight: 600;
}
.mini:hover { background: #e8ebff; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border: 0; background: transparent; border-radius: 10px;
  cursor: pointer; color: var(--ink-2); text-align: left; width: 100%;
  transition: background .16s, color .16s;
}
.nav-item:hover { background: #f4f6fc; }
.nav-item.active { background: linear-gradient(135deg, rgba(91,108,255,.12), rgba(155,91,255,.10)); color: var(--ink); font-weight: 600; }
.nav-item.active .ico { color: var(--brand); }
.ico { width: 18px; height: 18px; display: grid; place-items: center; color: #8f97a8; flex: 0 0 18px; }
.ico svg { width: 17px; height: 17px; }
.count {
  margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted);
  background: #f2f4fa; padding: 1px 7px; border-radius: 20px; min-width: 22px; text-align: center;
}
.nav-item.active .count { background: #fff; color: var(--brand); }
.nav-item.star .ico { color: #e8a33d; }

.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cat {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px;
  cursor: pointer; color: var(--ink-2); position: relative;
}
.cat:hover { background: #f4f6fc; }
.cat.active { background: #f0f2ff; font-weight: 600; color: var(--ink); }
.cat .swatch { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.cat .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .n { font-size: 11.5px; color: var(--muted); background: #f2f4fa; padding: 1px 7px; border-radius: 20px; }
.cat .edit {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: #fff; box-shadow: var(--shadow-sm); border-radius: 7px;
  width: 24px; height: 24px; display: none; place-items: center; cursor: pointer; color: var(--muted);
}
.cat:hover .edit { display: grid; }
.cat:hover .n { visibility: hidden; }
.cat-tip { font-size: 11.5px; color: #a4abb9; padding: 10px 10px 0; line-height: 1.6; }

.side-foot { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 9px; }
.status { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #c8ccd8; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(36,180,126,.15); }
.ghost {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 13px;
  transition: all .16s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.ghost:hover { border-color: #d6dbf0; background: #fafbff; }
.ghost.danger { color: var(--danger); border-color: #f3d6d7; }
.ghost.danger:hover { background: #fff5f5; }
.primary {
  border: 0; background: linear-gradient(135deg, var(--brand), #7a5bff); color: #fff;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600;
  box-shadow: 0 6px 16px rgba(91,108,255,.28); transition: all .16s;
}
.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.top { padding: 22px 28px 16px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.titles h1 { margin: 0; font-size: 22px; letter-spacing: -.2px; }
.titles p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.search {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; padding: 8px 12px; min-width: 280px;
  color: var(--muted); box-shadow: var(--shadow-sm);
}
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 13px; }
.select {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 10px;
  font-size: 13px; cursor: pointer; outline: 0;
}
.top .ghost { padding: 8px 10px; }

.board {
  flex: 1; overflow-y: auto; padding: 4px 28px 40px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(264px, 100%), 1fr));
  align-content: start;
  overflow-x: hidden;
}

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative; overflow: hidden;
  height: auto;
  margin: 0;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #dfe3f4; }
.card .thumb { height: 158px; background: #f4f5fa; position: relative; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.04); }
.card .thumb.ph { display: grid; place-items: center; }
.card .thumb.ph span { color: #b8bed0; font-size: 26px; }
.badge-type {
  position: absolute; top: 9px; left: 9px; font-size: 11px; padding: 3px 8px; border-radius: 20px;
  background: rgba(255,255,255,.92); color: var(--ink-2); backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(0,0,0,.08); font-weight: 600;
}
.fav-btn {
  position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: #c3c8d6; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.fav-btn.on { color: #e8a33d; }
.card-body { padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.45; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-text {
  font-size: 12.5px; color: #6c7486; line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap;
}
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 6px; }
.chip {
  font-size: 11px; padding: 2.5px 8px; border-radius: 20px; color: #465066;
  background: #f1f3fa; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis;
}
.chip.cat-chip { color: #fff; font-weight: 600; }
.src { font-size: 11.5px; color: #a4abb9; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card { display: flex; gap: 12px; padding: 15px; align-items: center; }
.site-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 44px; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, #6b7bff, #a05bff);
}
.site-avatar img { width: 100%; height: 100%; object-fit: cover; }
.site-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.site-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-desc { font-size: 12px; color: #7b8394; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 40px; }
.empty-ico { font-size: 40px; }
.empty h3 { margin: 12px 0 6px; font-size: 17px; }
.empty p { color: var(--muted); max-width: 400px; margin: 0 auto; line-height: 1.7; font-size: 13px; }
.empty-actions { margin-top: 18px; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(18, 21, 33, .42); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; width: min(680px, calc(100vw - 40px)); max-height: calc(100vh - 60px);
  background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(16,20,40,.28);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-box.narrow { width: min(420px, calc(100vw - 40px)); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 15px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 11px; background: #f0f2ff; color: var(--brand); padding: 3px 9px; border-radius: 20px; font-weight: 700; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.icon-btn:hover { background: #f3f5fb; }
.modal-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.modal-body > * { flex-shrink: 0; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; background: #fcfcfe; }
.modal-foot .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff;
  outline: 0; width: 100%; font-size: 13px; line-height: 1.6; resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: #b9c1ff; box-shadow: 0 0 0 3px rgba(91,108,255,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-media { border-radius: 12px; overflow: hidden; background: #f4f5fa; max-height: 260px; display: grid; place-items: center; flex: 0 0 auto; }
.detail-media img { max-width: 100%; max-height: 260px; display: block; }
.meta-line { font-size: 11.5px; color: #a4abb9; line-height: 1.7; word-break: break-all; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.segs { display: flex; gap: 5px; background: #f5f6fb; padding: 4px; border-radius: 12px; }
.segs button {
  flex: 1; border: 0; background: transparent; padding: 8px 0; border-radius: 9px;
  cursor: pointer; font-size: 13px; color: #5f6779; transition: all .16s;
}
.segs button.on { background: #fff; box-shadow: var(--shadow-sm); font-weight: 700; color: var(--ink); }
.sw { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.sw.on { border-color: #161922; box-shadow: 0 0 0 2px #fff inset; }
.help ol { padding-left: 18px; line-height: 2; font-size: 13px; color: var(--ink-2); }
.help code { background: #f4f6fc; padding: 1px 6px; border-radius: 6px; font-size: 12px; color: var(--brand); }
.help .hint { font-size: 12.5px; color: var(--muted); line-height: 1.8; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(10px);
  background: #1b2030; color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; transition: all .22s; z-index: 60;
  pointer-events: none; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b8383d; }

@media (max-width: 900px) {
  .side { width: 210px; flex-basis: 210px; }
  .board { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); padding: 4px 16px 30px; }
  .top { padding: 16px 16px 12px; }
  .search { min-width: 0; }
}

/* ================= 门户站 ================= */
.portal { background: #fbfcff; overflow-x: hidden; }
.p-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
  background: rgba(251, 252, 255, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 235, 244, .9);
}
.p-brand { display: flex; align-items: center; gap: 9px; }
.p-brand b { font-size: 15px; letter-spacing: .3px; }
.p-brand.small .logo { width: 26px; height: 26px; border-radius: 8px; }
.p-links { display: flex; gap: 22px; margin-left: 10px; }
.p-links a { font-size: 13.5px; color: #6c7486; }
.p-links a:hover { color: var(--brand); }
.p-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.p-user { font-size: 12.5px; color: var(--muted); }

.p-hero {
  max-width: 1200px; margin: 0 auto; padding: 54px 24px 30px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center;
}
.p-tag {
  display: inline-block; font-size: 12px; color: #5b6cff; background: #eef0ff;
  padding: 5px 11px; border-radius: 20px; letter-spacing: .4px;
}
.p-hero h1 {
  margin: 18px 0 14px; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.22; letter-spacing: -1px;
}
.p-hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #5b6cff, #9b5bff 60%, #c25bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.p-hero p { margin: 0; color: #6c7486; font-size: 15px; line-height: 1.85; max-width: 520px; }
.p-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.primary.lg, .ghost.lg { padding: 12px 22px; border-radius: 12px; font-size: 14px; }
.primary.sm, .ghost.sm { padding: 8px 14px; border-radius: 10px; font-size: 12.5px; }
.p-meta { display: flex; gap: 8px; align-items: center; margin-top: 18px; font-size: 12px; color: #a4abb9; flex-wrap: wrap; }
.p-meta i { font-style: normal; color: #d3d8e4; }

.p-hero-art { position: relative; padding-bottom: 40px; }
.shot-frame {
  border-radius: 16px; overflow: hidden; background: #fff;
  border: 1px solid #e3e7f3; box-shadow: 0 24px 60px rgba(24, 30, 60, .14);
  transform: rotate(-1deg);
}
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f1f3fa; border-bottom: 1px solid #e6e9f3; }
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d7dce9; }
.shot-bar span { margin-left: 8px; font-size: 10.5px; color: #9aa1b2; }
.shot-frame img { width: 100%; display: block; }
.shot-popup {
  position: absolute; left: -22px; bottom: 0; width: 232px; border-radius: 14px; overflow: hidden;
  border: 1px solid #e3e7f3; background: #fff; box-shadow: 0 18px 40px rgba(24, 30, 60, .18);
}
.shot-popup img { width: 100%; display: block; }

.p-sec { max-width: 1200px; margin: 0 auto; padding: 46px 24px; }
.sec-head h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.5px; }
.sec-head p { margin: 0 0 26px; color: #6c7486; font-size: 14px; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat {
  background: #fff; border: 1px solid #e8ebf4; border-radius: 16px; padding: 20px;
  box-shadow: 0 1px 2px rgba(20,24,40,.04); transition: transform .2s, box-shadow .2s;
}
.feat:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,24,40,.09); }
.fico {
  width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 15px; margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(20, 24, 40, .16);
}
.feat h3 { margin: 0 0 8px; font-size: 15.5px; }
.feat p { margin: 0; font-size: 12.8px; color: #788093; line-height: 1.8; }

.install { background: linear-gradient(180deg, #f6f8ff, #fbfcff); border-radius: 24px; margin: 10px auto; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  background: #fff; border: 1px solid #e8ebf4; border-radius: 16px; padding: 22px 20px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.step .num { font-size: 11px; letter-spacing: 2px; color: #b3bacb; font-weight: 700; }
.step h3 { margin: 0; font-size: 16px; }
.step p { margin: 0; font-size: 12.8px; color: #6c7486; line-height: 1.85; }
.step code, .faq code, .auth-tip code { background: #f2f4fb; color: #5b6cff; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.step > .primary, .step > .ghost { margin-top: auto; }

.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid #e8ebf4; border-radius: 14px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.faq summary::before { content: '＋'; color: #b3bacb; font-weight: 400; }
.faq details[open] summary::before { content: '－'; color: var(--brand); }
.faq p { margin: 10px 0 2px; color: #6c7486; font-size: 13px; line-height: 1.9; }

.p-foot {
  max-width: 1200px; margin: 20px auto 0; padding: 24px; border-top: 1px solid #eceef6;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.p-foot-links { display: flex; gap: 18px; font-size: 12.5px; color: #7b8394; }
.p-foot-links a:hover { color: var(--brand); }
.p-copy { margin-left: auto; font-size: 11.5px; color: #a4abb9; }

@media (max-width: 900px) {
  .p-hero { grid-template-columns: 1fr; gap: 30px; padding-top: 34px; }
  .p-hero-art { display: none; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .step-grid { grid-template-columns: 1fr; }
  .p-links { display: none; }
}

/* ================= 登录 / 注册 ================= */
.auth-body { background: #f4f6fb; min-height: 100vh; }
.auth-wrap { display: grid; grid-template-columns: 440px 1fr; min-height: 100vh; }
.auth-side {
  background: linear-gradient(160deg, #1c2140, #2a2350 55%, #3a2160);
  color: #fff; padding: 40px 42px; display: flex; flex-direction: column; gap: 20px; position: relative; overflow: hidden;
}
.auth-side::after {
  content: ''; position: absolute; width: 320px; height: 320px; right: -110px; bottom: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 100, 255, .55), transparent 65%);
}
.auth-side .p-brand b { color: #fff; }
.auth-side .logo { background: linear-gradient(135deg, #7d8cff, #b07bff); box-shadow: 0 8px 24px rgba(120,120,255,.4); }
.auth-side h2 { font-size: 30px; line-height: 1.35; letter-spacing: -.6px; margin: 22px 0 6px; }
.auth-side ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; color: rgba(255,255,255,.78); font-size: 13px; }
.auth-side li { display: flex; gap: 8px; align-items: center; }
.auth-side li::before { content: '·'; color: #9b8cff; font-weight: 700; }
.back-link { margin-top: auto; color: rgba(255,255,255,.7); font-size: 12.5px; }
.back-link:hover { color: #fff; }
.auth-main { display: grid; place-items: center; padding: 30px 20px; }
.auth-card {
  width: min(400px, 100%); background: #fff; border-radius: 20px; padding: 26px;
  box-shadow: 0 20px 50px rgba(24, 30, 60, .1); border: 1px solid #edeff7;
}
.auth-tabs { margin-bottom: 18px; }
.auth-card h3 { margin: 0 0 4px; font-size: 19px; }
.auth-sub { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; }
.auth-card form { display: flex; flex-direction: column; gap: 11px; }
.primary.block { width: 100%; padding: 11px; margin-top: 4px; }
.auth-error { background: #fff1f1; color: #c4343a; border: 1px solid #f7dada; border-radius: 9px; padding: 8px 11px; font-size: 12.5px; }
.auth-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }
.link { border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.auth-tip { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e8ebf4; font-size: 11px; color: #a4abb9; line-height: 1.7; }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* ================= 后台管理 ================= */
.admin-body { background: #f5f7fc; }
.a-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  padding: 14px 26px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid #e8ebf4;
}
.a-tag { font-size: 10.5px; letter-spacing: 1.4px; color: #8b93a5; border: 1px solid #e4e8f4; padding: 3px 8px; border-radius: 20px; }
.a-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.a-user { font-size: 12.5px; color: #6c7486; margin-right: 6px; }
.a-main { max-width: 1200px; margin: 0 auto; padding: 22px 26px 60px; display: flex; flex-direction: column; gap: 16px; }
.a-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.a-card {
  background: #fff; border: 1px solid #e8ebf4; border-radius: 16px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(20,24,40,.04);
}
.a-label { font-size: 11.5px; color: #8b93a5; letter-spacing: .5px; }
.a-card b { font-size: 26px; letter-spacing: -.5px; line-height: 1.2; }
.a-sub { font-size: 11.5px; color: #a4abb9; }
.a-panel { background: #fff; border: 1px solid #e8ebf4; border-radius: 16px; box-shadow: 0 1px 2px rgba(20,24,40,.04); overflow: hidden; }
.a-panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #f0f2f9; }
.a-panel-head h2 { margin: 0; font-size: 16px; }
.a-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; font-size: 12.8px; min-width: 880px; }
.a-table th {
  text-align: left; font-weight: 600; color: #8b93a5; font-size: 11.5px; letter-spacing: .5px;
  padding: 11px 16px; background: #fafbfe; border-bottom: 1px solid #f0f2f9; white-space: nowrap;
}
.a-table td { padding: 11px 16px; border-bottom: 1px solid #f5f6fb; vertical-align: middle; }
.a-table tr:hover td { background: #fbfcff; }
.a-table .right, .a-table th.right { text-align: right; }
.a-user-cell { display: flex; align-items: center; gap: 9px; }
.a-avatar {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #6b7bff, #a05bff); flex: 0 0 30px; font-size: 13px;
}
.a-user-cell b { display: block; font-size: 13px; }
.a-user-cell span { display: block; font-size: 11px; color: #a4abb9; }
.a-me { font-style: normal; font-size: 10px; color: #5b6cff; background: #eff1ff; padding: 1px 6px; border-radius: 20px; }
.a-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #f2f4fa; color: #6c7486; white-space: nowrap; }
.a-badge.admin { background: #fff3e3; color: #b06f14; }
.a-badge.ok { background: #e9f8f1; color: #12855a; }
.a-badge.off { background: #fdecec; color: #c4343a; }
.a-row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.a-btn {
  border: 1px solid #e4e8f4; background: #fff; color: #4c5466; border-radius: 8px;
  padding: 5px 9px; font-size: 11.5px; cursor: pointer; white-space: nowrap;
}
.a-btn:hover { border-color: #c9d0ea; background: #fafbff; }
.a-btn.danger { color: #c4343a; border-color: #f4d9da; }
.a-btn.danger:hover { background: #fff6f6; }
.a-empty { color: #a4abb9; font-size: 12.5px; padding: 22px; display: block; text-align: center; }
.a-note { margin: 0; padding: 12px 20px 16px; font-size: 11.5px; color: #a4abb9; border-top: 1px solid #f5f6fb; }
.a-top-list { padding: 6px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.a-top-item { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.a-rank { width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-bar { flex: 1; height: 6px; border-radius: 6px; background: #f2f4fa; overflow: hidden; }
.a-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #5b6cff, #9b5bff); }
.a-top-item b { width: 34px; text-align: right; }
.a-denied { text-align: center; padding: 60px 20px; color: #6c7486; }
.a-denied a { color: var(--brand); }

@media (max-width: 900px) {
  .a-cards { grid-template-columns: repeat(2, 1fr); }
  .a-main { padding: 16px; }
}

/* ================= 账号设置 ================= */
.side-user {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 11px; background: #f7f8fd;
}
.side-user .avatar {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #5b6cff, #9b5bff); color: #fff; font-weight: 700; font-size: 12px;
}
.side-user .uinfo { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.side-user .uinfo b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .uinfo span { font-size: 10.5px; color: #a4abb9; }
.side-user .icon-btn { padding: 3px 6px; font-size: 13px; }

/* ================= 卡片直开 / 账号弹窗 ================= */
.open-btn {
  display: inline-flex; align-items: center; gap: 3px;
  background: linear-gradient(135deg, #5b6cff, #8f5bff); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
  white-space: nowrap; box-shadow: 0 4px 12px rgba(91, 108, 255, .22);
  transition: filter .15s, transform .15s;
}
.open-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.open-btn.subtle { background: #eff1ff; color: #5b6cff; box-shadow: none; font-weight: 600; }

.acc-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  font-size: 13px; padding: 7px 0; border-bottom: 1px dashed #f0f2f9;
}
.acc-row span { color: #8b93a5; font-size: 12px; }
.acc-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-block {
  background: #fafbfe; border: 1px solid #eff1f8; border-radius: 12px;
  padding: 12px 13px; display: flex; flex-direction: column; gap: 9px;
}
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { margin: 0; font-size: 11.5px; color: #a4abb9; line-height: 1.75; }
.help-actions { display: flex; gap: 10px; margin-top: 4px; }
