/* ============================================================
   GEO 星枢 (GEO Nexus) — 极光指挥中心主题 v2
   零外部依赖：不引用任何 CDN 字体 / 图标库
   设计语言：深邃夜空底 + 极光辉光 + 玻璃层叠 + 精密细节
   ============================================================ */

:root {
  --bg-0: #04060d;
  --bg-1: #060b18;
  --bg-2: #0a1224;

  --panel: rgba(148, 176, 230, .055);
  --panel-2: rgba(148, 176, 230, .028);
  --panel-hi: rgba(255, 255, 255, .07);
  --stroke: rgba(160, 190, 240, .11);
  --stroke-2: rgba(160, 190, 240, .2);
  --hairline: linear-gradient(90deg, transparent, rgba(125, 211, 252, .38) 22%,
             rgba(196, 181, 253, .32) 55%, transparent);

  --txt: #eaf1fd;
  --txt-2: #a3b2cc;
  --txt-3: #6b7a94;

  --cyan: #2dd4ee;
  --cyan-2: #7ceef9;
  --violet: #a78bfa;
  --amber: #fcd34d;
  --green: #4ade80;
  --red: #fb7185;

  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 18px 50px -12px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-lift: 0 26px 64px -14px rgba(0, 0, 0, .68), 0 3px 12px rgba(0, 0, 0, .4);
  --glow-cyan: 0 0 26px rgba(45, 212, 238, .32), 0 0 64px rgba(45, 212, 238, .1);
  --glow-violet: 0 0 26px rgba(167, 139, 250, .3);

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .26, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--txt);
  /* 基础底色：必须是不透明渐变，星空画布叠在它之上 */
  background:
    radial-gradient(1150px 720px at 78% -12%, #0e1c3d 0%, transparent 62%),
    radial-gradient(900px 620px at -8% 30%, #0a1a30 0%, transparent 58%),
    linear-gradient(178deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(45, 212, 238, .28); color: #fff; }

/* ---------------- 背景层 ---------------- */

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* 只用带透明度的径向渐变：若混入不透明底色会把星空画布完全遮住 */
  background:
    radial-gradient(950px 640px at 14% 6%, rgba(45, 212, 238, .12), transparent 62%),
    radial-gradient(860px 640px at 88% 10%, rgba(167, 139, 250, .13), transparent 62%),
    radial-gradient(1200px 800px at 55% 108%, rgba(56, 189, 248, .08), transparent 66%);
}

/* 页面四角暗角，聚焦视线 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(130% 130% at 50% 42%, transparent 58%, rgba(1, 3, 8, .5) 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .22;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .018) 0px,
    rgba(255, 255, 255, .018) 1px,
    transparent 1px,
    transparent 4px
  );
}

/* ---------------- 玻璃拟态 ---------------- */

.glass {
  position: relative;
  background:
    linear-gradient(180deg, var(--panel-hi), transparent 46%),
    var(--panel);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* 顶缘发光发丝线 */
.glass::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--hairline);
  border-radius: 1px;
  pointer-events: none;
  opacity: .7;
}

.grad-text {
  margin: 0;
  font-size: 30.5px;
  font-weight: 800;
  letter-spacing: .5px;
  background: linear-gradient(94deg, #c8f6ff 0%, #67e8f9 30%, var(--cyan) 52%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(45, 212, 238, .3));
}

.hidden { display: none !important; }

/* ---------------- 登录 ---------------- */

.auth-wrap {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 36px 32px;
  animation: riseIn .7s var(--ease) both;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.auth-sub {
  margin: 5px 0 0;
  font-size: 15.5px;
  color: var(--txt-2);
  letter-spacing: 3px;
}

.logo-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 16px rgba(45, 212, 238, .5));
}

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 24px;
  background: rgba(10, 18, 36, .55);
  border: 1px solid var(--stroke);
  border-radius: 13px;
}

.tab {
  flex: 1;
  padding: 10px 0;
  font-size: 16.5px;
  color: var(--txt-2);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: all .22s var(--ease);
}

.tab:hover { color: var(--txt); }

.tab.active {
  color: #03121a;
  font-weight: 700;
  background: linear-gradient(94deg, var(--cyan-2), var(--cyan) 60%, #38bdf8);
  box-shadow: var(--glow-cyan);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-hint {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--txt-3);
}

/* ---------------- 表单控件 ---------------- */

.field { display: flex; flex-direction: column; gap: 7px; }

.field > span {
  font-size: 15px;
  color: var(--txt-2);
  letter-spacing: .3px;
}

/* 文本类输入：含 JS 动态生成的无 type 属性输入框 */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="file"]),
select, textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 16.5px;
  color: var(--txt);
  background: rgba(8, 15, 32, .6);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input::placeholder, textarea::placeholder { color: var(--txt-3); }

input:focus, select:focus, textarea:focus {
  border-color: rgba(45, 212, 238, .6);
  background: rgba(45, 212, 238, .05);
  box-shadow: 0 0 0 3px rgba(45, 212, 238, .12), 0 0 20px rgba(45, 212, 238, .08);
}

input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid rgba(45, 212, 238, .55);
  outline-offset: 2px;
}

select option { background: var(--bg-2); color: var(--txt); }

textarea { resize: vertical; min-height: 92px; line-height: 1.7; }

label.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  color: var(--txt-2);
  cursor: pointer;
}

label.check input { width: 15px; height: 15px; accent-color: var(--cyan); }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 19px;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: .2px;
  color: var(--txt);
  background: rgba(148, 176, 230, .08);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.btn:hover {
  background: rgba(148, 176, 230, .14);
  border-color: rgba(160, 190, 240, .34);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5);
}

