/* ============ 阻击者联盟 · 用户中心 — 现代精致风 v2 ============ */
:root {
  --bg: #eef1f8;
  --card: #ffffff;
  --border: #e4e9f4;
  --text: #171d2c;
  --muted: #69748a;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eef4ff;
  --brand-a: #4f46e5;
  --brand-b: #2563eb;
  --brand-c: #06b6d4;
  --green: #059669;
  --amber: #d97706;
  --purple: #7c3aed;
  --red: #dc2626;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 4px 12px rgba(16, 24, 40, .07), 0 20px 44px rgba(16, 24, 40, .10);
  --ring: 0 0 0 3px rgba(37, 99, 235, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(37, 99, 235, .09), transparent 60%),
    radial-gradient(900px 380px at -10% 0%, rgba(79, 70, 229, .07), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

::selection { background: rgba(37, 99, 235, .18); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; line-height: 1.4; cursor: pointer;
  transition: all .18s ease; white-space: nowrap; user-select: none;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  box-shadow: 0 4px 14px rgba(37, 99, 235, .32);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37, 99, 235, .4); }
.btn-ghost {
  color: var(--primary); border-color: #d5def4; background: #fff;
}
.btn-ghost:hover { color: var(--primary-dark); border-color: var(--primary); background: var(--primary-soft); }
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-warn { color: #b45309 !important; border-color: #fcd34d !important; background: #fffbeb !important; }
.btn-warn:hover { background: #fef3c7 !important; border-color: #f59e0b !important; color: #92400e !important; }
.c-blue { color: var(--primary) !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 233, 244, .9);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 62px;
  display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px; position: relative;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
  box-shadow: 0 3px 10px rgba(37, 99, 235, .4);
}
.brand-logo::after {
  content: ""; position: absolute; inset: 7px;
  border: 2px solid #fff; border-radius: 4px;
}
.brand-text { font-size: 16px; font-weight: 800; letter-spacing: .4px; }
.brand-text em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 5px; }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a {
  padding: 7px 13px; border-radius: 9px; font-size: 13.5px; color: var(--muted);
  font-weight: 500; transition: all .15s;
}
.topnav a:hover { color: var(--primary); background: var(--primary-soft); }
.topnav a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.top-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--primary-soft);
}
.top-name { font-size: 13.5px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 布局 ---------- */
.layout {
  max-width: 1200px; margin: 0 auto; padding: 24px 20px 8px;
  display: grid; grid-template-columns: 268px 1fr; gap: 22px; align-items: start;
}
.sidebar { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 侧栏用户卡 ---------- */
.user-card {
  position: relative; overflow: hidden; padding: 0; text-align: center;
}
.user-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 86px;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 60%, var(--brand-c));
}
.user-card .user-body { position: relative; padding: 52px 18px 18px; }
.user-avatar-img {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  display: block; margin: -46px auto 12px; position: relative;
  border: 3px solid #fff; box-shadow: 0 6px 18px rgba(16, 24, 40, .18);
  background: #fff;
}
.user-name { font-size: 17px; font-weight: 800; }
.user-role { margin: 5px 0 9px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.user-desc { font-size: 12.5px; color: var(--muted); margin-bottom: 13px; word-break: break-all; }
.user-card .btn { margin-bottom: 8px; }
.user-card .btn:last-child { margin-bottom: 0; }

/* ---------- 徽章 ---------- */
.tag {
  display: inline-block; padding: 2.5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
}
.tag-blue { background: var(--primary-soft); color: var(--primary); }
.tag-amber { background: #fff7ed; color: #c2410c; }
.tag-muted { background: #f1f4f9; color: var(--muted); }
.tag-gold { background: linear-gradient(135deg, #fff3cd, #ffe9a8); color: #92600a; border: 1px solid #f5d77e; }

/* ---------- 侧边导航 ---------- */
.side-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10.5px 13px; border-radius: 10px;
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  position: relative; transition: all .15s;
}
.side-nav a svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.side-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.side-nav a.active {
  color: var(--primary); background: var(--primary-soft); font-weight: 700;
}
.side-nav a.active::before {
  content: ""; position: absolute; left: -10px; top: 20%; bottom: 20%;
  width: 3.5px; border-radius: 4px; background: linear-gradient(180deg, var(--brand-a), var(--brand-b));
}

/* ---------- 内容区 ---------- */
.content { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 26px; position: relative; overflow: hidden;
}
.welcome::after {
  content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(37, 99, 235, .10), transparent 65%);
  pointer-events: none;
}
.welcome h1 { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.welcome p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.welcome .btn { position: relative; z-index: 1; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 13px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stat-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 6px 14px rgba(37, 99, 235, .3); }
.stat-green { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 14px rgba(5, 150, 105, .3); }
.stat-amber { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 14px rgba(217, 119, 6, .3); }
.stat-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); box-shadow: 0 6px 14px rgba(124, 58, 237, .3); }
.stat-meta { display: flex; flex-direction: column; }
.stat-num { font-size: 21px; font-weight: 800; line-height: 1.25; }
.stat-label { font-size: 12.5px; color: var(--muted); }

/* ---------- 两列 ---------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 6px;
}
.card-head h2 { font-size: 15.5px; font-weight: 800; position: relative; padding-left: 12px; }
.card-head h2::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
  border-radius: 4px; background: linear-gradient(180deg, var(--brand-a), var(--brand-b));
}
.card-head .more { font-size: 12.5px; color: var(--muted); }
.card-head .more:hover { color: var(--primary); }

/* ---------- 文章列表 ---------- */
.post-list { list-style: none; padding: 4px 20px 16px; }
.post-item { padding: 11px 0; border-bottom: 1px solid #f0f2f8; }
.post-item:last-child { border-bottom: 0; }
.post-title {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--text);
  line-height: 1.5; transition: color .15s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-title:hover { color: var(--primary); }
.post-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 2px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary);
}
.chip-amber { background: #fff7ed; color: #c2410c; }
.chip-green { background: #ecfdf5; color: #047857; }
.chip-purple { background: #f5f3ff; color: #6d28d9; }

/* ---------- 评论列表 ---------- */
.comment-list { list-style: none; padding: 4px 20px 16px; }
.comment-item { padding: 10px 0; border-bottom: 1px solid #f0f2f8; }
.comment-item:last-child { border-bottom: 0; }
.comment-author { font-size: 12.5px; font-weight: 700; color: var(--primary); }
.comment-text {
  font-size: 13px; color: var(--text); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.comment-date { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------- 分类 chips ---------- */
#categories .card-head { margin-bottom: 0; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 20px 20px; }
.chip-lg {
  padding: 8px 15px; font-size: 13px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  background: #f5f7fc; color: var(--text); border: 1px solid #eef1f8;
  transition: all .16s;
}
.chip-lg:hover { background: var(--primary-soft); border-color: #cfe0ff; transform: translateY(-1px); }
.chip-lg b { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ---------- 骨架屏 ---------- */
.skeleton {
  height: 46px; border-radius: 9px; margin: 9px 0;
  background: linear-gradient(90deg, #edf1f8 25%, #f7f9fd 37%, #edf1f8 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
}
.skeleton-chip { display: inline-block; width: 96px; height: 34px; border-radius: 9px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 空态 / 错误 ---------- */
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }
.hidden { display: none !important; }
.error-box {
  padding: 14px; border-radius: 9px; background: #fef2f2;
  color: #b91c1c; font-size: 13px; text-align: center;
}
.error-box button {
  margin-left: 8px; padding: 4px 12px; border-radius: 7px;
  border: 1px solid #fca5a5; background: #fff; color: #b91c1c;
  cursor: pointer; font-size: 12.5px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 11px 20px; border-radius: 11px; z-index: 100;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  background: #1c2434;
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 页脚 ---------- */
.footer { margin-top: 34px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .7); backdrop-filter: blur(8px); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 20px;
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--muted);
}

/* ============ 账户与绑定 ============ */
.muted { color: var(--muted); }
.acc-content { display: flex; flex-direction: column; gap: 18px; }

/* 用户横幅 */
.acc-hero {
  position: relative; overflow: hidden; padding: 28px 30px;
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(130deg, #171e33 0%, #1e2a4a 45%, #24365f 100%);
  border: 0; color: #fff;
}
.acc-hero::before {
  content: ""; position: absolute; right: -40px; top: -90px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, .35), transparent 62%);
  pointer-events: none;
}
.acc-hero::after {
  content: ""; position: absolute; left: 45%; bottom: -110px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(6, 182, 212, .22), transparent 60%);
  pointer-events: none;
}
.acc-hero-avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .85);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
  background: #fff; position: relative; z-index: 1; flex-shrink: 0;
  display: block; width: 84px; height: 84px;
}
.acc-avatar-wrap { position: relative; flex-shrink: 0; z-index: 1; width: 84px; height: 84px; }
.acc-avatar-edit {
  position: absolute; right: -2px; bottom: -2px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  box-shadow: 0 3px 10px rgba(16, 24, 40, .3);
  transition: transform .15s, box-shadow .15s;
  opacity: 0;
}
.acc-avatar-wrap:hover .acc-avatar-edit,
.acc-avatar-edit:focus-visible { opacity: 1; }
.acc-avatar-edit:hover { transform: scale(1.1); }
.acc-avatar-edit svg { display: block; }
.acc-hero-meta { position: relative; z-index: 1; min-width: 0; }
.acc-hero-meta h1 { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.acc-hero-meta .muted { color: rgba(255, 255, 255, .68); font-size: 13px; margin: 3px 0 10px; }
.acc-hero-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.acc-hero-tags .tag {
  background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(4px);
}
.acc-hero-tags .tag-gold { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #713f12; border: 0; }

/* 设置卡片 */
.acc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .acc-cols { grid-template-columns: 1fr; } }

.acc-box { padding: 22px 24px; transition: box-shadow .18s ease; }
.acc-box:hover { box-shadow: var(--shadow-lg); }
.acc-box-head h2 { font-size: 15.5px; font-weight: 800; margin-bottom: 2px; }
.acc-box-head .muted { font-size: 12.5px; margin-bottom: 14px; }

.acc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 2px; border-top: 1px solid #f0f2f8;
}
.acc-row:first-of-type { border-top: 0; }
.acc-label {
  width: 74px; color: var(--text); font-weight: 600; font-size: 13.5px;
  flex-shrink: 0; display: flex; align-items: center; gap: 7px;
}
.acc-label svg { width: 15px; height: 15px; color: var(--primary); }
.acc-value { flex: 1; font-size: 13.5px; word-break: break-all; font-weight: 500; }

/* 表单 */
.acc-form {
  margin-top: 8px; padding: 16px; border-radius: 12px;
  background: linear-gradient(180deg, #f8fafd, #f4f7fc);
  border: 1px solid #e8edf7;
}
.acc-field { margin-bottom: 11px; }
.acc-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.acc-field input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 13.5px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.acc-field input:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
.acc-actions { display: flex; gap: 9px; margin-top: 4px; }

/* 社交绑定列表 */
.bind-list { display: flex; flex-direction: column; gap: 6px; }
.bind-row {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid #eef1f8; background: #fbfcfe;
  transition: all .16s;
}
.bind-row:hover { border-color: #dbe4f8; background: #fff; box-shadow: 0 4px 14px rgba(16, 24, 40, .05); }
.plat {
  display: inline-flex; align-items: center; gap: 10px;
  width: 128px; font-size: 13.5px; font-weight: 700; flex-shrink: 0;
}
.plat i {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; position: relative; flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35), 0 3px 8px rgba(16, 24, 40, .14);
}
.plat i::before {
  content: ""; width: 13px; height: 13px; border-radius: 4px;
  background: #fff; opacity: .96;
}
.p-qq i { background: linear-gradient(135deg, #12b7f5, #0a8fd8); }
.p-qq i::before { clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 60%, 60% 100%, 0 100%); border-radius: 3px; }
.p-wx i { background: linear-gradient(135deg, #22c55e, #07c160); }
.p-wx i::before { background: #07c160; border-radius: 50%; box-shadow: inset 0 0 0 3px #fff; }
.p-gitee i { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.p-gitee i::before { clip-path: polygon(20% 0, 80% 0, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0 80%, 0 20%); }
.p-baidu i { background: linear-gradient(135deg, #4f6bff, #2932e1); }
.p-baidu i::before { clip-path: polygon(10% 30%, 30% 30%, 30% 10%, 70% 10%, 70% 30%, 90% 30%, 90% 70%, 70% 70%, 70% 90%, 30% 90%, 30% 70%, 10% 70%); }
.p-huawei i { background: linear-gradient(135deg, #ef4444, #cf0a2c); }
.p-huawei i::before { clip-path: polygon(50% 0, 100% 40%, 80% 100%, 20% 100%, 0 40%); }
.p-xiaomi i { background: linear-gradient(135deg, #ff7a1a, #ff6700); }
.p-xiaomi i::before { clip-path: polygon(0 0, 40% 0, 40% 60%, 60% 60%, 60% 0, 100% 0, 100% 100%, 60% 100%, 40% 100%, 0 100%); }
.p-ms i { background: linear-gradient(135deg, #38bdf8, #00a4ef); }
.p-ms i::before { clip-path: polygon(0 0, 45% 0, 45% 45%, 0 45%, 0 100%, 45% 100%, 45% 55%, 0 55%); }

.bind-bound {
  flex: 1; display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--text); font-weight: 600; min-width: 0;
}
.bind-bound span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bind-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #eef1f8; flex-shrink: 0; border: 1.5px solid #fff; box-shadow: 0 1px 5px rgba(16, 24, 40, .15); }
.bind-status { flex: 1; text-align: left; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 16px 16px 6px; }
  .sidebar { position: static; }
  .cols { grid-template-columns: 1fr; }
  .topnav { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 0 14px; height: 56px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .welcome { flex-direction: column; align-items: flex-start; }
  .acc-hero { padding: 22px 20px; gap: 16px; }
  .acc-hero-avatar { width: 64px; height: 64px; }
}

/* ============ 统一身份认证中心 ============ */
.auth-body {
  min-height: 100vh; margin: 0;
  background: #0b1020;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  position: relative; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
}
.auth-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(720px 480px at 18% 12%, rgba(37, 99, 235, .28), transparent 62%),
    radial-gradient(620px 420px at 82% 22%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(700px 500px at 55% 95%, rgba(6, 182, 212, .16), transparent 62%),
    linear-gradient(160deg, #0b1020 0%, #101a33 55%, #0c1226 100%);
}
.auth-wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 420px);
  gap: 36px; align-items: center;
  max-width: 920px; width: 100%;
}
.auth-hero { color: #eef2ff; padding: 12px 8px; }
.auth-logo {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 22px;
  background: linear-gradient(135deg, var(--brand-a, #2563eb), var(--brand-b, #06b6d4));
  box-shadow: 0 14px 34px rgba(37, 99, 235, .45);
  position: relative;
}
.auth-logo::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 26px; height: 20px; transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.7));
  clip-path: polygon(50% 0, 100% 32%, 100% 78%, 50% 100%, 0 78%, 0 32%);
}
.auth-hero h1 { font-size: 26px; font-weight: 800; margin: 0 0 10px; letter-spacing: .5px; }
.auth-hero p { margin: 0 0 26px; font-size: 14.5px; line-height: 1.8; color: #b6c2e6; }
.auth-hero-points { display: grid; gap: 10px; }
.auth-hero-points span {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 13px; color: #9fb0da;
}
.auth-hero-points b {
  color: #dbe5ff; font-weight: 700; font-size: 13px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 2px 9px; white-space: nowrap;
}
.auth-card {
  background: #fff; border-radius: 20px; padding: 30px 30px 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .12);
}
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: #f1f5f9; border-radius: 12px; padding: 5px; margin-bottom: 22px;
}
.auth-tab {
  border: 0; background: transparent; padding: 10px 0;
  font-size: 15px; font-weight: 600; color: #64748b;
  border-radius: 9px; cursor: pointer; transition: all .18s;
  font-family: inherit;
}
.auth-tab.active {
  background: #fff; color: #2563eb;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .09);
}
.auth-form { display: grid; gap: 14px; }
.auth-form.hidden { display: none; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: #334155; }
.auth-form .input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid #e2e8f0; border-radius: 11px;
  padding: 11px 14px; font-size: 14.5px; font-family: inherit;
  transition: border-color .18s, box-shadow .18s; background: #fff; color: #0f172a;
}
.auth-form .input:focus {
  outline: none; border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .13);
}
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.check { display: flex; align-items: center; gap: 7px; color: #475569; cursor: pointer; }
.check input { accent-color: #2563eb; width: 15px; height: 15px; }
.auth-link { color: #2563eb; text-decoration: none; font-weight: 600; }
.auth-link:hover { text-decoration: underline; }
.btn-lg { padding: 12px 16px; font-size: 15px; border-radius: 12px; letter-spacing: 4px; }
.auth-error {
  margin: 0; padding: 10px 13px; border-radius: 10px;
  background: #fef2f2; color: #dc2626; font-size: 13.5px;
  border: 1px solid #fecaca;
}
.auth-error.hidden { display: none; }
.auth-note { margin: 0; font-size: 12.5px; color: #94a3b8; line-height: 1.7; }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0 14px;
  color: #94a3b8; font-size: 12.5px;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e8edf5; }
.auth-socials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.platform {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 4px 9px; border-radius: 12px; text-decoration: none;
  background: #f8fafc; border: 1px solid #eef2f7; transition: all .18s;
}
.platform:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: 0 8px 18px rgba(15, 23, 42, .08); }
.pf-letter {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
}
.pf-name { font-size: 12px; color: #475569; white-space: nowrap; }
.p-qq .pf-letter { background: linear-gradient(135deg, #12b7f5, #0a8de8); }
.p-wx .pf-letter { background: linear-gradient(135deg, #34d399, #16a34a); }
.p-gitee .pf-letter { background: linear-gradient(135deg, #f87171, #dc2626); }
.p-baidu .pf-letter { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.p-huawei .pf-letter { background: linear-gradient(135deg, #f43f5e, #dc2626); }
.p-xiaomi .pf-letter { background: linear-gradient(135deg, #fb923c, #ea580c); }
.p-ms .pf-letter { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 12px; color: #94a3b8; line-height: 1.7; }
@media (max-width: 800px) {
  .auth-wrap { grid-template-columns: 1fr; max-width: 440px; gap: 22px; }
  .auth-hero { text-align: center; }
  .auth-logo { margin-left: auto; margin-right: auto; }
  .auth-hero-points { justify-content: center; }
  .auth-hero-points span { justify-content: center; }
  .auth-card { padding: 24px 20px 18px; }
}

/* ============ 认证平台门户（v5） ============ */
.layout {
  flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 26px 20px 60px;
  display: grid; grid-template-columns: 268px 1fr; gap: 22px; align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 82px; }
.content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h2 { font-size: 16.5px; font-weight: 800; color: #0f172a; }
.card-head .muted { font-size: 12.5px; }
.more { font-size: 13px; font-weight: 600; }
.muted { color: var(--muted); }

/* 身份卡 */
.user-card { background: linear-gradient(160deg, #ffffff 30%, #f3f7ff 100%); }
.user-body { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.user-avatar-img {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
  background: #e2e8f0;
}
.user-name { font-size: 18px; font-weight: 800; color: #0f172a; }
.user-role { display: flex; justify-content: center; }
.user-desc { font-size: 12.5px; color: var(--muted); word-break: break-all; margin-bottom: 6px; }
.tag { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag-blue { background: #e8f0ff; color: #1d4ed8; }

.side-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  border-radius: 10px; color: #475569; font-size: 14px; font-weight: 600; transition: all .16s;
}
.side-nav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.side-nav a:hover { background: #f1f5f9; color: var(--primary); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary); }

/* 欢迎卡 */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background:
  radial-gradient(560px 200px at 90% -40%, rgba(6, 182, 212, .16), transparent 60%),
  radial-gradient(420px 200px at 8% -30%, rgba(79, 70, 229, .14), transparent 55%),
  linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
}
.welcome h1 { font-size: 20px; font-weight: 800; color: #0f172a; }
.welcome p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.guest-hero { padding: 40px 30px; justify-content: flex-start; }
.guest-hero h1 { font-size: 26px; }
.guest-hero p { font-size: 14.5px; max-width: 560px; }
.guest-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* 应用区 */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.app-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 17px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: #fbfcff; transition: all .18s; position: relative;
}
a.app-tile:hover { transform: translateY(-3px); border-color: #c7d4f5; box-shadow: 0 12px 26px rgba(37, 99, 235, .13); }
.app-tile-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  color: #fff; font-size: 20px; font-weight: 800; margin-bottom: 8px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
}
.app-tile-name { font-size: 14.5px; font-weight: 700; color: #0f172a; }
.app-tile-home { font-size: 12px; color: #94a3b8; word-break: break-all; }
.app-tile-go { font-size: 12.5px; font-weight: 700; color: var(--primary); margin-top: 6px; }
.empty { color: #94a3b8; font-size: 13.5px; padding: 14px 0; }

/* 安全中心 */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; margin-bottom: 22px; }
.sec-item {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: 13px; background: #fbfcff; transition: all .18s;
}
.sec-item:hover { border-color: #c7d4f5; background: #f6f9ff; transform: translateY(-2px); }
.sec-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sec-icon svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sec-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.sec-green { background: linear-gradient(135deg, #10b981, #059669); }
.sec-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.sec-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.sec-item b { display: block; font-size: 13.5px; color: #0f172a; }
.sec-item i { display: block; font-size: 11.5px; color: #94a3b8; font-style: normal; margin-top: 2px; }
.sec-title { font-size: 14px; font-weight: 700; color: #334155; margin-bottom: 10px; }

/* 登录日志 */
.log-list { display: flex; flex-direction: column; }
.log-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 4px;
  border-bottom: 1px solid #f1f5f9; font-size: 12.5px;
}
.log-item:last-child { border-bottom: 0; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.log-dot.ok { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }
.log-dot.fail { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.log-method { font-weight: 600; color: #0f172a; min-width: 60px; }
.log-ip { color: #475569; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; min-width: 110px; }
.log-ua { color: #94a3b8; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-time { color: #94a3b8; white-space: nowrap; }

/* 平台能力 */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.feat { padding: 15px; border-radius: 13px; background: #f8fafc; border: 1px solid #eef2f7; }
.feat b { display: block; font-size: 14px; color: #0f172a; margin-bottom: 3px; }
.feat span { font-size: 12.5px; color: var(--muted); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #1e293b; color: #fff; font-size: 13.5px; padding: 11px 20px;
  border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .35); z-index: 99;
}
.toast-ok { background: #059669; }

/* footer */
.footer { border-top: 1px solid var(--border); background: rgba(255, 255, 255, .7); padding: 18px 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: #94a3b8; }
.footer-inner a { color: #64748b; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding-top: 18px; }
  .sidebar { position: static; }
  .topnav { display: none; }
  .log-ip { min-width: 0; }
  .log-ua { display: none; }
}

.auth-noscript{margin-top:6px}.auth-noscript .auth-form{padding-top:0}
.code-row{display:flex;gap:8px}.code-row .input{flex:1}.code-btn{flex-shrink:0;white-space:nowrap;min-width:120px}