/* ============================================================
   帧起微澜 — Warm Ledger
   暖纸 · 墨黑 · 火漆砖红。原生零构建样式系统。
   设计哲学：把瞬时的流量，当作可核验的现象来记账。
   ============================================================ */

:root {
  /* —— 材料 —— */
  --paper: #f7f6f3;          /* 页面底：暖纸 */
  --paper-deep: #efece4;      /* 凹陷纸 / 输入底 */
  --card: #ffffff;            /* 卡片纸 */
  --ink: #111110;            /* 墨 */
  --ink-2: #6b6a5e;          /* 次级文字 */
  --ink-3: #a8a29a;          /* 弱化标签 */
  --line: #e7e3dc;            /* 发丝线 */
  --line-soft: #efede5;

  /* 旧变量名兼容（页面内联样式仍在引用） */
  --bg-primary: var(--paper);
  --bg-secondary: var(--paper-deep);
  --bg-tertiary: #e9e5da;
  --bg-card: var(--card);
  --border: var(--line);
  --border-light: var(--line-soft);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);

  /* —— 一枚火漆 + 状态墨 —— */
  --seal: #9a3b32;            /* 砖红：唯一强调色 */
  --seal-deep: #7e2e27;
  --seal-soft: rgba(154, 59, 50, 0.10);
  --accent: var(--seal);
  --accent-dark: var(--seal-deep);
  --accent-glow: rgba(154, 59, 50, 0.22);

  --success: #1f7a4d;
  --warning: #b7791f;
  --danger: #b3402f;
  --info: #2f5d8c;
  --pass: var(--success);

  --gradient-primary: var(--ink);
  --gradient-card: var(--card);

  /* —— 形制 —— */
  --shell: 1152px;            /* 正文与导航共用的内容宽度 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(17, 17, 16, 0.05);
  --shadow-sm: 0 1px 2px rgba(17,17,16,.04), 0 6px 16px -10px rgba(17,17,16,.12);
  --shadow-md: 0 1px 2px rgba(17,17,16,.04), 0 12px 32px -14px rgba(17,17,16,.16);
  --shadow-lg: 0 2px 6px rgba(17,17,16,.05), 0 28px 64px -28px rgba(17,17,16,.22);
  --shadow-card: var(--shadow-sm);
  --shadow-glow: 0 8px 24px -10px var(--accent-glow);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* 中文衬线：宋体/思源宋体，标题与印章用，承载文旅气韵 */
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
  /* 青绿：取《千里江山图》石青石绿，作山水纹样与点缀 */
  --jade: #2c6e63;
  --jade-soft: rgba(44, 110, 99, 0.10);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 文旅山水底纹：漓江喀斯特水墨固定于视口底部，极淡不干扰阅读；--ink-shift 供滚动视差 */
body::before {
  content: "";
  position: fixed; left: 0; right: 0; bottom: 0; height: 52vh;
  z-index: 0; pointer-events: none;
  background: url("../assets/wenlu-ink.jpg") no-repeat center bottom / cover;
  opacity: .18;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 55%);
  transform: translateY(var(--ink-shift, 0px));
  will-change: transform;
}

#app { position: relative; z-index: 1; min-height: 100vh; }

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; }

/* ============================================================
   顶部导航：通栏白底 + 发丝下划线，与正文同宽对齐
   ============================================================ */
.console {
  position: fixed;
  top: 0;
  left: 0;
  transform: none;
  width: 100%;
  max-width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 max(20px, calc((100% - var(--shell)) / 2));
  z-index: 100;
}

.console-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  height: 34px;
}

.console-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 34px;
}
.console-mark-img { display: block; height: 26px; width: auto; }

.console-word { line-height: 1.25; white-space: nowrap; }
.console-word b { font-family: var(--font-serif); font-size: 16px; font-weight: 700; letter-spacing: 1.5px; display: block; }
.console-word small {
  font-size: 9.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.6px;
  display: block;
  margin-top: 1px;
}

.console-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: safe center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.console-nav::-webkit-scrollbar { display: none; }