.btn:active { transform: translateY(0); }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #03141c;
  font-weight: 700;
  background: linear-gradient(94deg, var(--cyan-2) 0%, var(--cyan) 46%, #38bdf8 78%, var(--violet) 148%);
  border-color: transparent;
  box-shadow: var(--glow-cyan), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.btn-primary:hover {
  box-shadow: 0 0 38px rgba(45, 212, 238, .55), 0 10px 28px -10px rgba(45, 212, 238, .4), inset 0 1px 0 rgba(255, 255, 255, .4);
  background: linear-gradient(94deg, #9df3ff 0%, var(--cyan-2) 30%, var(--cyan) 62%, #38bdf8 96%, var(--violet) 160%);
}

.btn-violet {
  color: #fff;
  background: linear-gradient(94deg, #8b5cf6, var(--violet));
  border-color: transparent;
  box-shadow: var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.btn-violet:hover { background: linear-gradient(94deg, #9f74f8, #b9a0fb); box-shadow: 0 0 34px rgba(167, 139, 250, .5); }

.btn-ghost { background: transparent; border-color: var(--stroke); color: var(--txt-2); }
.btn-ghost:hover { color: var(--txt); border-color: var(--stroke-2); background: rgba(148, 176, 230, .07); }

.btn-danger { color: var(--red); border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .07); }
.btn-danger:hover { background: rgba(251, 113, 133, .15); border-color: rgba(251, 113, 133, .55); box-shadow: 0 0 18px rgba(251, 113, 133, .2); }

.btn-block { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 15.5px; border-radius: 9px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--txt-2);
  background: transparent;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  cursor: pointer;
  transition: all .2s;
}

.icon-btn:hover { color: var(--cyan); border-color: rgba(45, 212, 238, .5); background: rgba(45, 212, 238, .08); box-shadow: 0 0 14px rgba(45, 212, 238, .18); }

/* ---------------- 应用骨架 ---------------- */

.app {
  position: relative;
  z-index: 5;
  display: flex;
  height: 100%;
  gap: 16px;
  padding: 16px;
}

.sidebar {
  width: 236px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 12px 12px;
  transition: width .25s var(--ease), padding .25s var(--ease);
}

.app.collapsed .sidebar { width: 66px; padding: 20px 8px 12px; }
.app.collapsed .side-title,
.app.collapsed .nav-item span,
.app.collapsed .nav-badge,
.app.collapsed .side-foot span { display: none; }
.app.collapsed .nav-item { justify-content: center; }

.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; }

.side-title { display: flex; flex-direction: column; line-height: 1.25; }
.side-title strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
  background: linear-gradient(94deg, #d9f7ff, var(--cyan) 60%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.side-title small { font-size: 12.5px; color: var(--txt-3); letter-spacing: 3px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  font-size: 16px;
  color: var(--txt-2);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s var(--ease);
}

.nav-item svg { flex-shrink: 0; opacity: .85; transition: opacity .18s; }
.nav-item:hover { color: var(--txt); background: rgba(148, 176, 230, .07); }
.nav-item:hover svg { opacity: 1; }

.nav-item.active {
  color: #d9f7ff;
  background: linear-gradient(94deg, rgba(45, 212, 238, .16), rgba(167, 139, 250, .07) 90%);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 238, .22);
}

.nav-item.active svg { opacity: 1; color: var(--cyan); filter: drop-shadow(0 0 7px rgba(45, 212, 238, .7)); }

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--cyan-2), var(--violet));
  box-shadow: 0 0 14px var(--cyan);
}

.nav-badge {
  margin-left: auto;
  padding: 1.5px 7px;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--cyan);
  background: rgba(45, 212, 238, .13);
  border: 1px solid rgba(45, 212, 238, .32);
  border-radius: 6px;
}

.nav-badge.alt { color: var(--violet); background: rgba(167, 139, 250, .13); border-color: rgba(167, 139, 250, .34); }

.nav-sep { height: 1px; margin: 10px 8px; background: var(--stroke); }

.side-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 4px;
  font-size: 14px;
  color: var(--txt-3);
}

.sys-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2.2s infinite;
}

.main { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  flex-shrink: 0;
}

.topbar-title h2 {
  margin: 0;
  font-size: 20.5px;
  font-weight: 700;
  letter-spacing: .3px;
}

.topbar-title p { margin: 4px 0 0; font-size: 14.5px; color: var(--txt-3); letter-spacing: .3px; }

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

.tenant-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6.5px 14px;
  font-size: 15px;
  color: var(--txt-2);
  background: rgba(8, 15, 32, .5);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.tenant-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.view {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 24px;
}

.view::-webkit-scrollbar { width: 8px; }
.view::-webkit-scrollbar-track { background: transparent; }
.view::-webkit-scrollbar-thumb { background: rgba(148, 176, 230, .14); border-radius: 4px; }
.view::-webkit-scrollbar-thumb:hover { background: rgba(45, 212, 238, .35); }

/* ---------------- 页面通用 ---------------- */

.page { animation: riseIn .45s var(--ease) both; }

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 18px;
}

.page-head h3 { margin: 0; font-size: 19.5px; font-weight: 700; letter-spacing: .2px; }
.page-head p { margin: 5px 0 0; font-size: 15px; color: var(--txt-3); }
.page-head .spacer { flex: 1; }

.panel { padding: 22px; margin-bottom: 16px; }
.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--txt);
}
.panel-title::before {
  content: "";
  width: 3.5px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan-2), var(--violet));
  box-shadow: 0 0 12px rgba(45, 212, 238, .6);
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 指标卡 */
.stat {
  position: relative;
  padding: 20px;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}

.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--stroke-2); }

.stat::after {
  content: "";
  position: absolute;
  top: -42%;
  right: -18%;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 238, .14), transparent 68%);
  pointer-events: none;
}

.stat-label {
  font-size: 14.5px;
  color: var(--txt-3);
  letter-spacing: .6px;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 34.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--txt);
  text-shadow: 0 0 26px rgba(45, 212, 238, .28);
}

