/* ===================================================================
   A股基本面量化评分 v4 — 紧凑现代风格
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg:          #F0F4F8;
  --card-bg:     #FFFFFF;
  --card-radius: 10px;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --primary:     #155E75;
  --primary-hover:#0E4557;
  --primary-bg:  #E6F2F5;
  --primary-border:#B2D0D9;
  --text:        #1E293B;
  --text-muted:  #64748B;
  --text-light:  #94A3B8;
  --border:      #E2E8F0;
  --border-light:#F1F5F9;
  --success:     #16a34a;
  --danger:      #dc2626;
  --up:          #e53e3e;
  --down:        #16a34a;

  --nav-width:   180px;
  --nav-dark:    #103040;
  --nav-dark-hover:#1A4256;
  --nav-dark-active:#1E5068;
  --nav-dark-text:#8BA4B5;
  --nav-dark-text-active:#5BC0EB;

  --bar-prof: #4285f4; --bar-growth: #34a853; --bar-debt: #fbbc04;
  --bar-ops: #ea4335; --bar-trend: #00bcd4; --bar-stab: #7c4dff;
  --bar-val: #ff5722; --bar-ind: #9c27b0; --bar-leader: #e91e63;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
}

/* ===== 左侧导航 ===== */
.nav-left {
  width: var(--nav-width); flex-shrink: 0;
  background: var(--nav-dark); color: var(--nav-dark-text);
  display: flex; flex-direction: column;
  padding: 16px 0;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.nav-logo { font-size: 30px; text-align: center; margin-bottom: 2px; }
.nav-title { text-align: center; font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; color: var(--nav-dark-text); text-decoration: none;
  font-size: 15px; font-weight: 600; transition: all 0.15s; cursor: pointer;
}
.nav-item:hover { background: var(--nav-dark-hover); color: #fff; }
.nav-item.active { background: var(--nav-dark-active); color: var(--nav-dark-text-active); font-weight: 700; }
.nav-icon { font-size: 17px; width: 22px; text-align: center; }
.nav-footer { margin-top: auto; padding: 12px 16px; font-size: 11px; color: #506678; text-align: center; }

/* ===== 主区域 ===== */
#app {
  margin-left: var(--nav-width);
  flex: 1; padding: 20px 24px;
  min-width: 0;
}
.page { display: none; }
.page.active { display: block; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.status-ready { color: var(--text-muted); font-size: 13px; }
.status-loading { color: #e67e22; font-size: 13px; }
.status-error { color: var(--danger); font-size: 13px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card-bg); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow); padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.btn:hover { background: #F8FAFC; border-color: #CBD5E1; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }

/* ===== 筛选栏 ===== */
.filter-bar {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: 10px 14px;
  margin-bottom: 12px;
}
.filter-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.filter-row + .filter-row { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-light); }
.filter-label { font-size: 13px; font-weight: 600; color: var(--text-muted); min-width: 32px; }
.filter-item { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.filter-item select { font-size: 13px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 10px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; background: #fff; user-select: none;
}
.filter-chip:has(input:checked) { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); }
.filter-chip input { display: none; }

/* 搜索下拉 */
.search-dropdown {
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
  min-width: 200px;
}
.search-item {
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}
.search-item:hover { background: var(--primary-bg); color: var(--primary); }
.search-item:last-child { border-bottom: none; }

.return-period { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* ===== 表格 ===== */
.table-wrapper { overflow-x: auto; overflow-y: auto; max-height: 68vh; }
.table-wrapper thead { position: sticky; top: 0; z-index: 10; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: #F8FAFC;
  padding: 8px 10px; text-align: left; font-weight: 600;
  font-size: 12px; color: var(--text-muted);
  border-bottom: 2px solid var(--border); white-space: nowrap;
  user-select: none;
}
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--primary); }
tbody td { padding: 5px 8px; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
tbody tr:hover { background: #F8FAFC; }
tbody tr.selected { background: var(--primary-bg); }
tbody tr { cursor: pointer; }

.col-score-rank { width: 40px; text-align: center; font-weight: 700; color: var(--primary); }
.col-code { font-family: "SF Mono","Consolas",monospace; font-size: 12px; width: 64px; }
.col-name { font-weight: 500; font-size: 13px; }
.col-score { font-weight: 700; color: var(--primary); font-size: 14px; white-space: nowrap; }
.col-score .sortable { cursor: pointer; }
.col-score .sortable:hover { text-decoration: underline; }
.col-score .dim-toggle {
  cursor: pointer; font-size: 10px; color: var(--text-muted);
  margin-left: 6px; padding: 1px 3px; border-radius: 3px;
  background: #F1F5F9; user-select: none;
}
.col-score .dim-toggle:hover { background: #E2E8F0; color: var(--text); }
.col-dim { text-align: right; font-variant-numeric: tabular-nums; }
.col-dim.hidden { display: none; }
.col-trade { text-align: right; font-variant-numeric: tabular-nums; font-size: 11px; }
.col-trade.up { color: var(--up); }
.col-trade.down { color: var(--down); }
.col-return-rank { text-align: center; font-weight: 600; }
.col-return-pct { text-align: right; font-size: 11px; font-weight: 500; }
.col-return-pct.up { color: var(--up); }
.col-return-pct.down { color: var(--down); }
.col-return-period { text-align: center; font-size: 10px; color: var(--text-muted); }

.bar-inline { display: inline-block; height: 3px; margin-left: 3px; vertical-align: middle; border-radius: 2px; min-width: 1px; }

/* ===== 模型选项卡 ===== */
.model-tabs { display: flex; gap: 4px; }
.model-tab {
  padding: 7px 18px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; background: #fff; color: var(--text-muted);
  transition: all 0.15s;
}
.model-tab:hover { background: var(--primary-bg); color: var(--primary); }
.model-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.model-tab.custom { background: #fff; color: var(--primary); border: 1px dashed var(--primary-border); }

/* ===== 自定义模型弹窗 ===== */
#custom-model-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1100; backdrop-filter: blur(2px);
}
.custom-model-modal {
  background: #fff; border-radius: 14px;
  padding: 24px 28px; min-width: 440px; max-width: 600px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.cm-dim-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--border-light);
}
.cm-dim-label { width: 80px; font-size: 12px; font-weight: 600; }
.cm-dim-slider { flex: 1; }
.cm-dim-pct { width: 36px; text-align: right; font-size: 12px; font-weight: 600; color: var(--primary); }

/* ===== 添加自定义股票弹窗 ===== */
#add-stock-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1100; backdrop-filter: blur(2px);
}
.as-result-item {
  display: flex; align-items: center; gap: 4px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.as-result-item:hover { background: var(--primary-bg); color: var(--primary); }
.as-result-item:last-child { border-bottom: none; }

/* ===== 快速详情 ===== */
.quick-detail { margin-top: 12px; padding: 14px; border-top: 2px solid var(--border); }
.qd-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; }
.close-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }

.detail-bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-label { width: 90px; font-size: 11px; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.bar-label small { color: var(--text-light); }
.bar-track { flex: 1; height: 20px; background: #F1F5F9; border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 10px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 10px; font-weight: 600; color: #fff; min-width: 30px; }
.bar-prof { background: var(--bar-prof); } .bar-growth { background: var(--bar-growth); }
.bar-debt { background: var(--bar-debt); } .bar-ops { background: var(--bar-ops); }
.bar-trend { background: var(--bar-trend); } .bar-stab { background: var(--bar-stab); }
.bar-val { background: var(--bar-val); } .bar-ind { background: var(--bar-ind); }
.bar-leader { background: var(--bar-leader); }
.bar-score { width: 36px; font-size: 11px; font-weight: 600; text-align: right; }

.detail-table { margin-top: 8px; }
.detail-table caption { font-weight: 600; text-align: left; margin-bottom: 4px; font-size: 13px; }
.detail-table td { padding: 3px 8px; }
.td-val { font-family: "SF Mono","Consolas",monospace; font-size: 11px; }
tr.skipped { opacity: 0.4; }

/* ===== 模型配置页 ===== */
.model-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px;
}
.model-toolbar select, .model-toolbar input { font-size: 12px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; }
.model-options {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--border-light);
}
.model-options label { display: flex; align-items: center; gap: 4px; }
.model-options select { font-size: 11px; padding: 2px 4px; }
.model-options input[type=number] { font-size: 11px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 3px; }
.weight-sum { font-weight: 700; font-size: 15px; color: var(--primary); margin-left: auto; }
.weight-sum.err { color: var(--danger); }

/* 模型配置 5x2卡片 左右分栏 */
.model-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.dim-block {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 7px;
  display: flex; gap: 6px;
}
.dim-left {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  flex-shrink: 0; width: 60px;
}
.dim-label { font-weight: 700; font-size: 11px; text-align: center; line-height: 1.2; }
.donut { width: 32px; height: 32px; }
.donut circle { fill: none; stroke-width: 4; }
.donut .bg { stroke: #E2E8F0; }
.donut .val { stroke: var(--primary); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 0.3s; }
.dim-weight { font-weight: 800; font-size: 11px; color: var(--primary); }

.dim-right { flex: 1; min-width: 0; }
.sub-row { display: flex; align-items: center; gap: 4px; padding: 1px 0; }
.sub-label { font-size: 9px; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-wt { font-size: 8px; color: var(--text-light); width: 18px; text-align: right; }
.sub-slider { width: 42px; height: 3px; flex-shrink: 0; -webkit-appearance: none; appearance: none; background: linear-gradient(to right, #94A3B8 var(--pct), #E2E8F0 var(--pct)); border-radius: 2px; outline: none; }
.sub-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 9px; height: 9px; border-radius: 50%; background: #64748B; cursor: pointer; border: 1px solid #fff; }

/* ===== 评分说明页 ===== */
.method-card { max-width: 760px; }
.method-card h3 { margin: 0 0 8px 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.method-card p { margin: 0 0 6px 0; font-size: 13px; line-height: 1.65; }
.method-desc { color: var(--text-muted); }

.weight-tag {
  font-size: 11px; font-weight: 600; color: var(--primary);
  background: var(--primary-bg); border: 1px solid var(--primary-border);
  border-radius: 20px; padding: 1px 8px;
}
.method-steps { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.step {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; line-height: 1.6; color: var(--text);
  padding: 8px 10px; background: #F8FAFC; border-radius: 6px;
  border-left: 3px solid var(--primary-border);
}
.step-num {
  flex-shrink: 0; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; border-radius: 50%;
  font-size: 11px; font-weight: 700;
}
.method-notes { list-style: none; padding: 0; margin: 4px 0 0 0; }
.method-notes li { padding: 4px 0; font-size: 12.5px; line-height: 1.6; color: var(--text-muted); border-bottom: 1px solid var(--border-light); }
.method-notes li::before { content: '• '; color: var(--primary); font-weight: 700; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ===== 实盘跟踪 ===== */
#live-page .card h3 { font-size: 16px; }

/* ===== 计算进度覆盖层 ===== */
#progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.progress-modal {
  background: #fff;
  border-radius: 20px;
  padding: 48px 56px;
  min-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
/* 旋转圈圈 */
.progress-ring {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  position: relative;
}
.progress-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid #E2E8F0;
}
.progress-ring-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid transparent;
  border-top-color: #155E75;
  border-right-color: #0EA5E9;
  animation: progress-spin 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}
@keyframes progress-spin {
  to { transform: rotate(360deg); }
}
.progress-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.progress-msg {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 20px;
  line-height: 1.5;
}
.progress-hint {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
  line-height: 1.4;
}

/* 刷新行情按钮 */
#btn-refresh-prices {
  font-size: 11px;
  padding: 4px 10px;
}

/* 行业两级列表 */
.industry-panel {
  flex-direction: column; align-items: flex-start; gap: 6px;
}
.industry-cats {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.industry-subs {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
  width: 100%;
}
.ind-chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 8px; font-size: 11px;
  border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; background: #fff; user-select: none;
  white-space: nowrap; transition: all 0.12s;
}
.ind-chip:hover { border-color: var(--primary-border); background: #F0F7FA; }
.ind-chip.active { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); font-weight: 600; }
.ind-chip small { font-size: 10px; color: var(--text-light); margin-left: 1px; }
.ind-chip.active small { color: var(--primary); }
.ind-chip.sub { font-size: 10px; }

/* 回测 */
.bt-stats { font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--border-light); margin-bottom: 6px; font-weight: 600; }
.bt-stats .win { color: #00FF88; }
.bt-stats .high { color: #FF6B35; }
.bt-table { width: 100%; border-collapse: collapse; }
.bt-table th { background: #242830; color: #9CA3AF; font-size: 11px; padding: 6px 8px; text-align: left; border-bottom: 1px solid #333; }
.bt-table td { color: #D1D5DB; font-size: 12px; padding: 3px 8px; border-bottom: 1px solid #2a2a2a; }
.bt-table .up { color: #FF5252; } .bt-table .down { color: #00D4AA; }
.bt-table .bold { font-weight: 700; }

/* ===== 首页 ===== */
.home-hero {
  display: flex; gap: 40px; align-items: stretch;
  min-height: calc(100vh - 60px);
}
.home-left { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.home-title {
  font-size: 42px; font-weight: 800; color: var(--text);
  background: linear-gradient(135deg, #155E75, #0EA5E9, #7c4dff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center; padding: 10px 0;
  letter-spacing: 2px;
  animation: titleGlow 3s ease-in-out infinite alternate;
}
@keyframes titleGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.3); }
}
.home-sections { display: flex; flex-direction: column; gap: 42px; }
.home-card {
  display: flex; align-items: flex-start; gap: 18px;
  background: var(--card-bg); border-radius: 12px;
  padding: 28px 28px; border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeInUp 0.6s ease-out both;
  min-height: 120px;
}
.home-card:nth-child(1) { animation-delay: 0.1s; }
.home-card:nth-child(2) { animation-delay: 0.2s; }
.home-card:nth-child(3) { animation-delay: 0.3s; }
.home-card:nth-child(4) { animation-delay: 0.4s; }
.home-card:nth-child(5) { animation-delay: 0.5s; }
.home-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.home-card.highlight {
  border-left: 4px solid #FF6B35;
  background: linear-gradient(135deg, #FFF8F5, #fff);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-card-icon { font-size: 36px; flex-shrink: 0; width: 50px; text-align: center; }
.home-card-text h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px 0; color: var(--text); }
.home-card-text p { font-size: 17px; color: var(--text-muted); margin: 0; line-height: 1.6; }
.home-right {
  width: 400px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 20px;
  justify-content: center;
  padding-top: 100px;
}
.home-img-card {
  background: var(--card-bg); border-radius: 12px;
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}
.home-img-card:hover { transform: scale(1.03); }
.home-img-card img { width: 100%; height: auto; }
.home-img { width: 100%; height: auto; display: block; }
.home-img-label {
  text-align: center; padding: 12px;
  font-size: 18px; font-weight: 700; color: var(--text);
  background: #F8FAFC;
}

/* ===== 顶栏用户信息 ===== */
#top-bar {
  position: fixed; top: 0; right: 0; z-index: 500;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom-left-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  font-size: 15px;
}
.top-bar-user {
  font-weight: 700; color: var(--primary);
  font-size: 15px;
}
.top-bar-btn {
  font-size: 13px; padding: 5px 12px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer;
  color: var(--text-muted); transition: all 0.15s;
}
.top-bar-btn:hover { background: #F8FAFC; color: var(--text); }
#btn-logout-top:hover { color: var(--danger); border-color: #fecaca; }

/* ===== 登录弹窗 ===== */
#login-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1200; backdrop-filter: blur(4px);
}

/* ===== 游客模式 — 模糊/马赛克 ===== */
.guest-blur {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  position: relative;
}
.guest-blur-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.3);
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--primary); font-weight: 700;
  pointer-events: none;
}

/* ===== 导航栏用户信息 ===== */
.nav-user {
  padding: 10px 16px; font-size: 12px; color: var(--nav-dark-text);
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
}
.nav-user .user-name { font-weight: 600; color: #5BC0EB; }
.nav-user .btn-logout { font-size: 11px; color: #8BA4B5; cursor: pointer; margin-left: 6px; }
.nav-user .btn-logout:hover { color: #FF5252; }

/* ===== 响应式 — 手机端 ===== */
@media (max-width: 768px) {
  /* 导航放顶部 */
  .nav-left {
    position: relative; width: 100%; flex-direction: row;
    padding: 8px 10px; overflow-x: auto; white-space: nowrap;
    flex-wrap: nowrap; gap: 4px;
  }
  .nav-logo, .nav-title, .nav-footer { display: none; }
  .nav-item { padding: 6px 10px; font-size: 12px; gap: 4px; }
  .nav-item .nav-icon { font-size: 14px; width: auto; }

  /* 主区域 */
  #app { margin-left: 0; padding: 10px; }
  body { flex-direction: column; }

  /* 首页 */
  .home-hero { flex-direction: column; gap: 20px; }
  .home-right { width: 100%; flex-direction: column; padding-top: 0; }
  .home-img-card { max-width: 100%; }
  .home-title { font-size: 22px; }
  .home-card { flex-direction: column; padding: 16px; }
  .home-card-icon { font-size: 28px; }
  .home-card-text h2 { font-size: 16px; }
  .home-card-text p { font-size: 14px; }

  /* 筛选栏 */
  .filter-bar { padding: 8px; }
  .filter-row { gap: 4px; }
  .filter-chip { font-size: 10px; padding: 2px 6px; }

  /* 表格横向滚动 */
  .table-wrapper { max-height: 50vh; }
  table { font-size: 11px; }
  thead th { font-size: 10px; padding: 4px 6px; }
  tbody td { font-size: 10px; padding: 3px 5px; }

  /* 模型配置 */
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .dim-left { width: 50px; }
  .dim-label { font-size: 10px; }

  /* 实盘跟踪 */
  #live-page .card { padding: 8px 10px; }
  #live-content > div:first-of-type + div { flex-direction: column; }
  #live-content > div:first-of-type + div > div { width: 100% !important; min-width: 0 !important; }

  /* 弹窗 */
  .custom-model-modal { min-width: auto !important; width: 95%; padding: 16px; }
  .progress-modal { min-width: auto; padding: 32px 24px; }

  /* 顶栏 — 手机端放到导航下面 */
  #top-bar {
    position: relative; top: auto; right: auto;
    border-radius: 0; justify-content: center;
    padding: 6px 12px; font-size: 12px; gap: 6px;
    box-shadow: none; border-bottom: 1px solid var(--border);
  }
  .top-bar-user { font-size: 12px; }
  .top-bar-btn { font-size: 11px; padding: 3px 8px; }

  /* 回测 */
  #bt-chart { height: 260px; }
  #model-page .card > div:last-of-type { flex-direction: column; }
  #model-page .card > div:last-of-type > div { width: 100% !important; min-width: 0 !important; }

  /* 评分说明 */
  .method-card { max-width: 100%; }
}
