/* ============================================================
 * 客户工作台 · 暗夜霓虹主题（稿 B 落地版）
 * 炭黑底 + 玻璃拟态 + 荧光点缀；涨红跌绿（中国习惯）
 * ============================================================ */
:root {
  --bg: #0d0f12;
  --bg-soft: #12151a;
  --surface: rgba(255, 255, 255, .045);
  --surface-strong: rgba(255, 255, 255, .07);
  --surface-solid: #161a20;
  --text: #f2f4f6;
  --muted: #9aa3ad;
  --faint: #6b7480;
  --line: rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .055);
  --lime: #c6f24e;
  --cyan: #3ee6c4;
  --coral: #ff5c7a;
  --amber: #ffc53d;
  --lime-soft: rgba(198, 242, 78, .13);
  --cyan-soft: rgba(62, 230, 196, .12);
  --coral-soft: rgba(255, 92, 122, .13);
  --amber-soft: rgba(255, 197, 61, .13);
  /* 涨红跌绿 */
  --up: #ff6b7f;
  --up-soft: rgba(255, 107, 127, .13);
  --down: #3ee6a4;
  --down-soft: rgba(62, 230, 164, .12);
  --shadow: 0 18px 44px -18px rgba(0, 0, 0, .55);
  --glow-lime: 0 0 0 1px rgba(198, 242, 78, .35), 0 10px 32px -10px rgba(198, 242, 78, .28);
  --radius: 8px;
  --sidebar: 232px;
  --font-d: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-b: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.5;
}
/* 细网格保留主题辨识度，不依赖图片或外部资源。 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(1200px 800px at 50% 0%, #000 30%, transparent 100%);
}
a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(198, 242, 78, .3); }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------------- 壳与导航 ---------------- */
.app-shell { position: relative; z-index: 1; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 26px 16px;
  border-right: 1px solid var(--line);
  background: rgba(13, 15, 18, .82);
  backdrop-filter: blur(18px);
  color: var(--text);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.25; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #0d0f12;
  font-family: var(--font-d);
  font-size: 19px;
  box-shadow: 0 8px 24px -8px rgba(62, 230, 196, .55);
}
.brand small { display: block; margin-top: 3px; color: var(--faint); font-size: 9.5px; font-weight: 600; letter-spacing: .14em; }
.main-nav { display: grid; gap: 3px; }
.nav-label { padding: 15px 11px 5px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.main-nav a {
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13.5px;
  transition: color .2s, background .2s, transform .2s;
}
.main-nav a:hover { background: var(--surface-strong); color: var(--text); transform: translateX(3px); }
.main-nav a.active {
  background: linear-gradient(120deg, rgba(62, 230, 196, .16), rgba(198, 242, 78, .12));
  color: var(--lime);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(198, 242, 78, .22);
}
.main-nav a.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(var(--cyan), var(--lime));
  box-shadow: 0 0 12px rgba(198, 242, 78, .8);
  transform: translateY(-50%);
}
.sidebar-note {
  margin: auto 2px 14px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.7;
}
.sidebar-note strong { display: block; margin-bottom: 3px; color: var(--lime); font-family: var(--font-d); font-size: 13px; font-weight: 700; }
.logout-form { margin-top: 0; }
.sidebar .button.quiet { color: var(--muted); border-color: var(--line); background: transparent; }
.sidebar .button.quiet:hover { color: var(--text); border-color: rgba(255, 255, 255, .25); }
.content { position: relative; z-index: 1; margin-left: var(--sidebar); padding: 36px 40px 80px; min-height: 100vh; }
.mobile-nav { display: none; }