.stat-value.cyan { color: var(--cyan-2); text-shadow: 0 0 26px rgba(45, 212, 238, .5); }
.stat-value.violet { color: #c4b5fd; text-shadow: 0 0 26px rgba(167, 139, 250, .45); }
.stat-value.amber { color: var(--amber); text-shadow: 0 0 26px rgba(252, 211, 77, .4); }
.stat-value.green { color: var(--green); text-shadow: 0 0 26px rgba(74, 222, 128, .4); }

.stat-unit { margin-left: 4px; font-size: 16.5px; color: var(--txt-3); }
.stat-foot { margin-top: 9px; font-size: 14px; color: var(--txt-3); line-height: 1.6; }

/* ---------------- 表格 ---------------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 16px; }

table.tbl th {
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-3);
  text-align: left;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(8, 15, 32, .45);
  border-bottom: 1px solid var(--stroke-2);
  white-space: nowrap;
}

table.tbl td {
  padding: 13px;
  color: var(--txt-2);
  border-bottom: 1px solid rgba(148, 176, 230, .06);
  vertical-align: middle;
}

table.tbl tbody tr { transition: background .16s; }
table.tbl tbody tr:hover { background: rgba(45, 212, 238, .055); }
table.tbl tbody tr:last-child td { border-bottom: 0; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* 标签 */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 7px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tag.cyan { color: var(--cyan-2); background: rgba(45, 212, 238, .1); border-color: rgba(45, 212, 238, .32); }
.tag.green { color: var(--green); background: rgba(74, 222, 128, .1); border-color: rgba(74, 222, 128, .32); }
.tag.amber { color: var(--amber); background: rgba(252, 211, 77, .1); border-color: rgba(252, 211, 77, .32); }
.tag.violet { color: #c4b5fd; background: rgba(167, 139, 250, .1); border-color: rgba(167, 139, 250, .32); }
.tag.gray { color: var(--txt-3); background: rgba(148, 176, 230, .05); border-color: var(--stroke); }
.tag.red { color: var(--red); background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .32); }

/* 空状态 */
.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--txt-3);
  font-size: 16px;
  line-height: 1.8;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  color: var(--cyan);
  border: 1px dashed rgba(45, 212, 238, .35);
  border-radius: 16px;
  background: rgba(45, 212, 238, .05);
  box-shadow: 0 0 24px rgba(45, 212, 238, .1) inset;
}

.empty a { color: var(--cyan); cursor: pointer; text-decoration: none; }
.empty a:hover { text-decoration: underline; text-shadow: 0 0 12px rgba(45, 212, 238, .5); }

/* ---------------- 图表 ---------------- */

.chart-box { position: relative; width: 100%; }
.chart-box canvas { display: block; width: 100%; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 14.5px; color: var(--txt-2); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2.5px; }

.rate-ring { display: grid; place-items: center; position: relative; }
.rate-ring canvas { display: block; }
.rate-ring .ring-text {
  position: absolute;
  text-align: center;
  font-family: var(--mono);
}
.rate-ring .ring-num { font-size: 33.5px; font-weight: 700; color: var(--cyan-2); text-shadow: 0 0 24px rgba(45, 212, 238, .5); }
.rate-ring .ring-lbl { font-size: 13.5px; color: var(--txt-3); letter-spacing: 1.5px; }

/* 进度条 */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-name { width: 104px; flex-shrink: 0; font-size: 15px; color: var(--txt-2); }
.bar-track { flex: 1; height: 8px; background: rgba(8, 15, 32, .65); border-radius: 5px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.bar-fill {
  display: block; /* span 默认 inline，不设 block 则 width/height 失效 */
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--cyan), #38bdf8 62%, var(--violet));
  box-shadow: 0 0 15px rgba(45, 212, 238, .5);
  transition: width .9s var(--ease);
}
.bar-val { width: 68px; flex-shrink: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 15px; color: var(--cyan-2); }

/* ---------------- 模态框 ---------------- */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 10, .76); backdrop-filter: blur(6px); }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  animation: popIn .3s var(--ease) both;
}

.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--stroke); }
.modal-head h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.modal-body { padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--stroke); }

/* ---------------- 加载 / 提示 ---------------- */

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  background: rgba(2, 5, 12, .74);
  backdrop-filter: blur(7px);
}

.loader-ring {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(45, 212, 238, .16);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .9s linear infinite;
  box-shadow: 0 0 36px rgba(45, 212, 238, .28);
}

.global-loading p { margin: 0; font-size: 16px; color: var(--txt-2); letter-spacing: .8px; }

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 100;
  padding: 12px 22px;
  font-size: 16px;
  border-radius: 12px;
  background: rgba(9, 16, 33, .95);
  border: 1px solid var(--stroke-2);
  box-shadow: var(--shadow-lift);
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: transform .32s var(--ease), opacity .32s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.ok { border-color: rgba(74, 222, 128, .5); color: var(--green); box-shadow: 0 0 28px rgba(74, 222, 128, .12), var(--shadow-lift); }
.toast.err { border-color: rgba(251, 113, 133, .5); color: var(--red); box-shadow: 0 0 28px rgba(251, 113, 133, .12), var(--shadow-lift); }

