/* ============================================================
   财税智能体中心 · 设计系统（由 ui-ux-pro-max 设计智能生成）
   风格：专业深蓝 / 信任蓝 / 增收绿 · 浅底白卡 · IBM Plex Sans
   原则：无 emoji 图标（SVG）、4.5:1 对比、150-300ms 过渡、响应式
   ============================================================ */

:root {
  /* 品牌色 */
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #1E3A5F;
  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --sky-700:  #0369A1;
  --green-600:#059669;
  --green-700:#047857;
  --amber-500:#F59E0B;

  /* 中性 */
  --bg:      #F8FAFC;
  --bg-soft: #F1F5F9;
  --bg-card: #FFFFFF;   /* 海报/抽屉等白卡底，避免 var 未定义导致背景透明 */
  --fg:      #0F172A;
  --fg-soft: #334155;
  --fg-2:    #475569;   /* 次级文字，避免 var 未定义回退异常 */
  --muted:   #64748B;
  --card:    #FFFFFF;
  --border:  #E2E8F0;
  --border-2:#CBD5E1;

  --ring: rgba(37, 99, 235, .35);

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 6px 16px rgba(15,23,42,.08);
  --shadow-lg: 0 16px 40px rgba(15,23,42,.14);
  --shadow-blue: 0 10px 30px rgba(37,99,235,.18);

  --radius:    16px;
  --radius-sm: 11px;
  --radius-xs: 8px;

  --maxw: 1180px;

  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- SVG 图标基础 ---------- */
.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 18px; height: 18px; }
.ic-lg { width: 26px; height: 26px; }

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 22px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--navy-900); font-family: 'AlibabaPuHuiTi-3-115Black', '阿里巴巴普惠体', 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed, #a855f7);
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(124,58,237,.28);
}
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; color: var(--fg-soft);
  font-size: 15px; font-weight: 500; transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-links a:hover { background: var(--bg-soft); color: var(--navy-900); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; color: var(--navy-900); padding: 6px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; font-weight: 600; font-size: 15px;
  padding: 11px 20px; transition: all .2s var(--ease); line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-700); }
.btn-green { background: var(--green-600); color: #fff; box-shadow: 0 10px 30px rgba(5,150,105,.20); }
.btn-green:hover { background: var(--green-700); }
.btn-ghost { background: transparent; color: var(--navy-900); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.24); }
.btn-light:hover { background: rgba(255,255,255,.22); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* 用户区 */
.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 5px 6px 5px 14px; border-radius: 999px; font-size: 14px;
}
.user-chip .quota { color: var(--muted); font-variant-numeric: tabular-nums; }
.user-chip .quota b { color: var(--green-700); font-weight: 700; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--blue-600); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(37,99,235,.35), transparent 60%),
    radial-gradient(900px 400px at 0% 10%, rgba(3,105,161,.30), transparent 55%),
    linear-gradient(160deg, var(--navy-900), #15233b 60%, #0d1726);
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 78px 0 70px; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 28%, transparent 78%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 28%, transparent 78%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: #cfe0ff; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16); padding: 6px 13px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 50px); line-height: 1.12; margin: 20px 0 0;
  font-weight: 700; letter-spacing: -.01em; max-width: 16ch;
}
.hero h1 .hl { color: #6ea8ff; }
.hero p.sub { font-size: clamp(16px, 2vw, 19px); color: #c7d2e2; max-width: 56ch; margin: 18px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 38px; }
.hero-badges .b { display: flex; align-items: center; gap: 9px; color: #b9c6da; font-size: 14px; }
.hero-badges .b .ic { color: #5e9bff; }

/* 数据条 */
.stats {
  background: var(--navy-800); color: #fff; border-top: 1px solid rgba(255,255,255,.08);
}
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 22px 0; }
.stat { text-align: center; padding: 6px 10px; }
.stat .num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.stat .num .u { color: #6ea8ff; }
.stat .lbl { font-size: 13.5px; color: #9fadc4; margin-top: 2px; }

/* ============================================================
   区块通用
   ============================================================ */
.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 38px; }
.section-head .tag { color: var(--blue-700); font-weight: 700; font-size: 14px; letter-spacing: .05em; }
.section-head h2 { font-size: clamp(25px, 3.4vw, 35px); margin: 10px 0 0; font-weight: 700; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 12px 0 0; font-size: 16px; }

/* ============================================================
   智能体市场
   ============================================================ */
.market { background: var(--bg); }
.market-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 26px;
}
.search {
  position: relative; flex: 1; min-width: 220px; max-width: 420px;
}
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%; padding: 12px 14px 12px 44px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--border-2); border-radius: 11px; background: #fff; color: var(--fg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--ring); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--border-2);
  background: #fff; color: var(--fg-soft); font-size: 14.5px; font-weight: 500;
  transition: all .18s var(--ease);
}
.tab .ic { color: var(--blue-600); }
.tab:hover { border-color: var(--blue-500); }
.tab.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.tab.active .ic { color: #6ea8ff; }
.tab .count { font-size: 12px; opacity: .7; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; text-align: left; width: 100%;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c9d6ea; }
.card-top { display: flex; align-items: center; gap: 13px; }
.card-ic {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--sky-700));
}
.card-ic.green { background: linear-gradient(135deg, var(--green-600), #0e7490); }
.card-ic.navy  { background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); }
.card h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--navy-900); }
.card .cat-pill {
  font-size: 11.5px; font-weight: 600; color: var(--blue-700);
  background: #eef4ff; border-radius: 999px; padding: 3px 9px; margin-left: auto;
}
.card .tagline { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.card .go {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue-700); font-weight: 600; font-size: 14px;
}
.card .go .ic { transition: transform .2s var(--ease); }
.card:hover .go .ic { transform: translateX(3px); }

.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 50px 0; }

/* ============================================================
   价值主张
   ============================================================ */