/* ---------------- 页头 ---------------- */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto 26px;
  max-width: 1180px;
}
.page-head h1 { margin: 3px 0 0; font-family: var(--font-d); font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.25; letter-spacing: .01em; }
.dashboard-head h1 { font-size: clamp(26px, 3vw, 36px); }
.eyebrow { margin: 0 0 7px; color: var(--lime); font-size: 10.5px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.subline { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
h2 { margin: 0; font-family: var(--font-d); font-size: 18px; font-weight: 700; letter-spacing: .01em; }
h3 { letter-spacing: .01em; }

/* ---------------- 按钮 ---------------- */
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s cubic-bezier(.23, 1, .32, 1), box-shadow .25s, border-color .2s, background .2s;
}
.button:hover { border-color: rgba(255, 255, 255, .28); background: var(--surface-strong); transform: translateY(-1px); }
.button:active { transform: scale(.97); }
.button.primary {
  border-color: transparent;
  background: linear-gradient(120deg, var(--cyan), var(--lime));
  color: #0d0f12;
  font-weight: 750;
  box-shadow: 0 8px 26px -8px rgba(62, 230, 196, .5);
}
.button.primary:hover { box-shadow: 0 12px 34px -8px rgba(198, 242, 78, .55); filter: brightness(1.06); }
.button.secondary { background: var(--surface); }
.button.quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.button.quiet:hover { color: var(--text); }
.button.full { width: 100%; }
.button.compact-button, .compact-actions .button { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.button-row form { margin: 0; }
.compact-actions { margin-top: 0; justify-content: flex-end; }
.confirmation-grid { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) auto; gap: 10px; align-items: end; width: 100%; }
.confirmation-grid label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.confirmation-grid input { min-width: 0; width: 100%; }

/* ---------------- 通用面板 ---------------- */
.panel, .form-panel, .preview-panel, .metric-grid, .day-score, .next-client-card,
.portfolio-band, .market-panel, .quality-item, .login-panel, .detail-strip,
.product-snapshot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.panel { min-width: 0; padding: 22px; }
.wide-panel { max-width: 1180px; margin: 0 auto 18px; }
.focus-panel { border-top: 2px solid var(--lime); }
.focus-name { display: inline-block; margin-top: 13px; font-size: 25px; font-weight: 760; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-head > a { font-size: 13px; font-weight: 650; }
.section-head > a:hover { text-decoration: underline; }
.muted, .empty { color: var(--muted); }
.empty { margin: 14px 0; text-align: center; }
.empty-state { margin: 18px 0; color: var(--muted); font-size: 12.5px; }
.line-clamp { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wrap-text { overflow-wrap: anywhere; }
.home-grid, .two-column { max-width: 1180px; margin: 0 auto 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.compact-list { display: grid; }
.compact-list > a { min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); color: var(--text); }
.compact-list > a:first-child { border-top: 0; }
.compact-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-list time, .compact-list small { color: var(--muted); font-size: 12px; }

/* ---------------- 指标 ---------------- */
.metric-grid { max-width: 1180px; margin: 0 auto 18px; display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); overflow: hidden; }
.metric { min-width: 0; min-height: 92px; padding: 18px 20px; border-right: 1px solid var(--line-soft); }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: 12.5px; }
.metric strong { display: block; margin-top: 7px; font-family: var(--font-d); font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.compact-metrics { grid-template-columns: repeat(3, 1fr); }

/* ---------------- 首页 ---------------- */
.day-workbench { max-width: 1180px; margin: 0 auto 16px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); gap: 16px; }
.day-score {
  position: relative;
  min-height: 264px;
  padding: 30px 32px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(62, 230, 196, .14), rgba(198, 242, 78, .08) 55%, rgba(255, 92, 122, .07));
}
.day-score > p { margin: 0; color: var(--lime); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; }
.day-score > div { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; }
.day-score > div strong {
  font-family: var(--font-d);
  font-size: 72px;
  font-weight: 700;
  line-height: .95;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(115deg, var(--cyan), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.day-score > div span { color: var(--muted); font-size: 17px; }
.day-score > small { display: block; margin-top: 14px; color: var(--muted); }
.day-score dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.day-score dl > div { padding-right: 18px; min-width: 0; }
.day-score dt { color: var(--faint); font-size: 11px; }
.day-score dd { margin: 5px 0 0; font-family: var(--font-d); font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; }

.next-client-card { min-width: 0; padding: 26px; }
.next-client-card::before { content: ""; display: block; width: 30px; height: 3px; margin-bottom: 20px; border-radius: 2px; background: linear-gradient(90deg, var(--coral), var(--amber)); box-shadow: 0 0 14px rgba(255, 92, 122, .7); }
.next-client { display: inline-block; margin-top: 8px; color: var(--text); font-family: var(--font-d); font-size: 32px; font-weight: 700; border-bottom: 2px solid rgba(62, 230, 196, .4); transition: border-color .2s; }
.next-client:hover { border-color: var(--lime); }
.next-reason { margin: 9px 0 0; color: var(--cyan); font-weight: 600; font-size: 14px; }
.last-contact { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12.5px; }
.all-done { display: block; margin-top: 30px; font-family: var(--font-d); font-size: 21px; color: var(--lime); }

.action-rail {
  max-width: 1180px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.action-rail > a { min-width: 0; min-height: 96px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-content: center; padding: 16px 20px; border-right: 1px solid var(--line-soft); color: var(--text); transition: background .2s; }
.action-rail > a:first-child { padding-left: 2px; }
.action-rail > a:last-child { border-right: 0; }
.action-rail > a:hover { background: var(--surface); }
.action-rail span { color: var(--muted); font-size: 11.5px; }
.action-rail strong { font-family: var(--font-d); font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; transition: color .2s; }
.action-rail small { grid-column: 1 / -1; overflow: hidden; color: var(--faint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.action-rail a:hover strong { color: var(--lime); text-shadow: 0 0 18px rgba(198, 242, 78, .5); }
.action-rail .quality-action strong { color: var(--amber); }

.arrival-notice {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 18px 20px;
  border: 1px solid rgba(62, 230, 196, .24);
  border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(62, 230, 196, .13), rgba(198, 242, 78, .06));
  box-shadow: 0 14px 34px -22px rgba(62, 230, 196, .65);
}
.arrival-notice-copy { display: flex; align-items: center; gap: 12px; }
.arrival-notice-copy span:last-child { display: grid; }
.arrival-notice-copy small { color: var(--cyan); font-size: 10.5px; font-weight: 750; letter-spacing: .12em; }
.arrival-notice-copy strong { margin-top: 2px; font-family: var(--font-d); font-size: 19px; }
.arrival-pulse { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 6px rgba(62, 230, 196, .11), 0 0 18px rgba(62, 230, 196, .8); }
.arrival-total { float: right; margin-top: -34px; color: var(--lime); font-family: var(--font-d); font-size: 24px; font-variant-numeric: tabular-nums; }
.arrival-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; border-top: 1px solid rgba(62, 230, 196, .15); }
.arrival-strip article { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px 4px 0; }
.arrival-strip article:nth-child(even) { padding-left: 16px; border-left: 1px solid rgba(62, 230, 196, .15); }
.arrival-strip article > span { min-width: 0; display: grid; }
.arrival-strip article a { overflow: hidden; color: var(--text); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.arrival-strip article small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.arrival-strip article b { color: var(--cyan); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.work-focus-grid { max-width: 1180px; margin: 0 auto 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.work-focus-panel { padding: 20px 22px; }
.work-focus-panel .section-head { min-height: 48px; }
.section-count { color: var(--muted); font-size: 12px; }
.compact-task-list .task-row { min-height: 62px; padding: 11px 0; gap: 10px; }
.compact-task-list .settlement-compact { grid-template-columns: minmax(0, 1fr) auto; }
.calm-empty { min-height: 86px; display: grid; align-content: center; margin: 0; color: var(--muted); }
.calm-empty strong { color: var(--text); font-size: 13.5px; }
.calm-empty span { margin-top: 4px; font-size: 12px; }

.progress-section { max-width: 900px; margin: 28px auto 22px; padding: 0; }
.progress-head { min-height: 70px; margin: 0; padding: 8px 0 14px; border-bottom: 0; }
.timeline-range a { min-width: 58px; }
.progress-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; padding: 11px 0 15px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: transparent; }
.progress-summary span { margin: 0; color: var(--muted); font-size: 11.5px; }
.progress-summary strong { margin-right: 3px; color: var(--text); font-family: var(--font-d); font-size: 15px; font-variant-numeric: tabular-nums; }
.home-ledger-feed { width: 100%; max-width: none; margin-top: 14px; padding: 0; }
.home-ledger-event.buy .event-dot { border-color: rgba(255, 92, 122, .32); background: var(--coral-soft); color: var(--coral); }
.home-ledger-event.redeem .event-dot { border-color: rgba(62, 230, 196, .3); background: var(--cyan-soft); color: var(--cyan); }
.home-ledger-event.contact .event-dot { border-color: rgba(198, 242, 78, .3); background: var(--lime-soft); color: var(--lime); }
.home-ledger-event.adjustment .event-dot, .home-ledger-event.correction .event-dot { border-color: rgba(255, 197, 61, .3); background: var(--amber-soft); color: var(--amber); }
.home-ledger-event.voided { opacity: .58; }
.home-ledger-event .event-badge.buy { border-color: rgba(255, 92, 122, .38); color: var(--coral); }
.home-ledger-event .event-badge.contact { border-color: rgba(198, 242, 78, .35); color: var(--lime); }
.home-ledger-event .event-badge.adjustment, .home-ledger-event .event-badge.correction { border-color: rgba(255, 197, 61, .38); color: var(--amber); }
.ledger-event-note {
  max-width: 680px; display: -webkit-box; overflow: hidden; margin: 0;
  color: var(--text); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere;
  -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}
.ledger-feed-more { display: flex; justify-content: center; padding: 12px 0 0; }
.progress-feed { padding: 0 22px 10px; }
.progress-day { display: grid; grid-template-columns: 106px minmax(0, 1fr); }
.progress-day-marker { position: relative; padding: 18px 18px 18px 0; border-right: 1px solid var(--line-soft); }
.progress-day-marker::after {
  content: "";
  position: absolute;
  top: 24px;
  right: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px var(--bg), 0 0 12px rgba(198, 242, 78, .8);
}
.progress-day-marker time { display: block; font-family: var(--font-d); font-size: 15px; font-weight: 700; }
.progress-day-marker span { display: block; margin-top: 3px; color: var(--faint); font-size: 11px; }
.progress-events { min-width: 0; padding: 8px 0 8px 22px; }
.progress-event { min-height: 60px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: 10px; border-bottom: 1px solid var(--line-soft); color: var(--text); transition: background .2s; }
.progress-event:last-child { border-bottom: 0; }
.progress-event:hover { background: var(--surface-strong); }
.event-dot { width: 8px; height: 8px; border-radius: 50%; background: #7b8790; }
.event-dot.buy { background: var(--coral); box-shadow: 0 0 8px rgba(255, 92, 122, .7); }
.event-dot.redeem { background: var(--cyan); box-shadow: 0 0 8px rgba(62, 230, 196, .7); }
.event-dot.contact { background: var(--lime); box-shadow: 0 0 8px rgba(198, 242, 78, .7); }
.event-dot.correction { background: var(--amber); }
.event-dot.adjustment { background: var(--amber); }
.event-dot.service { background: #6d7b72; }
.event-dot.voided { background: #565e66; }
.event-copy { min-width: 0; }
.event-copy strong { display: block; font-size: 13.5px; transition: color .15s; }
.progress-event:hover .event-copy strong { color: var(--lime); }
.event-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-value { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline-empty { padding: 48px 20px; text-align: center; }
.timeline-empty p, .timeline-empty strong { display: block; margin: 5px 0 18px; color: var(--muted); }

.investment-teaser {
  max-width: 1180px;
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 30px;
  align-items: center;
  margin: 0 auto;
  padding: 24px 28px;
  border-radius: 8px;
  border: 1px solid rgba(198, 242, 78, .25);
  background: linear-gradient(115deg, rgba(62, 230, 196, .16), rgba(198, 242, 78, .1) 60%, rgba(255, 92, 122, .1));
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.investment-teaser:hover { transform: translateY(-3px); box-shadow: var(--glow-lime); }
.investment-teaser span { min-width: 0; }
.investment-teaser small { display: block; color: var(--muted); font-size: 10.5px; }
.investment-teaser strong { display: block; margin-top: 4px; font-family: var(--font-d); font-size: 17px; }
.investment-teaser .teaser-assets strong { font-size: 24px; font-variant-numeric: tabular-nums; background: linear-gradient(115deg, var(--cyan), var(--lime)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.investment-teaser b { color: var(--lime); font-size: 12.5px; white-space: nowrap; padding: 9px 16px; border: 1px solid rgba(198, 242, 78, .35); border-radius: 99px; }

/* 旧版仪表盘兼容类（保留以防旧模板引用） */
.today-strip { max-width: 1180px; margin: 0 auto 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.today-stat { min-width: 0; min-height: 104px; padding: 18px 20px; border-top: 3px solid var(--lime); border-right: 1px solid var(--line-soft); }
.today-stat:last-child { border-right: 0; }
.today-stat > span { display: block; color: var(--muted); font-size: 13px; }
.today-stat strong { display: inline-block; margin-top: 6px; font-size: 30px; font-variant-numeric: tabular-nums; }
.today-stat small { margin-left: 6px; color: var(--muted); }
.today-stat.accent-green { border-top-color: var(--down); }
.today-stat.accent-blue { border-top-color: var(--cyan); }
.today-stat.accent-coral { border-top-color: var(--coral); }
.today-stat.accent-amber { border-top-color: var(--amber); }
.dashboard-focus-grid { max-width: 1180px; margin: 0 auto 16px; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 14px; }
.work-section { min-width: 0; padding: 22px; }
.next-action-section { border-left: 3px solid var(--lime); }
.queue-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.queue-group { min-width: 0; padding: 15px 14px 0 0; }
.queue-group + .queue-group { padding-left: 14px; border-left: 1px solid var(--line-soft); }
.queue-group > strong { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 13px; }
.queue-group > strong span { color: var(--muted); font-variant-numeric: tabular-nums; }
.queue-group > a { min-height: 39px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line-soft); color: var(--text); font-size: 12px; }
.queue-group > a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-group > a time, .queue-group > a small, .queue-group > small { color: var(--muted); font-size: 11px; }
.overview-section { max-width: 1180px; margin: 0 auto 18px; padding-top: 8px; }
.overview-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.overview-metrics > div { min-width: 0; padding: 15px 18px; border-right: 1px solid var(--line-soft); }
.overview-metrics > div:last-child { border-right: 0; }
.overview-metrics span { display: block; color: var(--muted); font-size: 12px; }
.overview-metrics strong { display: block; margin-top: 4px; overflow: hidden; font-size: 17px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
th { color: var(--faint); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(62, 230, 196, .05); }
td small { display: block; color: var(--muted); font-size: 11px; }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-link { color: var(--text); font-weight: 650; }
.table-link:hover { color: var(--lime); }
.positive { color: var(--up); }   /* 涨 · 红 */
.negative { color: var(--down); } /* 跌 · 绿 */
.warn-text { color: var(--amber); }
.danger-text { color: var(--up); }
.status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 10px; border-radius: 99px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.status.ok { background: var(--cyan-soft); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(62, 230, 196, .3); }
.status.pending { background: var(--amber-soft); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 197, 61, .3); }

/* ---------------- 表单 ---------------- */
.search-bar { max-width: 1180px; margin: 0 auto 14px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 8px; }
.product-library-filters .search-bar { grid-template-columns:minmax(160px,1fr) auto auto auto; }
.inline-fund-label { margin-top:8px; display:flex; align-items:center; flex-wrap:wrap; gap:4px 10px; }
.inline-fund-label select { width:170px; min-height:36px; padding:6px 10px; font-size:13px; }
.inline-fund-label .inline-label-status { min-height:18px; margin:0; font-size:12px; }
@media(max-width:720px) {
  .product-library-filters .search-bar { grid-template-columns:minmax(0,1fr); }
  .product-library-filters .search-bar select { grid-row:auto; grid-column:auto; }
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); background: rgba(62, 230, 196, .06); box-shadow: 0 0 0 3px rgba(62, 230, 196, .16); }
input:disabled { opacity: .55; }
select option { background: var(--surface-solid); color: var(--text); }
textarea { resize: vertical; }
label, .field > label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.form-grid > *, .field, label { min-width: 0; }

.segmented { display: inline-flex; align-items: stretch; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.segmented > a, .segmented label > span {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.segmented > a:hover, .segmented label > span:hover { color: var(--text); }
.segmented > a.active, .segmented label input:checked + span {
  background: linear-gradient(120deg, rgba(62, 230, 196, .2), rgba(198, 242, 78, .16));
  color: var(--lime);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(198, 242, 78, .3);
}
.segmented label input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.mode-tabs { display: flex; max-width: 1180px; margin: 0 auto 16px; }
.action-tabs { flex-wrap: wrap; }
.redemption-tabs { flex-wrap: wrap; }

.entry-layout { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 18px; align-items: start; }
.form-panel, .preview-panel { padding: 24px; }
.preview-panel { position: sticky; top: 24px; }
.field-group { margin: 0 0 22px; padding: 0; border: 0; }
.field-group legend { margin-bottom: 9px; color: var(--muted); font-size: 13px; font-weight: 650; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.section-fields { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.span-2 { grid-column: span 2; }
.hidden, [hidden] { display: none !important; }
.check-line { display: flex !important; align-items: center; gap: 7px !important; margin-top: 8px; font-weight: 500 !important; }
.check-line input { width: 17px; min-height: 17px; margin: 0; box-shadow: none; accent-color: var(--lime); }
.stand-alone { min-height: 42px; align-self: end; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.form-actions .button { min-width: 150px; }

.autocomplete-field { position: relative; }
.suggestions {
  position: absolute;
  z-index: 30;
  top: 70px;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 26, 32, .96);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.suggestions button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: background .15s; }
.suggestions button:hover { background: rgba(198, 242, 78, .08); }
.suggestions button:last-child { border-bottom: 0; }
.suggestions small { color: var(--muted); }

.preview-panel h2 { margin: 3px 0 16px; font-size: 20px; }
.preview-panel dl { margin: 0; }
.preview-panel dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.preview-panel dt { color: var(--muted); font-size: 13px; }
.preview-panel dd { margin: 0; text-align: right; font-weight: 650; font-size: 13.5px; }
.raw-preview { margin: 17px 0; padding: 13px 14px; border-left: 3px solid var(--cyan); border-radius: 0 10px 10px 0; background: rgba(62, 230, 196, .06); }
.raw-preview span { color: var(--muted); font-size: 11.5px; }
.raw-preview p { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 13px; }
.preview-panel .button + .button { margin-top: 8px; }
.inline-error, .flash { padding: 12px 14px; border-radius: 11px; font-size: 13.5px; }
.inline-error, .flash.error { background: var(--up-soft); color: var(--up); box-shadow: inset 0 0 0 1px rgba(255, 107, 127, .3); }
.flash.success { background: var(--cyan-soft); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(62, 230, 196, .3); }
.flash.celebrate { border-left: 3px solid var(--lime); }
.flash-stack { max-width: 1180px; margin: 0 auto 14px; display: grid; gap: 8px; }
.success-panel { border-top: 2px solid var(--lime); box-shadow: var(--shadow), 0 0 40px -12px rgba(198, 242, 78, .35); }
.success-panel h2 { color: var(--lime); }

/* ---------------- 客户/台账详情 ---------------- */
.detail-strip { max-width: 1180px; margin: 0 auto 18px; display: grid; grid-template-columns: 1fr 1fr 2fr; overflow: hidden; }
.detail-strip > div { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--line-soft); }
.detail-strip > div:last-child { border-right: 0; }
.detail-strip span { display: block; color: var(--muted); font-size: 12px; }
.detail-strip strong { display: block; margin-top: 5px; }

/* ---------------- 产品详情 ---------------- */
.product-head { margin-bottom: 20px; }
.product-snapshot { max-width: 1180px; margin: 0 auto 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.product-snapshot > div { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--line-soft); }
.product-snapshot > div:last-child { border-right: 0; }
.product-snapshot span { display: block; color: var(--muted); font-size: 12px; }
.product-snapshot strong { display: block; margin-top: 5px; overflow: hidden; font-family: var(--font-d); font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.product-insight-grid { max-width: 1180px; margin: 0 auto 16px; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .8fr); gap: 16px; }
.product-insight-grid .panel { margin: 0; }
.product-chart-panel, .peer-panel { min-height: 470px; }
.product-chart-panel .section-head p, .peer-panel .section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.range-tabs { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, .16); }
.range-tabs a { min-width: 48px; padding: 5px 9px; border-radius: 5px; color: var(--muted); font-size: 11.5px; text-align: center; }
.range-tabs a:hover { color: var(--text); }
.range-tabs a.active { background: var(--surface-strong); color: var(--lime); box-shadow: inset 0 0 0 1px rgba(198, 242, 78, .2); }
.chart-frame { position: relative; min-height: 250px; padding: 4px 42px 0 0; }
.price-chart { width: 100%; height: 242px; overflow: visible; }
.price-chart line { stroke: rgba(255, 255, 255, .055); stroke-width: 1; }
.price-chart polygon { fill: rgba(62, 230, 196, .08); }
.price-chart polyline { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(62, 230, 196, .35)); }
.price-chart circle { fill: var(--lime); stroke: var(--bg); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-axis { position: absolute; right: 0; color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart-max { top: 0; }
.chart-min { bottom: 16px; }
.chart-dates { display: flex; justify-content: space-between; padding-right: 42px; margin-top: -7px; color: var(--faint); font-size: 10px; }
.trend-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border-top: 1px solid var(--line-soft); }
.trend-stats > div { padding: 14px 12px 3px; border-right: 1px solid var(--line-soft); }
.trend-stats > div:first-child { padding-left: 0; }
.trend-stats > div:last-child { border-right: 0; }
.trend-stats span { display: block; color: var(--muted); font-size: 10.5px; }
.trend-stats strong { display: block; margin-top: 4px; font-size: 15px; font-variant-numeric: tabular-nums; }
.data-footnote { margin: 14px 0 0; color: var(--faint); font-size: 10.5px; overflow-wrap: anywhere; }
.data-footnote.stale { color: var(--coral); }
.peer-rank { display: flex; align-items: flex-end; gap: 9px; padding: 8px 0 12px; }
.peer-rank > strong { font-family: var(--font-d); font-size: 56px; line-height: .9; color: var(--lime); }
.peer-rank > span { color: var(--muted); font-size: 16px; }
.peer-rank small { display: block; margin-top: 4px; color: var(--faint); font-size: 10.5px; }
.peer-median { margin: 5px 0 14px; font-size: 12px; font-weight: 650; }
.peer-list { margin: 0; padding: 0; list-style: none; }
.peer-list li { border-top: 1px solid var(--line-soft); }
.peer-list li.current { margin: 0 -9px; padding: 0 9px; border-radius: 6px; background: var(--lime-soft); }
.peer-list a { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text); }
.peer-list a > span { min-width: 0; display: flex; align-items: center; gap: 9px; }
.peer-list a > span > b { width: 20px; flex: 0 0 20px; color: var(--faint); font-size: 10.5px; text-align: center; }
.peer-list a > span > span { min-width: 0; }
.peer-list strong, .peer-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peer-list strong { font-size: 12px; }
.peer-list small { color: var(--muted); font-size: 9.5px; }
.peer-list em { flex: 0 0 auto; font-size: 12px; font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }
.peer-empty { margin-top: 100px; }
.product-facts-panel { padding-bottom: 12px; }
.product-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.product-facts > div { min-width: 0; padding: 14px 16px 14px 0; border-top: 1px solid var(--line-soft); }
.product-facts > div.wide { grid-column: span 2; }
.product-facts dt { color: var(--muted); font-size: 11px; }
.product-facts dd { margin: 5px 0 0; color: var(--text); font-size: 12.5px; overflow-wrap: anywhere; }
.fund-fee-panel { padding-bottom: 14px; }
.fee-panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.fee-schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--line-soft); }
.fee-schedule { min-width: 0; padding: 18px 22px 8px 0; }
.fee-schedule + .fee-schedule { padding-left: 22px; border-left: 1px solid var(--line-soft); }
.fee-schedule header { min-height: 42px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fee-schedule h3 { margin: 0; font-family: var(--font-d); font-size: 16px; }
.fee-schedule header span { color: var(--muted); font-size: 10.5px; text-align: right; }
.fee-schedule dl { margin: 0; }
.fee-schedule dl > div { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line-soft); }
.fee-schedule dt { color: var(--muted); font-size: 12px; }
.fee-schedule dd { margin: 0; color: var(--text); font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.fee-empty { margin: 12px 0; color: var(--faint); font-size: 12px; }
.fee-source { margin-top: 10px; }
.fee-source a { color: var(--lime); }
.fee-rate { color: var(--lime); font-weight: 750; }

.timeline article { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); align-items: flex-start; }
.timeline article:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: 12.5px; }
.timeline p { margin: 4px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.task-list { display: grid; }
.task-row { min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.task-row:first-child { border-top: 0; }
.task-row p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.task-row time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.task-actions form { margin: 0; }
.followup-context { display: grid; gap: 5px; margin-bottom: 18px; padding: 14px 0; border-block: 1px solid var(--line-soft); }
.followup-context small, .followup-context span { color: var(--muted); }
.section-note { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.settlement-row { grid-template-columns: minmax(220px, 1fr) minmax(450px, 1.4fr); }
.arrival-form { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.arrival-primary { min-width: 220px; }
.arrival-adjust { position: relative; }
.arrival-adjust > summary { color: var(--muted); cursor: pointer; font-size: 12px; list-style: none; }
.arrival-adjust > summary::-webkit-details-marker { display: none; }
.arrival-adjust > summary:hover { color: var(--text); }
.settlement-adjust-form { position: absolute; z-index: 12; top: 32px; right: 0; width: 520px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); box-shadow: var(--shadow); }
.settlement-adjust-form label { font-size: 11.5px; }
.settlement-adjust-form .button { min-height: 38px; white-space: nowrap; }
.meta-line { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.meta-line small { color: var(--muted); }
.evidence-block { padding: 15px; border-left: 3px solid var(--cyan); border-radius: 0 10px 10px 0; background: rgba(62, 230, 196, .06); overflow-wrap: anywhere; }
.evidence-block p { margin: 0 0 8px; }
.evidence-block small { color: var(--muted); }
.issue-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.issue-line:first-of-type { border-top: 0; }
.issue-line small { color: var(--muted); }
.issue-list .task-row { grid-template-columns: minmax(0, 1fr) auto; }

.summary-list { margin: 0; }
.summary-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.summary-list > div:first-child { border-top: 0; }
.summary-list dt { color: var(--muted); font-size: 13px; }
.summary-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.correction-summary { max-width: 1180px; margin: 0 auto 18px; }
.correction-form { max-width: 1180px; margin: 0 auto; }
.correction-form > .button { margin-top: 16px; }
.correction-form .muted { margin: 14px 0 0; font-size: 12.5px; }

/* ---------------- 投资看板 ---------------- */
.market-head { margin-bottom: 20px; }
.portfolio-band { max-width: 1180px; display: grid; grid-template-columns: 1.45fr repeat(3, 1fr); margin: 0 auto 16px; overflow: hidden; padding: 0; }
.portfolio-band > div { min-width: 0; min-height: 116px; display: grid; align-content: center; padding: 20px 22px; border-left: 1px solid var(--line-soft); }
.portfolio-band > div:first-child {
  border-left: 0;
  background: linear-gradient(135deg, rgba(62, 230, 196, .14), rgba(198, 242, 78, .07));
}
.portfolio-band span { color: var(--muted); font-size: 11px; }
.portfolio-band strong { display: block; margin-top: 7px; overflow: hidden; font-family: var(--font-d); font-size: 21px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-band .portfolio-main strong { font-size: 32px; background: linear-gradient(115deg, var(--cyan), var(--lime)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.portfolio-band small { margin-top: 5px; color: var(--faint); font-size: 11.5px; }
.portfolio-band .positive { color: var(--up); }
.portfolio-band .negative { color: var(--down); }

.market-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.market-panel { min-width: 0; padding: 22px; transition: border-color .25s, box-shadow .25s; }
.market-panel:hover { border-color: rgba(255, 255, 255, .16); }
.span-2-market { grid-column: 1 / -1; }
.market-list, .client-rank-list { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.market-list > a, .client-rank-list > a, .fund-movers a, .pnl-columns a {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--text);
  transition: background .2s;
}
.market-list > a:hover, .client-rank-list > a:hover, .fund-movers a:hover, .pnl-columns a:hover { background: var(--surface-strong); }
.market-list > a:first-child, .client-rank-list > a:first-child, .fund-movers a:first-of-type, .pnl-columns a:first-of-type { border-top: 0; }
.market-list span, .client-rank-list span, .fund-movers span, .pnl-columns span { min-width: 0; flex: 1 1 0; }
.market-list strong, .client-rank-list strong, .fund-movers strong, .pnl-columns strong { display: block; overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.market-list small, .client-rank-list small, .fund-movers small, .pnl-columns small { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.market-list b, .client-rank-list b { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.market-list b.urgent { color: var(--coral); text-shadow: 0 0 14px rgba(255, 92, 122, .55); }
.ranking-list { margin: 0; padding: 0; list-style: none; }
.ranking-list a { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 8px; margin: 0 -8px; border-radius: 10px; border-top: 1px solid var(--line-soft); color: var(--text); transition: background .2s; }
.ranking-list a:hover { background: var(--surface-strong); }
.ranking-list li:first-child a { border-top: 0; }
.ranking-list a > span { min-width: 0; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; }
.ranking-list a b { grid-row: 1 / 3; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-strong); color: var(--muted); font-size: 11px; }
.ranking-list li:first-child a b { background: linear-gradient(135deg, var(--cyan), var(--lime)); color: #0d0f12; font-weight: 800; }
.ranking-list a strong { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list a small { color: var(--muted); font-size: 10.5px; }
.ranking-list em, .fund-movers em, .pnl-columns em { font-size: 13.5px; font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fund-movers, .pnl-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.fund-movers > div, .pnl-columns > div, .fund-movers a, .pnl-columns a { min-width: 0; }
.fund-movers h3, .pnl-columns h3 { margin: 0 0 8px; color: var(--muted); font-size: 11.5px; font-weight: 650; }
.contact-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.contact-strip a { min-width: 0; display: grid; grid-template-columns: 74px 76px minmax(0, 1fr); gap: 8px; padding: 12px 8px; margin: 0 -8px; border-radius: 10px; border-top: 1px solid var(--line-soft); color: var(--text); transition: background .2s; }
.contact-strip a:hover { background: var(--surface-strong); }
.contact-strip a:nth-child(-n+2) { border-top: 0; }
.contact-strip time { color: var(--muted); font-size: 10.5px; }
.contact-strip strong { font-size: 12.5px; }
.contact-strip span { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }

.bar-list { display: grid; gap: 18px; }
.bar-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.bar-row strong { font-variant-numeric: tabular-nums; }
.bar-row small { color: var(--muted); font-size: 11px; }
.bar-progress { display: block; width: 100%; height: 8px; margin: 8px 0 6px; overflow: hidden; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .07); appearance: none; }
.bar-progress::-webkit-progress-bar { border-radius: 99px; background: rgba(255, 255, 255, .07); }
.bar-progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--lime)); box-shadow: 0 0 12px rgba(62, 230, 196, .5); }
.bar-progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--lime)); }

/* ---------------- 数据核对 ---------------- */
.quality-head { align-items: end; }
.quality-total { flex-shrink: 0; display: flex; align-items: baseline; gap: 7px; color: var(--amber); font-family: var(--font-d); font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quality-total small { color: var(--muted); font-family: var(--font-b); font-size: 11px; white-space: nowrap; }
.quality-group { max-width: 980px; margin: 0 auto 28px; }
.quality-list { display: grid; gap: 10px; }
.quality-item { min-width: 0; }
.quality-quick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 22px; align-items: center; padding: 18px; }
.quality-copy { min-width: 0; display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 14px; align-items: center; }
.quality-copy strong { display: block; font-size: 13.5px; }
.quality-copy small { display: block; margin-top: 4px; color: var(--muted); }
.quality-copy em { display: block; margin-top: 7px; color: var(--faint); font-size: 11.5px; font-style: normal; }
.quality-marker { width: 7px; height: 28px; border-radius: 4px; background: var(--amber); box-shadow: 0 0 10px rgba(255, 197, 61, .5); }
.quality-quick-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.quality-quick-actions form { margin: 0; }
.quality-quick-actions .button { min-height: 36px; padding: 0 12px; }
.quality-secondary-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 12px; }
.quality-secondary-actions > a, .quality-secondary-actions summary { color: var(--muted); cursor: pointer; list-style: none; }
.quality-secondary-actions summary::-webkit-details-marker { display: none; }
.quality-secondary-actions > details[open] { width: min(100%, 520px); }
.quality-other-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.insurance-quality-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); gap: 16px 22px; align-items: center; padding: 18px; }
.insurance-quality-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.insurance-quality-form input { min-height: 38px; }
.insurance-quality-form .button { min-height: 38px; white-space: nowrap; }
.insurance-premium-confirm { grid-column: 1 / -1; display: flex; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; color: var(--amber); font-size: 11.5px; font-weight: 500; }
.insurance-premium-confirm input { width: 16px; min-height: 16px; margin-top: 1px; }
.insurance-quality-item .quality-secondary-actions { grid-column: 1 / -1; }
.undo-banner { max-width: 980px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 auto 18px; padding: 13px 16px; border: 1px solid rgba(62, 230, 196, .25); border-radius: 8px; background: var(--cyan-soft); }
.undo-banner strong, .undo-banner small { display: block; }
.undo-banner small { margin-top: 2px; color: var(--muted); }
.quality-clear { max-width: 680px; margin: 12vh auto; text-align: center; }
.quality-clear > span { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: var(--cyan-soft); color: var(--cyan); font-size: 25px; box-shadow: 0 0 24px rgba(62, 230, 196, .35); }
.quality-clear p { color: var(--muted); }
.queue-issue { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px; }
.queue-issue strong { display: block; margin-top: 6px; font-size: 13.5px; }
.queue-issue p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.background-work { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.background-list { display: grid; }
.background-list article { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.background-list article:first-child { border-top: 0; }
.background-list article span { min-width: 0; display: grid; }
.background-list article strong { overflow: hidden; color: var(--muted); font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.background-list article small { margin-top: 3px; color: var(--faint); font-size: 11.5px; }
.background-list article a { font-size: 12px; white-space: nowrap; }

/* ---------------- 登录 / 错误 ---------------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-panel { position: relative; z-index: 1; width: min(100%, 400px); padding: 32px; }
.login-brand { color: var(--lime); font-family: var(--font-d); font-weight: 700; font-size: 17px; }
.login-panel h1 { margin: 8px 0 24px; font-family: var(--font-d); font-size: 27px; }
.login-panel form { display: grid; gap: 14px; }
.login-panel .flash { margin-bottom: 4px; }
.error-page { max-width: 600px; margin: 15vh auto; text-align: center; }
.error-page > strong { font-family: var(--font-d); font-size: 56px; background: linear-gradient(115deg, var(--cyan), var(--lime)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.error-page h1 { margin: 10px 0 24px; }
.error-page .button { margin-top: 6px; }

/* ---------------- 撒花 ---------------- */
.confetti-layer { position: fixed; inset: 0; z-index: 100; overflow: hidden; pointer-events: none; }
.confetti-piece {
  position: absolute;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  opacity: 0;
  box-shadow: 0 0 10px currentColor;
  animation: confetti-pop 950ms cubic-bezier(.2, .75, .3, 1) forwards;
}
@keyframes confetti-pop {
  0% { transform: translate(-50%, -50%) scale(.35) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--confetti-x)), calc(-50% + var(--confetti-y))) scale(.9) rotate(var(--confetti-turn)); opacity: 0; }
}

/* ---------------- 响应式：平板 ---------------- */
@media (max-width: 980px) {
  .content { padding: 26px 22px 76px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric:nth-child(3) { border-right: 0; }
  .metric:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .entry-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settlement-row { grid-template-columns: 1fr; }
  .work-focus-grid { grid-template-columns: 1fr; }
  .arrival-strip { grid-template-columns: 1fr; }
  .arrival-strip article:nth-child(even) { padding-left: 0; border-left: 0; }
  .arrival-form { justify-content: flex-start; }
  .dashboard-focus-grid { grid-template-columns: 1fr; }
  .queue-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-metrics { grid-template-columns: repeat(3, 1fr); }
  .overview-metrics > div:nth-child(3) { border-right: 0; }
  .overview-metrics > div:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .day-workbench { grid-template-columns: 1fr; }
  .day-score { min-height: 230px; }
  .action-rail { grid-template-columns: repeat(2, 1fr); }
  .action-rail > a:first-child { padding-left: 20px; }
  .action-rail > a:nth-child(2) { border-right: 0; }
  .action-rail > a:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .portfolio-band { grid-template-columns: repeat(2, 1fr); }
  .portfolio-band > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .portfolio-band > div:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .market-grid { grid-template-columns: 1fr; }
  .span-2-market { grid-column: 1; }
  .product-insight-grid { grid-template-columns: 1fr; }
  .product-chart-panel, .peer-panel { min-height: 0; }
  .peer-empty { margin-top: 24px; }
  .product-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- 响应式：手机 ---------------- */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .sidebar { display: none; }
  .content { margin-left: 0; padding: 20px 14px calc(86px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(13, 15, 18, .9);
    backdrop-filter: blur(18px);
  }
  .mobile-nav > a, .mobile-more > summary { min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); font-size: 12px; }
  .mobile-nav > a.active, .mobile-more > summary.active { color: var(--lime); font-weight: 750; background: rgba(198, 242, 78, .1); }
  .mobile-more { position: relative; min-width: 0; }
  .mobile-more > summary { cursor: pointer; list-style: none; }
  .mobile-more > summary::-webkit-details-marker { display: none; }
  .mobile-more-panel {
    position: absolute; right: 0; bottom: 54px; width: 168px; display: grid; overflow: hidden;
    padding: 6px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface-solid); box-shadow: var(--shadow);
  }
  .mobile-more-panel a { min-height: 42px; display: flex; align-items: center; padding: 0 12px; border-radius: 6px; color: var(--text); font-size: 13px; }
  .mobile-more-panel a:hover { background: var(--surface-strong); color: var(--lime); }
  .page-head { align-items: center; }
  .page-head h1 { font-size: 23px; }
  .page-head .button { min-height: 38px; padding: 0 12px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 78px; padding: 14px; border-bottom: 1px solid var(--line-soft); }
  .metric:nth-child(odd) { border-right: 1px solid var(--line-soft); }
  .metric:nth-child(even) { border-right: 0; }
  .metric:last-child { border-bottom: 0; }
  .metric strong { font-size: 18px; }
  .dashboard-head h1 { font-size: 25px; }
  .today-strip { grid-template-columns: repeat(2, 1fr); }
  .today-stat { min-height: 88px; padding: 14px; border-bottom: 1px solid var(--line-soft); }
  .today-stat:nth-child(even) { border-right: 0; }
  .today-stat:nth-child(n+3) { border-bottom: 0; }
  .today-stat strong { font-size: 25px; }
  .work-section { padding: 16px; }
  .next-client { font-size: 25px; }
  .queue-stack { grid-template-columns: 1fr; }
  .queue-group, .queue-group + .queue-group { padding: 12px 0; border-left: 0; border-top: 1px solid var(--line-soft); }
  .queue-group:first-child { border-top: 0; }
  .progress-section { margin-top: 24px; }
  .progress-head { align-items: flex-end; min-height: 0; padding: 0 0 13px; }
  .timeline-range a { min-width: 0; padding: 0 11px; }
  .progress-summary { padding: 10px 0 13px; }
  .home-ledger-feed { margin-top: 12px; padding: 0; }
  .progress-feed { padding: 0 15px 8px; }
  .progress-day { grid-template-columns: 1fr; }
  .progress-day-marker { padding: 15px 0 7px 16px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .progress-day-marker::after { top: 20px; left: 0; right: auto; box-shadow: 0 0 0 3px var(--bg), 0 0 10px rgba(198, 242, 78, .8); }
  .progress-day-marker time, .progress-day-marker span { display: inline; }
  .progress-day-marker span { margin-left: 7px; }
  .progress-events { padding: 3px 0 8px 16px; border-left: 1px solid var(--line-soft); }
  .progress-event { grid-template-columns: 8px minmax(0, 1fr); gap: 10px; }
  .event-value { grid-column: 2; }
  .overview-metrics { grid-template-columns: repeat(2, 1fr); }
  .overview-metrics > div, .overview-metrics > div:nth-child(3) { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
  .overview-metrics > div:nth-child(even) { border-right: 0; }
  .overview-metrics > div:last-child { border-bottom: 0; }
  .compact-metrics { grid-template-columns: repeat(2, 1fr); }
  .home-grid, .two-column { grid-template-columns: 1fr; gap: 12px; }
  .panel, .form-panel, .preview-panel { padding: 16px; }
  .preview-panel { scroll-margin-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .mode-tabs { width: 100%; }
  .mode-tabs a { min-width: 0; flex: 1; padding: 0 8px; }
  .action-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .action-tabs label > span { width: 100%; padding: 0 6px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .span-2 { grid-column: span 1; }
  .form-actions .button { width: 100%; }
  .detail-strip { grid-template-columns: 1fr 1fr; }
  .detail-strip > div:nth-child(2) { border-right: 0; }
  .detail-strip > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); }
  .product-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-snapshot > div:nth-child(2) { border-right: 0; }
  .product-snapshot > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .product-chart-panel .section-head { align-items: flex-start; }
  .chart-frame { min-height: 205px; padding-right: 34px; }
  .price-chart { height: 198px; }
  .trend-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-stats > div:nth-child(2) { border-right: 0; }
  .trend-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .product-facts { grid-template-columns: 1fr; }
  .product-facts > div.wide { grid-column: auto; }
  .fee-schedule-grid { grid-template-columns: 1fr; }
  .fee-schedule, .fee-schedule + .fee-schedule { padding: 15px 0 8px; border-left: 0; }
  .timeline article { grid-template-columns: 72px minmax(0, 1fr); }
  .timeline article .status { grid-column: 2; justify-self: start; }
  .task-row { grid-template-columns: 1fr; gap: 10px; }
  .arrival-notice { padding: 15px; }
  .arrival-total { float: none; display: block; margin: 12px 0 0 22px; font-size: 21px; }
  .arrival-strip article { grid-template-columns: minmax(0, 1fr) auto; padding-right: 0; }
  .arrival-strip article .arrival-adjust { grid-column: 1 / -1; }
  .work-focus-panel { padding: 16px; }
  .queue-issue { grid-template-columns: 1fr; padding: 14px; }
  .task-row .button, .task-row form .button { justify-self: start; }
  .compact-actions { justify-content: flex-start; }
  .confirmation-grid { grid-template-columns: 1fr 1fr; }
  .confirmation-grid .button { width: 100%; }
  .issue-line { grid-template-columns: auto minmax(0, 1fr); }
  .issue-line small { grid-column: 2; }
  .arrival-form { align-items: stretch; flex-direction: column; }
  .arrival-primary { width: 100%; min-width: 0; }
  .settlement-adjust-form { position: static; width: 100%; grid-template-columns: 1fr; margin-top: 8px; }
  .search-bar { grid-template-columns: 1fr auto; }
  .search-bar select { grid-row: 2; grid-column: 1 / -1; }
  th, td { padding: 10px 8px; }
  .day-score { min-height: 216px; padding: 24px 22px; }
  .day-score > div strong { font-size: 54px; }
  .day-score dl > div { padding-right: 8px; }
  .next-client-card { padding: 22px; }
  .action-rail > a { min-height: 82px; padding: 12px 14px; }
  .action-rail > a:first-child { padding-left: 14px; }
  .action-rail strong { font-size: 22px; }
  .performance-teaser { gap: 9px 14px; padding: 16px; }
  .performance-teaser-values { grid-column: 1 / -1; text-align: left; }
  .investment-teaser { grid-template-columns: 1fr auto; gap: 14px; padding: 20px; }
  .investment-teaser .teaser-assets { display: none; }
  .portfolio-band { grid-template-columns: repeat(2, 1fr); }
  .portfolio-band > div { min-height: 94px; padding: 16px; }
  .portfolio-band .portfolio-main { grid-column: 1 / -1; min-height: 120px; }
  .portfolio-band > div:nth-child(2) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .portfolio-band > div:nth-child(3) { border-left: 1px solid var(--line-soft); }
  .portfolio-band > div:nth-child(4) { border-left: 0; }
  .portfolio-band .portfolio-main strong { font-size: 27px; }
  .market-panel { padding: 17px; }
  .market-list > a, .client-rank-list > a, .fund-movers a, .pnl-columns a,
  .ranking-list a, .contact-strip a {
    margin-inline: 0;
  }
  .fund-movers, .pnl-columns { grid-template-columns: 1fr; gap: 24px; }
  .contact-strip { grid-template-columns: 1fr; }
  .contact-strip a:nth-child(2) { border-top: 1px solid var(--line-soft); }
  .quality-head { align-items: center; }
  .quality-total { font-size: 30px; }
  .quality-quick { grid-template-columns: 1fr; padding: 14px; }
  .insurance-quality-item { grid-template-columns: 1fr; padding: 14px; }
  .insurance-quality-form { grid-template-columns: 1fr; }
  .quality-quick-actions { justify-content: stretch; }
  .quality-quick-actions form { flex: 1 1 calc(33.333% - 6px); }
  .quality-quick-actions .button { width: 100%; }
  .quality-secondary-actions { align-items: flex-end; flex-direction: column; }
  .quality-secondary-actions > details[open], .quality-other-form { width: 100%; }
  .quality-other-form { grid-template-columns: 1fr; }
  .undo-banner { align-items: flex-start; }
}

.performance-teaser {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  width: 100%; max-width: 1180px; margin: 0 auto 16px; padding: 18px 22px;
  border: 1px solid rgba(198, 242, 78, .24); border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(198, 242, 78, .10), rgba(100, 216, 255, .06));
  color: var(--text); box-shadow: var(--shadow);
  transition: border-color .2s, background .2s, transform .2s;
}
.performance-teaser:hover { border-color: rgba(198, 242, 78, .48); background: linear-gradient(110deg, rgba(198, 242, 78, .13), rgba(100, 216, 255, .08)); transform: translateY(-1px); }
.performance-teaser span:first-child { display: grid; }
.performance-teaser small { color: var(--muted); }
.performance-teaser strong { margin-top: 3px; font-size: 18px; }
.performance-teaser-values { color: var(--muted); text-align: center; }
.performance-teaser > b { color: var(--lime); white-space: nowrap; }
.performance-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 16px; align-items: start; }
.performance-auto, .performance-manual { min-width: 0; }
.date-control { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.date-control input { min-width: 145px; }
.performance-summary { display: flex; align-items: baseline; gap: 8px; padding: 18px 0 16px; border-bottom: 1px solid var(--line-soft); }
.performance-summary strong { color: var(--lime); font-size: 46px; line-height: 1; }
.performance-summary span, .performance-summary b { color: var(--muted); }
.performance-summary b { margin-left: auto; font-size: 14px; }
.performance-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.performance-groups article { display: grid; gap: 5px; min-height: 128px; padding: 20px 18px; border-bottom: 1px solid var(--line-soft); }
.performance-groups article:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.performance-groups small, .performance-groups span { color: var(--muted); }
.performance-groups strong { font-size: 23px; }
.performance-groups span { font-size: 12px; line-height: 1.6; }
.inline-warning { margin: 16px 0 0; color: var(--amber); }
.metric-input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.metric-input-grid label { display: grid; grid-template-columns: minmax(0, 1fr) 88px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-soft); }
.metric-input-grid label > span { display: grid; font-size: 13px; }
.metric-input-grid label small { color: var(--muted); font-size: 10px; }
.metric-input-grid input { min-width: 0; text-align: right; }
.performance-generate { width: 100%; margin-top: 16px; }
.report-result { margin-top: 16px; border-color: rgba(198, 242, 78, .28); }
.report-result pre { overflow: auto; margin: 18px 0 0; padding: 20px; border: 1px solid var(--line-soft); background: var(--surface-strong); color: var(--text); font: inherit; line-height: 1.85; white-space: pre-wrap; }
.copy-status { min-height: 20px; margin: 8px 0 0; color: var(--lime); font-size: 12px; }
.stop-profit-panel { margin: 16px 0; border-color: rgba(255, 107, 127, .24); }

.quick-edit-panel { margin-top: 16px; }
.quick-edit-panel summary { cursor: pointer; list-style: none; }
.quick-edit-panel summary::-webkit-details-marker { display: none; }
.quick-edit-panel summary > span { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.quick-edit-panel summary small, .quick-edit-actions small { color: var(--muted); }
.quick-edit-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.quick-edit-form label { display: grid; align-content: start; gap: 6px; }
.quick-edit-form .wide { grid-column: 1 / -1; }
.quick-edit-actions { display: flex; align-items: center; gap: 12px; }
.ledger-quick-edit { grid-template-columns: 1fr 1fr; }
.ledger-quick-edit .full, .ledger-quick-edit > small { grid-column: 1 / -1; }

/* ---------------- 投资流水 / 补录核对 ---------------- */
.investment-module-tabs, .feed-toolbar, .feed-summary, .investment-feed,
.maturity-feed, .reconcile-filters, .reconcile-overview, .reconciliation-sheet {
  width: 100%; max-width: 1180px; margin-inline: auto;
}
.investment-module-tabs { display: flex; margin: 16px auto; }
.investment-module-tabs a { min-height: 42px; padding-inline: 18px; }
.investment-page-head, .investment-module-tabs, .fund-feed-toolbar, .fund-feed-summary,
.wealth-toolbar, .wealth-summary, .maturity-feed { max-width: 900px; }
.feed-toolbar {
  display: grid; grid-template-columns: 130px minmax(240px, 1fr) auto;
  align-items: end; gap: 10px; margin: 18px auto 10px;
}
.feed-toolbar label { display: grid; gap: 5px; }
.feed-toolbar label > span { color: var(--muted); font-size: 11px; }
.wealth-toolbar { grid-template-columns: minmax(240px, 1fr) auto; }
.feed-summary {
  display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) auto;
  align-items: stretch; border-block: 1px solid var(--line-soft);
}
.feed-summary > div { min-height: 84px; padding: 15px 16px; border-right: 1px solid var(--line-soft); }
.feed-summary small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.feed-summary strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.feed-summary span { margin-left: 3px; color: var(--muted); font-size: 11px; }
.feed-summary nav { align-self: center; margin-left: 16px; }
.feed-summary .positive, .event-result.positive strong, .event-result.realized strong, .maturity-value .positive { color: var(--lime); }
.feed-summary .negative, .event-result.negative strong, .maturity-value .negative { color: var(--red); }
.wealth-summary { grid-template-columns: repeat(3, minmax(120px, 180px)) minmax(220px, 1fr); }
.wealth-summary > p { align-self: center; margin: 0; padding: 14px 20px; color: var(--muted); line-height: 1.6; }
.investment-feed { max-width: 900px; margin-top: 18px; }
.investment-event {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); overflow: hidden;
  margin-bottom: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: rgba(255, 255, 255, .025); transition: border-color .2s, background .2s, transform .2s;
}
.investment-event:hover { border-color: rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .04); transform: translateY(-1px); }
.event-rail {
  position: relative; display: grid; align-content: start; justify-items: center; gap: 11px;
  padding: 20px 10px; border-right: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .018); color: var(--muted); text-align: center;
}
.event-rail::after { display: none; }
.event-rail time { order: 2; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.event-dot {
  position: static; order: 1; width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid rgba(62, 230, 196, .28); border-radius: 50%; background: var(--cyan-soft);
  color: var(--cyan); font-size: 11px; font-weight: 800; box-shadow: none;
}
.event-dot::after { content: "账"; }
.investment-event.buy .event-dot::after { content: "买"; }
.investment-event.redeem .event-dot { border-color: rgba(198, 242, 78, .28); background: var(--lime-soft); color: var(--lime); }
.investment-event.redeem .event-dot::after { content: "赎"; }
.investment-event.contact .event-dot { border-color: rgba(198, 242, 78, .28); background: var(--lime-soft); color: var(--lime); }
.investment-event.contact .event-dot::after { content: "联"; }
.investment-event.adjustment .event-dot, .investment-event.correction .event-dot { border-color: rgba(255, 197, 61, .3); background: var(--amber-soft); color: var(--amber); }
.investment-event.adjustment .event-dot::after { content: "调"; }
.investment-event.correction .event-dot::after { content: "修"; }
.investment-event.service .event-dot::after { content: "服"; }
.investment-event.voided .event-dot::after { content: "废"; }
.event-main {
  display: grid; gap: 9px; min-width: 0; padding: 18px 20px 17px;
}
.event-social-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.event-badge { padding: 3px 7px; border: 1px solid rgba(100, 216, 255, .35); color: var(--cyan); font-size: 10.5px; font-weight: 750; }
.event-badge.redeem { border-color: rgba(198, 242, 78, .34); color: var(--lime); }
.event-kind { color: var(--muted); font-size: 10.5px; }
.event-client { overflow: hidden; color: var(--text); font-size: 16px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.event-copy { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; }
.event-amount { color: var(--text); font-size: 20px; font-weight: 760; font-variant-numeric: tabular-nums; }
.event-product { display: grid; gap: 4px; min-width: 0; color: var(--text); }
.event-product strong { overflow: hidden; font-size: 17px; font-weight: 720; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.event-product code { color: var(--muted); font-family: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }
.event-outcome { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px 26px; margin-top: 2px; }
.event-result { display: grid; gap: 2px; }
.event-result strong { font-size: 15.5px; }
.event-result small { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.event-result.pending strong { color: var(--amber); }
.event-result.settled strong, .event-result.neutral strong { color: var(--muted); }
.event-links { display: flex; align-items: center; gap: 20px; margin-top: 3px; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 10.5px; }
.event-links a { color: var(--muted); }
.event-links a:hover { color: var(--cyan); }
@media (min-width: 721px) {
  .investment-event:not(.home-ledger-event) .event-main {
    grid-template-columns: minmax(0, 1fr) minmax(210px, .48fr);
    column-gap: 28px;
  }
  .investment-event:not(.home-ledger-event) .event-social-head,
  .investment-event:not(.home-ledger-event) .event-links { grid-column: 1 / -1; }
  .investment-event:not(.home-ledger-event) .event-copy,
  .investment-event:not(.home-ledger-event) .event-product { grid-column: 1; }
  .investment-event:not(.home-ledger-event) .event-outcome {
    grid-column: 2; grid-row: 2 / span 2; align-self: stretch; align-content: center;
    display: grid; gap: 12px; padding-left: 24px; border-left: 1px solid var(--line-soft);
  }
}
.maturity-feed { margin-top: 16px; border-top: 1px solid var(--line-soft); }
.maturity-item {
  display: grid; grid-template-columns: 160px minmax(0, 1fr) 170px;
  align-items: center; gap: 20px; min-height: 102px; padding: 16px 0; border-bottom: 1px solid var(--line-soft);
}
.maturity-countdown { display: grid; gap: 5px; padding-left: 14px; border-left: 3px solid var(--cyan); }
.maturity-item.soon .maturity-countdown, .maturity-item.urgent .maturity-countdown { border-color: var(--amber); }
.maturity-item.overdue .maturity-countdown, .maturity-item.missing .maturity-countdown { border-color: var(--red); }
.maturity-countdown strong { font-size: 15px; }
.maturity-countdown time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.maturity-main { display: grid; gap: 5px; min-width: 0; }
.maturity-main > a:first-child { color: var(--muted); font-size: 12px; }
.maturity-main > a:nth-child(2) { display: flex; align-items: baseline; gap: 8px; min-width: 0; color: var(--text); }
.maturity-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maturity-main code { flex: none; color: var(--muted); font-family: inherit; font-size: 11px; }
.maturity-main small { color: var(--faint); }
.maturity-value { display: grid; justify-items: end; gap: 4px; }
.maturity-value > strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.maturity-value > span, .maturity-value > a { color: var(--muted); font-size: 11px; }
.reconcile-filters {
  display: grid; grid-template-columns: 130px 160px minmax(220px, 1fr) auto;
  align-items: end; gap: 10px; margin: 16px 0 10px;
}
.reconcile-filters label { display: grid; gap: 5px; }
.reconcile-filters label > span { color: var(--muted); font-size: 11px; }
.reconcile-overview {
  display: flex; align-items: center; gap: 20px; padding: 12px 0 16px;
  color: var(--muted); border-bottom: 1px solid var(--line-soft);
}
.reconcile-overview strong { color: var(--text); font-size: 18px; }
.reconcile-overview nav { margin-left: auto; }
.compact-segmented a { min-height: 36px; padding: 0 12px; font-size: 12px; }
.reconciliation-sheet { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); }
.reconcile-product + .reconcile-product { border-top: 8px solid var(--bg); }
.reconcile-product-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 100px 52px; align-items: center;
  min-height: 48px; padding: 8px 14px; border-bottom: 1px solid rgba(241, 191, 73, .28);
  background: rgba(241, 191, 73, .14);
}
.reconcile-product-head a { overflow: hidden; color: #f4d27b; font-size: 15px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.reconcile-product-head code { color: var(--text); font-family: inherit; font-size: 14px; }
.reconcile-product-head small { color: var(--muted); text-align: right; }
.reconcile-columns, .reconcile-row {
  display: grid; grid-template-columns: minmax(120px, 1fr) 118px 64px 76px;
  align-items: center; gap: 12px; padding: 0 14px;
}
.reconcile-columns { min-height: 32px; color: var(--faint); font-size: 10px; }
.reconcile-columns span:nth-child(n+2) { text-align: right; }
.reconcile-row { min-height: 45px; border-top: 1px solid var(--line-soft); color: var(--text); }
.reconcile-row:hover { background: var(--surface-strong); }
.reconcile-row strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.reconcile-amount, .reconcile-row time { text-align: right; white-space: nowrap; }
.reconcile-amount { font-variant-numeric: tabular-nums; }
.reconcile-row time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.reconcile-state { justify-self: end; color: var(--lime); font-size: 12px; font-weight: 750; }
.reconcile-state.voided { color: var(--faint); }

@media (max-width: 900px) {
  .performance-layout { grid-template-columns: 1fr; }
  .performance-teaser { grid-template-columns: 1fr auto; gap: 10px; }
  .performance-teaser-values { grid-column: 1 / -1; text-align: left; }
  .reconcile-filters { grid-template-columns: 1fr 1fr; }
  .feed-summary { grid-template-columns: repeat(2, 1fr); }
  .feed-summary > div:nth-child(2) { border-right: 0; }
  .feed-summary nav { margin: 12px 0; }
  .wealth-summary { grid-template-columns: repeat(3, 1fr); }
  .wealth-summary > p { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); }
  .reconcile-search { grid-column: 1 / -1; }
  .reconcile-filters .button { width: 100%; }
  .quick-edit-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .performance-groups, .metric-input-grid { grid-template-columns: 1fr; }
  .performance-groups article:nth-child(odd) { border-right: 0; }
  .performance-groups article { min-height: 105px; padding-inline: 4px; }
  .performance-summary strong { font-size: 38px; }
  .metric-input-grid label { grid-template-columns: minmax(0, 1fr) 96px; }
  .performance-teaser { padding: 15px; }
  .reconcile-overview { align-items: flex-start; flex-wrap: wrap; gap: 8px 16px; }
  .investment-page-head .head-actions { width: 100%; }
  .investment-page-head .head-actions .button { flex: 1; }
  .investment-module-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .investment-module-tabs a { min-width: 0; padding-inline: 5px; font-size: 11.5px; text-align: center; }
  .fund-feed-toolbar { grid-template-columns: 104px minmax(0, 1fr); }
  .fund-feed-toolbar .button { grid-column: 1 / -1; width: 100%; }
  .wealth-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .feed-summary { grid-template-columns: 1fr 1fr; }
  .feed-summary > div { min-height: 75px; padding: 12px; }
  .feed-summary nav { grid-column: 1 / -1; width: 100%; }
  .feed-summary nav a { flex: 1; }
  .wealth-summary { grid-template-columns: 1fr 1fr; }
  .wealth-summary > div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); }
  .investment-event { grid-template-columns: 58px minmax(0, 1fr); margin-bottom: 8px; }
  .event-rail { gap: 8px; padding: 15px 6px; }
  .event-dot { width: 30px; height: 30px; }
  .event-main { gap: 8px; padding: 15px 13px 14px; }
  .event-social-head { flex-wrap: wrap; gap: 6px; }
  .event-client { width: 100%; font-size: 15px; }
  .event-product strong { font-size: 16px; white-space: normal; }
  .event-amount { font-size: 18px; }
  .event-outcome { display: grid; gap: 7px; }
  .event-links { align-items: flex-start; flex-direction: column; gap: 4px; }
  .maturity-item { grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; }
  .maturity-countdown { grid-column: 1 / -1; }
  .maturity-value { min-width: 86px; }
  .reconcile-overview nav { width: 100%; margin-left: 0; }
  .reconcile-overview nav a { flex: 1; }
  .reconciliation-sheet { margin-inline: -14px; border-right: 0; border-left: 0; }
  .reconcile-product-head { grid-template-columns: minmax(0, 1fr) 76px 36px; padding-inline: 12px; }
  .reconcile-product-head a { font-size: 13px; }
  .reconcile-product-head code { font-size: 12px; }
  .reconcile-columns, .reconcile-row {
    grid-template-columns: minmax(72px, 1fr) 68px 42px 48px; gap: 7px; padding-inline: 12px;
  }
  .reconcile-columns { font-size: 9px; }
  .reconcile-row strong { font-size: 13px; }
  .reconcile-amount, .reconcile-row time, .reconcile-state { font-size: 11px; }
  .quick-edit-form, .ledger-quick-edit { grid-template-columns: 1fr; }
  .quick-edit-form .wide, .ledger-quick-edit .full, .ledger-quick-edit > small { grid-column: auto; }
  .quick-edit-panel summary > span, .quick-edit-actions { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .confetti-layer { display: none; }
}