.console-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.console-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .8; }
.console-nav-item:hover { background: var(--paper-deep); color: var(--ink); }
.console-nav-item.active { background: var(--ink); color: var(--paper); }
.console-nav-item.active svg { opacity: 1; }

.console-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; flex-shrink: 0; }

.console-user {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  height: 34px;
}
.console-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.console-email {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--ink-2);
}
.console-logout {
  border: 0;
  background: var(--paper-deep);
  color: var(--ink-2);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .18s ease;
}
.console-logout:hover { background: var(--seal); color: #fff; }

.console-burger {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--paper-deep);
  cursor: pointer;
  place-items: center;
}

/* 移动端抽屉 */
.console-drawer-scrim {
  position: fixed; inset: 0; background: rgba(17,17,16,.35);
  backdrop-filter: blur(2px); z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.console-drawer-scrim.open { opacity: 1; pointer-events: auto; }
.console-drawer {
  position: fixed; top: 72px; right: 16px; left: auto;
  width: calc(100% - 32px); max-width: 340px;
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  padding: 14px; z-index: 95;
  transform: translateY(-12px) scale(.98); opacity: 0; pointer-events: none;
  transform-origin: top center;
  transition: all .25s cubic-bezier(.22,.8,.3,1);
  max-height: calc(100vh - 120px); overflow-y: auto;
}
.console-drawer.open { transform: none; opacity: 1; pointer-events: auto; }
.console-drawer .console-nav { flex-direction: column; align-items: stretch; gap: 4px; }
.console-drawer .console-nav-item { justify-content: flex-start; height: 44px; padding: 0 16px; }
.console-drawer .console-sep {
  width: auto; height: 1px; margin: 6px 16px;
  background: var(--line);
}
.drawer-section {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--ink-3); padding: 14px 14px 6px;
}
.drawer-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin: 8px 0 4px; border-top: 1px solid var(--line);
}
.drawer-user .console-email { max-width: none; }

/* ============================================================
   主内容
   ============================================================ */
.main-content {
  max-width: calc(var(--shell) + 48px);
  margin: 0 auto;
  padding: clamp(78px, 6.5vw, 96px) 24px 64px;
  min-height: 100vh;
  animation: pageIn .35s cubic-bezier(.22,.8,.3,1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   动效层 — 页面切换 / 入场 stagger / 骨架屏
   ============================================================ */
#page-content { transition: opacity .22s ease, transform .22s ease; }
#page-content.out { opacity: 0; transform: translateY(10px); }

body.js-anim .reveal { opacity: 0; transform: translateY(12px); }
body.js-anim .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .5s cubic-bezier(.22,.8,.3,1), transform .5s cubic-bezier(.22,.8,.3,1);
  transition-delay: var(--d, 0ms);
}

.skel {
  background: var(--paper-deep);
  border-radius: 8px;
  animation: skelPulse 1.2s ease-in-out infinite;
}
@keyframes skelPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.btn:active { transform: translateY(1px) scale(.98); }

.progress-bar{height:10px;border-radius:999px;background:var(--bg-tertiary,#eef1f6);overflow:hidden;margin:6px 0 10px;}
.progress-fill{height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,#0095F6,#7C3AED);transition:width .35s ease;}
.progress-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--text-secondary);margin-bottom:14px;}
.progress-steps{list-style:none;padding:0;margin:0;display:grid;gap:8px;}
.progress-steps li{font-size:13px;color:var(--text-muted);display:flex;align-items:center;gap:8px;transition:color .3s;}
.progress-steps li.active{color:var(--ink);font-weight:600;}
.progress-steps li.done{color:var(--seal,#0095F6);}

.stat-flash { animation: statFlash .9s ease; }
@keyframes statFlash { 0% { color: var(--seal); } 100% { color: var(--ink); } }

/* 页内 Tab（预测 · 草稿合并页） */
.tab-row { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .18s ease;
}
.tab-btn:hover { color: var(--ink); background: var(--paper-deep); }
.tab-btn.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

@media (max-width: 860px) {
  body.js-anim .reveal { opacity: 1; transform: none; transition: none; }
}

.page-header { margin: 2px 0 24px; max-width: 720px; position: relative; }
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.page-desc { color: var(--ink-2); font-size: 14px; }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px;
}
.kicker::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--seal); }

/* ============================================================
   卡片 — 白卡、大圆角、柔投影
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* 卡片悬停轻抬：交互反馈；覆盖 reveal 入场 transform 与延迟 */
.card:hover,
body.js-anim .reveal.in.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(24, 18, 12, .10);
  transition: transform .22s ease, box-shadow .22s ease;
  transition-delay: 0ms;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.card-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }

/* ============================================================
   统计卡片
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card::before { content: none; }
.stat-label {
  font-size: 11.5px; color: var(--ink-3);
  font-family: var(--font-mono); letter-spacing: .4px;
  margin-bottom: 8px;
}
.stat-value { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.stat-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* 首次使用引导：替代空数据下的六张零值卡 */
.first-run { margin-bottom: 28px; }
.fr-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.fr-step {
  display: flex; align-items: flex-start; gap: 12px;
  text-align: left; cursor: pointer;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-xs);
  font-family: var(--font-sans);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.fr-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--ink-3); }
.fr-no {
  flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 600;
}
.fr-body { display: block; min-width: 0; }
.fr-body b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fr-body small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.fr-go { margin-left: auto; color: var(--ink-3); font-size: 14px; line-height: 22px; }
.stat-trend { font-size: 12px; font-weight: 500; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ============================================================
   表格 — 发丝线清单
   ============================================================ */
.table-wrapper { overflow-x: auto; margin: -4px -6px; padding: 4px 6px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  padding: 10px 14px;
  color: var(--ink-3);
  font-weight: 500;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: .6px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s ease; }
tbody tr:hover td { background: #faf9f5; }

/* ============================================================
   行内图标 — 页面 emoji 统一渲染为线性 SVG，与导航图标同风格
   ============================================================ */
.ico {
  width: 1.05em; height: 1.05em;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.18em;
  stroke: currentColor;
}
.empty-icon .ico { width: 34px; height: 34px; margin-bottom: 6px; }
.tl-icon .ico { width: 28px; height: 28px; }
.badge .ico { width: .95em; height: .95em; }
.card-title .ico, .detail-section-title .ico, .page-title .ico, .modal-title .ico { opacity: .68; }

/* ============================================================
   按钮 — 胶囊：墨黑主、浅纸次、语义软底
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-sans);
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 16px -8px rgba(17,17,16,.5); }
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(17,17,16,.55); }

.btn-secondary { background: #efede5; color: var(--ink); border-color: transparent; }
.btn-secondary:hover { background: #e7e3d8; }

.btn-success { background: rgba(31,122,77,.10); color: var(--success); border-color: rgba(31,122,77,.22); }
.btn-success:hover { background: rgba(31,122,77,.16); }

.btn-danger { background: rgba(179,64,47,.08); color: var(--danger); border-color: rgba(179,64,47,.2); }
.btn-danger:hover { background: rgba(179,64,47,.14); }

.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ============================================================
   表单
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12.5px; color: var(--ink-2);
  margin-bottom: 7px; font-weight: 500;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font-sans);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-3); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(17,17,16,.07);
}
.form-textarea {
  resize: vertical; min-height: 120px;
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.7;
}
.form-select { appearance: none; background-image: none; cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ============================================================
   徽章 — 软底胶囊
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 500; line-height: 1.7;
  white-space: nowrap;
}
.badge-success { background: rgba(31,122,77,.12); color: var(--success); }
.badge-warning { background: rgba(183,121,31,.13); color: var(--warning); }
.badge-danger  { background: rgba(179,64,47,.11); color: var(--danger); }
.badge-info    { background: rgba(47,93,140,.11); color: var(--info); }
.badge-primary { background: var(--seal-soft); color: var(--seal); }
.badge-secondary { background: rgba(148,163,184,.15); color: var(--text-secondary); }

/* 档位：火漆 S / 松绿 A / 靛蓝 B / 纸灰 C */
.tier-S { background: var(--seal); color: #fff; }
.tier-A { background: rgba(31,122,77,.14); color: var(--success); }
.tier-B { background: rgba(47,93,140,.13); color: var(--info); }
.tier-C { background: var(--paper-deep); color: var(--ink-2); }

/* ============================================================
   认证页
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  background:
    radial-gradient(820px 420px at 50% -8%, rgba(154,59,50,.08), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(17,17,16,.05), transparent 60%),
    var(--paper);
}
.auth-card {
  width: 100%; max-width: 430px;
  padding: 40px 38px 34px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo-icon {
  width: 66px; height: 66px; margin: 0 auto 18px;
  background: var(--ink); color: var(--paper);
  border-radius: 20px;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 600;
  box-shadow: 0 16px 32px -14px rgba(17,17,16,.55);
}
.auth-logo-icon img { width: 44px; height: auto; display: block; }
.auth-title { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.auth-subtitle { color: var(--ink-2); font-size: 13.5px; margin-top: 8px; line-height: 1.6; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 13px; color: var(--ink-2); }
.auth-switch a { color: var(--seal); cursor: pointer; font-weight: 500; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ============================================================
   详情 / 策略卡 / 凭证
   ============================================================ */
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.detail-section { margin-bottom: 24px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section-title {
  font-size: 13px; font-weight: 600; letter-spacing: .2px;
  margin-bottom: 13px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px;
}

.strategy-item {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 15px 16px;
  margin-bottom: 10px;
  border-left-width: 3px; border-left-style: solid; border-left-color: var(--line);
}
.strategy-item.copyable { border-left-color: var(--success); }
.strategy-item.avoid { border-left-color: var(--danger); }
.strategy-item.diff { border-left-color: var(--info); }
.strategy-item.compliance { border-left-color: var(--warning); }
.strategy-element { font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; }
.strategy-howto { font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.strategy-source { font-size: 11px; color: var(--ink-3); margin-top: 9px; font-family: var(--font-mono); }

.credential-box {
  background: #faf8f2;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  color: var(--seal-deep);
  line-height: 1.85;
}
.credential-label {
  font-size: 10.5px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 6px; font-family: var(--font-mono);
}

/* 八维小卡 */
.eight-dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
.dim-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 15px 13px;
  text-align: center;
}
.dim-name { font-size: 12px; color: var(--ink-2); margin-bottom: 7px; }
.dim-score { font-size: 23px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; line-height: 1.1; }
.dim-score-bar { height: 4px; background: var(--paper-deep); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.dim-score-fill { height: 100%; background: var(--ink); border-radius: 2px; }

/* 时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 5px; bottom: 5px;
  width: 1.5px; background: var(--line);
}
.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -24px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--ink);
}
.timeline-date { font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px; font-family: var(--font-mono); }
.timeline-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.timeline-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

/* ============================================================
   加载 / 空状态
   ============================================================ */
.loading {
  text-align: center; padding: 56px 20px;
  color: var(--ink-2); font-size: 13px;
}
.loading-spinner {
  display: inline-block; width: 26px; height: 26px;
  border: 2.5px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 48px 22px; color: var(--ink-3); font-size: 13.5px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .55; display: block; }

/* 账本校验 */
.verify-hero { text-align: center; padding: 46px 24px 34px; }
.verify-icon { font-size: 42px; line-height: 1; margin-bottom: 14px; }
.verify-status { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.verify-detail { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.verify-note {
  max-width: 620px; margin: 26px auto 0;
  font-size: 12.5px; line-height: 1.8; color: var(--ink-3);
  border-top: 1px solid var(--line-soft); padding-top: 20px;
}

/* 朱砂落款印：宋体标题旁一枚小方印，点到为止的文旅印记 */
.seal-mark {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; margin-left: 10px;
  vertical-align: 3px;
  background: linear-gradient(155deg, #a8443a, #8f332b);
  color: #fdf1ec;
  border-radius: 3px;
  font-family: var(--font-serif);
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 1px;
  writing-mode: vertical-rl; text-orientation: upright;
  transform: rotate(-4deg);
  box-shadow: 0 1px 2px rgba(143, 51, 43, .3);
  position: relative;
}
.seal-mark::after {
  content: ""; position: absolute; inset: 2px;
  border: 1px solid rgba(253, 241, 236, .75); border-radius: 2px;
}

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
  position: fixed; top: 92px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: calc(100vw - 40px);
}
.toast {
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 450;
  box-shadow: var(--shadow-lg);
  animation: toastIn .32s cubic-bezier(.22,.9,.3,1.1);
  max-width: 380px;
}
.toast.success { background: #16382a; }
.toast.error { background: #3d1c17; }
.toast.warning { background: #3a2c12; }
.toast.info { background: var(--ink); }
@keyframes toastIn {
  from { transform: translateY(-10px) scale(.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ============================================================
   弹窗
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(17, 17, 16, 0.42);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-box {
  width: 100%; max-width: 500px;
  max-height: 86vh; overflow-y: auto;
  border-radius: var(--r-lg) !important;
  padding: 26px !important;
  box-shadow: var(--shadow-lg);
  animation: modalIn .28s cubic-bezier(.22,.9,.3,1.05);
}
@keyframes modalIn {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line); gap: 12px;
}
.modal-close {
  background: var(--paper-deep); border: none; color: var(--ink-2);
  font-size: 13px; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; transition: all .16s ease; flex-shrink: 0;
}
.modal-close:hover { background: var(--seal); color: #fff; }

/* ============================================================
   视频过长居中提示弹窗（.tl-*）
   ============================================================ */
.tl-wrap { text-align: center; }
.tl-hero { padding: 6px 0 16px; }
.tl-icon {
  width: 60px; height: 60px; margin: 0 auto 14px;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 28px; line-height: 1;
  background: rgba(183, 121, 31, .10);
  border: 1px solid rgba(183, 121, 31, .28);
  animation: tlPulse 2.2s ease-in-out infinite;
}
@keyframes tlPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(183, 121, 31, .22); }
  50%      { box-shadow: 0 0 0 10px rgba(183, 121, 31, 0); }
}
.tl-lead { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.tl-lead b { color: var(--warning); }
.tl-sub { font-size: 12.5px; color: var(--text-muted); }

.tl-card {
  background: var(--paper-deep); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px; text-align: left; margin-bottom: 14px;
}
.tl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; }
.tl-k { font-size: 12.5px; color: var(--text-muted); flex-shrink: 0; }
.tl-v { font-size: 13px; color: var(--ink); text-align: right; word-break: break-all; }
.tl-v.tl-strong { color: var(--warning); font-weight: 600; font-size: 14px; }

.tl-bar {
  position: relative; height: 8px; margin-top: 10px;
  background: rgba(183, 121, 31, .12); border-radius: 999px; overflow: hidden;
}
.tl-bar-fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, #d99a2b, var(--warning));
  border-radius: 999px; animation: tlFill .8s cubic-bezier(.16,1,.3,1) both;
}
.tl-bar-limit { position: absolute; top: -3px; bottom: -3px; left: 100%; display: none; }
@keyframes tlFill { from { width: 0 !important; } }
.tl-bar-note { margin-top: 6px; font-size: 12px; color: var(--text-muted); text-align: right; }
.tl-bar-note b { color: var(--warning); }

.tl-why, .tl-actions {
  text-align: left; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px 12px 16px; margin-bottom: 12px; background: var(--paper);
}
.tl-why { border-left: 3px solid var(--warning); }
.tl-actions { border-left: 3px solid var(--seal); }
.tl-why-h, .tl-actions-h { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.tl-why ul, .tl-actions ol { margin: 0; padding-left: 18px; }
.tl-why li, .tl-actions li { font-size: 12.5px; line-height: 1.7; color: var(--text-secondary); }
.tl-actions li { margin-bottom: 2px; }
.tl-why li b, .tl-actions li b { color: var(--ink); }

.tl-btn { width: 100%; margin-top: 4px; padding: 11px 0; font-size: 14px; }
@media (max-width: 520px) {
  .tl-icon { width: 50px; height: 50px; font-size: 24px; }
  .tl-lead { font-size: 15px; }
}

/* ============================================================
   杂项小结构（页面内联依赖）
   ============================================================ */
code, .mono { font-family: var(--font-mono); font-size: .92em; }
del { color: var(--danger); opacity: .85; }
a { color: var(--seal); }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* 浏览器原生 prompt/alert 无法换肤，数字滚动条暖化 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d8d3c5; border-radius: 8px; border: 3px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1380px) {
  .console-email { display: none; }
}

@media (max-width: 1240px) {
  .console-nav { gap: 1px; mask-image: none; }
  .console-nav-item { padding: 0 10px; gap: 6px; font-size: 13px; }
  .console-sep { display: none; }
  .console-brand { padding-right: 10px; gap: 8px; }
  .console-user { padding-left: 10px; gap: 7px; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1600px) {
  :root { --shell: 1360px; }
}

@media (max-width: 1080px) {
  .console-word small { display: none; }
  .console > .console-nav { display: none; }
  .console-burger { display: grid; place-items: center; margin-left: 0; }
  .console-user { margin-left: auto; }
}

@media (max-width: 860px) {
  .console-user { padding-left: 10px; }
  .main-content { padding: 76px 18px 56px; }
  .stats-grid { gap: 10px; }
  .auth-card { padding: 32px 24px 28px; }
}

@media (max-width: 480px) {
  .console { height: 56px; padding: 0 14px; gap: 8px; }
  .console-word b { font-size: 14px; }
  .console-user .console-logout { display: none; }
  .main-content { padding: 74px 14px 44px; }
  .stats-grid { grid-template-columns: 1fr; }
  .toast-container { right: 14px; left: 14px; align-items: stretch; }
  .toast { max-width: none; }
}

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


/* —— 导航栏视觉微调 —— */
.console-nav-item { border-radius: 999px; transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.console-nav-item:hover { transform: translateY(-1px); }
.console-nav-item.active { box-shadow: 0 2px 10px rgba(26, 22, 16, .16); }
.console-sep { opacity: .75; }

/* —— 每页小精灵助手 —— */
.sprite-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 52px; height: 52px;
  display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%;
  background: linear-gradient(150deg, #fffdf8, #f4ece0); color: var(--accent-dark); font-size: 22px;
  box-shadow: 0 6px 20px rgba(24, 18, 12, .16); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.sprite-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 26px rgba(24, 18, 12, .2); }
.sprite-fab.open { transform: scale(.92); }
.sprite-panel { position: fixed; right: 22px; bottom: 86px; z-index: 60; width: 340px; max-width: calc(100vw - 32px);
  height: 440px; max-height: calc(100vh - 120px); display: none; flex-direction: column;
  background: var(--bg-card, #fffdf8); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(24, 18, 12, .22); overflow: hidden; }
.sprite-panel.open { display: flex; }
.sprite-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent-dark, #8f332b), #a8443a); color: #fdf1ec; }
.sprite-head-title { font-family: var(--font-serif); font-size: 14px; font-weight: 700; letter-spacing: .5px; }
.sprite-close { background: none; border: none; color: #fdf1ec; font-size: 15px; cursor: pointer; opacity: .85; }
.sprite-close:hover { opacity: 1; }
.sprite-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-secondary, #f7f1e7); }
.sprite-msg { max-width: 86%; padding: 8px 11px; border-radius: 10px; font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; }
.sprite-msg.bot { align-self: flex-start; background: #fffdf8; border: 1px solid var(--border); color: var(--text-primary); }
.sprite-msg.user { align-self: flex-end; background: var(--accent-dark, #8f332b); color: #fdf1ec; border: 1px solid transparent; }
.sprite-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: #fffdf8; }
.sprite-input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 13px; color: var(--text-primary);
  background: var(--bg-secondary, #f7f1e7); border: 1px solid var(--border); border-radius: 8px; outline: none; }
.sprite-input:focus { border-color: var(--accent-dark, #8f332b); }
.sprite-send { padding: 8px 14px; font-size: 13px; color: #fdf1ec; background: var(--accent-dark, #8f332b);
  border: none; border-radius: 8px; cursor: pointer; }
.sprite-send:hover { filter: brightness(1.08); }