.values { background: linear-gradient(180deg, #fff, var(--bg)); }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.value:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.value .vic {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 16px;
}
.value:nth-child(1) .vic { background: linear-gradient(135deg, var(--blue-600), var(--sky-700)); }
.value:nth-child(2) .vic { background: linear-gradient(135deg, var(--green-600), #0e7490); }
.value:nth-child(3) .vic { background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); }
.value h3 { margin: 0 0 8px; font-size: 19px; color: var(--navy-900); font-weight: 700; }
.value p { margin: 0; color: var(--muted); font-size: 15px; }

/* ============================================================
   三步上手
   ============================================================ */
.steps { background: var(--bg); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step .no {
  width: 38px; height: 38px; border-radius: 10px; background: var(--navy-900); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px; margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy-900); font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ============================================================
   安全信任
   ============================================================ */
.trust { background: linear-gradient(160deg, var(--navy-900), #131f33); color: #fff; }
.trust .section-head .tag { color: #6ea8ff; }
.trust .section-head h2 { color: #fff; }
.trust .section-head p { color: #aab8d0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trust-item {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 24px;
}
.trust-item .tic { color: #6ea8ff; margin-bottom: 12px; }
.trust-item h3 { margin: 0 0 7px; font-size: 17px; font-weight: 700; }
.trust-item p { margin: 0; color: #aeb9cf; font-size: 14.5px; }

/* ============================================================
   页脚
   ============================================================ */
.footer { background: var(--navy-900); color: #9fadc4; padding: 46px 0 30px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer .brand { color: #fff; }
.footer .fdesc { max-width: 320px; font-size: 14px; margin-top: 14px; line-height: 1.7; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 12px; font-weight: 700; }
.footer-col a { display: block; font-size: 14px; color: #9fadc4; padding: 4px 0; transition: color .18s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 18px; font-size: 13px; color: #7e8ca6; }

/* ============================================================
   聊天抽屉
   ============================================================ */
.scrim {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s; z-index: 80;
}
.scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(480px, 100%);
  background: var(--bg); z-index: 90; transform: translateX(100%);
  transition: transform .3s var(--ease); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff;
}
.drawer-head .d-ic {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,255,255,.14); color: #fff; flex: none;
}
.drawer-head h3 { margin: 0; font-size: 16.5px; font-weight: 700; }
.drawer-head .d-sub { font-size: 12.5px; color: #b9c6da; }
.drawer-head .close { margin-left: auto; background: rgba(255,255,255,.12); border: none; color: #fff; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; transition: background .18s; }
.drawer-head .close:hover { background: rgba(255,255,255,.24); }

.chat { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
/* 消息外层包裹（气泡 + 时间戳） */
.msg-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 8px 0; }
.msg-wrap.user { align-items: flex-end; }
.msg-wrap.assistant { align-items: flex-start; }

.msg { max-width: 85%; padding: 12px 15px; border-radius: 14px; font-size: 15px; line-height: 1.5; word-break: break-word; position: relative; }
/* 消息时间戳：独立行，气泡外部下方 */
.msg-time {
  display: inline-block; font-size: 12px; color: #999; padding: 0 4px;
  opacity: .8; font-variant-numeric: tabular-nums; letter-spacing: 0.3px;
}
/* 日期 + 操作按钮同行容器 */
.msg-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
/* AI 回复底部操作栏（复制 / 去排版） */
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-actions .btn-ghost { font-size: 13px; padding: 6px 12px; border-radius: 8px; color: var(--blue-600); border-color: var(--border-2); }
.msg-actions .btn-ghost:hover { background: #EFF6FF; border-color: var(--blue-500); }
.msg-actions .btn-primary { font-size: 13px; padding: 6px 16px; border-radius: 8px; font-weight: 600; letter-spacing: 0.3px; }
.msg-actions .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(37,99,235,0.3); }
.msg.user { align-self: flex-end; background: var(--blue-600); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant {
  align-self: flex-start;
  background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  border-radius: 12px; padding: 12px 16px; max-width: 85%;
  min-height: 32px;
}
.msg.assistant p { margin: 0 0 10px; } .msg.assistant p:last-child { margin-bottom: 0; }
.msg.assistant ul { margin: 6px 0; padding-left: 20px; } .msg.assistant li { margin: 3px 0; }
.msg.assistant code { background: #eef2f8; padding: 1px 6px; border-radius: 5px; font-size: 13.5px; }
.msg.assistant table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13.5px; }
.msg.assistant th, .msg.assistant td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; }
.msg.assistant th { background: var(--bg-soft); font-weight: 600; }
.msg.assistant strong { color: var(--navy-900); }
.msg .cursor { display: inline-block; width: 7px; height: 16px; background: var(--blue-600); border-radius: 2px; vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.greeting { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.greeting p { margin: 0 0 14px; color: var(--fg-soft); font-size: 15px; line-height: 1.5; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button {
  text-align: left; background: #f3f7ff; border: 1px solid #dbe7ff; color: var(--blue-700);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; transition: all .18s var(--ease);
}
.suggest button:hover { background: #e6efff; border-color: var(--blue-500); }
.suggest button .ic { color: var(--blue-600); flex: none; }

/* 主回复后的推荐追问（与 .suggest 同风格，左对齐并带引导标签） */
.suggest-follow { align-items: flex-start; margin: 2px 0 10px; }
.suggest-follow .sf-label {
  font-size: 12.5px; font-weight: 600; color: var(--muted, #7a8aa0);
  margin: 2px 0 6px; padding-left: 2px;
}
.suggest-follow .sf-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest-follow .sf-btns button {
  text-align: left; background: #f3f7ff; border: 1px solid #dbe7ff; color: var(--blue-700);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; transition: all .18s var(--ease);
  cursor: pointer; font-family: inherit;
}
.suggest-follow .sf-btns button::after {
  content: '→'; font-size: 12px; opacity: 0.5; margin-left: 2px; flex-shrink: 0;
  transition: opacity .18s, transform .18s;
}
.suggest-follow .sf-btns button:hover::after { opacity: 1; transform: translateX(2px); }
.suggest-follow .sf-btns button:hover { background: #e6efff; border-color: var(--blue-500); transform: translateY(-1px); }
.suggest-follow .sf-btns button .ic { color: var(--blue-600); flex: none; }

/* 思考中动态动画：三个跳动圆点 + 文字 */
.thinking { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 14.5px; }
.thinking i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-600); animation: think-bounce 1.4s infinite ease-in-out both;
}
.thinking i:nth-child(1) { animation-delay: -0.32s; }
.thinking i:nth-child(2) { animation-delay: -0.16s; }
.thinking i:nth-child(3) { animation-delay: 0s; }
@keyframes think-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.composer { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); background: #fff; }
.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; border: 1px solid var(--border-2); border-radius: 11px; padding: 13px 16px;
  font-family: inherit; font-size: 15px; line-height: 1.5; min-height: 46px; max-height: 300px; color: var(--fg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.composer textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--ring); }
.composer .img-btn { width: 46px; height: 46px; border-radius: 11px; border: 1px solid var(--border-2); background: #fff; color: var(--blue-600); display: grid; place-items: center; flex: none; cursor: pointer; transition: background .18s, border-color .18s; }
.composer .img-btn:hover { background: var(--bg-soft); border-color: var(--blue-600); }
.composer .send { width: 46px; height: 46px; border-radius: 11px; border: none; background: var(--blue-600); color: #fff; display: grid; place-items: center; flex: none; transition: background .18s; }
.composer .send:hover { background: var(--blue-700); }
.composer .send:disabled { background: var(--border-2); cursor: not-allowed; }

/* 图片预览条（发送前） */
.img-preview { display: none; flex-wrap: wrap; gap: 8px; }
.img-thumb { position: relative; width: 64px; height: 64px; border-radius: 9px; overflow: hidden; border: 1px solid var(--border-2); background: var(--bg-soft); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb .img-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border: none; border-radius: 50%; background: rgba(15,23,42,.62); color: #fff; font-size: 13px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0; }

/* 用户消息内的图片 */
.msg-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-imgs img { max-width: 160px; max-height: 160px; border-radius: 8px; object-fit: cover; cursor: zoom-in; border: 1px solid rgba(255,255,255,.4); }

/* 聊天区拖拽高亮 */
.chat.drag { outline: 2px dashed var(--blue-600); outline-offset: -8px; }

/* ============================================================
   登录弹窗
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px;
  background: rgba(15,23,42,.5); backdrop-filter: blur(3px);
}
.modal.open { display: grid; }
.modal-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 30px;
  box-shadow: var(--shadow-lg); animation: pop .25s var(--ease);
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-card .m-head { text-align: center; margin-bottom: 20px; }
.modal-card .m-ic { width: 50px; height: 50px; border-radius: 13px; background: linear-gradient(135deg, var(--blue-600), var(--navy-700)); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.modal-card h3 { margin: 0; font-size: 21px; color: var(--navy-900); font-weight: 700; }
.modal-card .m-sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--fg-soft); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border-2); border-radius: 10px;
  font-family: inherit; font-size: 15px; color: var(--fg); transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--ring); }
.field input:disabled { background: #f3f5f9; color: #9aa3b2; cursor: not-allowed; border-color: #e6eaf0; }
.modal .err { color: #dc2626; font-size: 13.5px; min-height: 18px; margin: 2px 0 10px; }
.modal .switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; }
.modal .switch a { color: var(--blue-700); font-weight: 600; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 11px; font-size: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s var(--ease); z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .grid, .value-grid, .step-grid, .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .grid, .value-grid, .step-grid, .trust-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 58px 0 52px; }
  .section { padding: 54px 0; }
  .nav-right .btn-ghost { display: none; }
}

/* 品牌字标：象姐财税圈「象」字 logo → 象姐头像 */
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed, #a855f7);
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(124,58,237,.28);
}
.footer .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed, #a855f7);
  object-fit: cover;
}

/* ============================================================
   Markdown 渲染样式（智能体回复）
   ============================================================ */
.msg.assistant h1, .msg.assistant h2, .msg.assistant h3, .msg.assistant h4 {
  margin: 14px 0 8px; line-height: 1.35; color: var(--navy-900); font-weight: 700;
}
.msg.assistant h1 { font-size: 19px; }
.msg.assistant h2 { font-size: 17px; }
.msg.assistant h3 { font-size: 16px; }
.msg.assistant h4 { font-size: 15px; }
.msg.assistant h1:first-child, .msg.assistant h2:first-child,
.msg.assistant h3:first-child, .msg.assistant h4:first-child { margin-top: 0; }
.msg.assistant ol { margin: 6px 0; padding-left: 22px; }
.msg.assistant ol li { margin: 3px 0; }
.msg.assistant hr.md-hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* 💡 象姐说：专属提示框 */
.msg.assistant blockquote.md-quote {
  margin: 12px 0; padding: 11px 14px; background: #eef4ff;
  border-left: 3px solid var(--blue-600); border-radius: 8px;
  color: var(--fg-soft); font-size: 14.5px; line-height: 1.5;
}
.msg.assistant blockquote.md-quote:first-child { margin-top: 0; }

/* 聊天消息内 Markdown 段落/列表紧凑化 */
.msg.assistant p { margin: 0 0 7px; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 7px; padding-left: 22px; }
.msg.assistant li { margin: 3px 0; }

/* 智能体初始卡片：象姐平台标识条 */
/* ============================================================
   滚动渐显 / 入场动画（专家评审：用动效提升「大气感」）
   原则：只用 transform/opacity（GPU 友好）、尊重 prefers-reduced-motion
   ============================================================ */
/* 通用滚动渐显类 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* 卡片 / 网格错峰入场 */
.grid .card:nth-child(2), .feat-grid .card:nth-child(2) { transition-delay: .08s; }
.grid .card:nth-child(3), .feat-grid .card:nth-child(3) { transition-delay: .16s; }
.grid .card:nth-child(4), .feat-grid .card:nth-child(4) { transition-delay: .24s; }
.grid .card:nth-child(5), .feat-grid .card:nth-child(5) { transition-delay: .32s; }
.grid .card:nth-child(6), .feat-grid .card:nth-child(6) { transition-delay: .40s; }
.value:nth-child(2), .step:nth-child(2), .trust-item:nth-child(2) { transition-delay: .1s; }
.value:nth-child(3), .step:nth-child(3), .trust-item:nth-child(3) { transition-delay: .2s; }

/* 卡片光泽扫过（hover 时） */
.card, .price-card { position: relative; overflow: hidden; }
.card::after, .price-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(120deg, transparent 32%, rgba(255,255,255,.35) 50%, transparent 68%);
  transform: translateX(-130%); opacity: 0; transition: transform .7s var(--ease), opacity .7s var(--ease);
}
.card:hover::after, .price-card:hover::after { transform: translateX(130%); opacity: 1; }

/* hover 提升（更高优先级，确保悬浮位移盖过 reveal 残留态） */
.grid .card:hover, .feat-grid .card:hover, .price-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg); transition-delay: 0s;
}

/* 区块标题：下划线生长 */
.section-head { position: relative; }
.section-head::after {
  content: ""; display: block; width: 0; height: 3px; margin: 16px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue-600), var(--green-600));
  transition: width .6s var(--ease);
}
.section-head.in::after { width: 64px; }

/* 导航栏滚动阴影 */
.navbar.scrolled { box-shadow: 0 6px 22px rgba(15,23,42,.10); }

/* Hero 入场（纯 CSS，加载即播放，错峰淡入） */
.hero-inner > * { opacity: 0; transform: translateY(18px); animation: heroIn .7s var(--ease) forwards; }
.hero-inner .eyebrow { animation-delay: .05s; }
.hero-inner h1 { animation-delay: .16s; }
.hero-inner p.sub { animation-delay: .30s; }
.hero-inner .hero-cta { animation-delay: .44s; }
.hero-inner .hero-badges { animation-delay: .58s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .hero-inner > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   智能体初始对话：自我介绍 + 怎么用 + 引导建议
   ============================================================ */
.greeting.intro { padding: 20px 20px 18px; }
/* 【示例文字】深灰色，与正文区分 */
.eg { color: #888; font-size: 0.95em; }
.greeting.intro .intro-b { margin: 0 0 12px; color: var(--fg-soft); font-size: 14.5px; line-height: 1.5; }
/* 内部 Markdown（我能做什么 / 怎么用 用 renderMarkdown 渲染） */
.greeting.intro .intro-b.md > :first-child { margin-top: 0; }
.greeting.intro .intro-b.md > :last-child { margin-bottom: 0; }
.greeting.intro .intro-b.md p { margin: 0 0 6px; }
.greeting.intro .intro-b.md ul { margin: 0 0 6px; padding-left: 20px; }
.greeting.intro .intro-b.md ol { margin: 0 0 6px; padding-left: 20px; }
.greeting.intro .intro-b.md li { margin: 3px 0; }
.greeting.intro .intro-b.md strong { color: var(--navy-900); font-weight: 700; }
.greeting.intro .intro-b.md .md-quote { margin: 0 0 9px; }
.greeting.intro .intro-tip { margin: 16px 0 10px; font-size: 13.5px; font-weight: 600; color: var(--blue-700); }

/* ============================================================
   人设资料独立页（引导式 · 财税行业预填）
   ============================================================ */
.profile-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.pf-hero { margin-bottom: 26px; }
.pf-hero h1 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 12px; color: var(--navy-900); font-weight: 700; letter-spacing: -.01em; }
.pf-hero p { color: var(--fg-soft); font-size: 15.5px; line-height: 1.75; margin: 0; }
.pf-hero p b { color: var(--blue-700); }
.pf-banner {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  background: #eef4ff; border: 1px solid #dbe7ff; color: var(--blue-700);
  border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 500;
}
.pf-banner .ic { color: var(--blue-600); flex: none; }
.pf-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pf-step-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600;
  color: var(--fg-soft); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
}
.pf-step-chip .n { width: 20px; height: 20px; border-radius: 50%; background: var(--navy-900); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

.pf-form { display: flex; flex-direction: column; gap: 22px; }
.pf-block { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.pf-block h2 { display: flex; align-items: center; gap: 11px; margin: 0 0 18px; font-size: 18px; color: var(--navy-900); font-weight: 700; }
.pf-block h2 .pf-step { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--blue-600), var(--sky-700)); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none; }
.pf-block .field { margin-bottom: 16px; }
.pf-block .field:last-child { margin-bottom: 0; }
.pf-block .field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--fg-soft); margin-bottom: 6px; }
.pf-block .field input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border-2); border-radius: 10px;
  font-family: inherit; font-size: 15px; color: var(--fg); background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pf-block .field input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--ring); }
.pf-block .field .hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.pf-block .field .hint b { color: var(--green-700); }

.pf-actions { display: flex; justify-content: flex-end; gap: 12px; }
.pf-form .err { color: #dc2626; font-size: 13.5px; min-height: 18px; margin: 2px 0 0; text-align: right; }

/* ---------- 资料设置表单（统一设计系统） ---------- */
.pf-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
  padding: 18px 22px 4px;
}
.pf-form .field { margin: 0; }
.pf-full { grid-column: 1 / -1; }
.pf-section-label {
  grid-column: 1 / -1;
  font-size: 12.5px; font-weight: 700; color: var(--blue-700); letter-spacing: .03em;
  padding: 12px 0 4px; border-top: 1px solid var(--border); margin-top: 2px;
}
.pf-section-label:first-of-type { border-top: none; padding-top: 4px; }

/* IP 人设整行块 */
.pf-persona {
  background: linear-gradient(135deg, #eef4ff 0%, #f3f8ff 100%);
  border: 1px solid #dbe7ff; border-radius: 14px;
  padding: 16px 18px;
}
.pf-box-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.pf-box-ic { font-size: 20px; line-height: 1; }
.pf-box-title { font-size: 15px; font-weight: 700; color: var(--navy-900); }
.pf-box-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }

/* 选择框统一样式 */
.pf-form select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border-2); border-radius: 10px;
  font-family: inherit; font-size: 14px; color: var(--fg); background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pf-form select:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--ring); }

/* 操作按钮 */
.pf-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 22px 20px; }
.err { color: #dc2626; font-size: 13px; min-height: 16px; padding: 0 22px 18px; }

@media (max-width: 720px) {
  .pf-form { grid-template-columns: 1fr; gap: 12px; }
  .pf-grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   标杆推荐
   ============================================================ */
.featured { background: var(--bg); }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.feat-more { text-align: center; margin-top: 30px; }
.card.feat { border-color: #cfe0ff; box-shadow: 0 8px 26px rgba(37,99,235,.12); }
.card.feat:hover { border-color: var(--blue-500); box-shadow: var(--shadow-lg); }
.card .star {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--amber-500);
  padding: 2px 9px; border-radius: 999px; letter-spacing: .02em;
}

/* ============================================================
   套餐 / 赋能服务
   ============================================================ */
.pricing { background: linear-gradient(180deg, var(--bg), #fff); }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 22px; justify-content: center; }
.price-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 30px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.featured-card { border-color: var(--blue-600); box-shadow: var(--shadow-blue); }
.pc-tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--blue-700);
  background: #eef4ff; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.pc-tag.hot { color: #fff; background: linear-gradient(135deg, var(--blue-600), var(--green-600)); }
.price-card h3 { margin: 0 0 6px; font-size: 21px; color: var(--navy-900); font-weight: 700; }
.pc-price { font-size: 34px; font-weight: 700; color: var(--navy-900); letter-spacing: -.02em; margin: 6px 0 18px; }
.pc-price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.price-card li { position: relative; padding-left: 28px; color: var(--fg-soft); font-size: 15px; line-height: 1.5; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #e7f6ee; }
.price-card li::after { content: "\2713"; position: absolute; left: 4px; top: 2px; color: var(--green-600); font-size: 12px; font-weight: 700; }
.price-card .btn-block { margin-top: auto; }

/* ============================================================
   常见问题 FAQ
   ============================================================ */
.faq { background: var(--bg); }
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.faq-item.open { border-color: #c9d6ea; box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: none; padding: 18px 22px; text-align: left;
  font-size: 16.5px; font-weight: 600; color: var(--navy-900); font-family: inherit;
}
.faq-q .faq-ic { color: var(--muted); transition: transform .25s var(--ease); flex: none; }
.faq-item.open .faq-q .faq-ic { transform: rotate(180deg); color: var(--blue-600); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 15px; line-height: 1.75; }

/* 定价区在窄屏单列 */
@media (max-width: 900px) {
  .price-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}

/* ============================================================
   登录网关（未登录全屏显示，隐藏应用主体）
   ============================================================ */
/* 公开落地页（引流页）不隐藏主体，允许免登录浏览；仅会员页隐藏 */
body.logged-out:not(.public-page) .app { display: none !important; }
.gate {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 20px;
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(37,99,235,.35), transparent 60%),
    radial-gradient(900px 400px at 0% 10%, rgba(3,105,161,.30), transparent 55%),
    linear-gradient(160deg, var(--navy-900), #15233b 60%, #0d1726);
}
.gate.open { display: grid; }
.gate-card {
  position: relative;
  width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 34px 30px;
  box-shadow: var(--shadow-lg); text-align: center; animation: pop .25s var(--ease);
}
/* 公开页可关闭登录弹窗（仅 .public-page 生效，由 JS 控制） */
.gate-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--fg-2);
  font-size: 20px; line-height: 1; cursor: pointer; transition: all .18s var(--ease);
}
.gate-close:hover { background: #f3f4f6; color: var(--navy-900); border-color: var(--blue-400); }
.gate-card .g-ic {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed, #a855f7);
  object-fit: cover; margin: 0 auto 16px;
}
.gate-card h2 { margin: 0 0 6px; font-size: 23px; color: var(--navy-900); font-weight: 700; }
.gate-card .g-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; line-height: 1.6; }

/* ============================================================
   智能体独立页：左栏 + 主聊天区
   ============================================================ */
/* agent 页隐藏顶部导航栏（内容已移入侧边栏） */
.agent-navbar { display: none !important; }
.agent-layout { display: flex; height: 100vh; }

.agent-rail {
  width: 240px; flex: none; background: #fff; border-right: 1px solid var(--border);
  overflow-y: auto; padding: 0;
  display: flex; flex-direction: column;
}
/* 侧边栏顶部：品牌(左) + 用户信息(右) */
.rail-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px; border-bottom: 1px solid var(--border); flex: none;
}
.rail-brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 15.5px; font-weight: 700; color: var(--navy-900); text-decoration: none;
  font-family: 'AlibabaPuHuiTi-3-115Black', '阿里巴巴普惠体', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.rail-brand .xm {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed, #a855f7);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(124,58,237,.25);
}
.rail-user {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-soft);
}
.rail-user .avatar {
  width: 28px; height: 28px; border-radius: 8px; background: var(--blue-600); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none;
}
.rail-user .quota { color: var(--muted); font-size: 11.5px; }
.rail-user .quota b { color: var(--blue-700); }
.rail-user #navLogout { padding: 4px 10px; font-size: 12px; }

/* 侧边栏中部：导航列表 */
.rail-nav { flex: 1; overflow-y: auto; padding: 8px 10px; }
.rail-home {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px;
  color: var(--blue-700); font-weight: 600; font-size: 13.5px; background: #eef4ff;
  transition: background .18s var(--ease);
}
.rail-home:hover { background: #e1ecff; }
.rail-group { margin-bottom: 6px; }
.rail-group-title {
  font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing .05em;
  padding: 4px 8px 2px; text-transform: uppercase;
}
.rail-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px;
  color: var(--fg-soft); font-size: 13.5px; font-weight: 500; transition: background .18s var(--ease), color .18s var(--ease);
}
.rail-item .ic { color: var(--blue-600); flex: none; }
.rail-item:hover { background: var(--bg-soft); color: var(--navy-900); }
.rail-item.active { background: var(--navy-900); color: #fff; }
.rail-item.active .ic { color: #6ea8ff; }

/* 侧边栏底部：我的资料 + 用户信息 */
.rail-footer {
  flex: none; padding: 8px 10px 10px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.rail-profile {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px;
  color: var(--muted); font-size: 13px; font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.rail-profile:hover { background: var(--bg-soft); color: var(--navy-900); }
.rail-profile .ic { flex: none; }

/* 左下角用户信息 */
.rail-user-info {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
  background: var(--bg-soft); font-size: 13px;
}
.rail-user-info .avatar {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--sky-700));
  font-size: 12px; font-weight: 700;
}
.rail-uname { font-weight: 600; color: var(--navy-900); }
.rail-user-info .quota { color: var(--muted); font-size: 12px; margin-left: auto; }
.rail-user-info #navLogout { padding: 4px 10px; font-size: 12px; }

/* 左栏品牌副标题 */
.rail-subtitle {
  font-size: 10.5px; color: var(--blue-600); font-weight: 500;
  letter-spacing: 0.5px; opacity: .8; flex: none;
  padding: 3px 0 0; line-height: 1.2;
}

/* 左栏导航项未读蓝点 */
.rail-item { position: relative; }
.rail-item .unread-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue-600); border: 1.5px solid #fff;
  flex: none; pointer-events: none;
}
.rail-item.active .unread-dot { display: none; }

.agent-main { flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: linear-gradient(180deg, #e3effb 0%, #eaf2fc 35%, #f0f5fa 70%, #f5f8fc 100%);
}
/* 用户中心主区：背景略深；内容超高时可滚动（修复底部被遮挡） */
.uc-main {
  flex: 1; min-width: 0;
  background: linear-gradient(180deg, #dceaf6 0%, #e4edf8 30%, #eaf2f9 60%, #f0f5fa 100%);
  overflow-y: auto;
  padding-bottom: 28px;
}
/* 智能体头部：正蓝→浅蓝渐变（清爽科技风），头像+白字 */
.agent-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 22px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 40%, #60a5fa 70%, #93c5fd 100%);
  border-bottom: 1px solid rgba(255,255,255,.25);
  color: #fff;
  box-shadow: 0 2px 16px rgba(37,99,235,.18), 0 1px 4px rgba(0,0,0,.04);
}
.agent-head .a-ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.22); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.35);
  overflow: hidden;
  /* 如果 a-ic 内是 img（象姐头像），直接显示 */
}
.agent-head .a-ic img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 11px;
}
.agent-head h2 { margin: 0; font-size: 18px; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.1); }
.agent-head .a-head-text { flex: 1; min-width: 0; }
.agent-head .a-sub { font-size: 12px; color: rgba(255,255,255,.78); margin-top: 2px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-head-actions { margin-left: auto; flex-shrink: 0; }
.agent-head-actions .btn .ic { margin-right: 6px; vertical-align: -3px; }
/* 历史对话数量徽标 */
.hist-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  font-size: 11px; font-weight: 700; line-height: 1;
  color: #fff; background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 999px; vertical-align: middle;
}