.inline-loading { display: flex; align-items: center; gap: 9px; font-size: 15.5px; color: var(--txt-2); }
.inline-loading i {
  width: 13px; height: 13px;
  border: 2px solid rgba(45, 212, 238, .2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ---------------- 结果/代码展示 ---------------- */

.result-box {
  padding: 18px;
  background: rgba(3, 7, 16, .5);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  max-height: 460px;
  overflow-y: auto;
}

.md-body { font-size: 16.5px; line-height: 1.85; color: var(--txt-2); }
.md-body h1, .md-body h2, .md-body h3, .md-body h4, .md-body h5, .md-body h6 {
  color: var(--txt); margin: 20px 0 10px; line-height: 1.4;
}
.md-body h1 { font-size: 22.5px; }
.md-body h2 { font-size: 19.5px; padding-left: 11px; border-left: 3px solid var(--cyan); }
.md-body h3 { font-size: 18px; }
.md-body h4, .md-body h5, .md-body h6 { font-size: 17px; }
.md-body p { margin: 0 0 12px; }
.md-body ul, .md-body ol { margin: 0 0 12px; padding-left: 22px; }
.md-body li { margin-bottom: 6px; }
.md-body strong { color: var(--txt); }
.md-body code {
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--cyan-2);
  background: rgba(45, 212, 238, .09);
  border-radius: 4px;
}
.md-body pre {
  padding: 14px;
  overflow-x: auto;
  background: rgba(0, 0, 0, .4);
  border: 1px solid var(--stroke);
  border-radius: 9px;
}
.md-body pre code { color: var(--txt-2); background: none; }
.md-body table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 15.5px; }
.md-body th, .md-body td { padding: 8px 10px; border: 1px solid var(--stroke); }
.md-body th { background: rgba(148, 176, 230, .05); color: var(--txt); }
.md-body blockquote {
  margin: 0 0 12px;
  padding: 9px 15px;
  color: var(--txt-3);
  border-left: 3px solid var(--violet);
  background: rgba(167, 139, 250, .07);
  border-radius: 0 8px 8px 0;
}

.code-box {
  padding: 16px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.75;
  color: #bdf3ff;
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(0, 0, 0, .42);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  max-height: 380px;
  overflow-y: auto;
}

.code-head { display: flex; align-items: center; gap: 10px; margin: 16px 0 9px; }
.code-head strong { font-size: 15.5px; font-weight: 700; }
.code-head .spacer { flex: 1; }

/* 诊断报告 */
.dim-item { margin-bottom: 15px; }
.dim-top { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 15.5px; }
.dim-top .dim-name { color: var(--txt); }
.dim-top .dim-score { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--cyan-2); }
.dim-comment { font-size: 14.5px; color: var(--txt-3); margin-top: 5px; line-height: 1.6; }

.list-check { list-style: none; margin: 0; padding: 0; }
.list-check li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--txt-2);
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.list-check.warn li::before { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

/* 摘录 */
.excerpt {
  padding: 11px 14px;
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--txt-3);
  background: rgba(148, 176, 230, .035);
  border-left: 2px solid var(--stroke-2);
  border-radius: 0 8px 8px 0;
}

.excerpt mark { padding: 0 3px; color: var(--cyan-2); background: rgba(45, 212, 238, .14); border-radius: 3px; }

/* 筛选栏 */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.toolbar .field { min-width: 170px; }
.toolbar .spacer { flex: 1; }

/* ---------------- 动画 ---------------- */

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

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* ============================================================
   指挥中心 / 粒子增强 新增样式
   ============================================================ */
.hero {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 28px 30px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -100px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, .2), transparent 65%);
  pointer-events: none;
}
.hero-score { flex-shrink: 0; display: grid; place-items: center; position: relative; }
.hero-score canvas { display: block; }
.hero-score .hs-num { position: absolute; text-align: center; }
.hero-score .hs-num b {
  display: block;
  font-family: var(--mono);
  font-size: 48.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 30px rgba(45, 212, 238, .65);
}
.hero-score .hs-num span { font-size: 13.5px; letter-spacing: 2.5px; color: var(--txt-3); }
.hero-main { flex: 1; min-width: 0; }
.hero-title { margin: 0 0 8px; font-size: 21.5px; font-weight: 700; letter-spacing: .2px; }
.hero-sub { margin: 0; font-size: 15.5px; color: var(--txt-2); line-height: 1.8; }
.hero-sub b { color: var(--cyan-2); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 15px;
  border-radius: 20px;
  background: rgba(8, 15, 32, .5);
  border: 1px solid var(--stroke);
  color: var(--txt-2);
  transition: border-color .2s;
}
.hero-chip:hover { border-color: var(--stroke-2); }
.hero-chip i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 9px currentColor; }

.steps { display: flex; flex-wrap: wrap; }
.step {
  flex: 1;
  min-width: 150px;
  position: relative;
  padding: 16px 14px 14px;
  cursor: pointer;
  transition: background .2s;
  border-radius: 12px;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 33px;
  right: 0;
  width: 1px;
  height: 28px;
  background: var(--stroke);
}
.step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16.5px;
  font-weight: 700;
  border: 1px solid var(--stroke-2);
  color: var(--txt-2);
  background: rgba(8, 15, 32, .5);
  transition: all .2s;
  margin-bottom: 10px;
}
.step.done .step-dot {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #03141c;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(45, 212, 238, .5);
}
.step-name { font-size: 15.5px; color: var(--txt); font-weight: 600; }
.step-meta { font-size: 13.5px; color: var(--txt-3); margin-top: 3px; }
.step:hover { background: rgba(45, 212, 238, .055); }

.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: flex; align-items: center; gap: 12px; }
.funnel-row .bar-name { width: 96px; flex-shrink: 0; font-size: 15px; color: var(--txt-2); }
.funnel-bar {
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 14.5px;
  font-weight: 700;
  color: #03141c;
  min-width: 6px;
  transition: width .9s var(--ease);
  box-shadow: 0 0 15px rgba(45, 212, 238, .22);
}
.funnel-n { width: 48px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 15.5px; color: var(--txt-2); }

.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(148, 176, 230, .07); }
.todo li:last-child { border-bottom: 0; }
.todo .t-ico {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14.5px;
  font-weight: 700;
  background: rgba(252, 211, 77, .12);
  color: var(--amber);
  border: 1px solid rgba(252, 211, 77, .32);
}
.todo .t-body { flex: 1; }
.todo .t-body b { color: var(--txt); font-size: 16px; cursor: pointer; }
.todo .t-body b:hover { color: var(--cyan-2); text-shadow: 0 0 12px rgba(45, 212, 238, .4); }
.todo .t-body p { margin: 3px 0 0; font-size: 14.5px; color: var(--txt-3); line-height: 1.65; }

