/* ==========================================================================
   网安Harness 离线插件源
   ========================================================================== */
:root {
  --bg: #f2f5f9;
  --bg-soft: #e8eef5;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef3f8;
  --ink: #0b1523;
  --ink-2: #223247;
  --muted: #64748b;
  --muted-2: #8494a7;
  --line: #dbe3ec;
  --line-strong: #c7d3e0;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --brand-soft: #e6f5f2;
  --accent: #0891b2;
  --accent-soft: #e0f2fe;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --purple: #6d28d9;
  --purple-soft: #ede9fe;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-lg: 0 28px 70px rgba(15, 23, 42, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --header-bg: rgba(255, 255, 255, .86);
  --hero: #07131f;
  --hero-ink: #e9f7f4;
  --hero-muted: #9cb3c4;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  --bg: #070c13;
  --bg-soft: #0b1420;
  --surface: #0f1824;
  --surface-2: #121e2c;
  --surface-3: #182738;
  --ink: #e8eff8;
  --ink-2: #cad7e5;
  --muted: #8ea2b7;
  --muted-2: #70859a;
  --line: #223144;
  --line-strong: #33475e;
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --brand-soft: #0e2f2d;
  --accent: #22d3ee;
  --accent-soft: #0b2c3a;
  --danger: #f87171;
  --danger-soft: #3a1414;
  --warn: #fbbf24;
  --warn-soft: #3a2a0d;
  --ok: #4ade80;
  --ok-soft: #0f2e1b;
  --purple: #a78bfa;
  --purple-soft: #24163e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 34px rgba(0, 0, 0, .22);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .5);
  --header-bg: rgba(7, 12, 19, .86);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; min-height: 60vh; outline: none; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.icon { flex: none; vertical-align: -3px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1; }
.flex { display: flex; align-items: center; gap: 10px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 68px; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
:root[data-theme="dark"] .brand-mark img { filter: invert(1) brightness(1.7); }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text strong { font-size: 17px; letter-spacing: -.02em; }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 9px;
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .16s, background .16s;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--brand-strong); background: var(--brand-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none; margin-left: auto;
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 17px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }
.theme-toggle {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }

/* 用户菜单 */
.user-menu { position: relative; }
.user-button {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 9px 4px 4px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.user-name { font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 9px); min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: var(--shadow-lg); padding: 7px; display: none; z-index: 70;
}
.dropdown.open { display: block; animation: fadeUp .14s ease-out; }
.dropdown-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.dropdown-head strong { display: block; font-size: 13px; }
.dropdown-head span { font-size: 11px; color: var(--muted); }
.dropdown-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-2); font-size: 13px; text-align: left;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--ink); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 15px;
  border: 1px solid transparent; border-radius: 10px;
  background: var(--surface); color: var(--ink-2);
  font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: background .16s, border-color .16s, color .16s, transform .16s, box-shadow .16s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 24%, transparent); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #061a18; }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-strong); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color: #fff; }
.btn-soft-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-sm { min-height: 31px; padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { min-height: 46px; padding: 11px 20px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero); color: var(--hero-ink);
  padding: 74px 0 82px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, .075) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.85), transparent 88%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; width: 760px; height: 760px; right: -220px; top: -360px;
  background: radial-gradient(circle, rgba(34, 211, 238, .18), transparent 64%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.06fr .94fr; gap: 54px; align-items: center; }
.hero-copy { max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: #7dd3c7; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 11px; border: 1px solid rgba(45, 212, 191, .22); border-radius: 999px;
  background: rgba(15, 118, 110, .14);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .14); }
