/* ==========================================================================
   智投复盘 · 移动端优先与 PWA 全局设计系统
   Palette: Slate 900 (#0f172a), Slate 800 (#1e293b), Slate 700 (#334155)
   Accents: Sky Blue (#38bdf8), Red/Rise (#ef4444), Green/Fall (#22c55e), Amber (#fbbf24)
   ========================================================================== */

:root {
  --bg-main: #0b1120;
  --bg-card: #1e293b;
  --bg-card-hover: #243248;
  --bg-input: #0f172a;
  --border-subtle: #334155;
  --border-focus: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --color-up: #ef4444;
  --color-up-bg: rgba(239, 68, 68, 0.12);
  --color-down: #22c55e;
  --color-down-bg: rgba(34, 197, 94, 0.12);
  --color-primary: #38bdf8;
  --color-gold: #fbbf24;
  --tab-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 移动端独立容器（在PC上模拟手机精致窗口，手机上全屏运行） */
#app-container {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
}

/* 顶部状态栏与导航栏 */
.header-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: calc(var(--safe-top) + 8px) 16px 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.3);
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.brand-badge {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
  border-radius: 99px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 600;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 移动端/窄屏默认隐藏大屏切换按钮，避免挤压顶栏导致文字竖排 */
.mode-btn {
  display: none !important;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.3);
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.brand-badge {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
  border-radius: 99px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--bg-card-hover);
  color: #fff;
}

/* PWA 安装与离线引导条 */
.pwa-banner {
  background: linear-gradient(90deg, #1e3a8a, #0369a1);
  color: #fff;
  padding: 8px 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  animation: slideDown 0.3s ease-out;
}

.pwa-banner-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-install-btn {
  background: #fff;
  color: #0369a1;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.pwa-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  margin-left: 6px;
}

/* 核心内容视口 */
.content-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px calc(var(--tab-height) + var(--safe-bottom) + 16px) 14px;
  -webkit-overflow-scrolling: touch;
}

/* 搜索栏组件 */
.search-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.search-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.search-icon {
  font-size: 14px;
  color: var(--text-sub);
  margin-right: 8px;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  flex: 1;
  width: 100%;
}

.search-input::placeholder {
  color: var(--text-sub);
}

.search-clear {
  color: var(--text-sub);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

/* 搜索下拉候选菜单 */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 40;
  max-height: 280px;
  overflow-y: auto;
}

.search-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  cursor: pointer;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:active {
  background: var(--bg-card-hover);
}