/* ---------------- 可访问性审计 ---------------- */
.audit-head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.crawl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(148, 176, 230, .07);
}
.crawl-row:last-child { border-bottom: none; }

.crawl-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--txt);
  min-width: 150px;
}

.crawl-desc {
  flex: 1;
  font-size: 14.5px;
  color: var(--txt-3);
}

.issue-list {
  margin: 0;
  padding-left: 18px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--txt-2);
}
.issue-list li::marker { color: var(--red); }
.issue-list.good li::marker { color: var(--green); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .app { padding: 10px; gap: 10px; }
  .sidebar { position: absolute; z-index: 40; height: calc(100% - 20px); transform: translateX(-115%); transition: transform .25s var(--ease); }
  .app.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.7); }
  .app.collapsed .sidebar { width: 232px; }
  .app.collapsed .side-title,
  .app.collapsed .nav-item span,
  .app.collapsed .nav-badge,
  .app.collapsed .side-foot span { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar-title p { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
}

/* 降级：不支持 backdrop-filter 时保证面板可读 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: linear-gradient(180deg, rgba(20, 32, 60, .92), rgba(10, 18, 36, .94)); }
  .modal-backdrop, .global-loading { background: rgba(2, 4, 10, .9); }
}

/* ---------------- interactive effects ---------------- */
@keyframes fxIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.fx-in { animation: fxIn .52s var(--ease) both; }

.bar-fill { transition: width .95s var(--ease); }

.glass { transition: transform .42s var(--ease), box-shadow .42s var(--ease); }

.panel.glass:hover {
  box-shadow: var(--shadow-lift),
              inset 0 0 60px rgba(125, 211, 252, .06),
              0 0 0 1px rgba(125, 211, 252, .22);
}

.stat { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(125, 211, 252, .2);
}

.nav-item, .tab, .btn { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .fx-in { animation: none; }
  .bar-fill { transition: none; }
  .glass, .stat { transition: none; }
}


/* ============================================================
   创作智能体 & 星辰元素 v3
   ============================================================ */

/* ---------------- 星尘层（CSS 双层闪烁星，叠在星空画布之上） ---------------- */

.stardust {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 22%, rgba(255,255,255,.9), transparent 55%),
    radial-gradient(1px 1px at 21% 68%, rgba(190,230,255,.8), transparent 55%),
    radial-gradient(1.6px 1.6px at 33% 12%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1px 1px at 45% 84%, rgba(220,205,255,.8), transparent 55%),
    radial-gradient(1.3px 1.3px at 58% 31%, rgba(255,255,255,.85), transparent 55%),
    radial-gradient(1px 1px at 67% 57%, rgba(190,230,255,.7), transparent 55%),
    radial-gradient(1.7px 1.7px at 76% 8%,  rgba(255,255,255,.8), transparent 55%),
    radial-gradient(1px 1px at 84% 43%, rgba(220,205,255,.85), transparent 55%),
    radial-gradient(1.2px 1.2px at 93% 74%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1px 1px at 12% 92%, rgba(190,230,255,.7), transparent 55%),
    radial-gradient(1.5px 1.5px at 50% 50%, rgba(255,255,255,.5), transparent 55%),
    radial-gradient(1px 1px at 70% 90%, rgba(255,255,255,.6), transparent 55%);
  animation: twinkle 5.5s ease-in-out infinite;
}

.stardust.s2 {
  transform: scale(-1);
  animation-duration: 8.2s;
  animation-delay: -2.8s;
  opacity: .7;
}

@keyframes twinkle {
  0%, 100% { opacity: .95; }
  50% { opacity: .45; }
}

/* ---------------- 星标符号 ---------------- */

.panel-title { position: relative; }
.panel-title::after {
  content: "✦";
  margin-left: auto;
  font-size: 10px;
  color: rgba(124, 238, 249, .5);
  text-shadow: 0 0 10px rgba(45, 212, 238, .6);
  animation: starPulse 3.2s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

.nav-item.active::after {
  content: "✦";
  margin-left: auto;
  font-size: 9px;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}

/* 星座分隔线（页头下方的细微星点连线质感） */
.page-head { position: relative; }
.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 7px;
  background-image:
    radial-gradient(1.5px 1.5px at 2% 100%, rgba(124,238,249,.8), transparent 60%),
    linear-gradient(90deg, transparent 2%, rgba(124,238,249,.12) 2%, rgba(124,238,249,.12) 11%, transparent 11%),
    radial-gradient(1.5px 1.5px at 11% 100%, rgba(124,238,249,.9), transparent 60%),
    linear-gradient(90deg, transparent 11%, rgba(167,139,250,.1) 11%, rgba(167,139,250,.1) 26%, transparent 26%),
    radial-gradient(1.5px 1.5px at 26% 100%, rgba(167,139,250,.8), transparent 60%),
    linear-gradient(90deg, transparent 26%, rgba(124,238,249,.08) 26%, rgba(124,238,249,.08) 48%, transparent 48%),
    radial-gradient(1.5px 1.5px at 48% 100%, rgba(124,238,249,.7), transparent 60%);
  background-repeat: no-repeat;
  opacity: .55;
  pointer-events: none;
}

/* ---------------- 智能体卡片 ---------------- */

.agents-grid { align-items: stretch; }

.agent-card { display: flex; flex-direction: column; padding: 24px; }

.agent-top { display: flex; align-items: center; gap: 14px; margin-bottom: 13px; }

.avatar-ring {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(from 210deg, var(--cyan), var(--violet) 42%, rgba(255,255,255,.12) 70%, var(--cyan));
  box-shadow: 0 0 22px rgba(45, 212, 238, .35), 0 0 46px rgba(167, 139, 250, .15);
}
.avatar-ring img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(6, 12, 26, .9);
}