.hero h1 {
  margin: 21px 0 18px; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.12;
  letter-spacing: -.035em; font-weight: 750; color: #f3fffc;
}
.hero h1 em { font-style: normal; color: #5eead4; }
.hero p.lead { margin: 0; max-width: 560px; color: var(--hero-muted); font-size: 16.5px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 29px; }
.hero-actions .btn-primary { background: #5eead4; border-color: #5eead4; color: #04211d; box-shadow: 0 10px 30px rgba(94, 234, 212, .18); }
.hero-actions .btn-primary:hover { background: #99f6e4; border-color: #99f6e4; }
.hero-actions .btn-secondary { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .16); color: #d8e9e5; }
.hero-actions .btn-secondary:hover { border-color: rgba(94, 234, 212, .5); color: #fff; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 27px; color: #87a1b1; font-size: 12.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta strong { color: #d9f4ee; font-weight: 650; }

.hero-visual { position: relative; }
.terminal-card {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(148, 220, 210, .18);
  background: linear-gradient(180deg, rgba(10, 26, 38, .88), rgba(5, 16, 25, .94));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
}
.terminal-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(94, 234, 212, .05) 48%, transparent 60%);
}
.terminal-head { display: flex; align-items: center; gap: 7px; padding: 12px 15px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.terminal-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.terminal-dot.red { background: #f87171; } .terminal-dot.amber { background: #fbbf24; } .terminal-dot.green { background: #34d399; }
.terminal-title { margin-left: 7px; color: #7894a6; font-size: 11px; font-family: var(--mono); }
.terminal-body { padding: 18px 19px 20px; font-family: var(--mono); font-size: 12.3px; line-height: 1.9; color: #a9c2ce; }
.terminal-line { white-space: pre-wrap; }
.terminal-line .prompt { color: #5eead4; }
.terminal-line .key { color: #7dd3fc; }
.terminal-line .str { color: #fcd34d; }
.terminal-line .dim { color: #5c7788; }
.terminal-line .ok { color: #34d399; }
.terminal-badge {
  position: absolute; right: -14px; bottom: -20px;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 13px; border-radius: 12px;
  background: rgba(7, 19, 31, .92); border: 1px solid rgba(94, 234, 212, .24);
  color: #b8eee5; font-size: 11.5px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.terminal-badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52, 211, 153, .12); animation: pulse 2.4s infinite; }

/* ---------- 通用 section ---------- */
.section { padding: 54px 0; }
.section.tight { padding-top: 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-title { margin: 0; font-size: 25px; letter-spacing: -.025em; font-weight: 720; }
.section-desc { margin: 7px 0 0; color: var(--muted); font-size: 14px; max-width: 680px; }
.section-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.page-hero { padding: 40px 0 12px; }
.page-hero h1 { margin: 0; font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -.03em; }
.page-hero p { margin: 9px 0 0; color: var(--muted); max-width: 720px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; margin: 22px 0 14px; color: var(--muted); font-size: 12.5px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- 配置接入 ---------- */
.connect-card {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.connect-info { padding: 27px 28px 26px; }
.connect-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--brand-strong); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.connect-info h3 { margin: 10px 0 6px; font-size: 21px; letter-spacing: -.02em; }
.connect-info p { margin: 0; color: var(--muted); font-size: 13.5px; }
.steps { display: grid; gap: 0; margin-top: 20px; }
.step { display: flex; gap: 12px; padding: 13px 0; border-top: 1px dashed var(--line); }
.step:first-child { border-top: 0; padding-top: 4px; }
.step-num {
  flex: none; width: 25px; height: 25px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-strong); font-size: 11.5px; font-weight: 700;
}
.step strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.step span { color: var(--muted); font-size: 12.5px; }
.connect-code { background: #08131f; color: #d7ebe8; padding: 25px 24px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.connect-code::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(45, 212, 191, .13), transparent 55%);
}
.connect-code-label { position: relative; color: #6f8fa1; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-family: var(--mono); }
.url-box {
  position: relative; display: flex; align-items: center; gap: 9px;
  margin-top: 10px; padding: 11px 12px;
  border: 1px solid rgba(94, 234, 212, .2); border-radius: 10px;
  background: rgba(255, 255, 255, .035);
}
.url-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.3px; color: #a7f3d0; }
.copy-btn {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05);
  color: #c8e6e1; border-radius: 7px; padding: 5px 8px; font-size: 11px;
}
.copy-btn:hover { background: rgba(255, 255, 255, .1); }
.connect-note { position: relative; margin: 13px 0 0; color: #7f9aaa; font-size: 11.5px; line-height: 1.75; }
.connect-note code { color: #b8eee5; background: rgba(255, 255, 255, .06); padding: 1px 5px; border-radius: 4px; }

/* ---------- 工具栏 / 搜索 ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.search-box { position: relative; flex: 1 1 300px; max-width: 460px; }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); padding: 9px 12px;
  outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.search-box .input { padding-left: 38px; }
.select { max-width: 160px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 500;
  transition: all .16s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .chip.active { color: #061a18; }
.chip .count { opacity: .65; font-size: 10.5px; }

/* ---------- 插件卡片 ---------- */
.plugin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.plugin-card {
  position: relative; display: flex; flex-direction: column;
  padding: 19px; min-height: 228px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
.plugin-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow); }
.plugin-card-head { display: flex; align-items: flex-start; gap: 12px; }
.plugin-icon {
  flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.plugin-icon img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.plugin-title-wrap { min-width: 0; flex: 1; }
.plugin-title { margin: 0; font-size: 16.5px; line-height: 1.3; letter-spacing: -.015em; font-weight: 700; }
.plugin-title a { color: var(--ink); }
.plugin-title a:hover { color: var(--brand-strong); }
.plugin-name { margin-top: 3px; color: var(--muted-2); font-size: 11px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-desc { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.62; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plugin-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 10.5px; line-height: 1.4;
}
.tag.brand { background: var(--brand-soft); border-color: transparent; color: var(--brand-strong); }
.tag.amber { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.plugin-card-foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 11px;
}
.plugin-card-foot .meta { display: inline-flex; align-items: center; gap: 4px; }
.plugin-card-foot .version { color: var(--ink-2); font-family: var(--mono); font-size: 10.5px; }
.featured-pin {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 23px; height: 23px; border-radius: 7px;
  color: var(--warn); background: var(--warn-soft);
}

/* ---------- 空状态 / 加载 ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 58px 24px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius); color: var(--muted); background: var(--surface-2);
}
.empty .empty-icon { width: 52px; height: 52px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); color: var(--muted-2); margin-bottom: 14px; }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 17px; }
.empty p { margin: 0; font-size: 13px; max-width: 420px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px; color: var(--muted); font-size: 13px; }
.spinner { width: 17px; height: 17px; border: 2px solid var(--line-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.skeleton-card { height: 228px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface), var(--surface-3), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border: 1px solid var(--line); }
.boot-screen { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.boot-mark { width: 54px; height: 54px; border-radius: 16px; }
.boot-text { font-size: 13px; letter-spacing: .02em; }

/* ---------- 插件详情 ---------- */
.detail-page { padding-bottom: 46px; }
.detail-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 20px;
  padding: 26px 28px; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.detail-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 95% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 46%);
}
.detail-icon { position: relative; flex: none; width: 74px; height: 74px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); padding: 9px; }
.detail-icon img { width: 100%; height: 100%; object-fit: contain; }
.detail-head-main { position: relative; min-width: 0; flex: 1; }
.detail-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.detail-title { margin: 0; font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -.03em; line-height: 1.18; }
.detail-sub { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.detail-sub .mono { font-size: 11px; }
.detail-desc { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 760px; }
.detail-actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 22px; margin-top: 22px; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { position: sticky; top: 88px; display: grid; gap: 14px; }
.tabs { display: flex; align-items: center; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab {
  position: relative; border: 0; background: transparent; color: var(--muted);
  padding: 10px 13px 12px; font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-strong); }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .025); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 14px; font-weight: 700; }
.panel-body { padding: 18px; }
.info-card { padding: 17px 18px; }
.info-card h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.info-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 12.5px; }
.info-row:first-of-type { border-top: 0; padding-top: 0; }
.info-label { color: var(--muted); flex: none; }
.info-value { text-align: right; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.info-value .mono { font-size: 11.5px; }
.install-card { padding: 17px 18px; }
.install-card h3 { margin: 0 0 5px; font-size: 13px; }
.install-card p { margin: 0 0 12px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.command-line {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 11px; border-radius: 9px;
  background: #08131f; color: #b6e8df;
  font-family: var(--mono); font-size: 11px; line-height: 1.65;
  overflow-x: auto;
}
.command-line code { flex: 1; font: inherit; color: inherit; white-space: pre; word-break: normal; }
.command-copy { flex: none; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #c8e6e1; border-radius: 6px; padding: 3px 6px; font-size: 10px; }
.command-copy:hover { background: rgba(255,255,255,.1); }
.side-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.badge-green { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge-amber { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.badge-red { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.badge-blue { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.badge-purple { background: var(--purple-soft); border-color: transparent; color: var(--purple); }
.badge-brand { background: var(--brand-soft); border-color: transparent; color: var(--brand-strong); }
.readme { padding: 26px 30px 32px; color: var(--ink-2); font-size: 14px; line-height: 1.78; overflow-wrap: break-word; }
.readme > :first-child { margin-top: 0; }
.readme > :last-child { margin-bottom: 0; }
.readme h1, .readme h2, .readme h3, .readme h4, .readme h5, .readme h6 { color: var(--ink); line-height: 1.3; letter-spacing: -.02em; margin: 1.5em 0 .6em; }
.readme h1 { font-size: 25px; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.readme h2 { font-size: 20px; padding-bottom: .25em; border-bottom: 1px solid var(--line); }
.readme h3 { font-size: 16.5px; }
.readme h4 { font-size: 14.5px; }
.readme p { margin: .7em 0; }
.readme a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.readme ul, .readme ol { padding-left: 1.4em; margin: .7em 0; }
.readme li { margin: .25em 0; }
.readme li.md-task { list-style: none; margin-left: -1.2em; }
.md-check { display: inline-flex; width: 15px; height: 15px; border: 1px solid var(--line-strong); border-radius: 4px; margin-right: 6px; align-items: center; justify-content: center; font-size: 10px; color: var(--brand); }
.readme blockquote { margin: 1em 0; padding: .6em 1em; border-left: 3px solid var(--brand); background: var(--surface-2); color: var(--muted); border-radius: 0 8px 8px 0; }
.readme blockquote p { margin: .2em 0; }
.readme hr { border: 0; border-top: 1px solid var(--line); margin: 1.7em 0; }
.readme code.md-inline-code { font-family: var(--mono); font-size: .88em; background: var(--surface-3); border: 1px solid var(--line); padding: .1em .35em; border-radius: 5px; color: var(--ink-2); }
.readme .md-image { display: block; max-width: 100%; height: auto; margin: 1em auto; border-radius: 10px; border: 1px solid var(--line); }
.md-table-wrap { overflow-x: auto; margin: 1em 0; border: 1px solid var(--line); border-radius: 10px; }
.md-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.md-table th, .md-table td { padding: 8px 11px; border-bottom: 1px solid var(--line); text-align: left; }
.md-table th { background: var(--surface-2); font-weight: 650; color: var(--ink); }
.md-table tr:last-child td { border-bottom: 0; }
.code-block { margin: 1em 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #08131f; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .025); }
.code-lang { color: #6f8fa1; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.code-copy { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #c8e6e1; border-radius: 5px; padding: 2px 7px; font-size: 10px; }
.code-copy:hover { background: rgba(255,255,255,.1); }
.md-pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.md-pre code { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: #cfe7e2; white-space: pre; }

/* 文件浏览 */
.file-browser { display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: 560px; overflow: hidden; }
.file-tree { border-right: 1px solid var(--line); background: var(--surface-2); max-height: 720px; overflow: auto; padding: 10px 8px; }
.tree-item { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; text-align: left; }
.tree-item:hover { background: var(--surface-3); color: var(--ink); }
.tree-item.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.tree-item .icon { color: var(--muted-2); }
.tree-item.active .icon { color: var(--brand); }
.tree-dir { color: var(--ink-2); font-weight: 600; cursor: pointer; }
.tree-group { margin: 0; }
.tree-group > summary { list-style: none; }
.tree-group > summary::-webkit-details-marker { display: none; }
.tree-caret { transition: transform .15s ease; }
.tree-group[open] > summary .tree-caret { transform: rotate(90deg); }
.tree-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-children { margin-left: 0; }
.file-preview { min-width: 0; display: flex; flex-direction: column; }
.file-preview-head { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--line); background: var(--surface); }
.file-path { min-width: 0; flex: 1; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; }
.code-view { flex: 1; overflow: auto; background: #08131f; color: #cfe7e2; max-height: 660px; }
.code-line { display: flex; min-height: 20px; font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.code-line:hover { background: rgba(255, 255, 255, .035); }
.line-no { flex: none; width: 48px; padding: 0 10px 0 0; text-align: right; color: #496273; user-select: none; border-right: 1px solid rgba(255,255,255,.06); margin-right: 12px; }
.line-text { white-space: pre; padding-right: 20px; }
.file-image { padding: 22px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); min-height: 300px; }
.file-image img { max-height: 480px; border-radius: 8px; border: 1px solid var(--line); }
.binary-note { padding: 26px; text-align: center; color: var(--muted); }
.file-empty { padding: 50px; text-align: center; color: var(--muted); }

/* 版本表 */
.version-list { display: grid; gap: 10px; }
.version-item {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
}
.version-item .v { font-family: var(--mono); font-size: 13px; font-weight: 650; color: var(--ink); }
.version-item .v-meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.version-item .v-actions { display: flex; gap: 6px; }
.version-changelog { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- 认证页 ---------- */
.auth-page { padding: 44px 0 64px; }
.auth-shell {
  display: grid; grid-template-columns: 1fr 1fr; max-width: 980px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg); min-height: 560px;
}
.auth-brand {
  position: relative; overflow: hidden; padding: 44px 42px;
  background: var(--hero); color: var(--hero-ink);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 10% 85%, rgba(34, 211, 238, .17), transparent 55%), linear-gradient(rgba(45,212,191,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(45,212,191,.06) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
}
.auth-brand > * { position: relative; }
.auth-brand .auth-logo { display: flex; align-items: center; gap: 12px; }
.auth-brand .auth-logo .brand-mark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.auth-brand h2 { margin: 42px 0 10px; font-size: 30px; line-height: 1.2; letter-spacing: -.03em; color: #f0fffc; }
.auth-brand p { margin: 0; color: #9fb8c6; font-size: 13.5px; line-height: 1.8; }
.auth-features { display: grid; gap: 13px; margin-top: 30px; }
.auth-feature { display: flex; gap: 10px; align-items: flex-start; color: #c3d9de; font-size: 12.5px; }
.auth-feature .icon { color: #5eead4; margin-top: 2px; }
.auth-brand-foot { color: #6f8d9c; font-size: 11px; margin-top: 34px; }
.auth-form-panel { padding: 42px 44px; display: flex; flex-direction: column; justify-content: center; }
.auth-form-panel h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.auth-form-panel .auth-lead { margin: 7px 0 25px; color: var(--muted); font-size: 13px; }
.form-group { margin-bottom: 15px; }
.label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.label .hint { color: var(--muted-2); font-weight: 400; font-size: 11px; }
.textarea { min-height: 90px; resize: vertical; }
.form-hint { margin-top: 6px; color: var(--muted-2); font-size: 11px; }
.form-error { display: none; margin: 0 0 14px; padding: 9px 11px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 12px; line-height: 1.5; white-space: pre-line; }
.form-error.show { display: block; }
.auth-switch { margin-top: 20px; color: var(--muted); font-size: 12.5px; text-align: center; }
.auth-switch a { font-weight: 650; }
.auth-note { margin-top: 18px; padding: 11px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.success-panel { text-align: center; padding: 30px 10px; }
.success-panel .success-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success-panel h2 { margin: 0 0 8px; font-size: 21px; }
.success-panel p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* ---------- 上传 ---------- */
.upload-page { padding: 30px 0 58px; }
.upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.upload-card { padding: 24px; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 190px; padding: 24px; text-align: center;
  border: 1.5px dashed var(--line-strong); border-radius: 14px;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  transition: border-color .18s, background .18s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .drop-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); color: var(--brand); margin-bottom: 11px; }
.dropzone strong { color: var(--ink); font-size: 14px; }
.dropzone span { font-size: 12px; margin-top: 3px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-picked { display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.file-picked .file-icon { width: 38px; height: 38px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-strong); display: flex; align-items: center; justify-content: center; }
.file-picked .file-info { min-width: 0; flex: 1; }
.file-picked .file-info strong { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-picked .file-info span { color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.upload-side { display: grid; gap: 14px; position: sticky; top: 88px; }
.upload-status { display: flex; gap: 9px; padding: 11px 12px; border-radius: 9px; font-size: 11.5px; line-height: 1.65; }
.upload-status.info { background: var(--accent-soft); color: var(--accent); }
.upload-status.warn { background: var(--warn-soft); color: var(--warn); }
.upload-status.ok { background: var(--ok-soft); color: var(--ok); }
.upload-status.error { background: var(--danger-soft); color: var(--danger); }
.my-plugins { margin-top: 30px; }
.my-plugin-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.my-plugin-row:first-child { border-top: 0; }
.my-plugin-row .plugin-icon { width: 36px; height: 36px; border-radius: 9px; }
.my-plugin-row .info { min-width: 0; flex: 1; }
.my-plugin-row .info strong { display: block; font-size: 13px; }
.my-plugin-row .info span { font-size: 11px; color: var(--muted); }
.progress { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: inherit; transition: width .2s; }

/* ---------- 管理控制台 ---------- */
.console-page { padding: 26px 0 54px; }
.console-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 22px; align-items: start; }
.console-sidebar { position: sticky; top: 88px; padding: 8px; }
.console-side-label { padding: 9px 10px 7px; color: var(--muted-2); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.console-nav { display: grid; gap: 3px; }
.console-nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 550; text-align: left;
}
.console-nav-item:hover { background: var(--surface-2); color: var(--ink); }
.console-nav-item.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 650; }
.console-nav-item .count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
.console-content { min-width: 0; }
.console-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 18px; }
.console-head h1 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.console-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card { padding: 16px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.stat-card .stat-icon { width: 29px; height: 29px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--brand); }
.stat-value { margin-top: 10px; font-size: 26px; line-height: 1.15; font-weight: 720; letter-spacing: -.03em; }
.stat-sub { margin-top: 3px; color: var(--muted-2); font-size: 10.5px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.chart-bars { display: flex; align-items: flex-end; gap: 7px; height: 170px; padding-top: 18px; }
.chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; height: 100%; }
.chart-bar .bar { width: 100%; max-width: 30px; min-height: 2px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--accent))); opacity: .9; transition: height .4s ease; }
.chart-bar .bar-label { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.chart-bar .bar-value { color: var(--muted); font-size: 9.5px; }
.audit-list { display: grid; gap: 0; }
.audit-item { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 11.5px; }
.audit-item:first-child { border-top: 0; }
.audit-dot { margin-top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.audit-item .audit-main { min-width: 0; flex: 1; }
.audit-item .audit-main strong { font-size: 11.5px; }
.audit-item .audit-main span { display: block; color: var(--muted); font-size: 10.5px; }
.audit-time { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { padding: 10px 13px; text-align: left; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.user-cell { display: flex; align-items: center; gap: 9px; }
.user-cell .avatar { width: 30px; height: 30px; font-size: 11px; }
.user-cell strong { display: block; font-size: 12.5px; }
.user-cell span { display: block; color: var(--muted-2); font-size: 10.5px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.inline-select { width: auto; min-width: 92px; padding: 5px 26px 5px 8px; border-radius: 7px; font-size: 11.5px; }
.approval-list { display: grid; gap: 11px; }
.approval-card { display: flex; align-items: flex-start; gap: 13px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.approval-card .avatar { width: 38px; height: 38px; font-size: 13px; }
.approval-main { min-width: 0; flex: 1; }
.approval-main strong { font-size: 13.5px; }
.approval-main .reason { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.console-alert { display: flex; gap: 9px; padding: 11px 13px; margin-bottom: 16px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12px; line-height: 1.6; }
.console-alert .icon { flex: none; margin-top: 1px; }
.section-subhead { margin: 20px 0 10px; font-size: 13px; font-weight: 700; }
.package-hint { color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.index-json {
  margin: 0; padding: 15px 17px; max-height: 520px; overflow: auto;
  background: #08131f; color: #cfe7e2; border-radius: 10px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7;
  white-space: pre; tab-size: 2;
}

/* ---------- 文档页 ---------- */
.docs-page { padding: 30px 0 60px; }
.docs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 34px; align-items: start; }
.docs-nav { position: sticky; top: 88px; display: grid; gap: 2px; }
.docs-nav a { display: block; padding: 7px 10px; border-left: 2px solid transparent; color: var(--muted); font-size: 12.5px; }
.docs-nav a:hover { color: var(--ink); }
.docs-nav a.active { color: var(--brand-strong); border-left-color: var(--brand); font-weight: 650; }
.docs-content { min-width: 0; }
.docs-content h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.docs-content .docs-lead { margin: 8px 0 26px; color: var(--muted); font-size: 14px; }
.doc-section { padding: 24px 26px; margin-bottom: 16px; }
.doc-section h2 { margin: 0 0 10px; font-size: 19px; letter-spacing: -.02em; }
.doc-section h3 { margin: 20px 0 8px; font-size: 14.5px; }
.doc-section p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.doc-section ul { color: var(--muted); font-size: 13px; line-height: 1.8; padding-left: 1.3em; }
.doc-section .code-block { margin: 12px 0; }
.doc-endpoint { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; }
.doc-method { font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 5px; background: var(--ok-soft); color: var(--ok); }
.doc-method.post { background: var(--accent-soft); color: var(--accent); }
.doc-path { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0; }
.doc-table th, .doc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.doc-table th { color: var(--muted); font-weight: 600; background: var(--surface-2); }

/* ---------- 弹窗 / Toast ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(4, 12, 20, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .15s ease-out; }
.modal { width: min(520px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: fadeUp .18s ease-out; }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.modal-head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.modal-close { border: 0; background: transparent; color: var(--muted); padding: 3px; border-radius: 6px; }
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.modal-body { padding: 16px 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.modal-body strong { color: var(--ink); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }
.modal .form-group { margin-bottom: 13px; }
.modal .input, .modal .textarea { background: var(--surface-2); }
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: grid; gap: 9px; max-width: 380px; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); color: var(--ink-2); font-size: 12.5px; animation: toastIn .2s ease-out; }
.toast .toast-icon { flex: none; margin-top: 1px; }
.toast.success .toast-icon { color: var(--ok); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--accent); }
.toast.warn .toast-icon { color: var(--warn); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 30px; }
.footer-inner { min-height: 92px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 18px 0; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand strong { display: block; font-size: 13px; }
.footer-brand span { display: block; color: var(--muted); font-size: 10.5px; }
.footer-links { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 12px; }
.footer-links a:hover { color: var(--brand); }
.footer-meta { display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: 10.5px; }

/* ---------- 工具类 ---------- */
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.pill-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }
.status-dot.amber { background: var(--warn); }
.status-dot.red { background: var(--danger); }
.status-dot.gray { background: var(--muted-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 620px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .plugin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 880px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions { margin-left: 0; }
  .header-inner { gap: 14px; }
  .site-header.mobile-open .main-nav {
    display: flex; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 3px;
    padding: 10px 20px 14px; background: var(--surface);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-header.mobile-open .main-nav .nav-link { padding: 11px 12px; }
  .auth-shell { grid-template-columns: 1fr; max-width: 520px; }
  .auth-brand { display: none; }
  .connect-card { grid-template-columns: 1fr; }
  .connect-code { padding: 22px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .console-layout { grid-template-columns: 1fr; }
  .console-sidebar { position: static; }
  .console-nav { display: flex; flex-wrap: wrap; }
  .console-nav-item { width: auto; }
  .console-side-label { display: none; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-side { position: static; }
  .file-browser { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .container { width: calc(100% - 28px); }
  .hero { padding: 50px 0 58px; }
  .hero h1 { font-size: 34px; }
  .hero p.lead { font-size: 14.5px; }
  .hero-meta { gap: 11px; }
  .plugin-grid { grid-template-columns: 1fr; }
  .skeleton-grid { grid-template-columns: 1fr; }
  .section { padding: 38px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .toolbar { align-items: stretch; }
  .search-box { max-width: none; }
  .select { max-width: none; }
  .detail-hero { padding: 18px; flex-direction: column; gap: 14px; }
  .detail-icon { width: 58px; height: 58px; }
  .detail-actions .btn { flex: 1; }
  .readme { padding: 20px 18px 24px; }
  .file-browser { grid-template-columns: 1fr; }
  .file-tree { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .version-item { grid-template-columns: 1fr; gap: 8px; }
  .auth-form-panel { padding: 30px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { margin-left: 0; }
  .footer-meta { width: 100%; }
  .console-head { flex-direction: column; align-items: flex-start; }
  .modal { max-height: 92vh; }
  .header-actions .btn-ghost { display: none; }
  .user-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