.item-left {
  display: flex;
  flex-direction: column;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* 通用板块与卡片 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 8px 0;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-link {
  font-size: 12px;
  color: var(--color-primary);
  cursor: pointer;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 大盘核心指数网格 */
.indices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.index-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.index-box:active {
  transform: scale(0.96);
}

.index-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.index-price {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.index-chg {
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
}

/* 涨跌颜色规范 */
.up { color: var(--color-up) !important; }
.down { color: var(--color-down) !important; }
.flat { color: var(--text-muted) !important; }

/* 实时盯盘池横幅 */
.monitor-pool-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 1.8s infinite;
  margin-right: 6px;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.monitor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  cursor: pointer;
}

.monitor-row:last-child {
  border-bottom: none;
}

.monitor-info {
  display: flex;
  flex-direction: column;
}

.monitor-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
  font-weight: 600;
}

.monitor-rules {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 3px;
}

.monitor-values {
  text-align: right;
}

.monitor-price {
  font-size: 15px;
  font-weight: bold;
}

.monitor-status-pill {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  font-weight: bold;
}

.status-watching {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.status-triggered {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* 连板天梯矩阵概览 */
.ladder-matrix-card {
  padding: 12px;
}

.ladder-date-bar {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.ladder-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ladder-badge-item {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
}

.ladder-badge-item .val {
  font-size: 16px;
  font-weight: 800;
  display: block;
  margin-top: 2px;
}

/* 全景复盘温度计 */
.temperature-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
}

.temp-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.temp-score-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.temp-score {
  font-size: 34px;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}

.temp-unit {
  font-size: 14px;
  color: var(--text-muted);
}

.temp-tag {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
  font-weight: bold;
}

.turnover-stat {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.turnover-val {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

/* 涨跌能量条 */
.ratio-bar-wrapper {
  margin: 12px 0;
}

.ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: 600;
}

.ratio-bar {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  background: var(--bg-input);
}

.ratio-up {
  background: var(--color-up);
  transition: width 0.4s;
}

.ratio-down {
  background: var(--color-down);
  transition: width 0.4s;
}

/* AI 收盘战报与异动列表 */
.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.insight-dot {
  color: var(--color-primary);
  font-weight: bold;
}

.anomaly-card {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
}

.anomaly-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.anomaly-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.anomaly-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-gold);
  font-weight: 600;
}

.anomaly-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* 新闻资讯卡片 */
.news-category-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.news-cat-pill {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

.news-cat-pill.active {
  background: var(--color-primary);
  color: #0f172a;
  font-weight: bold;
  border-color: var(--color-primary);
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.news-source {
  color: var(--color-primary);
  font-weight: 600;
}

.news-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.45;
  margin-bottom: 6px;
}

.news-summary-box {
  background: rgba(15, 23, 42, 0.6);
  border-left: 2px solid var(--color-primary);
  padding: 6px 10px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  border-radius: 0 6px 6px 0;
}

/* 底部常驻导航 TabBar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  max-width: 500px;
  margin: 0 auto;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  cursor: pointer;
  color: var(--text-sub);
  transition: color 0.15s;
}

.tab-item.active {
  color: var(--color-primary);
}

.tab-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
}

/* 标的详情抽屉 Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(var(--safe-bottom) + 16px) 16px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show .modal-sheet {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.modal-stock-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.modal-stock-code {
  font-size: 13px;
  color: var(--text-sub);
}

.modal-close-btn {
  background: rgba(51, 65, 85, 0.5);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

/* 分时走势 Canvas 容器 */
.chart-container {
  width: 100%;
  height: 220px;
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
}

.chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 按钮与表单控件 */
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
  width: 100%;
}

.btn-primary:active {
  transform: scale(0.98);
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
}

/* 合规免责声明条 */
.disclaimer-card {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.5;
  text-align: center;
  padding: 16px 12px;
  margin-top: 16px;
  border-top: 1px dashed var(--border-subtle);
}

/* 动效 */
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

/* ==================== 标的综合详情全景面板样式 ==================== */
.detail-full-sheet {
  max-height: 94vh !important;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
}

.back-link {
  color: var(--color-primary);
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
}

.btn-watchlist {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-watchlist.active {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #0f172a;
}

.detail-hero-card {
  padding: 14px;
  margin-bottom: 10px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 14px;
}

.detail-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.detail-big-price {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.detail-chg-row {
  font-size: 14px;
  font-weight: bold;
  margin-top: 4px;
}

.anomaly-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-weight: bold;
}

.detail-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 4px;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  padding-top: 10px;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.m-lbl {
  font-size: 11px;
  color: #64748b;
}

.m-val {
  font-size: 13px;
  font-weight: bold;
  color: #f8fafc;
  margin-top: 2px;
}

.chart-tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.c-tab {
  padding: 5px 14px;
  font-size: 12px;
  border-radius: 6px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #94a3b8;
  cursor: pointer;
  font-weight: 600;
}

.c-tab.active {
  background: var(--color-primary);
  color: #0f172a;
  font-weight: bold;
  border-color: var(--color-primary);
}

.depth-grid,
.depth-wrapper {
  display: flex;
  gap: 12px;
}

.depth-col,
.depth-column {
  flex: 1;
  font-size: 12px;
}

.depth-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.depth-row:last-child {
  border-bottom: none;
}

.depth-divider {
  width: 1px;
  background: #334155;
}

/* ==================== 我的自选股看板组件 ==================== */
.watchlist-card {
  padding: 0;
  overflow: hidden;
}

.watchlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease;
}

.watchlist-row:last-child {
  border-bottom: none;
}

.watchlist-row:hover,
.watchlist-row:active {
  background: rgba(255, 255, 255, 0.04);
}

.watchlist-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.watchlist-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.watchlist-name {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
}

.watchlist-code {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
}

.watchlist-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 8px;
}

.watchlist-price {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-number);
  text-align: right;
  min-width: 60px;
}

.watchlist-pct-pill {
  min-width: 68px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-number);
  text-align: center;
  color: #fff;
}

.watchlist-pct-pill.up {
  background: var(--up-color);
}

.watchlist-pct-pill.down {
  background: var(--down-color);
}