.agent-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.agent-id strong { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.agent-title { font-size: 12px; color: var(--cyan-2); letter-spacing: .5px; }

.agent-star {
  margin-left: auto;
  color: var(--cyan);
  font-size: 13px;
  text-shadow: 0 0 12px var(--cyan);
  animation: starPulse 3.2s ease-in-out infinite;
}

.agent-tagline {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--txt);
  line-height: 1.7;
}

.agent-bio {
  margin: 0 0 13px;
  font-size: 12.5px;
  color: var(--txt-3);
  line-height: 1.8;
}

.agent-skills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }

.agent-rules {
  flex: 1;
  padding: 12px 14px;
  margin-bottom: 15px;
  background: rgba(8, 15, 32, .55);
  border: 1px solid rgba(251, 113, 133, .16);
  border-radius: var(--radius-sm);
}
.agent-rules h5 {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--red);
}
.agent-rules ul { margin: 0; padding-left: 18px; }
.agent-rules li {
  font-size: 12px;
  line-height: 1.75;
  color: var(--txt-2);
  margin-bottom: 4px;
}

.agent-foot { display: flex; gap: 9px; }

/* 星云 hero（真实星云摄影 + 玻璃浮层） */
.agents-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.agents-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 15, .25), rgba(4, 7, 15, .78) 78%);
  pointer-events: none;
}
.agents-hero-inner {
  position: relative;
  z-index: 1;
  margin: 26px;
  padding: 20px 24px;
  max-width: 720px;
}
.agents-hero-inner h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .3px;
}
.hero-star { color: var(--cyan); text-shadow: 0 0 16px var(--cyan); }
.agents-hero-inner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--txt-2);
}
.agents-hero-inner strong, .agents-hero-inner .hl { color: var(--cyan-2); }

/* 记忆列表 */
.am-list { display: flex; flex-direction: column; gap: 8px; }
.am-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(8, 15, 32, .5);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
}
.am-item .am-text { flex: 1; font-size: 12.5px; line-height: 1.7; color: var(--txt-2); }
.am-item .icon-btn { width: 26px; height: 26px; flex-shrink: 0; }

/* ---------------- 创作页：智能体选择 & 关键词 & 质检 ---------------- */

.agent-pick { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; }

.ap-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 8px;
  background: rgba(8, 15, 32, .5);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.ap-chip:hover { border-color: var(--stroke-2); transform: translateY(-1px); }
.ap-chip.on {
  border-color: rgba(45, 212, 238, .6);
  background: linear-gradient(94deg, rgba(45, 212, 238, .12), rgba(167, 139, 250, .08));
  box-shadow: 0 0 16px rgba(45, 212, 238, .18);
}

.ap-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  padding: 1.5px;
  background: conic-gradient(from 200deg, var(--cyan), var(--violet) 55%, var(--cyan));
  flex-shrink: 0;
}
.ap-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ap-none {
  display: grid;
  place-items: center;
  color: var(--txt-2);
  font-size: 15px;
  border: 1.5px dashed var(--stroke-2);
  background: none;
}

.ap-name { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; line-height: 1.25; }
.ap-name small { font-size: 10.5px; font-weight: 400; color: var(--txt-3); }

.kw-note { font-style: normal; color: var(--txt-3); font-weight: 400; margin-left: 6px; }
.kw-groups { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }
.kw-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.kw-intent {
  flex-shrink: 0;
  width: 62px;
  font-size: 11px;
  color: var(--violet);
  letter-spacing: .5px;
}
.kw-chip {
  padding: 5px 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--txt-2);
  background: rgba(8, 15, 32, .5);
  border: 1px solid var(--stroke);
  border-radius: 15px;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.kw-chip:hover {
  color: var(--cyan-2);
  border-color: rgba(45, 212, 238, .55);
  background: rgba(45, 212, 238, .08);
  box-shadow: 0 0 12px rgba(45, 212, 238, .18);
}

/* 质检报告条 */
.quality-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 13px;
  border-radius: var(--radius-sm);
}
.q-score { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.q-num { font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1; }
.q-lbl { margin-top: 4px; font-size: 10.5px; color: var(--txt-3); letter-spacing: 1px; }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.q-metrics { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--txt-3); }
.q-metrics b { color: var(--txt); font-family: var(--mono); }
.q-warn { font-size: 12px; color: var(--amber); line-height: 1.6; }

@media (max-width: 860px) {
  .agents-hero-inner { margin: 14px; }
  .quality-bar { flex-direction: row; }
  .agent-top { flex-wrap: wrap; }
}

/* 侧栏文字不换行（星星标与徽章加入后防止挤压） */
.nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item { padding-right: 10px; }

/* ============================================================
   v4 · 摄影质感与哑光去塑料
   思路:真实摄影做结构元素(统一 luminosity 混色成深蓝单色调),
   玻璃拟态收敛为哑光面板,辉光全面减档
   ============================================================ */

/* ---------------- 全局哑光基调 ---------------- */

:root {
  --radius: 14px;
  --shadow: 0 14px 40px -14px rgba(0, 0, 0, .62), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow-lift: 0 20px 50px -16px rgba(0, 0, 0, .68);
  --glow-cyan: 0 0 18px rgba(45, 212, 238, .22), 0 0 44px rgba(45, 212, 238, .07);
  --panel: rgba(15, 23, 42, .66);
  --panel-hi: rgba(255, 255, 255, .035);
  --stroke: rgba(150, 178, 224, .1);
}

/* 哑光面板:不再通透,顶缘高光减半,辉光发丝线压暗 */
.glass {
  background:
    linear-gradient(180deg, var(--panel-hi), transparent 40%),
    var(--panel);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .028);
}

.glass::before { opacity: .38; }

/* 摄影横幅统一工艺:深蓝底 + luminosity 混色 = 单色调震撼 */
.hero-photo,
.agents-hero,
.auth-photo {
  background-color: #0b1526;
  background-size: cover;
  background-position: center;
  background-blend-mode: normal, luminosity;
}

/* ---------------- 登录:全幅摄影 + 哑光双栏 ---------------- */

