/* ============================================================
   Lumina · 动态长者知识库与智能分级系统
   设计系统 —— 深色科技仪表盘
   ============================================================ */

:root {
  /* 背景层次 */
  --bg-0: #070a14;          /* 最底层页面背景 */
  --bg-1: #0b0f1c;          /* 主内容背景 */
  --bg-2: #111627;          /* 卡片背景 */
  --bg-3: #161c30;          /* 卡片内嵌 / hover */
  --bg-rail: #0a0d18;       /* 侧边导航 */

  /* 边框与分隔 */
  --border: #1e2640;
  --border-soft: #19203552;
  --border-strong: #2a3458;

  /* 文本 */
  --text-0: #f2f5fb;        /* 主标题 */
  --text-1: #c7cee0;        /* 正文 */
  --text-2: #8a93ad;        /* 次要 */
  --text-3: #5b647e;        /* 弱化 / 占位 */

  /* 品牌色 —— 紫青渐变 */
  --brand: #7c6bff;
  --brand-2: #38e1c8;
  --brand-soft: #7c6bff1f;
  --grad-brand: linear-gradient(135deg, #7c6bff 0%, #38e1c8 100%);
  --grad-brand-soft: linear-gradient(135deg, #7c6bff22 0%, #38e1c822 100%);

  /* 风险三色 */
  --red: #ff5468;
  --red-soft: #ff546819;
  --amber: #ffb23e;
  --amber-soft: #ffb23e19;
  --green: #2fd47f;
  --green-soft: #2fd47f19;
  --blue: #4aa8ff;
  --blue-soft: #4aa8ff19;

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* 阴影 */
  --shadow: 0 10px 40px -12px rgba(0,0,0,.55);
  --shadow-glow: 0 0 0 1px var(--border), 0 16px 50px -18px rgba(124,107,255,.25);

  --rail-w: 64px;
  --topbar-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1200px 600px at 78% -10%, #7c6bff14, transparent 60%),
    radial-gradient(1000px 500px at 0% 110%, #38e1c80f, transparent 55%),
    var(--bg-0);
}

::selection { background: var(--brand); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

/* 内联图标默认尺寸(防止未约束的 SVG 撑满容器);大图标处单独覆盖 */
svg { width: 18px; height: 18px; flex: none; }
[data-i] { display: inline-flex; }
.stat__label svg, .hero__badge svg, .section-title svg, .card__head h3 svg,
.engine__h svg, .tl-body svg, .list__main svg, .advice svg { width: 16px; height: 16px; }
.risk-banner__ico svg { width: 20px; height: 20px; }
.feat__ico svg { width: 22px; height: 22px; }
.stat { display: flex; flex-direction: column; }
.stat__label { align-items: center; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #232b48; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #2f3a60; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   布局骨架
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  grid-template-rows: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* 侧边导航栏 */
.rail {
  background: var(--bg-rail);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 6px;
  z-index: 20;
}
.rail__logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px -6px #7c6bffaa;
  flex: none;
}
.rail__logo svg { width: 24px; height: 24px; }
.rail__item {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--text-3);
  position: relative;
  transition: .18s;
}
.rail__item svg { width: 21px; height: 21px; }
.rail__item:hover { color: var(--text-1); background: var(--bg-3); }
.rail__item.active { color: #fff; background: var(--brand-soft); }
.rail__item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 99px;
  background: var(--grad-brand);
}
.rail__spacer { flex: 1; }
.rail__item .tip {
  position: absolute; left: 52px; top: 50%; transform: translateY(-50%);
  background: var(--bg-3); color: var(--text-0);
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  font-size: 12px; border: 1px solid var(--border);
  opacity: 0; pointer-events: none; transition: .15s; z-index: 50;
}
.rail__item:hover .tip { opacity: 1; left: 56px; }

/* 主区 */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-1);
}

/* 顶栏 */
.topbar {
  height: var(--topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0e1322, var(--bg-1));
}
.topbar__title h1 { font-size: 17px; color: var(--text-0); font-weight: 650; letter-spacing: .3px; }
.topbar__title p { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar__date { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.status-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--green-soft); color: var(--green);
  padding: 6px 13px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600;
  border: 1px solid #2fd47f33;
}
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 #2fd47f88; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 #2fd47f66; }
  70% { box-shadow: 0 0 0 6px #2fd47f00; }
  100% { box-shadow: 0 0 0 0 #2fd47f00; }
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; color: var(--text-2);
  border: 1px solid var(--border); background: var(--bg-2);
  position: relative; transition: .15s;
}
.icon-btn:hover { color: var(--text-0); border-color: var(--border-strong); }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff; font-size: 10px;
  min-width: 16px; height: 16px; border-radius: 99px;
  display: grid; place-items: center; padding: 0 4px;
  border: 2px solid var(--bg-1);
}
.avatar {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-brand); display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px;
}