/* ===== 已清对话抽屉（可找回） ===== */
.hist-drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.hist-drawer.open { pointer-events: auto; }
.hist-overlay { position: absolute; inset: 0; background: rgba(15,23,42,.38); opacity: 0; transition: opacity .28s var(--ease); }
.hist-drawer.open .hist-overlay { opacity: 1; }
.hist-panel {
  position: absolute; top: 0; right: -400px; width: 380px; max-width: 92vw; height: 100%;
  background: var(--bg-card, #FFFFFF); box-shadow: -6px 0 28px rgba(0,0,0,.16);
  display: flex; flex-direction: column; transition: right .3s var(--ease);
}
.hist-drawer.open .hist-panel { right: 0; }
.hist-head {
  flex: none; padding: 16px 18px; border-bottom: 1px solid var(--border, #E2E8F0);
  display: flex; align-items: center; justify-content: space-between;
}
.hist-head h3 { margin: 0; font-size: 16px; color: var(--navy-900, #0F172A); }
.hist-close {
  border: none; background: transparent; font-size: 24px; line-height: 1; color: var(--muted, #64748B);
  cursor: pointer; padding: 0 4px; border-radius: 8px;
}
.hist-close:hover { background: var(--bg-soft, #F1F5F9); color: var(--navy-900, #0F172A); }
.hist-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.hist-empty { text-align: center; color: var(--fg-2, #475569); font-size: 13.5px; line-height: 1.7; padding: 48px 16px; }
.hist-loading { text-align: center; color: var(--fg-2, #475569); font-size: 13.5px; padding: 32px 0; }
.hist-list { display: flex; flex-direction: column; gap: 10px; }
.hist-item {
  border: 1px solid var(--border-2, #CBD5E1); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; background: #fff;
}
.hist-item-main { flex: 1; min-width: 0; }
.hist-item-title { font-size: 13.5px; font-weight: 600; color: var(--navy-900, #0F172A); }
.hist-item-sub { font-size: 12px; color: var(--muted, #64748B); margin-top: 3px; }
.hist-item-actions { display: flex; gap: 6px; flex: none; }
.hist-item-actions button {
  border: 1px solid transparent; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .18s var(--ease);
}
.hist-restore { background: linear-gradient(135deg, #2563eb, #6366f1); color: #fff; }
.hist-restore:hover { box-shadow: 0 4px 12px rgba(37,99,235,.32); }
.hist-del { background: transparent; color: var(--muted, #64748B); border-color: var(--border-2, #CBD5E1); }
.hist-del:hover { background: var(--bg-soft, #F1F5F9); color: #dc2626; border-color: #fca5a5; }

/* 聊天区复用 .chat/.msg/.greeting/.composer 全局样式（已在上方定义） */
.agent-main .chat { flex: 1; }

/* ============================================================
   人设资料弹窗
   ============================================================ */
.modal-card.wide { max-width: 580px; text-align: left; }
.modal-card.wide .m-head { text-align: center; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 6px 0 4px; }
.pf-grid .field { margin-bottom: 0; }
.pf-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 14px; }

/* 窄屏适配 */
@media (max-width: 820px) {
  .agent-layout { flex-direction: column; height: auto; }
  .agent-rail {
    width: auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .rail-header { display: none; }          /* 窄屏隐藏顶部品牌+用户 */
  .rail-footer { display: none; }           /* 窄屏隐藏底部我的资料 */
  .rail-nav { padding: 0; overflow: visible; flex: none; width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .rail-home { margin-bottom: 0; flex: none; }
  .rail-group { margin-bottom: 0; display: contents; }
  .rail-group-title { display: none; }
  .rail-item { white-space: nowrap; flex: none; }
  .agent-main .chat { min-height: 60vh; }
  .pf-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   算力消耗日志页面
   ============================================================ */
.usage-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding: 16px 22px 0;
}
.usage-stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.usage-stat-num { font-size: 26px; font-weight: 700; color: var(--blue-600); letter-spacing: -.02em; }
.usage-stat-lbl { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.usage-bar {
  display: flex; align-items: center; gap: 10px; padding: 14px 22px 0;
  flex-wrap: wrap;
}
.usage-date-input {
  padding: 7px 11px; border: 1px solid var(--border-2); border-radius: 8px;
  font-family: inherit; font-size: 13.5px; color: var(--fg); background: #fff;
}
.usage-date-input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--ring); }

.usage-table-wrap {
  padding: 16px 22px; overflow-x: auto;
}
.usage-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm); font-size: 13.5px;
}
.usage-table th {
  background: var(--bg-soft); padding: 10px 12px; text-align: left;
  font-weight: 600; color: var(--fg-soft); font-size: 12.5px;
  white-space: nowrap; border-bottom: 1px solid var(--border);
}
.usage-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-2); vertical-align: top;
  max-width: 220px;
}
.usage-table tr:last-child td { border-bottom: none; }
.usage-table tr:hover td { background: #fafcff; }
.id-cell { font-family: 'SF Mono', Monaco, monospace; font-size: 12px; color: var(--muted); }
.time-cell { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.bal-cell { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--blue-600, #1565d8); font-weight: 600; }
.msg-preview { color: var(--fg-soft); line-height: 1.45; word-break: break-all; }
.status-ok { color: var(--green-600); font-weight: 600; font-size: 12px; }
.status-fail { color: #dc2626; font-weight: 600; font-size: 12px; }
.empty-row { text-align: center; color: var(--muted); padding: 40px 12px !important; }

.usage-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 22px 24px;
}
.page-info { font-size: 13.5px; color: var(--muted); }

@media (max-width: 820px) {
  .usage-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 0; }
  .usage-stat-card { padding: 12px; }
  .usage-stat-num { font-size: 20px; }
  .usage-bar { padding: 10px 14px 0; }
  .usage-table-wrap { padding: 12px 14px; }
  .usage-pager { padding: 12px 14px 18px; }
}

/* ============================================================
   充值中心页面
   ============================================================ */
.recharge-body { padding: 0 22px 32px; overflow-y: auto; flex: 1; }

/* 用户余额信息 */
.rebalance-info {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-top: 16px; box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.rb-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-600), var(--sky-700));
  color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: none;
}
.rb-detail { flex: 1; min-width: 180px; }
.rb-name { font-size: 17px; font-weight: 700; color: var(--navy-900); }
.rb-tokens { font-size: 14px; color: var(--fg-soft); margin-top: 3px; }
.rb-tokens b { color: var(--green-600); font-size: 16px; }
.rb-validity { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rb-links { margin-top: 4px; font-size: 12.5px; }
.rb-links a { color: var(--blue-600); text-decoration: none; }
.rb-links a:hover { text-decoration: underline; }
.rb-actions { display: flex; gap: 8px; flex: none; }

/* 套餐选择 */
.recharge-section { margin-top: 24px; }
.rs-title { font-size: 16px; font-weight: 700; color: var(--navy-900); margin: 0 0 14px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-card {
  position: relative; background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius); padding: 22px 16px; text-align: center;
  cursor: pointer; transition: all .2s var(--ease);
  box-shadow: var(--shadow-sm); user-select: none;
}
.plan-card:hover { border-color: var(--blue-400, #60a5fa); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.plan-card.selected { border-color: var(--blue-600); background: #f8fbff; box-shadow: 0 0 0 3px var(--ring); }
.plan-card.recommended { border-color: var(--blue-500); }
.plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--blue-600), var(--green-600));
  color: #fff; font-size: 11px; font-weight: 700; padding: 3px 14px;
  border-radius: 999px; white-space: nowrap;
}
.plan-price { font-size: 36px; font-weight: 700; color: var(--navy-900); line-height: 1; }
.plan-price .plan-num { font-size: 42px; }
.plan-bonus { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.plan-bonus .bonus-num { color: var(--blue-600); font-weight: 700; }
.plan-check {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px;
  border-radius: 50%; border: 2px solid var(--border-2);
  transition: all .15s;
}
.plan-card.selected .plan-check {
  background: var(--blue-600); border-color: var(--blue-600);
}
.plan-card.selected .plan-check::after {
  content: '✓'; position: absolute; inset: 0; display: grid;
  place-items: center; color: #fff; font-size: 13px; font-weight: 700;
}

/* 支付方式 */
.pay-methods { display: flex; gap: 12px; flex-wrap: wrap; }
.pay-method {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border: 2px solid var(--border); border-radius: 11px;
  cursor: pointer; transition: all .18s var(--ease); font-size: 15px; font-weight: 500;
  user-select: none;
}
.pay-method:hover { border-color: var(--blue-400, #60a5fa); }
.pay-method.active { border-color: #07c160; background: #f0fff4; }
.pay-method input { display: none; }
.wechat-icon {
  width: 26px; height: 26px; border-radius: 6px; background: #07c160; color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none;
}

/* 充值按钮 */
.btn-recharge {
  background: linear-gradient(135deg, #07c160, #06ad56); color: #fff;
  font-size: 17px; padding: 15px 24px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(7,193,96,.30);
}
.btn-recharge:hover { background: linear-gradient(135deg, #06ad56, #059e4d); }
.btn-recharge:disabled { opacity: .6; cursor: not-allowed; }

/* 支付弹窗 */
.pay-modal {
  position: fixed; inset: 0; z-index: 150; display: none; place-items: center;
  background: rgba(15,23,42,.50); backdrop-filter: blur(4px);
}
.pay-modal.open { display: grid; }
.pay-modal-backdrop { position: absolute; inset: 0; }
.pay-modal-card {
  position: relative; width: min(420px, 92vw); background: #fff;
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg);
  animation: pop .25s var(--ease);
}
.pay-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.pay-modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.pay-modal-close {
  background: none; border: none; font-size: 22px; color: var(--muted);
  cursor: pointer; padding: 4px 8px; line-height: 1;
}
.pay-modal-body { padding: 28px 24px; display: flex; gap: 24px; align-items: center; }
.pay-qr-wrap {
  width: 180px; height: 180px; border: 1px solid var(--border-2);
  border-radius: 12px; display: grid; place-items: center;
  background: #fafafa; flex: none; overflow: hidden;
}
.pay-qr-img { width: 100%; height: 100%; object-fit: contain; }
.pay-qr-placeholder { text-align: center; color: var(--muted); padding: 16px; }
.pay-qr-placeholder p { margin: 4px 0; }
.pay-info { flex: 1; }
.pay-amount { font-size: 34px; font-weight: 700; color: var(--navy-900); }
.pay-plan-name { font-size: 14px; color: var(--fg-soft); margin-top: 4px; }
.pay-tip { font-size: 13px; color: var(--muted); margin-top: 16px; }
.pay-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.orders-table-wrap { overflow-x: auto; }

@media (max-width: 820px) {
  .rebalance-info { flex-direction: column; text-align: center; }
  .rb-actions { width: 100%; justify-content: center; }
  .plans { grid-template-columns: 1fr; }
  .plan-card { max-width: 320px; margin: 0 auto; width: 100%; }
  .pay-modal-body { flex-direction: column; text-align: center; }
  .pay-qr-wrap { width: 200px; height: 200px; }
}

/* ================= 用户中心：卡片布局 ================= */
.uc-card {
  margin: 0 22px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(21,101,216,.06);
  overflow: visible;
}
.uc-card > form,
.uc-card > .pf-form {
  padding: 4px 20px 8px;
}
.uc-card .pf-actions {
  padding: 6px 20px 18px;
}
.uc-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px 0;
}
.uc-card-icon {
  font-size: 22px; line-height: 1; flex: none;
}
.uc-card-head h3 {
  margin: 0; font-size: 16.5px; font-weight: 700; color: var(--navy-900);
}
.uc-card-hint {
  font-size: 12.5px; color: var(--muted); margin-left: auto;
}

/* ============ 管理员后台：统计卡片网格 ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 22px 18px;
}
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ============ 管理员后台：可视化仪表盘 ============ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 22px 18px;
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .dash-grid { grid-template-columns: 1fr; }
}
.dash-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 1px 4px rgba(21,101,216,.06);
}
.dash-card h4 {
  margin: 0 0 14px; font-size: 14.5px; font-weight: 700; color: var(--navy-900);
  display: flex; align-items: center; gap: 8px;
}
.dash-card h4 .dc-ic { font-size: 16px; }
.dash-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

/* 圆环进度（活跃用户占比） */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 108px; height: 108px; flex: none; }
.donut-center { font-size: 19px; font-weight: 700; fill: var(--navy-900); }
.donut-legend { font-size: 13px; color: var(--fg-soft); line-height: 1.8; }
.donut-legend b { color: var(--blue-600); font-variant-numeric: tabular-nums; }

/* 横向条形（热门智能体 / 算力对比） */
.hbar-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.hbar-label {
  width: 92px; flex: none; font-size: 12.5px; color: var(--fg-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hbar-track { flex: 1; height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.hbar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-600), var(--sky-700));
  transition: width .6s var(--ease);
}
.hbar-val { width: 46px; flex: none; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--navy-900); font-variant-numeric: tabular-nums; }

/* 迷你柱（今日 vs 累计） */
.mini-bars { display: flex; align-items: flex-end; gap: 14px; height: 100px; padding: 4px 2px 0; }
.mini-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.mini-bar .mb-fill {
  width: 100%; max-width: 56px; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); min-height: 6px;
}
.mini-bar .mb-cap { font-size: 12.5px; font-weight: 600; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.mini-bar .mb-day { font-size: 11px; color: var(--muted); }

/* ============ 管理员后台：左侧用户画像卡 ============ */
.rail-admin-profile {
  margin: 12px 12px 0; padding: 16px 16px 14px; border-radius: 16px;
  background: linear-gradient(155deg, #1E3A5F, #2563EB);
  color: #fff; box-shadow: 0 10px 26px rgba(37,99,235,.28);
}
.rail-admin-profile .rp-top { display: flex; align-items: center; gap: 12px; }
.rail-admin-profile .rp-avatar {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: rgba(255,255,255,.18); display: grid; place-items: center;
  font-size: 20px; font-weight: 700;
}
.rail-admin-profile .rp-name { font-size: 15.5px; font-weight: 700; line-height: 1.2; word-break: break-all; }
.rail-admin-profile .rp-role {
  display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.22);
}
.rail-admin-profile .rp-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 15px; }
.rail-admin-profile .rp-kpi { text-align: center; background: rgba(255,255,255,.10); border-radius: 10px; padding: 8px 4px; }
.rail-admin-profile .rp-kpi b { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rail-admin-profile .rp-kpi span { font-size: 10.5px; opacity: .82; }

/* ================= 用户中心：底部隐私 / 协议 ================= */
.uc-agreement {
  margin: 14px 22px 26px; border-top: 1px dashed var(--border); padding-top: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.uc-agg-item {
  background: rgba(255,255,255,.7); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.uc-agg-item > summary {
  cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 600; font-size: 14.5px;
  color: var(--fg); display: flex; align-items: center; gap: 8px;
  user-select: none;
}
.uc-agg-item > summary::-webkit-details-marker { display: none; }
.uc-agg-item > summary::before {
  content: ''; width: 7px; height: 7px; border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .2s ease;
}
.uc-agg-item[open] > summary::before { transform: rotate(45deg); }
.uc-agg-body {
  padding: 0 16px 16px; font-size: 13px; line-height: 1.7; color: var(--fg-soft);
}
.uc-agg-body p { margin: 0 0 10px; }
.uc-agg-body p:last-child { margin-bottom: 0; }
.uc-agg-body b { color: var(--fg); }

/* ================= 左栏「我的」子项（用户中心下的 算力日志 / 充值中心） ================= */
.rail-sub {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 30px; margin: 2px 0;
  font-size: 13px; color: var(--muted); text-decoration: none;
  border-radius: 8px; transition: background .15s, color .15s;
}
.rail-sub .ic { color: var(--blue-600); flex: none; }
.rail-sub:hover { background: var(--bg-soft); color: var(--navy-900); }
.rail-sub.active { background: #eef4ff; color: var(--blue-700); font-weight: 600; }

/* ================= 用户中心：顶部 算力看板（宽）+ 充值中心（窄） ================= */
.sum-grid {
  display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px;
  margin: 18px 22px 4px;
}
.sum-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 20px 18px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(21,101,216,.06));
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.sum-card:hover {
  border-color: var(--blue-500, #3b82f6);
  box-shadow: var(--shadow-md, 0 6px 18px rgba(21,101,216,.12));
  transform: translateY(-2px);
}
.sum-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.sum-card-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; color: var(--navy-900);
}
.sum-card-title .ic { color: var(--blue-600); }
.sum-card-go { font-size: 12.5px; font-weight: 600; color: var(--blue-600); white-space: nowrap; }

/* 算力看板：仪表盘 + 指标块 — 深蓝渐变 */
.sum-card.dash {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #1d4ed8 100%);
  border-color: rgba(37,99,235,.5);
  color: #fff;
  box-shadow: 0 14px 34px rgba(30,58,138,.34);
}
.sum-card.dash .sum-card-title { color: #fff; }
.sum-card.dash .sum-card-title .ic { color: #bcd6ff; }
.sum-card.dash .sum-card-go { color: #cfe0ff; }
.sum-card.dash .dash-tile-num { color: #fff; }
.sum-card.dash .dash-tile-lbl { color: rgba(255,255,255,.72); }
.sum-card.dash .gauge-pct { color: #fff; }
.sum-card.dash .gauge-lbl { color: rgba(255,255,255,.7); }
.sum-dash-inner { display: flex; align-items: center; gap: 24px; }
.gauge-wrap { position: relative; width: 116px; height: 116px; flex: none; }
.gauge { width: 116px; height: 116px; display: block; }
.gauge-track { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 12; }
.gauge-bar {
  fill: none; stroke: url(#gaugeGrad); stroke-width: 12; stroke-linecap: round;
  transition: stroke-dashoffset .9s var(--ease);
}
.gauge-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.gauge-pct { font-size: 23px; font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1; }
.gauge-lbl { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 4px; }
.dash-tiles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.dash-tile-num { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -.01em; line-height: 1.1; }
.dash-tile-num.dash-tile-sm { font-size: 17px; }
.dash-tile-lbl { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 4px; }

/* 充值中心：紧凑卡 — 深紫渐变 */
.sum-card:not(.dash) {
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 55%, #6d28d9 100%);
  border-color: rgba(124,58,237,.5);
  color: #fff;
  box-shadow: 0 14px 34px rgba(76,29,149,.34);
}
.sum-card:not(.dash) .sum-card-title { color: #fff; }
.sum-card:not(.dash) .sum-card-title .ic { color: #e9d5ff; }
.sum-card:not(.dash) .sum-card-go { color: #f3e8ff; }
.sum-card:not(.dash) .rc-row span { color: rgba(255,255,255,.72); }
.sum-card:not(.dash) .rc-row b { color: #fff; font-weight: 700; }
.rc-body { display: flex; flex-direction: column; gap: 10px; }
.rc-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.rc-row span { color: var(--muted); }
.rc-row b { color: var(--navy-900); font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-tip { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.sum-card:not(.dash) .rc-tip { color: rgba(255,255,255,.65); }

@media (max-width: 860px) {
  .sum-grid { grid-template-columns: 1fr; margin: 16px 16px 4px; }
  .sum-dash-inner { flex-direction: column; gap: 18px; }
  .dash-tiles { width: 100%; }
}
@media (max-width: 480px) {
  .dash-tiles { grid-template-columns: 1fr 1fr; }
}

/* ================= 用户中心 · 朋友圈品牌素材 ================= */
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 16px 20px 4px; }
.brand-label { font-size: 13px; color: var(--fg-2); font-weight: 600; }
.brand-tip { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 6px 0 10px; }

/* 多素材列表 */
.brand-list-block { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.brand-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.brand-list-head .brand-label { margin: 0; }
.brand-list { display: flex; flex-wrap: wrap; gap: 12px; }
.brand-empty { color: var(--muted); font-size: 12.5px; padding: 10px 2px; }
.brand-slot { width: 132px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.brand-slot-prev { width: 100%; height: 92px; border: 1px dashed var(--border-2); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.brand-slot-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-slot-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.brand-slot-idx { font-size: 11px; color: var(--muted); text-align: center; }
.brand-ctype { font-size: 12px; padding: 3px 6px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--bg-card); color: var(--fg); font-family: inherit; }
@media (max-width: 760px) { .brand-grid { grid-template-columns: 1fr; } }

/* ================= 管理员 · 海报管理 ================= */
.poster-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.pa-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-card); display: flex; flex-direction: column; position: relative; }
.pa-card.selected { border-color: var(--blue-400); box-shadow: 0 0 0 2px rgba(21,101,216,.15); }
.pa-chk { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(255,255,255,.85); border-radius: 6px; padding: 3px 5px; cursor: pointer; line-height: 1; }
.pa-chk input { width: 16px; height: 16px; accent-color: var(--blue-600); cursor: pointer; }
.pa-img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #f0f2f5; display: block; }
.pa-meta { padding: 8px 10px 10px; flex: 1; }
.pa-cat { font-size: 11.5px; color: var(--blue-600); font-weight: 600; }
.pa-title { font-size: 14px; font-weight: 600; margin-top: 2px; }
.pa-copy { font-size: 12px; color: var(--fg-2); margin-top: 4px; line-height: 1.5; }
.pa-acts { padding: 8px 10px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* 管理员后台 · 余额预警横幅 */
.lowbal-warn { margin-bottom: 14px; padding: 12px 16px; border: 1px solid #f0c36d; background: #fff8e6; border-radius: 12px; }
.lowbal-warn .lb-title { font-size: 13.5px; color: #8a5a00; font-weight: 600; }
.lowbal-warn .lb-title b { color: #c0392b; }
.lowbal-warn .lb-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.lowbal-warn .lb-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 12px; background: #fff; border: 1px solid #f0c36d; border-radius: 999px; font-size: 12.5px; color: var(--fg); }
.lowbal-warn .lb-rc { border: none; background: #c0392b; color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.lowbal-warn .lb-rc:hover { background: #a93226; }

/* ---- 海报 AI 文案标签 ---- */
.tag-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 4px 10px; background: #eaf2ff; color: var(--blue-700); border: 1px solid #c7d6fe; border-radius: 999px; font-size: 12px; font-family: inherit; }
.tag:hover { background: #dbe9ff; }