.watchlist-del-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 14px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.watchlist-del-btn:hover,
.watchlist-del-btn:active {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================================
   桌面端专属：专业多栏并排盯盘大屏 (Desktop Multi-Pane Dashboard)
   ========================================================================== */
.desktop-nav-tabs {
  display: none;
}

@media (min-width: 1024px) {
  body:not(.force-mobile) {
    overflow-x: hidden;
  }

  body:not(.force-mobile) #app-container {
    max-width: 1680px;
    width: 98%;
    margin: 0 auto;
    box-shadow: none;
    min-height: 100vh;
  }

  body:not(.force-mobile) .tab-bar {
    display: none !important;
  }

  body:not(.force-mobile) .desktop-nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  body:not(.force-mobile) .mode-btn {
    display: inline-flex !important;
  }

  body:not(.force-mobile) .content-viewport {
    max-width: 100%;
    padding: 12px 0 24px 0;
  }

  body:not(.force-mobile):not(.desk-single-view) #mobile-views-wrapper {
    display: none !important;
  }

  body:not(.force-mobile):not(.desk-single-view) #desktop-dashboard {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
  }

  body:not(.force-mobile).desk-single-view #desktop-dashboard {
    display: none !important;
  }

  body:not(.force-mobile).desk-single-view #mobile-views-wrapper {
    display: block !important;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
  }

  body:not(.force-mobile) #stock-detail-modal {
    display: none !important;
  }

  body:not(.force-mobile) .modal-overlay {
    align-items: center;
    justify-content: center;
  }

  body:not(.force-mobile) .modal-sheet {
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    transform: scale(0.96);
    margin-bottom: 0;
  }

  body:not(.force-mobile) .modal-overlay.show .modal-sheet {
    transform: scale(1);
  }
}

.desk-nav-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.desk-nav-btn:hover {
  border-color: #38bdf8;
  color: #fff;
  background: rgba(56, 189, 248, 0.1);
}

.desk-nav-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* 顶部全景指数与情绪横条 */
.desk-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.desk-indices-flex {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.desk-index-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}

.desk-index-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.desk-index-item .lbl {
  color: var(--text-muted);
  font-size: 12px;
}

.desk-index-item .val {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.desk-index-item .chg {
  font-weight: 700;
  font-size: 13px;
}

.desk-divider {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  margin: 0 4px;
}

.desk-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desk-view-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.desk-view-toggle-btn:hover {
  border-color: var(--color-primary);
  color: #fff;
}

.desk-view-toggle-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
  border-color: var(--border-focus);
}

/* 核心三栏网格布局 */
.desk-grid-layout {
  display: grid;
  grid-template-columns: 330px 1fr 380px;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 1360px) and (min-width: 1024px) {
  .desk-grid-layout {
    grid-template-columns: 300px 1fr 340px;
    gap: 10px;
  }
}

.desk-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 700px;
}

/* --- 左栏：选股面板 --- */
.desk-tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.desk-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.desk-tab-btn:hover {
  color: #fff;
}

.desk-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
}

.desk-scroll-pane {
  flex: 1;
  overflow-y: auto;
  max-height: 700px;
  padding-right: 4px;
}

.desk-stock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desk-stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.45);
  transition: all 0.15s ease;
}

.desk-stock-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(2px);
}

.desk-stock-item.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.desk-stock-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.desk-stock-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.desk-stock-item-code {
  font-size: 11px;
  color: var(--text-sub);
}

.desk-stock-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.desk-stock-item-price {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.desk-stock-item-pill {
  min-width: 62px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

/* 天梯面板 */
.desk-ladder-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.desk-ladder-group {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
}

.desk-ladder-title {
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desk-ladder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.desk-ladder-tag {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.desk-ladder-tag:hover {
  background: #ef4444;
  color: #fff;
}

/* --- 中栏：核心大图与盘口 --- */
.desk-col-center {
  padding: 16px 20px;
}

.desk-stock-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.desk-hero-left {
  display: flex;
  flex-direction: column;
}

.desk-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.desk-stock-name {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.desk-stock-code {
  font-size: 14px;
  color: var(--text-sub);
  font-family: var(--font-number);
}

.desk-price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 4px;
}

.desk-big-price {
  font-size: 32px;
  font-weight: 900;
  font-family: var(--font-number);
}

.desk-big-chg {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-number);
}

.desk-hero-actions {
  display: flex;
  gap: 8px;
}

.desk-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.4);
  margin-bottom: 12px;
}

.desk-chart-section {
  margin-bottom: 14px;
}

.desk-chart-container {
  width: 100%;
  height: 360px;
  background: #0b1120;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.desk-bottom-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.desk-depth-card,
.desk-anomaly-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
}

.desk-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

/* --- 右栏：实时情报与策略流 --- */
.desk-col-right {
  display: flex;
  flex-direction: column;
}

.desk-right-section {
  display: flex;
  flex-direction: column;
}

.desk-right-section.flex-1 {
  flex: 1;
  min-height: 0;
}

.desk-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.desk-rules-list {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desk-news-container {
  flex: 1;
  overflow-y: auto;
  max-height: 440px;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desk-news-item {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.desk-news-item:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: var(--bg-card-hover);
}

.desk-news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.desk-news-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.4;
  margin-bottom: 4px;
}

.desk-news-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 2px solid #38bdf8;
}

/* 盘后复盘大屏模式 */
.desk-review-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