/* 内容滚动区 */
.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}
.page { display: none; animation: fade .35s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================================================
   通用组件
   ============================================================ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.card__head h3 { font-size: 14.5px; color: var(--text-0); font-weight: 640; display: flex; align-items: center; gap: 8px; }
.card__head .spacer { margin-left: auto; }
.card__body { padding: 18px; }

.section-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 650; color: var(--text-0);
  margin-bottom: 12px;
}
.section-title .ico { color: var(--brand-2); display: inline-flex; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.5;
  border: 1px solid transparent;
}
.pill--red { background: var(--red-soft); color: var(--red); border-color: #ff546833; }
.pill--amber { background: var(--amber-soft); color: var(--amber); border-color: #ffb23e33; }
.pill--green { background: var(--green-soft); color: var(--green); border-color: #2fd47f33; }
.pill--blue { background: var(--blue-soft); color: var(--blue); border-color: #4aa8ff33; }
.pill--brand { background: var(--brand-soft); color: #b3a8ff; border-color: #7c6bff33; }
.pill--ghost { background: var(--bg-3); color: var(--text-2); border-color: var(--border); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 11px;
  font-size: 13px; font-weight: 600; transition: .16s;
  border: 1px solid var(--border-strong); color: var(--text-1); background: var(--bg-3);
}
.btn:hover { border-color: var(--brand); color: var(--text-0); }
.btn--primary { background: var(--grad-brand); color: #fff; border: none; box-shadow: 0 8px 22px -10px #7c6bffcc; }
.btn--primary:hover { filter: brightness(1.07); }
.btn--ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.tabs { display: inline-flex; gap: 4px; background: var(--bg-1); padding: 4px; border-radius: 12px; border: 1px solid var(--border); }
.tab {
  padding: 7px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); transition: .15s;
}
.tab:hover { color: var(--text-1); }
.tab.active { background: var(--brand); color: #fff; box-shadow: 0 4px 14px -6px #7c6bffaa; }

/* ============================================================
   首页 —— 项目概述 + 工作台概览
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(700px 300px at 85% -40%, #7c6bff33, transparent),
    radial-gradient(500px 260px at 10% 140%, #38e1c822, transparent),
    linear-gradient(120deg, #0f1426, #0c1120);
  padding: 40px 44px;
  margin-bottom: 22px;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ffffff0a; border: 1px solid var(--border-strong);
  padding: 6px 14px; border-radius: var(--r-pill);
  font-size: 12.5px; color: var(--brand-2); font-weight: 600; margin-bottom: 18px;
}
.hero h2 {
  font-size: 32px; line-height: 1.25; color: var(--text-0); font-weight: 750;
  letter-spacing: .5px; max-width: 720px;
}
.hero h2 .grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin-top: 14px; font-size: 14.5px; color: var(--text-2); max-width: 640px; }
.hero__actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero__deco {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  width: 180px; height: 180px; opacity: .9;
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px 20px; position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 90px; height: 90px; border-radius: 50%; opacity: .12;
}
.stat--red::after { background: var(--red); }
.stat--amber::after { background: var(--amber); }
.stat--green::after { background: var(--green); }
.stat--brand::after { background: var(--brand); }
.stat__label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.stat__val { font-size: 30px; font-weight: 750; color: var(--text-0); margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat__val small { font-size: 14px; color: var(--text-2); font-weight: 500; margin-left: 4px; }
.stat__sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.cols-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }

/* 风险分布甜甜圈 */
.donut-wrap { display: flex; align-items: center; gap: 26px; }
.donut { position: relative; width: 150px; height: 150px; flex: none; }
.donut svg { width: 150px; height: 150px; }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__center b { font-size: 26px; color: var(--text-0); }
.donut__center span { font-size: 11.5px; color: var(--text-2); }
.legend { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.legend__row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend__row b { margin-left: auto; color: var(--text-0); font-variant-numeric: tabular-nums; }

/* 名单 */
.list { display: flex; flex-direction: column; }
.list__row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 4px; border-bottom: 1px solid var(--border-soft);
}
.list__row:last-child { border-bottom: none; }
.list__av { width: 38px; height: 38px; border-radius: 11px; background: var(--bg-3); display: grid; place-items: center; font-size: 16px; flex: none; border: 1px solid var(--border); }
.list__main { min-width: 0; flex: 1; }
.list__main b { color: var(--text-0); font-size: 13.5px; }
.list__main p { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 最新预警时间线 */
.timeline { display: flex; flex-direction: column; gap: 2px; }
.tl-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.tl-row:last-child { border: none; }
.tl-time { font-size: 11.5px; color: var(--text-3); width: 42px; flex: none; padding-top: 1px; font-variant-numeric: tabular-nums; }
.tl-body b { color: var(--text-0); font-size: 13px; }
.tl-body p { font-size: 12px; color: var(--text-2); }
.tl-tag { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }

/* ============================================================
   核心页 —— 语音随访 + AI 双引擎分析
   ============================================================ */
.core-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* 终端卡片头 */
.term-head {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.term-logo { width: 42px; height: 42px; border-radius: 13px; background: var(--grad-brand); display: grid; place-items: center; flex: none; box-shadow: 0 6px 18px -6px #7c6bffaa; }
.term-logo svg { width: 24px; height: 24px; }
.term-head__t b { font-size: 14.5px; color: var(--text-0); display: flex; align-items: center; gap: 8px; }
.term-head__t p { font-size: 12px; color: var(--text-2); }

.term-meta { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border-soft); font-size: 12px; color: var(--text-2); }
.term-meta .m { display: inline-flex; align-items: center; gap: 6px; }

/* 随访对象切换 */
.subjects { display: flex; align-items: center; gap: 8px; padding: 14px 18px 4px; flex-wrap: wrap; }
.subjects .lbl { font-size: 12px; color: var(--text-3); margin-right: 2px; }
.subj {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--bg-3); border: 1px solid var(--border); transition: .15s;
}
.subj:hover { color: var(--text-0); }
.subj.active { background: var(--brand-soft); color: #c3bbff; border-color: #7c6bff55; }
.subj .rk { width: 7px; height: 7px; border-radius: 50%; }

/* 对话区 */
.chat { height: 420px; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 82%; animation: msgIn .3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg__av { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 13px; }
.msg__av--ai { background: var(--grad-brand); }
.msg__av--ai svg { width: 17px; height: 17px; }
.msg__av--user { background: var(--bg-3); border: 1px solid var(--border); }
.msg__bubble { padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; }
.msg__name { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.msg--ai .msg__bubble { background: var(--bg-3); color: var(--text-1); border: 1px solid var(--border); border-top-left-radius: 4px; }
.msg--user { margin-left: auto; flex-direction: row-reverse; }
.msg--user .msg__bubble { background: var(--grad-brand); color: #fff; border-top-right-radius: 4px; }
.msg--user .msg__name { text-align: right; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing span:nth-child(2){ animation-delay: .2s; } .typing span:nth-child(3){ animation-delay: .4s; }
@keyframes blink { 0%,60%,100%{opacity:.3; transform: translateY(0);} 30%{opacity:1; transform: translateY(-3px);} }

/* 输入条 */
.composer { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.composer__mic {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: var(--grad-brand); display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 22px -8px #7c6bffcc; transition: .15s;
}
.composer__mic:hover { filter: brightness(1.1); }
.composer__mic.rec { animation: recPulse 1.2s infinite; }
@keyframes recPulse { 0%,100%{ box-shadow: 0 0 0 0 #ff546866; } 50%{ box-shadow: 0 0 0 10px #ff546800; } }
.composer input {
  flex: 1; background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; color: var(--text-0); font-size: 13.5px; outline: none;
}
.composer input:focus { border-color: var(--brand); }
.composer input::placeholder { color: var(--text-3); }

/* 波形动画 */
.wave { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.wave i { width: 3px; background: var(--brand-2); border-radius: 2px; animation: wv 1s infinite ease-in-out; }
@keyframes wv { 0%,100%{ height: 5px; } 50%{ height: 20px; } }

/* ===== 右侧 AI 双引擎分析 ===== */
.analysis-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 24px; color: var(--text-3);
}
.analysis-empty svg { width: 54px; height: 54px; opacity: .35; margin-bottom: 16px; }
.analysis-empty b { color: var(--text-1); font-size: 15px; }
.analysis-empty p { font-size: 13px; margin-top: 6px; max-width: 320px; }

/* 双引擎栅格 */
.engines { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.engine {
  border-radius: var(--r-md); padding: 15px; border: 1px solid var(--border);
  background: var(--bg-1);
}
.engine__h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.engine__h .ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; }
.engine--rule .ico { background: var(--amber-soft); color: var(--amber); }
.engine--ai .ico { background: var(--brand-soft); color: #b3a8ff; }
.engine__title { font-size: 14px; font-weight: 700; color: var(--text-0); display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.engine__title .n { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.engine--rule .engine__title .n { background: var(--amber-soft); color: var(--amber); }
.engine--ai .engine__title .n { background: var(--brand-soft); color: #b3a8ff; }
.engine__list { display: flex; flex-direction: column; gap: 9px; }
.engine__item { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-1); }
.engine__item .dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex: none; }
.engine--rule .engine__item .dot { background: var(--amber); }
.engine--ai .engine__item .dot { background: var(--brand-2); }
.engine__item .ev { display: block; color: var(--text-3); font-size: 11.5px; margin-top: 2px; }

/* 信号提取标签 */
.signals { display: flex; flex-wrap: wrap; gap: 8px; }

/* 风险横幅 */
.risk-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: var(--r-md); margin-bottom: 4px;
}
.risk-banner--red { background: var(--red-soft); border: 1px solid #ff546840; }
.risk-banner--amber { background: var(--amber-soft); border: 1px solid #ffb23e40; }
.risk-banner--green { background: var(--green-soft); border: 1px solid #2fd47f40; }
.risk-banner__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.risk-banner--red .risk-banner__ico { background: #ff546826; color: var(--red); }
.risk-banner--amber .risk-banner__ico { background: #ffb23e26; color: var(--amber); }
.risk-banner--green .risk-banner__ico { background: #2fd47f26; color: var(--green); }
.risk-banner b { font-size: 15px; color: var(--text-0); }
.risk-banner p { font-size: 12.5px; color: var(--text-2); }

/* 建议措施 */
.advice { display: flex; flex-direction: column; gap: 11px; counter-reset: a; }
.advice__item { display: flex; gap: 12px; align-items: flex-start; }
.advice__num {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: var(--brand-soft); color: #b3a8ff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.advice__item p { font-size: 13px; color: var(--text-1); line-height: 1.55; }

/* SOAP 报告 */
.soap { display: flex; flex-direction: column; gap: 0; }
.soap__row { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.soap__row:last-child { border: none; }
.soap__k {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; background: var(--bg-3); color: var(--brand-2); border: 1px solid var(--border);
}
.soap__c b { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; letter-spacing: .5px; }
.soap__c p { font-size: 13px; color: var(--text-1); }

/* loading skeleton */
.thinking { display: flex; align-items: center; gap: 12px; padding: 28px 18px; color: var(--text-2); font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--border-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 趋势条形 */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.bar-row .nm { width: 52px; color: var(--text-2); flex: none; }
.bar-track { flex: 1; height: 9px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; }

/* ============================================================
   设置页
   ============================================================ */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-1); font-weight: 600; margin-bottom: 7px; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.input, .select, textarea.input {
  width: 100%; background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 13px; color: var(--text-0); font-size: 13.5px; outline: none; transition: .15s;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--brand); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%238a93ad' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }

.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.mode-card {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px;
  cursor: pointer; transition: .15s; background: var(--bg-1);
}
.mode-card:hover { border-color: var(--border-strong); }
.mode-card.active { border-color: var(--brand); background: var(--brand-soft); }
.mode-card__h { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 650; color: var(--text-0); margin-bottom: 6px; }
.mode-card__h .ck { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; }
.mode-card.active .ck { border-color: var(--brand); background: var(--brand); }
.mode-card.active .ck::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.mode-card p { font-size: 12.5px; color: var(--text-2); }

.model-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.model-opt {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; transition: .15s; background: var(--bg-1);
}
.model-opt:hover { border-color: var(--border-strong); }
.model-opt.active { border-color: var(--brand); background: var(--brand-soft); }
.model-opt__logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; flex: none; }
.model-opt b { display: block; font-size: 13.5px; color: var(--text-0); }
.model-opt span { font-size: 11.5px; color: var(--text-3); }

.banner-tip {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r-md);
  background: var(--blue-soft); border: 1px solid #4aa8ff33; color: var(--text-1); font-size: 12.5px; line-height: 1.6;
}
.banner-tip svg { width: 18px; height: 18px; color: var(--blue); flex: none; margin-top: 1px; }

/* toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--bg-3); border: 1px solid var(--border-strong); color: var(--text-0);
  padding: 11px 18px; border-radius: 12px; font-size: 13px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 9px; animation: toastIn .3s ease;
}
.toast svg { width: 17px; height: 17px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 功能网格(首页底部) */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feat {
  display: flex; gap: 14px; padding: 18px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--bg-2); transition: .18s;
}
.feat:hover { border-color: var(--brand); transform: translateY(-2px); }
.feat__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.feat b { color: var(--text-0); font-size: 14.5px; }
.feat p { font-size: 12.5px; color: var(--text-2); margin-top: 5px; line-height: 1.55; }

/* 流程步骤 */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.flow__step { position: relative; padding: 20px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-2); text-align: center; }
.flow__step .n { width: 34px; height: 34px; border-radius: 11px; background: var(--grad-brand); color: #fff; font-weight: 800; display: grid; place-items: center; margin: 0 auto 12px; }
.flow__step b { color: var(--text-0); font-size: 14px; }
.flow__step p { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.flow__step:not(:last-child)::after {
  content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%);
  color: var(--brand); font-size: 18px; z-index: 2;
}

.mt-22 { margin-top: 22px; }
.mt-16 { margin-top: 16px; }
.muted { color: var(--text-2); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* 响应式 */
@media (max-width: 1100px) {
  .core-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .cols-2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow__step::after { display: none; }
}
@media (max-width: 720px) {
  .feat-grid, .model-grid, .mode-cards, .engines { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero h2 { font-size: 24px; }
  .content { padding: 16px; }
}