.auth-wrap {
  z-index: 5;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

/* 左:哈勃深空场,星系数千 —— 震撼且安静 */
.auth-photo {
  flex: 1.25;
  position: relative;
  background-image:
    linear-gradient(115deg, rgba(4, 8, 18, .38) 0%, rgba(4, 8, 18, .72) 78%),
    url(/assets/img/photo_deepfield.jpg);
  background-position: center 40%;
  display: flex;
  align-items: flex-end;
}

.auth-photo::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(124, 238, 249, .4), transparent);
}

.auth-photo-cap {
  position: relative;
  z-index: 1;
  padding: 0 52px 58px;
  max-width: 560px;
}

.apc-hair {
  width: 44px;
  height: 2px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 12px rgba(45, 212, 238, .5);
}

.apc-big {
  margin: 0 0 14px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #f2f8ff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .8);
}

.apc-small {
  margin: 0;
  font-size: 14.5px;
  line-height: 2;
  color: rgba(214, 228, 248, .82);
  letter-spacing: 1px;
}

.apc-meta {
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  color: rgba(150, 178, 224, .45);
}

/* 右:近黑哑光面,月球圆形镶嵌 */
.auth-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(45, 212, 238, .05), transparent 55%),
    linear-gradient(180deg, #070d1a, #04070f);
  border-left: 1px solid rgba(150, 178, 224, .07);
}

.auth-card.matte {
  max-width: 400px;
  padding: 40px 36px 30px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: riseIn .6s var(--ease) both;
}

.auth-card.matte::before { display: none; }

/* 月球镶嵌:黑白摄影圆窗,呼应「单调而震撼」 */
.auth-moon {
  width: 74px;
  height: 74px;
  margin: 0 0 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 36%, rgba(124, 238, 249, .16), transparent 52%),
    url(/assets/img/photo_moon.jpg) center/118% auto;
  box-shadow:
    0 0 0 1px rgba(150, 178, 224, .16),
    0 8px 34px -6px rgba(0, 0, 0, .8),
    0 0 30px -8px rgba(124, 238, 249, .3);
}

.auth-side .grad-text { font-size: 30px; }

.auth-side .auth-sub { letter-spacing: 3.5px; }

.auth-side .auth-tabs { background: rgba(10, 18, 36, .8); }

.auth-side .auth-hint { color: #55647e; }

@media (max-width: 980px) {
  .auth-wrap { flex-direction: column; }
  .auth-photo {
    min-height: 200px;
    flex: none;
    align-items: flex-end;
  }
  .auth-photo-cap { padding: 0 28px 26px; }
  .apc-big { font-size: 26px; margin-bottom: 8px; }
  .apc-small br { display: none; }
  .apc-meta { display: none; }
  .auth-side { flex: 1; border-left: 0; padding: 30px 24px; }
}

/* ---------------- 看板 hero:创生之柱摄影横幅 ---------------- */

.hero-photo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 30px 32px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(150, 178, 224, .12);
  background-image:
    linear-gradient(94deg, rgba(4, 8, 17, .88) 24%, rgba(4, 8, 17, .58) 62%, rgba(6, 10, 20, .42)),
    url(/assets/img/photo_pillars.jpg);
  background-position: center 26%;
  box-shadow: var(--shadow);
}

.hero-photo::after { display: none; }

.hero-photo .hero-main { z-index: 1; }
.hero-photo .hero-score { z-index: 1; }

.hero-photo .hero-title { font-size: 20px; letter-spacing: .3px; }
.hero-photo .hero-sub { color: rgba(210, 224, 246, .78); }

/* ---------------- 智能体 hero:船底座星云,单色调 ---------------- */

.agents-hero {
  background-image:
    linear-gradient(94deg, rgba(4, 8, 17, .92) 30%, rgba(4, 8, 17, .55) 70%, rgba(6, 10, 20, .38)),
    url(/assets/img/photo_carina.jpg);
  background-position: center 38%;
  border: 1px solid rgba(150, 178, 224, .12);
}

