/* =====================================================================
   SEO+GEO 推广平台 · 设计系统 v2
   参考 Tabler（MIT）/ Ahrefs / SE Ranking 的后台信息密度与配色思路，自写实现
   深色模式：html[data-theme=dark]；保留 v1 全部类名，旧页面自动换肤
   ===================================================================== */
:root {
  --bg: #f5f7fb; --card: #ffffff; --surface-2: #f8fafc; --surface-3: #f1f5f9;
  --border: #e5e9f2; --border-strong: #d4dae6;
  --text: #0f172a; --text-2: #334155; --muted: #64748b;
  --primary: #4f46e5; --primary-dark: #4338ca; --primary-soft: #eef2ff; --primary-ring: rgba(79,70,229,.18);
  --green: #059669; --green-soft: #ecfdf5; --red: #dc2626; --red-soft: #fef2f2;
  --orange: #d97706; --orange-soft: #fffbeb; --purple: #7c3aed; --blue: #0284c7; --blue-soft: #f0f9ff;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-lift: 0 8px 24px rgba(15,23,42,.10);
  --side-bg: #0f172a; --side-text: #cbd5e1; --side-muted: #64748b; --side-hover: rgba(255,255,255,.06); --side-on: rgba(99,102,241,.22);
  --side-w: 236px;
  color-scheme: light;
}
html[data-theme=dark] {
  --bg: #0b1120; --card: #111a2e; --surface-2: #16213a; --surface-3: #1c2945;
  --border: #23304d; --border-strong: #2f3f62;
  --text: #e2e8f0; --text-2: #cbd5e1; --muted: #8b9ab3;
  --primary: #818cf8; --primary-dark: #6366f1; --primary-soft: rgba(129,140,248,.14); --primary-ring: rgba(129,140,248,.28);
  --green: #34d399; --green-soft: rgba(52,211,153,.12); --red: #f87171; --red-soft: rgba(248,113,113,.12);
  --orange: #fbbf24; --orange-soft: rgba(251,191,36,.12); --purple: #a78bfa; --blue: #38bdf8; --blue-soft: rgba(56,189,248,.12);
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lift: 0 8px 24px rgba(0,0,0,.45);
  --side-bg: #070c18;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--primary-ring); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; color: var(--text-2); }
.ic { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }
.ic.sm { width: 14px; height: 14px; }
.ic.lg { width: 22px; height: 22px; }

/* ---------- 应用框架：侧栏 + 主区 ---------- */
.app { display: flex; min-height: 100vh; background: linear-gradient(to right, var(--side-bg, #0f172a) var(--side-w), transparent 0); }
.sidebar {
  width: var(--side-w); flex: 0 0 var(--side-w); background: var(--side-bg); color: var(--side-text);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px 12px; display: flex; flex-direction: column; z-index: 60;
}
.sidebar::-webkit-scrollbar { width: 6px; } .sidebar::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #0ea5e9); box-shadow: 0 4px 14px rgba(99,102,241,.45); }
.brand-mark .ic { color: #fff; width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15.5px; letter-spacing: .3px; }
.brand-text small { color: var(--side-muted); font-size: 11.5px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); padding: 14px 10px 6px; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); font-size: 13.8px; transition: background .12s, color .12s; }
.nav a .ic { color: #64748b; transition: color .12s; }
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav a:hover .ic { color: #a5b4fc; }
.nav a.on { background: var(--side-on); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #818cf8; }
.nav a.on .ic { color: #a5b4fc; }
.site-switch { padding: 0 4px 8px; }
.site-switch select { width: 100%; background: #1e293b; color: #e2e8f0; border: 1px solid #334155; border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.side-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 12px; }
.side-mask { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
header.topbar {
  position: sticky; top: 0; z-index: 50; height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 28px;
  background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.crumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumb a { color: var(--muted); } .crumb span:last-child { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-flex; align-items: center; gap: 4px; height: 34px; min-width: 34px; justify-content: center; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; font-size: 12px; font-weight: 600; }
.icon-btn:hover { background: var(--surface-3); text-decoration: none; }
.lang-code { font-size: 11.5px; }
.when-dark { display: none; } html[data-theme=dark] .when-dark { display: inline-flex; } html[data-theme=dark] .when-light { display: none; }
.user-chip { display: flex; align-items: center; gap: 8px; padding-left: 10px; margin-left: 4px; border-left: 1px solid var(--border); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #0ea5e9); color: #fff; font-weight: 700; font-size: 13px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; font-size: 12.5px; }
.user-meta small { color: var(--muted); font-size: 11px; }
.only-mobile { display: none; }
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 24px 28px 64px; }

/* ---------- 标题与页头 ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub, .page-sub { color: var(--muted); font-size: 13.5px; }
h1 { font-size: 23px; font-weight: 750; margin-bottom: 4px; letter-spacing: -.3px; }
h2 { font-size: 16px; font-weight: 700; margin: 20px 0 12px; }
h3 { font-size: 14.5px; font-weight: 650; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 16px 20px 0; }
.site-card { transition: box-shadow .2s, transform .2s, border-color .2s; }
.site-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--border-strong); }
.site-section { border-left: 3px solid var(--primary); }
.site-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.site-section-head h2 { margin: 0; font-size: 17px; }

/* ---------- 网格 / 统计 / KPI ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.split { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat .num { font-size: 28px; font-weight: 750; line-height: 1.2; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .k-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .k-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi .k-ico.green { background: var(--green-soft); color: var(--green); } .kpi .k-ico.orange { background: var(--orange-soft); color: var(--orange); }
.kpi .k-ico.red { background: var(--red-soft); color: var(--red); } .kpi .k-ico.blue { background: var(--blue-soft); color: var(--blue); }
.kpi .k-val { font-size: 28px; font-weight: 750; letter-spacing: -.5px; margin-top: 8px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .k-val small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.delta { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); } .delta.flat { color: var(--muted); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 13.5px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--surface-2); white-space: nowrap; text-transform: none; letter-spacing: .02em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td, tr:hover td { background: var(--surface-2); }
th.sort-th { cursor: pointer; user-select: none; }
th.sort-th::after { content: ' ↕'; opacity: .35; font-size: 11px; }
th.sort-th[data-dir=asc]::after { content: ' ↑'; opacity: .9; } th.sort-th[data-dir=desc]::after { content: ' ↓'; opacity: .9; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-url { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 8px 16px; cursor: pointer; font-size: 13.5px; font-weight: 600; line-height: 1.4; transition: background .15s, box-shadow .15s, border-color .15s; box-shadow: 0 1px 2px rgba(15,23,42,.12); font-family: inherit; white-space: nowrap; }
html[data-theme=dark] .btn { background: #6366f1; }
.btn:hover { background: var(--primary-dark); text-decoration: none; box-shadow: 0 4px 12px var(--primary-ring); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--card); color: var(--text-2); border-color: var(--border-strong); box-shadow: none; font-weight: 550; }
.btn.secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn.danger { background: var(--card); color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); box-shadow: none; font-weight: 550; }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { background: transparent; color: var(--primary); box-shadow: none; }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn .ic { width: 16px; height: 16px; }

/* ---------- 徽章 / 标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; line-height: 1.6; }
.badge.critical { background: var(--red-soft); color: var(--red); }
.badge.warning, .badge.warn { background: var(--orange-soft); color: var(--orange); }
.badge.notice { background: var(--primary-soft); color: var(--primary); }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.gray { background: var(--surface-3); color: var(--muted); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 12.5px; color: var(--text-2); background: var(--card); cursor: pointer; user-select: none; }
.chip input { margin: 0; accent-color: var(--primary); }
.chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--green); } .dot.warn { background: var(--orange); } .dot.bad { background: var(--red); }

/* ---------- 评分 ---------- */
.score-ring { width: 104px; height: 104px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; margin: 0 auto; }
.score-ring > div { box-shadow: inset 0 0 0 1px var(--border); background: var(--card) !important; }
.gauge { --v: 0; --c: var(--primary); width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--surface-3) 0); }
.gauge > div { width: 94px; height: 94px; border-radius: 50%; background: var(--card); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.gauge b { font-size: 30px; font-weight: 800; letter-spacing: -1px; } .gauge small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bar.green > i { background: var(--green); } .bar.orange > i { background: var(--orange); } .bar.red > i { background: var(--red); }

/* ---------- 表单 ---------- */
.form-row { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; align-items: center; }
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=url], input[type=search], input[type=email], input[type=date], select, textarea {
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13.5px; font-family: inherit;
  flex: 1; min-width: 0; background: var(--card); transition: border .15s, box-shadow .15s; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
label { color: var(--text-2); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span, .field > label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { flex: 0 0 auto; }

/* ---------- 杂项 ---------- */
.muted { color: var(--muted); font-size: 13px; }
pre.detail { white-space: pre-wrap; word-break: break-all; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-top: 8px; border: 1px solid var(--border); color: var(--text-2); max-height: 280px; overflow: auto; }
.trend-bar { display: inline-block; height: 8px; background: linear-gradient(90deg, #6366f1, #0ea5e9); border-radius: 5px; vertical-align: middle; }
.pos-1 { color: var(--green); font-weight: 700; } .pos-mid { color: var(--orange); font-weight: 700; } .pos-bad { color: var(--red); font-weight: 700; }
details summary { cursor: pointer; color: var(--primary); font-size: 13.5px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: 8px; }
.empty b { display: block; color: var(--text-2); font-size: 14.5px; margin-bottom: 4px; }
.chart-box { position: relative; height: 260px; } .chart-box.sm { height: 180px; } .chart-box.lg { height: 320px; }
.legend-inline { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 16px; font-size: 13.5px; }
.alert.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.alert.warn { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 30%, transparent); }
.alert.bad { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs-line a, .tabs-line button { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tabs-line a.on, .tabs-line button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs-line a:hover { text-decoration: none; color: var(--text); }
.list-plain { list-style: none; } .list-plain li { padding: 8px 0; border-bottom: 1px solid var(--border); } .list-plain li:last-child { border-bottom: none; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .flex-1 { flex: 1; } .right { margin-left: auto; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.issue-row { display: grid; grid-template-columns: 6px 1fr auto; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: start; }
.issue-row:last-child { border-bottom: none; }
.issue-row .sev-strip { border-radius: 3px; align-self: stretch; background: var(--muted); }
.issue-row .sev-strip.critical { background: var(--red); } .issue-row .sev-strip.warning { background: var(--orange); } .issue-row .sev-strip.notice { background: var(--primary); }
.issue-row h4 { font-size: 14px; font-weight: 650; margin-bottom: 2px; }
.issue-row .fix { font-size: 12.8px; color: var(--text-2); margin-top: 6px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; border: 1px dashed var(--border); }
.tag-new { color: var(--red); font-weight: 700; font-size: 11px; } .tag-fixed { color: var(--green); font-weight: 700; font-size: 11px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; min-height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
.flash { padding: 10px 14px; border-radius: 10px; background: var(--green-soft); margin-bottom: 14px; }

/* ---------- 深色模式：兜底覆盖旧页面里写死的浅色内联样式 ---------- */
html[data-theme=dark] [style*="background:#f"], html[data-theme=dark] [style*="background: #f"],
html[data-theme=dark] [style*="background:#e"], html[data-theme=dark] [style*="background: #e"],
html[data-theme=dark] [style*="background:#d"], html[data-theme=dark] [style*="background: #d"],
html[data-theme=dark] [style*="background:white"], html[data-theme=dark] [style*="background-color:#f"] { background: var(--surface-2) !important; }
html[data-theme=dark] [style*="color:#111"], html[data-theme=dark] [style*="color:#222"], html[data-theme=dark] [style*="color:#333"],
html[data-theme=dark] [style*="color:#0f172a"], html[data-theme=dark] [style*="color:#1e293b"], html[data-theme=dark] [style*="color:#334155"],
html[data-theme=dark] [style*="color:#14532d"], html[data-theme=dark] [style*="color: #111"], html[data-theme=dark] [style*="color: #333"] { color: var(--text) !important; }
html[data-theme=dark] [style*="border:1px solid #"], html[data-theme=dark] [style*="border: 1px solid #"] { border-color: var(--border) !important; }
html[data-theme=dark] .tab { background: var(--card) !important; color: var(--text) !important; }
html[data-theme=dark] img { opacity: .92; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) { .grid.cols-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid.split { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .app { background: none; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lift); }
  body.side-open .sidebar { transform: none; }
  body.side-open .side-mask { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.45); z-index: 55; }
  .only-mobile { display: inline-flex; }
  header.topbar { padding: 0 14px; }
  .user-meta { display: none; }
  .container { padding: 16px 14px 48px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.cols-2 { grid-template-columns: 1fr; }
  h1 { font-size: 20px; }
  table { display: block; overflow-x: auto; }
}
@media (max-width: 560px) { .grid.cols-4, .grid.cols-3, .grid.cols-5 { grid-template-columns: 1fr 1fr; } .kpi .k-val { font-size: 22px; } }
@media print {
  .sidebar, header.topbar, .no-print, .side-mask { display: none !important; }
  body { background: #fff; color: #000; } .app { display: block; }
  .card, .kpi { border: 1px solid #ddd; box-shadow: none; page-break-inside: avoid; }
}
.card-head h2 > .ic, .card-head h3 > .ic { margin-right: 6px; color: var(--primary); vertical-align: -3px; }

/* ================= v3 · GEO-first ================= */
.hero { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 22px; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--card)), var(--card) 60%); }
.hero-score { text-align: center; }
.ring { --v: 0; --c: var(--primary); width: 168px; height: 168px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: var(--card); }
.ring b { position: relative; font-size: 46px; font-weight: 800; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.ring small { position: absolute; bottom: 38px; font-size: 11.5px; color: var(--muted); }
.delta-up { color: var(--green); font-weight: 650; } .delta-down { color: var(--red); font-weight: 650; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.mini-kpis .stat .num { font-size: 24px; }
.plat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.plat { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.plat .top { display: flex; justify-content: space-between; align-items: center; font-weight: 650; font-size: 13.5px; }
.plat .mk { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-weight: 600; }
.meter { height: 7px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 8px 0 4px; }
.meter > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), #0ea5e9); }
.meter.comp > i { background: linear-gradient(90deg, #f59e0b, #ef4444); } .meter.self > i { background: linear-gradient(90deg, #10b981, #0ea5e9); }
.hbar { display: grid; grid-template-columns: 130px minmax(0,1fr) 52px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .meter { margin: 0; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-strong { color: var(--green); background: var(--green-soft); } .st-ok { color: var(--blue); background: var(--blue-soft); }
.st-weak { color: var(--orange); background: var(--orange-soft); } .st-lost { color: var(--red); background: var(--red-soft); }
.st-missing { color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent); } .st-unknown { color: var(--muted); background: var(--surface-3); }
.eng-dots { display: flex; gap: 3px; flex-wrap: wrap; } .eng-dots i { width: 9px; height: 9px; border-radius: 3px; background: var(--surface-3); display: inline-block; }
.eng-dots i.hit { background: var(--green); }
.task { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: 0; }
.task .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.task .why { color: var(--muted); font-size: 12.5px; }
.answer { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--card); }
.answer .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.answer .body { font-size: 13.5px; line-height: 1.75; max-height: 260px; overflow: auto; }
.answer .body.open { max-height: none; }
mark.hl-brand { background: color-mix(in srgb, var(--green) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; font-weight: 650; }
mark.hl-comp { background: color-mix(in srgb, var(--orange) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.hl-url { color: var(--blue); word-break: break-all; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.md { line-height: 1.8; } .md h1 { font-size: 20px; } .md h2 { font-size: 16px; } .md table { border-collapse: collapse; margin: 8px 0; } .md td, .md th { border: 1px solid var(--border); padding: 4px 8px; }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state .ic { width: 40px; height: 40px; color: var(--primary); opacity: .7; margin-bottom: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.form-grid input, .form-grid select, .form-grid textarea { color: var(--text); }
.form-grid label.chip { flex-direction: row; align-items: center; gap: 8px; color: var(--text); justify-content: flex-start; }
.form-grid label.chip input[type=checkbox], .form-grid label.chip input[type=radio] { width: auto; flex: none; }
.src-type { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; background: var(--surface-3); color: var(--text-2); }
.notice { border-left: 3px solid var(--orange); background: var(--orange-soft); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.report-doc { max-width: 980px; margin: 0 auto; }
.report-doc .cover { padding: 28px 30px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #312e81, #0e7490); margin-bottom: 18px; }
.report-doc .cover h1 { color: #fff; font-size: 26px; } .report-doc .cover .muted { color: #c7d2fe; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .mini-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } .hbar { grid-template-columns: 90px minmax(0,1fr) 44px; } .task { grid-template-columns: 1fr; } .task .ico { display: none; } }
@media print { .report-doc .cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .card { break-inside: avoid; box-shadow: none; } }

/* v3.1 账号与权限 */
.acct-sec { margin-top: 14px; }
.acct-label { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.role-opt:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.role-opt.is-disabled { opacity: .45; cursor: not-allowed; }
.role-opt input { margin-top: 3px; accent-color: var(--primary); }
.role-opt span { display: flex; flex-direction: column; gap: 2px; }
.role-opt small { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px; transition: opacity .15s; }
.check-grid .chip input { accent-color: var(--primary); }
.acct-edit-row > td { background: var(--surface-2, var(--surface)); padding: 16px !important; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pw-row { display: flex; gap: 6px; align-items: center; }
.pw-row input { flex: 1; min-width: 0; }
.acct-create summary::-webkit-details-marker { display: none; }
@media (max-width: 720px) { .acct-table th:nth-child(4), .acct-table td:nth-child(4), .acct-table th:nth-child(5), .acct-table td:nth-child(5), .acct-table th:nth-child(6), .acct-table td:nth-child(6) { display: none; } }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.red { background: var(--red-soft); color: var(--red); }
.flow-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.flow-steps li { border: 1px solid var(--border); border-radius: 10px; padding: 10px; min-width: 0; }
.flow-steps .is-current { border-color: var(--primary); }
.flow-steps .is-done { background: var(--primary-soft); }
@media (min-width: 900px) { .flow-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 720px) { .flow-form { grid-template-columns: 1fr !important; } }
