/* ==========================================================================
   天机神算 · 前端样式
   ========================================================================== */

:root {
  --navy-900: #070b1f;
  --navy-800: #0b1030;
  --navy-700: #131a45;
  --navy-600: #1c2456;
  --gold-300: #ffe9a8;
  --gold-400: #f5d67b;
  --gold-500: #e8bf5c;
  --gold-600: #c99a24;
  --primary: #5b7cfa;
  --primary-dark: #4a63e7;
  --violet: #8b5cf6;
  --primary-gradient: linear-gradient(135deg, #5b7cfa 0%, #8b5cf6 100%);
  --green: #22c55e;
  --green-dark: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-1: #1a2340;
  --text-2: #59617f;
  --text-3: #8b93ad;
  --line: #e9ecf5;
  --bg: #f4f6fb;
  --card: #ffffff;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(23, 32, 80, 0.06);
  --shadow-md: 0 8px 24px rgba(23, 32, 80, 0.1);
  --shadow-lg: 0 18px 48px rgba(10, 16, 48, 0.28);
  --header-h: 56px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
  color: var(--text-1);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary); text-decoration: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cfd6e6; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }
.muted { color: var(--text-3); }
.center { text-align: center; }
.nowrap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

.login-page {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(1000px 600px at 15% 0%, rgba(88, 108, 240, 0.28), transparent 60%),
    radial-gradient(900px 700px at 90% 100%, rgba(139, 92, 246, 0.22), transparent 60%),
    linear-gradient(160deg, #0a1030 0%, #0d1436 45%, #131a45 100%);
}

.login-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-stars i {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #cbd6ff;
  opacity: 0.35;
  animation: starFloat linear infinite;
}
@keyframes starFloat {
  0% { transform: translateY(0) scale(0.8); opacity: 0.15; }
  50% { opacity: 0.6; }
  100% { transform: translateY(-90px) scale(1.1); opacity: 0; }
}

.login-card {
  position: relative;
  width: 372px;
  max-width: calc(100vw - 32px);
  padding: 34px 30px 30px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(35, 43, 92, 0.86) 0%, rgba(23, 30, 70, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  color: #eef1ff;
}

.login-logo { display: flex; justify-content: center; margin-bottom: 10px; }
.login-logo img { width: 108px; height: 108px; filter: drop-shadow(0 6px 18px rgba(232, 191, 92, 0.35)); }

.login-title {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0 0 6px;
  background: linear-gradient(180deg, #ffe9a8 0%, #f2c14e 55%, #d9a730 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub { text-align: center; color: #a9b2d8; font-size: 13px; margin-bottom: 16px; }

.login-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.login-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: #cdd6ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-tabs { display: flex; gap: 6px; margin-bottom: 14px; background: rgba(255,255,255,.05); padding: 4px; border-radius: 12px; }
.login-tabs button {
  flex: 1;
  padding: 8px 0;
  border-radius: 9px;
  color: #aab3da;
  font-size: 13px;
  transition: all .18s ease;
}
.login-tabs button.active { background: rgba(91, 124, 250, .28); color: #fff; box-shadow: inset 0 0 0 1px rgba(140, 165, 255, .35); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: #99a3c9; margin-bottom: 6px; padding-left: 2px; }
.field-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid transparent;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.field-box:focus-within { border-color: rgba(140, 165, 255, .9); box-shadow: 0 0 0 3px rgba(91, 124, 250, .22); }
.field-box svg { flex: none; color: #9aa3c4; }
.field-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 13px 0;
  color: #1a2340;
  font-size: 14px;
}

.btn-primary {
  width: 100%;
  padding: 13px 0;
  border-radius: 999px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 10px 24px rgba(93, 113, 245, 0.38);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(93, 113, 245, 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.login-hint { margin-top: 14px; text-align: center; font-size: 12px; color: #8b94bb; }
.login-error {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, .14);
  border: 1px solid rgba(239, 68, 68, .35);
  color: #ffc9c9;
  font-size: 12.5px;
}

/* ------------------------------- 应用框架 ------------------------------- */

.app { height: 100%; display: flex; flex-direction: column; background: var(--bg); }

.app-header {
  position: relative;
  z-index: 20;
  flex: none;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(90deg, #0a1030 0%, #131a45 55%, #161d4d 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(10, 16, 48, .25);
}

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #e7ebff;
  transition: background .16s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }

.brand { display: flex; align-items: center; gap: 7px; }
.brand img { width: 30px; height: 30px; }
.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #ffe9a8, #e8bf5c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

/* 顶部公告：横向流动字幕 */
.notice-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  background: linear-gradient(90deg, #fff8e6, #fffdf7 60%, #fff8e6);
  border-bottom: 1px solid #f2e4c4;
  color: #8a6a18;
  font-size: 12.5px;
  overflow: hidden;
}
.notice-bar .notice-icon { flex: none; display: inline-flex; color: #d9a730; }
.notice-viewport { flex: 1; min-width: 0; overflow: hidden; }
.notice-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation-name: noticeScroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.notice-track span { padding-right: 90px; }
.notice-viewport:hover .notice-track { animation-play-state: paused; }
@keyframes noticeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: rgba(91, 124, 250, .18);
  border: 1px solid rgba(140, 165, 255, .35);
  color: #ffe9a8;
  font-weight: 600;
  font-size: 13px;
}
.points-pill svg { color: var(--gold-500); }

.app-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.app-body { flex: 1; display: flex; min-height: 0; }

/* 左侧常驻功能导航（宽屏显示，窄屏自动切换为抽屉） */
.app-side {
  display: none;
  width: 212px;
  flex: none;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 16px;
  background: linear-gradient(180deg, #161d4a 0%, #131a45 100%);
  color: #e8ecff;
  border-right: 1px solid rgba(255, 255, 255, .07);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.app-side::-webkit-scrollbar { width: 6px; }
.app-side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 6px; }
.app-side .side-title {
  font-size: 13px;
  color: #98a3d0;
  letter-spacing: 1px;
  padding: 2px 8px 6px;
}
.app-side .nav-list { gap: 6px; }
.app-side .nav-item { padding: 11px 12px; font-size: 13.5px; }
.app-side .nav-account { margin-top: auto; }
.app-side .nav-account .row { font-size: 12.5px; }

@media (min-width: 768px) {
  .app-side { display: flex; }
  .nav-toggle-btn { display: none !important; }
}

.page { min-height: 100%; }

/* 顶部工具栏 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 12;
}
.toolbar .spacer { flex: 1; }

.toolbar-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f6f8fd;
  color: var(--text-2);
  font-size: 12.5px;
  outline: none;
}
.toolbar-select:focus { border-color: rgba(140, 165, 255, .9); }

.icon-btn.active { color: #5b7cfa; background: #eef2ff; }

/* 浅色工具栏里的图标按钮需要深色图标（默认样式是给深色顶栏用的） */
.toolbar .icon-btn { color: #7d88a6; }
.toolbar .icon-btn:hover { background: #eef1f9; }
.toolbar .icon-btn.active { color: #5b7cfa; background: #eef2ff; }

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: #94a3c4;
  transition: filter .15s ease;
}
.btn-tool:hover { filter: brightness(1.05); }
.btn-tool.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.btn-tool.gray { background: linear-gradient(135deg, #97a1bb, #7d88a6); }
.btn-tool.blue { background: var(--primary-gradient); }
.btn-tool.gold { background: linear-gradient(135deg, #f0b429, #d99b12); }
.btn-tool.ghost { background: #eef1f9; color: var(--text-2); }
.btn-tool.small { padding: 7px 12px; font-size: 12.5px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(233, 236, 245, .9);
}

.panel { margin: 12px; padding: 14px; }

/* 底部悬浮 */
.quick-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b7cfa, #8b5cf6);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 26px rgba(91, 124, 250, .42);
}
.quick-start .count { font-weight: 700; }

.fab {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b7cfa, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(91, 124, 250, .42);
}

/*
 * 底部操作条：滚动时贴在窗口底部，滚到底后回到内容末尾，
 * 因此永远不会盖住页面内容（比如「查看完整估价报告」按钮）。
 */
.float-bar {
  position: sticky;
  bottom: 10px;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  margin-top: 10px;
  pointer-events: none;
}
.float-bar > * { pointer-events: auto; }

/* 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 24px;
  text-align: center;
  color: var(--text-3);
}
.empty .empty-icon {
  width: 68px; height: 68px;
  border-radius: 20px;
  background: #eef1fb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #9fb0e8;
}
.empty h4 { margin: 0 0 6px; font-size: 15px; color: var(--text-2); font-weight: 600; }
.empty p { margin: 0; font-size: 12.5px; }

/* 抽屉/弹层 */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 42, .45);
  backdrop-filter: blur(1px);
  z-index: 40;
  opacity: 0;
  animation: fadeIn .2s ease forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

.nav-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: linear-gradient(180deg, #161d4a 0%, #131a45 100%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 20px;
  color: #e8ecff;
  box-shadow: 12px 0 40px rgba(8, 12, 34, .45);
  animation: slideInLeft .22s ease;
}
@keyframes slideInRight { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-24px); opacity: .4; } to { transform: none; opacity: 1; } }

.nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nav-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #dfe5ff; }
.nav-list { display: flex; flex-direction: column; gap: 8px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
  color: #dfe5ff;
  font-size: 14px;
  text-align: left;
  transition: all .16s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .09); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(91, 124, 250, .35), rgba(139, 92, 246, .28));
  border-color: rgba(140, 165, 255, .5);
  color: #fff;
}
.nav-item svg { flex: none; color: #93a3e8; }
.nav-item.active svg { color: #cdd8ff; }

.nav-account {
  margin-top: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(11, 16, 48, .55);
  border: 1px solid rgba(255, 255, 255, .07);
}
.nav-account .row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #b9c2e8; }
.nav-account .row b { color: #ffe9a8; font-weight: 600; }
.nav-logout {
  margin-top: 10px;
  width: 100%;
  padding: 11px 0;
  border-radius: 12px;
  border: 1px solid rgba(140, 165, 255, .45);
  color: #a9bbff;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(91, 124, 250, .12);
}
.nav-logout:hover { background: rgba(91, 124, 250, .22); }

.nav-redeem {
  margin-top: 10px;
  width: 100%;
  padding: 11px 0;
  border-radius: 12px;
  border: 1px solid rgba(245, 214, 123, .45);
  color: #ffe9a8;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(245, 214, 123, .12);
}
.nav-redeem:hover { background: rgba(245, 214, 123, .22); }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 88vh;
  background: linear-gradient(180deg, #1d2456 0%, #171e4c 100%);
  border-radius: 22px 22px 0 0;
  z-index: 50;
  color: #e9ecff;
  display: flex;
  flex-direction: column;
  animation: slideUp .25s ease;
  box-shadow: 0 -14px 40px rgba(8, 12, 34, .45);
}
.sheet.light { background: #fff; color: var(--text-1); }
@keyframes slideUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }

.sheet-head {
  flex: none;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sheet.light .sheet-head { border-bottom-color: var(--line); }
.sheet-head .title { font-size: 15px; font-weight: 600; }
.sheet-head .sub { font-size: 12px; color: #9aa4cd; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 18px 20px; }
.sheet-foot {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.sheet.light .sheet-foot { border-top-color: var(--line); }

/* 提示 */
.toast-wrap {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(20, 26, 60, .92);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  animation: toastIn .2s ease;
  max-width: 82vw;
}
.toast.error { background: rgba(190, 44, 44, .95); }
.toast.success { background: rgba(21, 128, 61, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 加载 */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.spinner.dark { border-color: rgba(91, 124, 250, .3); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
}

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row > label { display: block; font-size: 12.5px; color: #a3abd0; margin-bottom: 6px; }
.sheet.light .form-row > label { color: var(--text-2); }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
  color: inherit;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input::placeholder, .textarea::placeholder { color: #7f89b4; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(140, 165, 255, .8); box-shadow: 0 0 0 3px rgba(91, 124, 250, .18); }
.select option { color: #1a2340; }

.light .input, .light .select, .light .textarea,
.card .input, .card .select, .card .textarea {
  background: #f7f8fd;
  border-color: var(--line);
  color: var(--text-1);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: #ccd4f5;
  font-size: 12.5px;
  transition: all .14s ease;
}
.chip:hover { border-color: rgba(140, 165, 255, .6); color: #fff; }
.chip.active {
  background: linear-gradient(135deg, rgba(91, 124, 250, .85), rgba(139, 92, 246, .85));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.field-group { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed rgba(255, 255, 255, .1); }
.field-group:last-child { border-bottom: none; }
.field-group > h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #ffeed0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.field-group > h4 .badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(91, 124, 250, .25);
  color: #bcc9ff;
  font-weight: 500;
}

.num-range { display: flex; align-items: center; gap: 8px; }
.num-range input { flex: 1; }
.num-range span { color: #8e97bd; }

/* 估价结果：数值行 */
.value-line { display: flex; align-items: baseline; gap: 8px; font-size: 15px; margin: 7px 0; }
.value-line .k { color: #7d879f; font-size: 14px; }
.value-line .v { font-weight: 700; color: #2b3556; }
.value-line .v.gold { color: #d99b12; }
.value-line .v.primary { color: var(--primary-dark); }
.value-line .warn { color: var(--warning); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  background: #eef1fb;
  color: #5b6b9c;
}
.tag.green { background: #e7f8ee; color: #17803d; }
.tag.red { background: #fdecec; color: #c02b2b; }
.tag.gold { background: #fdf4e0; color: #a9761a; }
.tag.blue { background: #eef2ff; color: #4457d0; }

/* ------------------------------- 监控页 ------------------------------- */

.role-list { padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.role-card { padding: 14px; position: relative; }
.role-card.is-new { animation: cardIn .5s ease; }
.role-card.is-new { border-color: rgba(34, 197, 94, .45); box-shadow: 0 2px 14px rgba(34, 197, 94, .12); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.role-card .rc-head { display: flex; align-items: flex-start; gap: 10px; }
.role-card .rc-title { flex: 1; min-width: 0; }
.role-card .rc-title h4 { margin: 0; font-size: 16px; font-weight: 700; color: #24305a; }
.role-card .rc-title .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.role-card .rc-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 10px; }
.role-card .rc-values .item { background: #f7f8fd; border-radius: 10px; padding: 9px 10px; text-align: center; }
.role-card .rc-values .item .k { font-size: 11.5px; color: var(--text-3); }
.role-card .rc-values .item .v { font-size: 15px; font-weight: 700; color: #2b3556; margin-top: 2px; }
.role-card .rc-values .item .v.green { color: #17803d; }
.role-card .rc-values .item .v.red { color: #c02b2b; }
.role-card .rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.role-card .rc-foot { display: flex; gap: 8px; align-items: center; }

.heart-btn { color: #b9c1d8; }
.heart-btn.active { color: #ef4d6a; }

/* ------------------------------ 评估输入区 ------------------------------ */

.search-card {
  margin: 12px;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.link-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8f9fd;
}
.link-input input { flex: 1; border: none; outline: none; background: transparent; font-size: 13.5px; }

/* 输入框右侧的清除按钮 */
.input-clear {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: #8b93ad;
  background: #eef1f8;
  transition: background .15s ease, color .15s ease;
}
.input-clear.show { display: inline-flex; }
.input-clear:hover { background: #e0e5f2; color: #3f4a72; }
.input-clear svg { width: 13px; height: 13px; }

.hint-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--warning);
  margin-top: 10px;
}

/* ------------------------------ 详情报告 ------------------------------ */

.detail-wrap { padding: 10px 12px 96px; }
.detail-card { padding: 18px 16px; position: relative; }
.detail-card .dc-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; }
.detail-card .dc-actions button { color: #8f9ac0; padding: 6px; border-radius: 8px; }
.detail-card .dc-actions button:hover { background: #f1f3fa; }
.search-card .dc-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.search-card .dc-actions button { color: #8f9ac0; padding: 9px; border-radius: 10px; }
.search-card .dc-actions button svg { width: 26px; height: 26px; }
.search-card .dc-actions button:hover { background: #f1f3fa; }

.detail-title { font-size: 22px; font-weight: 800; color: #2b3556; margin: 4px 0 8px; padding-right: 100px; }
.detail-sub {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3); margin-bottom: 14px;
}
.detail-sub .bar { width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #5b7cfa, #8b5cf6); }

.collapse {
  border-top: 1px solid var(--line);
}
.collapse:first-child { border-top: none; }
.collapse-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 2px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: #2b3556;
}
.collapse-head .arrow { transition: transform .2s ease; color: #9aa3c0; }
.collapse.open .collapse-head .arrow { transform: rotate(90deg); }
.collapse-head .amount { margin-left: auto; font-size: 14px; color: #3c476b; font-weight: 700; }
.collapse-body { display: none; padding: 2px 2px 14px; }
.collapse.open .collapse-body { display: block; }

/* 二级折叠：带独立箭头 + 层级缩进 */
.sub-collapse { border-top: 1px dashed var(--line); position: relative; }
.sub-collapse::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: #eef1f8;
}
.sub-collapse.open::before { background: #dfe6ff; }
.sub-collapse-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 10px 12px;
  font-size: 13.5px;
  color: #46527a;
  font-weight: 600;
  text-align: left;
}
.sub-collapse-head:hover { color: #3b4bd8; }
.sub-collapse-head .arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: #f2f5fd;
  color: #8f9ac0;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.sub-collapse-head .arrow svg { width: 11px; height: 11px; }
.sub-collapse.open .sub-collapse-head .arrow {
  transform: rotate(90deg);
  background: #e8eeff;
  color: #4a63e7;
}
.sub-collapse-head[data-empty] { cursor: default; opacity: .72; }
.sub-collapse-head[data-empty] .arrow { background: #f6f7fb; color: #c2c9db; }
.sub-collapse-head .sub-name { flex: 1; min-width: 0; }
.sub-collapse-head .sub-badge {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef1fb;
  color: #6b78a8;
  font-size: 11px;
  font-weight: 500;
}
.sub-collapse-head .sub-badge.muted-badge { background: #f5f6fa; color: #a6aec6; }
.sub-collapse-head .amount { margin-left: auto; color: #3c476b; flex: none; }
.sub-collapse-body { display: none; padding: 0 0 12px 30px; }
.sub-collapse.open .sub-collapse-body { display: block; }

.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: var(--text-2); }
.kv-row b { color: #2b3556; font-weight: 600; }

.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.item-row:last-child { border-bottom: none; }
.item-row .name { flex: 1; min-width: 0; color: #34405f; }
.item-row .note { font-size: 11.5px; color: var(--text-3); }
.item-row .price { font-weight: 700; color: #d99b12; }
.item-actions { display: flex; gap: 6px; flex: none; }
.mini-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7f8fd;
  color: #5b6b9c;
  font-size: 11.5px;
  line-height: 1.7;
  transition: all .15s ease;
}
.mini-btn:hover { background: #eef2ff; border-color: #c9d4ff; color: #3b4bd8; }

.market-block { margin-bottom: 14px; }
.market-block h5 { margin: 0 0 8px; font-size: 13px; color: #46527a; }
.market-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f8fd;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: #45507a;
}
.market-item .price { font-weight: 700; color: #2b3556; }
.market-item .diff.up { color: #c02b2b; }
.market-item .diff.down { color: #17803d; }

.ai-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f4f7ff 0%, #f7f4ff 100%);
  border: 1px solid #e6e9fb;
}
.ai-card h4 { margin: 0 0 8px; font-size: 14px; color: #3b4680; display: flex; align-items: center; gap: 6px; }
.ai-card p { margin: 0 0 10px; font-size: 13px; color: #4a5578; line-height: 1.7; }
.ai-card ul { margin: 0 0 10px; padding-left: 18px; font-size: 12.5px; color: #55608a; }
.ai-card li { margin-bottom: 4px; }

.warning-box {
  margin: 10px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8e8;
  border: 1px solid #f6e3b8;
  color: #8a6a18;
  font-size: 12.5px;
}

/* 目录 */
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: #3f4a72;
  text-align: left;
  width: 100%;
}
.toc-item:hover { background: #f4f6fd; }
.toc-item.level-2 { padding-left: 24px; font-size: 12.5px; color: #6b7599; }
.toc-item .amount { color: #8a93b5; font-size: 12.5px; }
.toc-item.active { background: #eef2ff; color: #3b4bd8; font-weight: 600; }

/* 积分记录 */
.points-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.points-summary .item {
  background: #f7f8fd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  text-align: center;
}
.points-summary .k { font-size: 11.5px; color: var(--text-3); }
.points-summary .v { font-size: 17px; font-weight: 800; color: #1c2547; margin-top: 2px; }
.points-summary .v.green { color: #17803d; }

/* 通用三格数据卡（物品价格参考等弹窗使用） */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.mini-stats .item {
  background: #f7f8fd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.mini-stats .k { font-size: 11.5px; color: var(--text-3); }
.mini-stats .v { font-size: 17px; font-weight: 800; color: #1c2547; margin-top: 2px; }

.log-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.log-item:last-child { border-bottom: none; }
.log-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.log-head .amount { margin-left: auto; font-weight: 700; font-size: 15px; color: #c02b2b; }
.log-head .amount.plus { color: #17803d; }
.log-title { font-size: 13.5px; color: #2b3556; margin: 5px 0 3px; font-weight: 600; }
.log-sub { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-reply {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef7f1;
  border: 1px solid #d6ecdf;
  color: #22684a;
  font-size: 12.5px;
  white-space: pre-wrap;
}

/* 快速开始 */
.guide-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-step:last-child { border-bottom: none; }
.guide-step .no {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #eef1fb; color: #6b78a8; font-size: 13px; font-weight: 700;
}
.guide-step.done .no { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }
.guide-step h5 { margin: 0 0 3px; font-size: 13.5px; color: #2b3556; }
.guide-step p { margin: 0; font-size: 12.5px; color: var(--text-3); }

/* 表格（普通用户较少使用） */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--text-3); font-weight: 600; background: #fafbff; }

@media (max-width: 480px) {
  .role-card .rc-values { grid-template-columns: repeat(3, 1fr); }
  .detail-title { font-size: 19px; }
}

@media (min-width: 900px) {
  .page > * { max-width: 880px; margin-left: auto; margin-right: auto; }
  .page > .toolbar { max-width: none; margin: 0; }
  .page.wide > * { max-width: 1080px; }
}