.agents-hero .agents-hero-inner {
  background: rgba(7, 12, 24, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(150, 178, 224, .12);
  box-shadow: none;
}

.agents-hero .agents-hero-inner::before { display: none; }

/* ---------------- 细节降辉光(去塑料) ---------------- */

.stat-value { text-shadow: 0 0 16px rgba(45, 212, 238, .16); }
.stat-value.cyan { text-shadow: 0 0 18px rgba(45, 212, 238, .32); }
.stat-value.violet { text-shadow: 0 0 18px rgba(167, 139, 250, .28); }
.stat-value.amber { text-shadow: 0 0 18px rgba(252, 211, 77, .25); }
.stat-value.green { text-shadow: 0 0 18px rgba(74, 222, 128, .25); }

.btn-primary {
  box-shadow: 0 4px 18px -6px rgba(45, 212, 238, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn-primary:hover {
  box-shadow: 0 6px 26px -8px rgba(45, 212, 238, .6), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-violet { box-shadow: 0 4px 18px -6px rgba(167, 139, 250, .4); }

.bar-fill { box-shadow: 0 0 10px rgba(45, 212, 238, .3); }
.funnel-bar { box-shadow: 0 0 10px rgba(45, 212, 238, .14); }
.rate-ring .ring-num { text-shadow: 0 0 16px rgba(45, 212, 238, .32); }
.hero-score .hs-num b { text-shadow: 0 0 22px rgba(45, 212, 238, .4); }
.avatar-ring { box-shadow: 0 0 14px rgba(45, 212, 238, .22); }
.loader-ring { box-shadow: 0 0 22px rgba(45, 212, 238, .18); }

.step.done .step-dot { box-shadow: 0 0 12px rgba(45, 212, 238, .3); }

.nav-item.active {
  background: linear-gradient(94deg, rgba(45, 212, 238, .1), rgba(167, 139, 250, .05) 90%);
  box-shadow: none;
}
.nav-item.active svg { filter: drop-shadow(0 0 5px rgba(45, 212, 238, .45)); }

.panel-title::before { box-shadow: 0 0 8px rgba(45, 212, 238, .35); }

/* 摄影底上的环形图保持可读 */
.hero-photo .hs-num b { color: #eaf4ff; }

/* ---------------- v4 修复与打磨 ---------------- */

/* 徽章禁折行:修「可访问性审计·硬门槛」两行堆叠 */
.nav-badge {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 1.5px 6px;
  letter-spacing: .3px;
}

/* 智能体头像统一压成偏蓝单色调,贴合全站摄影工艺 */
.avatar-ring img,
.ap-avatar img {
  filter: grayscale(.45) saturate(.75) contrast(1.06) brightness(.96);
}

/* 创生之柱右侧避开文字区略提亮,恢复「震撼」辨识度 */
.hero-photo {
  background-image:
    linear-gradient(94deg, rgba(4, 8, 17, .9) 20%, rgba(4, 8, 17, .58) 56%, rgba(6, 10, 20, .26)),
    url(/assets/img/photo_pillars.jpg);
}

/* ============================================================
   官网生成页
   ============================================================ */

.theme-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; }

.theme-card {
  width: 190px;
  padding: 14px;
  background: rgba(8, 15, 32, .55);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all .2s var(--ease);
}
.theme-card:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.theme-card.on {
  border-color: rgba(45, 212, 238, .6);
  box-shadow: 0 0 16px rgba(45, 212, 238, .16);
}
.theme-card strong { font-size: 13.5px; }
.theme-card span { font-size: 11px; color: var(--txt-3); line-height: 1.6; }

.theme-vis {
  height: 62px;
  border-radius: 8px;
  margin-bottom: 9px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 9px;
}
.theme-vis i { display: block; border-radius: 3px 3px 0 0; }
.theme-deep { background: linear-gradient(180deg, #0a1322, #05080f); border: 1px solid #1c2940; }
.theme-deep i:nth-child(1) { width: 34%; height: 16px; background: #38d3ec; }
.theme-deep i:nth-child(2) { width: 22%; height: 10px; background: #1c2940; }
.theme-deep i:nth-child(3) { width: 26%; height: 13px; background: #a78bfa; }
.theme-light { background: linear-gradient(180deg, #ffffff, #f1f5fa); border: 1px solid #e3eaf3; }
.theme-light i:nth-child(1) { width: 34%; height: 16px; background: #0e7ea8; }
.theme-light i:nth-child(2) { width: 22%; height: 10px; background: #dbe5f0; }
.theme-light i:nth-child(3) { width: 26%; height: 13px; background: #6d5bd0; }

.site-panel { display: flex; flex-direction: column; }

.site-frame-wrap {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.site-frame { display: block; width: 100%; height: 640px; border: 0; }

.site-code {
  width: 100%;
  min-height: 480px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: #bdf3ff;
  background: rgba(0, 0, 0, .45);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 15px;
  resize: vertical;
  white-space: pre;
}

.site-edit-bar { display: flex; gap: 10px; margin-top: 11px; }

.deploy-card .deploy-steps { margin: 4px 0 0; padding-left: 20px; }
.deploy-card .deploy-steps li {
  font-size: 13px;
  line-height: 2;
  color: var(--txt-2);
}
.deploy-card .deploy-steps b { color: var(--txt); }

/* ============================================================
   导航分组 + 初次引导 + 聚光灯讲解
   ============================================================ */

/* ---------------- 侧栏分组标签 ---------------- */

.nav-group-label {
  margin: 14px 10px 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--txt-3);
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-group-label:first-child { margin-top: 2px; }

.app.collapsed .nav-group-label {
  display: none; /* 折叠时隐藏分组文字,仅留图标 */
}
.app.collapsed .nav-sep { display: none; }

@media (max-width: 860px) {
  .nav-group-label { display: none; } /* 移动端抽屉保持紧凑 */
}

/* ---------------- 顶栏引导按钮 ---------------- */

#tour-btn {
  font-family: var(--mono);
  color: var(--txt-2);
}

/* ---------------- 初次引导向导 ---------------- */

.ob-progress {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}
.ob-progress i {
  flex: 1;
  height: 3.5px;
  border-radius: 2px;
  background: rgba(148, 176, 230, .14);
  transition: background .25s;
}
.ob-progress i.on { background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 8px rgba(45, 212, 238, .4); }

.ob-lead { margin: 0 0 16px; font-size: 14px; color: var(--txt); line-height: 1.8; }

.ob-point {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 15px;
  margin-bottom: 10px;
  background: rgba(8, 15, 32, .5);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
}
.ob-point b { font-size: 13.5px; color: var(--cyan-2); }
.ob-point span { font-size: 12.5px; color: var(--txt-2); line-height: 1.7; }

/* ---------------- 聚光灯讲解 ---------------- */

#tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: transparent;
}

.tour-spot {
  position: fixed;
  display: none;
  border-radius: 12px;
  box-shadow: 0 0 0 4000px rgba(2, 4, 10, .74);
  border: 1.5px solid rgba(45, 212, 238, .65);
  pointer-events: none;
  transition: all .3s var(--ease);
}

.tour-card {
  position: fixed;
  z-index: 121;
  padding: 18px 20px 16px;
  max-width: 330px;
  animation: popIn .28s var(--ease) both;
}

.tour-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.tour-head strong { font-size: 14.5px; }
.tour-head span { font-family: var(--mono); font-size: 11px; color: var(--txt-3); }

#tour-d { margin: 0 0 14px; font-size: 12.8px; line-height: 1.8; color: var(--txt-2); }

.tour-dots { display: flex; gap: 6px; margin-bottom: 13px; }
.tour-dots i {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 176, 230, .18);
}
.tour-dots i.on { background: var(--cyan); box-shadow: 0 0 7px rgba(45, 212, 238, .5); }

.tour-btns { display: flex; gap: 9px; justify-content: flex-end; }
