/* Apollo Pro · Apollo-Pro-Modules-Detailed-UI 对齐 */

:root {
  --pro-sidebar-w: 240px;
  --pro-bg: #f4f4f5;
  --pro-surface: #ffffff;
  --pro-border: #e5e7eb;
  --pro-text: #0f172a;
  --pro-muted: #64748b;
  --pro-accent: #6366f1;
  --pro-accent-soft: rgba(99, 102, 241, 0.1);
  --pro-sidebar-bg: #18181b;
  --pro-sidebar-text: #fafafa;
  --pro-sidebar-muted: #a1a1aa;
  --font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--pro-bg);
  color: var(--pro-text);
  -webkit-font-smoothing: antialiased;
}

/* 跳过链接与刘海安全区 */
.skip-link.pro-skip {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 0.5rem 1rem;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  z-index: 300;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  text-decoration: none;
  font-size: 13px;
}

.skip-link.pro-skip:focus {
  transform: translateY(0);
  outline: 2px solid var(--pro-accent);
  outline-offset: 2px;
}

.pro-app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
  position: relative;
}

/* Topbar */
.pro-topbar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--pro-surface);
  border-bottom: 1px solid var(--pro-border);
  gap: 16px;
  position: relative;
  z-index: 200;
  overflow: visible;
}

.pro-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pro-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #f4f4f5;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--pro-text);
}

.pro-brand-wrap {
  text-decoration: none;
  color: inherit;
}

.pro-brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pro-text);
}

.pro-api-pill {
  font-size: 11px;
  font-weight: 600;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: min(360px, 55vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.pro-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  overflow: visible;
}

.pro-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pro-muted);
}

.pro-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s;
}

.pro-icon-btn:hover {
  background: #f4f4f5;
}

.pro-icon-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pro-icon-btn-badged {
  position: relative;
}

.pro-icon-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.pro-icon-badge[hidden],
.pro-im-edge-badge[hidden] {
  display: none !important;
}

.pro-topbar-login-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-accent);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.pro-topbar-login-link:hover {
  background: var(--pro-accent-soft);
}

.pro-topbar-dd-wrap {
  position: relative;
}

.pro-topbar-dd-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 10px;
  border: 1px solid var(--pro-border);
  background: #fafafa;
  font-family: inherit;
  cursor: pointer;
  max-width: 220px;
  transition: border-color 0.15s, background 0.15s;
}

.pro-topbar-dd-trigger:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: #fff;
}

.pro-topbar-dd-trigger[aria-expanded="true"] {
  border-color: var(--pro-accent);
  background: var(--pro-accent-soft);
}

.pro-topbar-dd-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.pro-topbar-dd-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}

.pro-topbar-dd-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.pro-topbar-dd-tier {
  font-size: 11px;
  color: var(--pro-muted);
}

.pro-topbar-dd-caret {
  margin-left: auto;
  font-size: 10px;
  color: var(--pro-muted);
  flex-shrink: 0;
}

.pro-topbar-dd-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  z-index: 50;
}

.pro-topbar-dd-menu[hidden] {
  display: none !important;
}

.pro-topbar-dd-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--pro-text);
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.pro-topbar-dd-item:hover {
  background: #f4f4f5;
}

.pro-topbar-dd-danger {
  color: #dc2626;
}

.pro-topbar-dd-danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* 顶栏通知下拉 */
.pro-notify-shell {
  position: relative;
  z-index: 201;
}

.pro-notify-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 24px));
  min-width: 280px;
  max-height: min(480px, calc(100vh - 80px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.06),
    0 16px 40px rgba(15, 23, 42, 0.14);
  z-index: 10080;
}

.pro-notify-panel[hidden] {
  display: none !important;
}

.pro-notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pro-text);
  border-bottom: 1px solid var(--pro-border);
  flex-shrink: 0;
}

.pro-notify-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--pro-muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pro-accent-soft);
  flex-shrink: 0;
}

.pro-notify-list {
  margin: 0;
  padding: 8px;
  list-style: none;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 72px;
  -webkit-overflow-scrolling: touch;
}

.pro-notify-list > li {
  margin: 0 0 8px;
}

.pro-notify-list > li:last-child {
  margin-bottom: 0;
}

.pro-notify-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pro-border);
  border-radius: 10px;
  background: var(--pro-bg);
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
  box-sizing: border-box;
}

.pro-notify-item:hover {
  background: var(--pro-accent-soft);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.pro-notify-list > li.is-read .pro-notify-item {
  opacity: 0.62;
}

.pro-notify-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pro-notify-item-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pro-text);
  word-break: break-word;
}

.pro-notify-item-meta {
  display: block;
  font-size: 12px;
  color: var(--pro-muted);
  line-height: 1.45;
  word-break: break-word;
}

.pro-notify-item-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--pro-muted);
  white-space: nowrap;
  padding-top: 2px;
}

.pro-notify-foot {
  flex-shrink: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--pro-border);
  background: var(--pro-surface);
}

.pro-notify-mark-all {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px dashed var(--pro-border);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-accent);
  cursor: pointer;
}

.pro-notify-empty {
  padding: 4px 0;
}

.pro-notify-empty .pro-muted {
  display: block;
  padding: 16px 12px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--pro-muted);
}

.pro-notify-mark-all:hover {
  background: var(--pro-accent-soft);
  border-style: solid;
}

/* 上下文内嵌聊（Portal-IM ContextualChat 静态示意） */
.pro-ctx-chat {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
}

.pro-ctx-chat--inline {
  margin-top: 14px;
  background: var(--pro-surface);
}

.pro-ctx-chat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-text);
  margin-bottom: 10px;
}

.pro-ctx-chat-ctx {
  font-size: 12px;
  font-weight: 500;
  color: var(--pro-muted);
}

.pro-ctx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pro-ctx-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--pro-border);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--pro-text);
}

.pro-ctx-chip:hover {
  border-color: var(--pro-accent);
  background: var(--pro-accent-soft);
}

.pro-ctx-thread {
  min-height: 48px;
  max-height: 360px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.pro-ctx-thread--compact {
  max-height: 240px;
}

.pro-ctx-msg {
  margin-bottom: 8px;
}
.pro-ctx-msg-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--pro-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pro-ctx-msg-content {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.pro-ctx-msg--user .pro-ctx-msg-content {
  background: var(--pro-accent-soft, rgba(99,102,241,0.1));
  color: var(--pro-text);
}
.pro-ctx-msg--ai .pro-ctx-msg-content {
  background: rgba(99,102,241,0.08);
  color: var(--pro-text);
}

.pro-ctx-line {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.pro-ctx-line-user {
  background: var(--pro-accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.pro-ctx-line-bot {
  background: #fff;
  border: 1px solid var(--pro-border);
}

.pro-ctx-line strong {
  display: block;
  font-size: 11px;
  color: var(--pro-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pro-ctx-composer {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pro-ctx-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--pro-border);
  font-family: inherit;
  font-size: 13px;
}

.pro-ctx-send {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--pro-accent);
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  font-size: 13px;
}

.pro-ctx-send:hover {
  opacity: 0.92;
}

/* 自选股板块环图 + 热力格 */
.pro-sector-viz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.pro-donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.pro-donut::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: var(--pro-surface);
  box-shadow: inset 0 0 0 1px var(--pro-border);
}

.pro-donut-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--pro-muted);
  line-height: 1.8;
}

.pro-donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  font-style: normal;
}

.pro-heat-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pro-heat-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--pro-muted);
}

.pro-heat-cells {
  display: flex;
  gap: 4px;
}

.pro-heat-cells span {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.pro-heat-h {
  background: #22c55e;
  opacity: 0.95;
  box-shadow: 0 0 4px rgba(34,197,94,0.5);
}

.pro-heat-m {
  background: #f59e0b;
  opacity: 0.9;
  box-shadow: 0 0 3px rgba(245,158,11,0.4);
}

.pro-heat-l {
  background: #374151;
  opacity: 0.6;
}

/* Workspace：主区 + Portal IM 右侧栏 */
.pro-workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  min-width: 0;
}

/* Body */
.pro-body {
  flex: 1;
  display: flex;
  min-height: 0;
  min-width: 0;
}

.pro-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 35;
}

.pro-sidebar-overlay.is-visible {
  display: block;
}

.pro-sidebar {
  width: var(--pro-sidebar-w);
  flex-shrink: 0;
  background: var(--pro-sidebar-bg);
  color: var(--pro-sidebar-text);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 40;
  overflow-y: auto;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.pro-sidebar-back {
  display: block;
  padding: 14px 16px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--pro-sidebar-muted);
  text-decoration: none;
}

.pro-sidebar-back:hover {
  color: #fff;
}

.pro-sidebar-head {
  padding: 12px 16px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
}

.pro-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
  flex: 1;
  overflow-y: auto;
}

.pro-nav-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.pro-nav-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #d4d4d8;
  transition: background 0.15s, color 0.15s;
}

.pro-nav-item:hover .pro-nav-item-main {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.pro-nav-item.is-active .pro-nav-item-main {
  background: var(--pro-accent-soft);
  color: #a5b4fc;
  box-shadow: inset 3px 0 0 0 var(--pro-accent);
}

.pro-nav-emoji {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.pro-nav-meta {
  padding: 0 12px 10px 44px;
  font-size: 11px;
  color: #71717a;
  line-height: 1.45;
}

.pro-nav-item.is-active .pro-nav-meta {
  color: #a1a1aa;
}

/* 智能量化 · 侧栏锁定（布局与同排 nav 项一致，仅追加锁图标） */
.pro-nav-item--quant .pro-nav-lock {
  margin-left: auto;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  color: #fbbf24;
  animation: pro-quant-lock-pulse 2.2s ease-in-out infinite;
}

.pro-nav-item--quant.is-locked .nav-label {
  color: var(--pro-text-secondary, #a1a1aa);
}

.pro-nav-item--quant.is-lock-nudge {
  animation: pro-quant-nav-nudge 0.65s ease;
}

@keyframes pro-quant-lock-pulse {
  0%,
  100% {
    opacity: 0.55;
    filter: brightness(0.95);
  }
  50% {
    opacity: 1;
    filter: brightness(1.15);
  }
}

@keyframes pro-quant-nav-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

.pro-quant-upgrade-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 100020;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
  border: 1px solid rgba(129, 140, 248, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #e0e7ff;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.25s ease;
}

.pro-quant-upgrade-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pro-quant-upgrade-toast[hidden]:not(.is-visible) {
  display: none;
}

.pro-quant-upgrade-toast-icon {
  font-size: 22px;
  flex-shrink: 0;
  animation: pro-quant-lock-pulse 2s ease-in-out infinite;
}

.pro-quant-upgrade-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.pro-quant-upgrade-toast-text strong {
  font-size: 14px;
  color: #fff;
}

.pro-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.pro-quant-upgrade-toast-close {
  border: none;
  background: transparent;
  color: #a5b4fc;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.pro-panel.is-quant-locked > :not(.pro-quant-lock-overlay) {
  pointer-events: none;
  user-select: none;
  filter: blur(2px);
  opacity: 0.35;
}

.pro-quant-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(6px);
  border-radius: inherit;
}

.pro-quant-lock-overlay[hidden] {
  display: none !important;
}

#panel-quant {
  position: relative;
}

.pro-quant-lock-card {
  max-width: 420px;
  text-align: center;
  padding: 28px 24px;
  border-radius: 16px;
  background: linear-gradient(160deg, #1e1b4b 0%, #0f0f12 100%);
  border: 1px solid rgba(129, 140, 248, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: pro-quant-lock-card-in 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes pro-quant-lock-card-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pro-quant-lock-icon {
  font-size: 40px;
  margin-bottom: 12px;
  animation: pro-quant-lock-pulse 2s ease-in-out infinite;
}

.pro-quant-lock-desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: #c4b5fd;
}

.pro-quant-lock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Main */
.pro-main {
  flex: 1;
  overflow: auto;
  padding: 24px;
  min-width: 0;
}

.pro-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
}

.pro-panel.is-active {
  display: block;
  animation: proFade 0.25s ease;
}

@keyframes proFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pro-panel-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.pro-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.pro-watchlist-toolbar {
  margin-bottom: 10px;
}

.pro-watchlist-title {
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.pro-watchlist-filter-input {
  flex: 0 1 220px;
  min-width: 140px;
  max-width: 280px;
  margin: 0;
}

.pro-watchlist-toolbar-spacer {
  flex: 1 1 auto;
  min-width: 8px;
}

@media (max-width: 640px) {
  .pro-watchlist-filter-input {
    flex: 1 1 100%;
    max-width: none;
  }
  .pro-watchlist-toolbar-spacer {
    display: none;
  }
}

/* 自选股折叠动画 */
#pro-watchlist-body-wrap.pro-collapsed {
  max-height: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-width: 0 !important;
  transition: max-height 0.25s ease, padding 0.25s ease, margin 0.25s ease, border 0.25s ease;
}
#pro-watchlist-body-wrap {
  max-height: 9999px;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease, margin 0.25s ease, border 0.25s ease;
}
#pro-watchlist-collapse {
  cursor: pointer;
  user-select: none;
}
#pro-watchlist-collapse.pro-collapsed {
  transform: rotate(-90deg);
}

.pro-input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 9px 14px;
  border: 1px solid var(--pro-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--pro-surface);
}

.pro-input:focus {
  outline: none;
  border-color: var(--pro-accent);
  box-shadow: 0 0 0 3px var(--pro-accent-soft);
}

.pro-btn {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pro-btn:hover {
  background: var(--pro-surface-2, #f8fafc);
}

.pro-btn-primary {
  background: var(--pro-accent);
  border-color: var(--pro-accent);
  color: #fff;
}

.pro-btn-primary:hover {
  background: #4f46e5;
  border-color: #4f46e5;
}

.pro-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.pro-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-muted);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Index row */
.pro-index-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pro-index-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 10px;
  padding: 14px;
}

.pro-index-name {
  font-size: 12px;
  color: var(--pro-muted);
  margin-bottom: 6px;
}

.pro-index-price {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pro-index-chg {
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

.pro-up {
  color: #dc2626;
}
.pro-down {
  color: #16a34a;
}
.pro-flat {
  color: #60a5fa;
}

/* Table */
.pro-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pro-border);
  border-radius: 10px;
  background: var(--pro-surface);
}

.pro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pro-table th,
.pro-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--pro-border);
  white-space: nowrap;
}

.pro-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pro-muted);
  background: #fafafa;
}

.pro-table tr:last-child td {
  border-bottom: none;
}

.pro-table .sym {
  font-weight: 600;
}

.pro-table .sub {
  font-size: 11px;
  color: var(--pro-muted);
  display: block;
}

/* ★ 自选股操作按钮（pill 风格） */
.pro-pill-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.pro-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--pro-surface-2);
  color: var(--pro-text-secondary);
  border: 1px solid var(--pro-border);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  line-height: 1.6;
  white-space: nowrap;
}

.pro-pill:hover {
  background: var(--pro-surface-3);
  color: var(--pro-text);
  border-color: var(--pro-text-muted);
}

/* 移除按钮 */
.pro-pill-remove {
  color: #ef4444 !important;
  border-color: rgba(239,68,68,0.3) !important;
  background: transparent !important;
}
.pro-pill-remove:hover {
  background: rgba(239,68,68,0.1) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

/* 编辑按钮 */
.pro-pill[data-pro-action="watchlist-edit"] {
  color: var(--pro-accent) !important;
  border-color: rgba(99,102,241,0.3) !important;
  background: transparent !important;
}
.pro-pill[data-pro-action="watchlist-edit"]:hover {
  background: var(--pro-accent-soft) !important;
  border-color: var(--pro-accent) !important;
}

/* 价格提醒百分比按钮 */
.as-pct-btn:hover {
  border: 1px solid var(--pro-accent) !important;
  background: var(--pro-accent-soft) !important;
}
#pro-watchlist-tbody td:nth-child(3),
#pro-watchlist-tbody td:nth-child(4),
#pro-watchlist-tbody td:nth-child(5),
#pro-watchlist-tbody td:nth-child(6),
#pro-watchlist-tbody td:nth-child(7),
#pro-watchlist-tbody td:nth-child(8) {
  text-align: right;
}
/* ★ 表头右对齐同步 */
.pro-table th:nth-child(3),
.pro-table th:nth-child(4),
.pro-table th:nth-child(5),
.pro-table th:nth-child(6),
.pro-table th:nth-child(7),
.pro-table th:nth-child(8) {
  text-align: right;
}

/* Research */
.pro-progress {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 10px 0;
}

.pro-progress-bar {
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, var(--pro-accent), #06b6d4);
  border-radius: 4px;
}

.pro-report-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.pro-report-meta {
  font-size: 12px;
  color: var(--pro-muted);
  margin-bottom: 10px;
}

.pro-report-serial {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #94a3b8;
  font-weight: 600;
}

.pro-report-abs {
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 12px;
}

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

.pro-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--pro-accent-soft);
  color: #4f46e5;
}

.pro-tag-action {
  cursor: pointer;
  font-weight: 600;
  color: #4338ca;
  border: 1px solid rgba(67, 56, 202, 0.35);
  background: rgba(99, 102, 241, 0.12);
}

.pro-tag-action:hover {
  background: rgba(99, 102, 241, 0.22);
}

.pro-research-api-empty {
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px dashed var(--pro-border);
  background: var(--pro-surface);
}

/* Monitor */
.pro-alert {
  border: 1px solid var(--pro-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--pro-surface);
}

.pro-alert-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-alert-body {
  font-size: 13px;
  color: var(--pro-muted);
  line-height: 1.5;
}

.pro-alert.is-unread {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.pro-alert-unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  margin-left: auto;
  flex-shrink: 0;
}

.pro-alert-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pro-alert-time {
  font-size: 11px;
  color: var(--pro-muted);
}

.pro-alert-actions {
  margin: 0;
  padding: 0;
  gap: 6px;
}

.pro-monitor-empty {
  padding: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.pro-monitor-pin {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--pro-border);
}

.pro-monitor-pin-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--pro-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.pro-monitor-group {
  margin-bottom: 12px;
}

.pro-monitor-group-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-muted);
}

.pro-monitor-unread {
  font-size: 12px;
  font-weight: 500;
  color: #a5b4fc;
}

/* 自选股异动：五列等分宽 + 独立对齐（不受自选表 nth-child 影响） */
.pro-monitor-moves-wrap {
  border-radius: var(--pro-radius-lg, 10px);
  overflow: hidden;
}

.pro-monitor-moves-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.pro-monitor-moves-table col.col-time,
.pro-monitor-moves-table col.col-name,
.pro-monitor-moves-table col.col-price,
.pro-monitor-moves-table col.col-pct,
.pro-monitor-moves-table col.col-type {
  width: 20%;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table thead th,
#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody td {
  width: 20%;
  box-sizing: border-box;
  padding: 10px 8px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--pro-text-muted, var(--pro-muted));
  background: var(--pro-surface-2, #fafafa);
  border-bottom: 1px solid var(--pro-border);
  text-align: center;
  white-space: nowrap;
  text-transform: none;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table thead th.col-name {
  text-align: left;
  padding-left: 12px;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody td {
  border-bottom: 1px solid var(--pro-border-light, var(--pro-border));
  text-align: center;
  white-space: nowrap;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody tr:last-child td {
  border-bottom: none;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody tr:hover td {
  background: var(--pro-surface-2, rgba(0, 0, 0, 0.03));
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody td.col-time {
  color: var(--pro-text-muted, var(--pro-muted));
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody td.col-name {
  text-align: left;
  padding-left: 12px;
  padding-right: 6px;
  white-space: nowrap;
}

.pro-monitor-stock {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  line-height: 1.35;
  vertical-align: middle;
}

.pro-monitor-stock .sym {
  font-weight: 600;
  color: var(--pro-text, inherit);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-monitor-stock .code {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  color: var(--pro-text-muted, var(--pro-muted));
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody td.col-price,
#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody td.col-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

#panel-monitor .pro-monitor-moves-wrap .pro-monitor-moves-table tbody td.col-type {
  padding-right: 10px;
}

.pro-monitor-move-tag {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  background: var(--pro-surface-2, #f4f4f5);
  border: 1px solid var(--pro-border);
  color: var(--pro-text-secondary, var(--pro-muted));
  white-space: nowrap;
}

.pro-monitor-move-tag.is-hot {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #d97706;
}

.pro-monitor-move-tag.is-calm {
  opacity: 0.88;
}

/* Advisor */
.pro-advisor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.pro-chip {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pro-chip:hover {
  border-color: var(--pro-accent);
  box-shadow: 0 4px 12px var(--pro-accent-soft);
}

.pro-advisor-note {
  font-size: 13px;
  color: var(--pro-muted);
  line-height: 1.6;
  padding: 16px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px dashed var(--pro-border);
}

.pro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .pro-split {
    grid-template-columns: 1fr;
  }
}

/* 股票详情（自选股展开） */
.pro-stock-detail.is-hidden {
  display: none !important;
}

.pro-stock-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pro-stock-detail-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pro-stock-price {
  font-size: 22px;
  font-weight: 700;
}

.pro-kline-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.pro-kline-tab {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--pro-border);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-muted);
  cursor: pointer;
}

.pro-kline-tab.is-active {
  border-color: var(--pro-accent);
  color: var(--pro-accent);
  background: var(--pro-accent-soft);
}

.pro-kline-tab.is-disabled {
  opacity: 0.45;
  color: var(--pro-muted);
  background: var(--pro-surface-2, #f1f5f9);
  border-color: var(--pro-border);
  cursor: not-allowed;
  pointer-events: auto;
}

.pro-kline-tab.is-disabled:hover,
.pro-kline-tab.is-disabled:focus {
  background: var(--pro-surface-2, #f1f5f9);
  border-color: var(--pro-border);
  color: var(--pro-muted);
}

.pro-kline-placeholder {
  min-height: 320px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
    #fafafa;
  border: 1px solid var(--pro-border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 10px 12px;
  font-size: 12px;
  color: var(--pro-muted);
}

.pro-kline-intraday-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 8px 12px;
  margin: 0;
  border-radius: 8px;
  background: #0a0c10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca8b8;
  font-size: 13px;
  line-height: 1.4;
}

.pro-kline-intraday-meta[hidden] {
  display: none !important;
}

.pro-intraday-meta-name {
  font-weight: 600;
  color: #eceff4;
}

.pro-intraday-meta-price {
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.pro-intraday-meta-vol {
  font-variant-numeric: tabular-nums;
  color: #a8b0bd;
}

.pro-kline-chart-host {
  width: 100%;
  min-height: 280px;
  height: 280px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a2e;
}

.pro-kline-tooltip {
  position: absolute;
  z-index: 100;
  pointer-events: none;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  min-width: 160px;
}
.pro-kline-tooltip .kp-date {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.pro-kline-tooltip .kp-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.pro-kline-tooltip .kp-label {
  color: #64748b;
}
.pro-kline-tooltip .kp-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pro-kline-tooltip .kp-value.up {
  color: #f87171;
}
.pro-kline-tooltip .kp-value.down {
  color: #4ade80;
}
.pro-kline-tooltip .kp-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 4px 0;
}

.pro-kline-zoom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 0 2px;
}

.pro-kline-zoom-bar[hidden] {
  display: none !important;
}

.pro-kline-zoom-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--pro-border);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-text, #334155);
  cursor: pointer;
}

.pro-kline-zoom-btn:hover {
  border-color: var(--pro-accent);
  color: var(--pro-accent);
}

.pro-kline-zoom-hint {
  font-size: 11px;
  color: var(--pro-muted);
  margin-left: auto;
}

.pro-kline-ma-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px 0 0;
}

.pro-kline-ma-bar[hidden] {
  display: none !important;
}

.pro-kline-ma-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-muted);
  margin-right: 2px;
}

.pro-ma-toggle {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--pro-border);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  /* 文字始终为均线色；关闭时整体变淡，减少依赖图上 MA 文字标签 */
  color: var(--ma-color);
  cursor: pointer;
  --ma-color: var(--pro-accent);
  opacity: 0.48;
}

.pro-ma-toggle.is-on {
  opacity: 1;
  border-color: var(--ma-color);
  box-shadow: inset 0 0 0 1px var(--ma-color);
}

.pro-ma-toggle.is-on[data-period="5"] {
  background: rgba(250, 204, 21, 0.14);
}
.pro-ma-toggle.is-on[data-period="10"] {
  background: rgba(192, 132, 252, 0.14);
}
.pro-ma-toggle.is-on[data-period="20"] {
  background: rgba(34, 211, 238, 0.14);
}
.pro-ma-toggle.is-on[data-period="60"] {
  background: rgba(251, 146, 60, 0.14);
}

/* 研报铁三角示意 */
.pro-iron-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.pro-iron-mini-label {
  color: var(--pro-muted);
  font-weight: 600;
  margin-right: 4px;
}

.pro-iron-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f4f5;
  color: var(--pro-muted);
  font-weight: 600;
}

.pro-iron-pill.is-done {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.pro-iron-pill.is-active {
  background: var(--pro-accent-soft);
  color: var(--pro-accent);
}

/* 量化信号 */
.pro-signal-grid {
  display: block;
  width: 100%;
}

.pro-signal-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--pro-border);
  background: var(--pro-card-bg);
  transition: border-color 0.15s;
  min-width: 0;
}
.pro-signal-card:hover {
  border-color: var(--pro-accent);
}

.pro-signal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.pro-signal-name {
  font-weight: 600;
  font-size: 13px;
}

.pro-signal-score {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
}

.pro-signal-meta {
  font-size: 11px;
  color: var(--pro-muted);
  margin-bottom: 8px;
}

.pro-signal-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--pro-accent);
}

.pro-signal-tag-neutral {
  background: #f4f4f5;
  color: var(--pro-muted);
}

.pro-signal-tag-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

/* Portal IM · SidebarChat */
.pro-im-dock {
  right: 0;
  bottom: 0;
  flex-shrink: 0;
  display: flex;
  border-left: 1px solid var(--pro-border);
  background: var(--pro-surface);
  transition: width 0.22s ease;
  z-index: 20;
}

.pro-im-dock.is-collapsed {
  width: 48px;
}

.pro-im-dock:not(.is-collapsed) {
  width: min(360px, 92vw);
}

.pro-im-dock.is-expanded {
  width: calc(100vw - 240px);
  max-width: 800px;
}

.pro-im-edge-btn {
  width: 48px;
  flex-shrink: 0;
  border: none;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-left: 1px solid var(--pro-border);
  position: relative;
}

.pro-im-edge-badged .pro-im-edge-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.pro-im-edge-btn:hover {
  background: var(--pro-accent-soft);
}

.pro-im-dock:not(.is-collapsed) .pro-im-edge-btn {
  display: none;
}

.pro-im-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--pro-border);
}

.pro-im-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pro-border);
  font-size: 13px;
  font-weight: 600;
}

.pro-im-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pro-im-expand-btn {
  background: none;
  border: 1px solid var(--pro-border);
  border-radius: 6px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--pro-text-secondary);
  line-height: 1.4;
}

.pro-im-expand-btn:hover {
  background: var(--pro-accent-soft);
  color: var(--pro-text);
}

.pro-im-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.pro-im-clear {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
}

.pro-im-clear:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.pro-im-collapse {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--pro-muted);
  padding: 4px 8px;
  border-radius: 6px;
}

.pro-im-collapse:hover {
  background: #f4f4f5;
}

.pro-im-thread {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 200px;
  max-height: calc(100vh - 220px);
  background: #fafafa;
}

.pro-im-msg {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.pro-im-msg-user {
  margin-left: auto;
  align-items: flex-end;
}

.pro-im-msg-bot {
  margin-right: auto;
  align-items: flex-start;
}

/* 气泡样式由 pro-theme 画在外层 .pro-im-msg；正文区不再套第二层框 */
.pro-im-msg p,
.pro-im-msg-bot .pro-im-body,
.pro-im-msg-user .pro-im-body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.pro-im-msg-user p,
.pro-im-msg-user .pro-im-body {
  color: #fff;
  text-align: left;
}

.pro-im-role {
  font-size: 11px;
  font-weight: 700;
  color: var(--pro-muted);
}

.pro-im-user-av.message-avatar.user {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 11px;
  padding: 0;
}

.pro-im-user-av [data-avatar-img] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.pro-im-composer {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--pro-border);
  background: var(--pro-surface);
  align-items: flex-end;
}

.pro-im-tool {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--pro-border);
  background: #1c1c1e;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pro-im-tool:hover {
  background: #272729;
  border-color: var(--pro-accent);
  color: var(--pro-accent);
}

.pro-im-tool.is-recording {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ef4444;
  animation: im-voice-pulse 1.2s ease-in-out infinite;
}

@keyframes im-voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

.pro-im-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--pro-border);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

.pro-im-send {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--pro-accent);
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.pro-im-send:hover {
  opacity: 0.92;
}

.pro-im-foot {
  margin: 0;
  padding: 6px 12px 10px;
  font-size: 10px;
  color: var(--pro-muted);
  background: var(--pro-surface);
}

.pro-toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  max-width: min(420px, 92vw);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.25);
  pointer-events: none;
}

.pro-detail-diagnosis {
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
}

.pro-detail-diagnosis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
}

.pro-detail-diagnosis-head:hover {
  background: rgba(99,102,241,0.04);
}

.pro-detail-diagnosis-label-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pro-detail-diagnosis-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pro-muted);
  white-space: nowrap;
}

.pro-detail-diagnosis-ts {
  font-size: 10px;
  color: var(--pro-muted);
  white-space: nowrap;
}

.pro-detail-diagnosis-toggle {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--pro-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: transform 0.2s, color 0.2s;
  line-height: 1;
}

.pro-detail-diagnosis-toggle:hover {
  color: #6366f1;
}

.pro-detail-diagnosis.is-collapsed .pro-detail-diagnosis-toggle {
  transform: rotate(-90deg);
}

.pro-detail-diagnosis-body-wrap {
  padding: 0 14px 12px;
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 600px;
}

.pro-detail-diagnosis.is-collapsed .pro-detail-diagnosis-body-wrap {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.pro-detail-diagnosis-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--pro-text);
  white-space: pre-wrap;
}

/* 诊断语音按钮 */
.pro-detail-tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 6px;
  opacity: 0.5;
  color: var(--pro-text-secondary, #9699b8);
  transition: all 0.15s ease;
  user-select: none;
}
.pro-detail-tts-btn:hover {
  opacity: 1;
  background: rgba(99, 102, 241, 0.08);
  color: var(--pro-accent, #6366f1);
}
.pro-detail-tts-btn:active {
  opacity: 0.3;
}
.pro-detail-tts-btn.is-playing {
  opacity: 1;
  color: var(--pro-accent, #6366f1);
  background: rgba(99, 102, 241, 0.1);
}
.pro-detail-tts-btn.is-paused {
  opacity: 0.6;
  color: var(--pro-text-secondary, #9699b8);
  background: rgba(99, 102, 241, 0.05);
}
.pro-detail-tts-btn.is-playing .tts-wave-1 {
  animation: tts-wave-pulse 0.8s ease-in-out infinite;
}
.pro-detail-tts-btn.is-playing .tts-wave-2 {
  animation: tts-wave-pulse 0.8s ease-in-out 0.2s infinite;
}

@media (max-width: 768px) {
  .pro-im-dock:not(.is-collapsed) {
    position: fixed;
    right: 0;
    top: calc(56px + env(safe-area-inset-top, 0px));
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    width: min(360px, 100vw) !important;
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  }
}

@media (max-width: 768px) {
  .pro-menu-btn {
    display: inline-flex;
  }

  .pro-sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    height: auto;
  }

  .pro-sidebar.is-collapsed {
    transform: translateX(-100%);
  }

  .pro-main {
    padding: 16px;
  }
}

@media (pointer: coarse) {
  .pro-icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .pro-menu-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pro-panel.is-active {
    animation: none;
  }

  .pro-sidebar {
    transition: none;
  }
}

/* ========== 上下文阅读弹窗 ========== */
.pro-ctx-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.pro-ctx-overlay.open {
  display: flex;
}
.pro-ctx-modal {
  width: min(90vw, 900px);
  max-height: 85vh;
  background: var(--pro-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: proCtxFadeIn 0.18s ease-out;
}
@keyframes proCtxFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pro-ctx-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--pro-border, #e5e7eb);
  flex-shrink: 0;
}
.pro-ctx-modal-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--pro-text, #0f172a);
}
.pro-ctx-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--pro-muted, #64748b);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}
.pro-ctx-modal-close:hover {
  background: var(--pro-accent-soft, rgba(99,102,241,0.1));
  color: var(--pro-accent, #6366f1);
}
.pro-ctx-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--pro-text, #0f172a);
  white-space: pre-wrap;
  word-break: break-word;
}
.pro-ctx-modal-body .pro-ctx-msg-row {
  margin-bottom: 12px;
}
.pro-ctx-modal-body .pro-ctx-msg-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--pro-muted, #64748b);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pro-ctx-modal-body .pro-ctx-msg-content {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--pro-bg, #f4f4f5);
}

/* Sidebar clock */
.pro-sidebar-clock {
  padding: 8px 16px 14px;
  font-size: 12px;
  color: #a1a1aa;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.pro-sidebar-clock .pro-clock-time {
  font-size: 17px;
  font-weight: 600;
  color: #e4e4e7;
  letter-spacing: 0.02em;
  display: block;
}
.pro-sidebar-clock .pro-clock-date {
  display: block;
  margin-top: 1px;
}


/* ════════════════════════════════════════════
   飞羽智聊 — AI猜你想问
   ════════════════════════════════════════════ */

.pro-advisor-suggestion {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.pro-advisor-suggestion-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--pro-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pro-advisor-suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pro-advisor-suggestion-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--pro-border);
  background: var(--pro-bg);
  color: var(--pro-text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pro-advisor-suggestion-chip:hover {
  border-color: var(--pro-accent);
  background: color-mix(in srgb, var(--pro-accent) 8%, var(--pro-bg));
  color: var(--pro-accent);
}

.pro-advisor-suggestion-chip:active {
  transform: scale(0.97);
}

.pro-advisor-suggestion-chip .chip-icon {
  flex-shrink: 0;
  font-size: 14px;
  opacity: 0.7;
}

.pro-advisor-suggestion-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--pro-muted);
  text-align: right;
}

.pro-advisor-note {
  font-size: 13px;
  color: var(--pro-muted);
  line-height: 1.5;
  padding: 0 4px;
}

.pro-sigma-card {
  margin-bottom: 16px;
  overflow: hidden;
}

.pro-sigma-loading {
  text-align: center;
  padding: 24px;
  color: var(--pro-muted);
  font-size: 14px;
}

.pro-sigma-body {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pro-sigma-macro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--pro-bg);
  border-radius: 10px;
  border: 1px solid var(--pro-border);
}

.pro-sigma-macro-state {
  font-weight: 700;
  font-size: 18px;
  padding: 4px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.pro-sigma-macro-state.state-extreme-bull { background: #dcfce7; color: #166534; }
.pro-sigma-macro-state.state-bull        { background: #dcfce7; color: #166534; }
.pro-sigma-macro-state.state-light-bull  { background: #f0fdf4; color: #15803d; }
.pro-sigma-macro-state.state-light-bear  { background: #fef2f2; color: #b91c1c; }
.pro-sigma-macro-state.state-bear        { background: #fef2f2; color: #991b1b; }
.pro-sigma-macro-state.state-extreme-bear{ background: #fef2f2; color: #7f1d1d; }

.pro-sigma-macro-desc {
  font-size: 13px;
  color: var(--pro-muted);
  flex: 1;
  line-height: 1.4;
}

.pro-sigma-macro-score {
  font-size: 13px;
  color: var(--pro-muted);
  white-space: nowrap;
}

.pro-sigma-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pro-sigma-col-head {
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px 6px 0 0;
  text-align: center;
}

.pro-sigma-top { background: #dcfce7; color: #166534; }
.pro-sigma-flop { background: #fef2f2; color: #991b1b; }

.pro-sigma-list {
  background: var(--pro-bg);
  border: 1px solid var(--pro-border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.pro-sigma-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pro-border);
  font-size: 13px;
  transition: background 0.15s;
  cursor: pointer;
}

.pro-sigma-item:last-child {
  border-bottom: 0;
}

.pro-sigma-item:hover {
  background: var(--pro-hover);
}

.pro-sigma-item-rank {
  font-weight: 600;
  color: var(--pro-muted);
  min-width: 20px;
}

.pro-sigma-item-sym {
  font-weight: 600;
  flex: 1;
  margin-left: 8px;
}

.pro-sigma-item-name {
  font-size: 11px;
  color: var(--pro-muted);
}

.pro-sigma-item-score {
  font-weight: 600;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--pro-surface);
}

/* Top5 / Flop5 排名 */
.pro-rank-col {
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 10px 12px;
}
.pro-rank-title {
  font-size: 13px;
  font-weight: 600;
}
.pro-rank-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.pro-rank-row:last-child {
  border-bottom: none;
}
.pro-rank-num {
  width: 18px;
  font-size: 11px;
  color: var(--pro-muted);
  text-align: right;
  flex-shrink: 0;
}
.pro-rank-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-rank-score {
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-accent);
  min-width: 24px;
  text-align: right;
}

/* ── 量化模块 ── */
.pro-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pro-modal {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  width: 560px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.pro-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--pro-border);
  font-weight: 600;
  font-size: 15px;
  color: var(--pro-text);
}
.pro-modal-close {
  background: none;
  border: none;
  color: var(--pro-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.pro-modal-close:hover { color: var(--pro-text); }
.pro-modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.pro-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--pro-border);
}

/* 研报 DOCX 预览 */
.pro-report-preview-modal {
  width: min(920px, 94vw);
  max-height: 90vh;
}
.pro-report-preview-body {
  min-height: 200px;
  max-height: calc(90vh - 140px);
}
.pro-report-preview-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
  color: var(--pro-text);
}
.pro-report-preview-docx {
  font-size: 14px;
  line-height: 1.75;
  color: var(--pro-text);
}
.pro-report-preview-docx h1,
.pro-report-preview-docx h2,
.pro-report-preview-docx h3 {
  margin: 1.2em 0 0.5em;
  font-weight: 600;
}
.pro-report-preview-docx p {
  margin: 0.6em 0;
}
.pro-report-preview-docx table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 13px;
}
.pro-report-preview-docx td,
.pro-report-preview-docx th {
  border: 1px solid var(--pro-border);
  padding: 6px 10px;
}
.pro-report-preview-warn {
  font-size: 12px;
  color: #f59e0b;
  margin: 0 0 12px;
}
.pro-form-group {
  margin-bottom: 14px;
}
.pro-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--pro-muted);
  margin-bottom: 4px;
}
.pro-input, .pro-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--pro-bg);
  border: 1px solid var(--pro-border);
  border-radius: 6px;
  color: var(--pro-text);
  outline: none;
  transition: border-color 0.15s;
}
.pro-input:focus, .pro-textarea:focus {
  border-color: var(--pro-accent);
}
.pro-textarea {
  font-family: "SF Mono","Menlo","Monaco","Consolas",monospace;
  line-height: 1.5;
  resize: vertical;
}
.quant-detail-row td {
  padding: 0 !important;
  background: rgba(0,0,0,0.15);
}
.quant-detail-container {
  padding: 8px 16px;
}
.quant-detail-container canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.quant-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.quant-help-btn {
  font-size: 13px;
  padding: 6px 14px;
}
.quant-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.quant-overview-card {
  background: var(--pro-surface-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--pro-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.quant-overview-sigma {
  grid-column: span 2;
}
@media (max-width: 720px) {
  .quant-overview-sigma {
    grid-column: span 1;
  }
}
.quant-overview-label {
  font-size: 11px;
  color: var(--pro-muted);
  margin-bottom: 4px;
}
.quant-overview-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--pro-text);
}
.quant-overview-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--pro-muted);
}
.quant-overview-run {
  color: #facc15;
  font-size: 12px;
}
.quant-overview-muted {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--pro-muted) !important;
}
.quant-overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.quant-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}
.quant-modal-wide {
  width: 640px;
  max-width: 94vw;
}
.quant-help-modal .quant-help-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--pro-text);
}
.quant-help-section {
  margin-bottom: 18px;
}
.quant-help-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.quant-help-ol,
.quant-help-ul {
  margin: 0;
  padding-left: 1.25rem;
}
.quant-help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.quant-help-table th,
.quant-help-table td {
  border: 1px solid var(--pro-border);
  padding: 8px 10px;
  text-align: left;
}
.quant-help-footer {
  justify-content: space-between !important;
  align-items: center;
}
.quant-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--pro-muted);
  cursor: pointer;
}
.quant-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .quant-form-row-2 {
    grid-template-columns: 1fr;
  }
}
.quant-modal-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--pro-muted);
}
.quant-status-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}
.quant-status-ok {
  color: #4ade80;
}
.quant-status-run {
  color: #facc15;
}
.quant-status-err {
  color: #f87171;
}
.quant-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-width: 90vw;
}
.quant-toast.is-error {
  border-color: #7f1d1d;
  background: #450a0a;
}
.quant-toast.is-ok {
  border-color: #14532d;
  background: #052e16;
}
.quant-toast[hidden] {
  display: none !important;
}

/* ── 智能量化 UX v2 ── */
.quant-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.quant-hero-text .pro-panel-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.quant-hero-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--pro-muted);
  max-width: 52rem;
}
.quant-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.quant-hero-docs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#panel-quant .quant-hero-primary {
  margin-left: auto;
}
@media (max-width: 720px) {
  #panel-quant .quant-hero-actions {
    width: 100%;
  }
  #panel-quant .quant-hero-docs {
    flex: 1 1 100%;
    justify-content: stretch;
  }
  #panel-quant .quant-hero-docs .quant-btn {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }
  #panel-quant .quant-hero-primary {
    margin-left: 0;
    flex: 1 1 100%;
    text-align: center;
  }
}
.quant-flow-simple {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.quant-flow {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.quant-shenao-pack {
  margin-bottom: 12px;
}
.quant-shenao-pack-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.quant-shenao-pack-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--pro-muted);
  line-height: 1.5;
}
.quant-shenao-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.15);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.35);
}
.quant-presets-root {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.quant-preset-wave-head {
  margin-bottom: 10px;
}
.quant-preset-wave-head h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pro-text, #e2e8f0);
}
.quant-preset-wave-head p {
  margin: 0;
  font-size: 12px;
  color: var(--pro-muted, #94a3b8);
  line-height: 1.45;
}
.quant-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.quant-preset-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface-2, rgba(255, 255, 255, 0.03));
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quant-preset-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.quant-preset-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.quant-preset-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.quant-preset-title-wrap h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.quant-preset-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}
.quant-preset-cat {
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}
.quant-preset-cat.is-technical {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
}
.quant-preset-cat.is-sentiment {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
}
.quant-preset-logic {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--pro-muted);
  flex: 1;
}
.quant-preset-fit {
  font-size: 11px;
  color: var(--pro-muted);
}
.quant-preset-fit strong {
  color: var(--pro-text);
  font-weight: 500;
}
.quant-preset-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.quant-preset-actions .pro-btn {
  flex: 1;
  min-width: 100px;
  font-size: 12px;
  padding: 8px 12px;
}
.quant-shenao-engine-note {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--pro-muted);
  opacity: 0.85;
}
.quant-quick-wrap {
  margin-top: 0;
}
.quant-preset-bt-confirm ul.quant-preset-bt-params {
  margin: 10px 0 14px;
  padding-left: 1.2rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--pro-muted);
}
.quant-preset-bt-confirm h4 {
  margin: 12px 0 8px;
  font-size: 13px;
}
.quant-pool-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 8px;
}
.quant-pool-preview-table th,
.quant-pool-preview-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--pro-border);
  text-align: left;
}
.quant-pool-preview-note,
.quant-pool-preview-warn {
  font-size: 12px;
  color: var(--pro-muted);
  margin: 0;
}
.quant-pool-preview-warn {
  color: #fbbf24;
}
.quant-preset-detail h4 {
  margin: 12px 0 6px;
  font-size: 13px;
}
.quant-preset-detail p,
.quant-preset-detail li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--pro-muted);
}
.quant-preset-detail ul {
  margin: 0;
  padding-left: 1.2rem;
}
.quant-preset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.quant-preset-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--pro-muted);
}
.quant-flow-step {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface-2, rgba(255, 255, 255, 0.03));
}
.quant-flow-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.quant-flow-step strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.quant-flow-step p {
  margin: 0;
  font-size: 12px;
  color: var(--pro-muted);
  line-height: 1.45;
}
.quant-flow-link {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: #818cf8;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.quant-toolbar-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.quant-loading-hint {
  padding: 16px;
  text-align: center;
  font-size: 13px;
}
.quant-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--pro-border);
  padding-bottom: 0;
  overflow-x: auto;
}
.quant-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--pro-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.quant-tab:hover {
  color: var(--pro-text);
}
.quant-tab.is-active {
  color: #a5b4fc;
  border-bottom-color: #6366f1;
}
.quant-tab-panel {
  display: none;
}
.quant-tab-panel.is-active {
  display: block;
}
.quant-card-flat {
  margin-top: 0;
}
.quant-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.quant-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: 10px;
  border: 1px solid var(--pro-border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quant-quick-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
}
.quant-quick-ico {
  font-size: 1.5rem;
}
.quant-quick-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-text);
}
.quant-list-root {
  min-height: 80px;
}
.quant-strategy-grid,
.quant-bt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.quant-entity-card {
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--pro-surface-2, rgba(255, 255, 255, 0.03));
}
.quant-entity-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.quant-entity-meta {
  font-size: 12px;
  color: var(--pro-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.quant-entity-meta span {
  display: block;
}
.quant-entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quant-entity-actions .pro-pill {
  font-size: 12px;
}
.quant-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  border: 1px dashed var(--pro-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.quant-empty p {
  margin: 0;
  max-width: 32rem;
  font-size: 13px;
  line-height: 1.6;
  color: var(--pro-muted);
}
.quant-empty-err {
  color: #ef4444 !important;
}
.quant-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  width: 100%;
}
.quant-paper-goto-signals {
  margin-top: 12px;
}
.quant-chart-modal {
  width: min(920px, 96vw);
  max-width: 96vw;
}
.quant-chart-body {
  padding-top: 4px;
}
.quant-chart-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.quant-metric-chip {
  flex: 1 1 120px;
  min-width: 100px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pro-border);
}
.quant-metric-chip .label {
  font-size: 11px;
  color: var(--pro-muted);
}
.quant-metric-chip .value {
  font-size: 16px;
  font-weight: 700;
}
.quant-bench-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.quant-bench-label {
  font-size: 12px;
  color: var(--pro-muted);
  margin-right: 4px;
}
.quant-bench-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--pro-muted);
  opacity: 0.9;
}
.quant-bench-hint code {
  font-size: 10px;
}
.quant-bench-chip {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--pro-border);
  background: transparent;
  color: var(--pro-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.quant-bench-chip.is-on {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
}
.quant-bench-chip.is-missing {
  opacity: 0.45;
  cursor: not-allowed;
}
.quant-chart-wrap {
  width: 100%;
  min-height: 280px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1c28;
}
.quant-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--pro-muted);
}
.quant-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quant-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.quant-signal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quant-signal-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--pro-border);
  font-size: 13px;
}
@media (max-width: 600px) {
  .quant-signal-row {
    grid-template-columns: 1fr;
  }
}

/* 操作案例分步引导 */
.pro-research-queue-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* 研报筛选：悬停即时提示（不用浏览器 title 延迟） */
.pro-btn.pro-filter-tip {
  position: relative;
}
.pro-btn.pro-filter-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  transform: none;
  z-index: 80;
  width: max-content;
  max-width: min(300px, 72vw);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  color: var(--pro-text, #e2e8f0);
  background: var(--pro-surface-elevated, rgba(15, 23, 42, 0.98));
  border: 1px solid var(--pro-border, #334155);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease, visibility 0.1s ease;
}
.pro-btn.pro-filter-tip:hover::after,
.pro-btn.pro-filter-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
}


.quant-tutorial-modal {
  width: min(640px, 94vw);
}
.quant-tutorial-body-wrap {
  padding-top: 8px;
}
.quant-tutorial-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.quant-tutorial-step-dot {
  flex: 1 1 0;
  min-width: 72px;
  text-align: center;
  font-size: 11px;
  color: var(--pro-muted);
  position: relative;
  padding-top: 22px;
}
.quant-tutorial-step-dot::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--pro-border);
}
.quant-tutorial-step-dot.is-done::before {
  background: rgba(99, 102, 241, 0.35);
  border-color: #6366f1;
}
.quant-tutorial-step-dot.is-active {
  color: #c7d2fe;
  font-weight: 600;
}
.quant-tutorial-step-dot.is-active::before {
  background: #6366f1;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.quant-tutorial-pane h3 {
  margin: 0 0 10px;
  font-size: 17px;
}
.quant-tutorial-pane .quant-tutorial-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--pro-muted);
}
.quant-tutorial-checklist {
  margin: 0 0 14px;
  padding: 12px 14px 12px 2rem;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 13px;
  line-height: 1.65;
}
.quant-tutorial-checklist li {
  margin-bottom: 6px;
}
.quant-tutorial-checklist li:last-child {
  margin-bottom: 0;
}
.quant-tutorial-tip {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #a5b4fc;
  background: rgba(30, 41, 59, 0.5);
  border-left: 3px solid #6366f1;
}
.quant-tutorial-case-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--pro-border);
  font-size: 13px;
  line-height: 1.55;
}
.quant-tutorial-case-box strong {
  color: #e2e8f0;
}
.quant-tutorial-footer {
  flex-direction: column;
  align-items: stretch !important;
  gap: 10px;
}
.quant-tutorial-skip-label {
  width: 100%;
}
.quant-tutorial-nav-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}
.quant-tutorial-nav-btns #quant-tutorial-go {
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 480px) {
  .quant-tutorial-nav-btns {
    flex-direction: column;
  }
  .quant-tutorial-nav-btns .pro-btn {
    width: 100%;
  }
}

/* 智能量化 · 模拟盘 */
.quant-paper-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.quant-paper-title {
  margin: 0 0 4px;
  font-size: 18px;
}
.quant-paper-sub {
  margin: 0;
  font-size: 12px;
}
.quant-paper-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.quant-metric-sm {
  font-size: 13px !important;
}
.quant-paper-chart {
  width: 100%;
  min-height: 220px;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}
.quant-paper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.quant-paper-table th,
.quant-paper-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.quant-paper-table th {
  color: var(--pro-muted);
  font-weight: 500;
  font-size: 11px;
}
.quant-paper-pool {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
}
.quant-paper-pool-title {
  font-size: 12px;
  color: var(--pro-muted);
  margin-bottom: 8px;
}
.quant-paper-pool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quant-signals-hint {
  font-size: 12px;
  margin: 0 0 10px;
}
.quant-signal-pri-1 {
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
}
.quant-overview-active .quant-overview-value-sm {
  font-size: 14px;
  line-height: 1.35;
}
.quant-overview-value-sm {
  font-size: 14px;
}
.quant-help-disclaimer {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}
.quant-help-disclaimer h3 {
  color: #fcd34d;
}
.quant-help-disclaimer ul {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .quant-paper-head {
    flex-direction: column;
  }
}

/* 策略实验室 */
.quant-lab-wrap {
  padding: 4px 0 16px;
}
.quant-lab-lead {
  font-size: 13px;
  color: var(--pro-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.quant-lab-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.quant-lab-grid {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: 12px;
  min-height: 360px;
}
.quant-lab-label {
  display: block;
  font-size: 12px;
  color: var(--pro-muted);
  margin-bottom: 6px;
}
.quant-lab-code {
  width: 100%;
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--pro-border);
  background: #0f1117;
  color: #e2e8f0;
  resize: vertical;
  box-sizing: border-box;
}
.quant-lab-console {
  min-height: 360px;
  max-height: 480px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
  font-family: ui-monospace, monospace;
  background: #0a0c10;
  border: 1px solid var(--pro-border);
  border-radius: 8px;
  color: #94a3b8;
  white-space: pre-wrap;
}
.quant-lab-console.is-error {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}
.quant-plaza-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.quant-plaza-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface-2, rgba(255, 255, 255, 0.03));
}
.quant-plaza-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.quant-plaza-meta,
.quant-plaza-desc,
.quant-plaza-stats {
  font-size: 12px;
  color: var(--pro-muted);
  margin: 0 0 8px;
}
.quant-plaza-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quant-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}
@media (max-width: 1024px) {
  .quant-lab-grid {
    grid-template-columns: 1fr;
  }
  .quant-lab-code,
  .quant-lab-console {
    min-height: 240px;
  }
}
.quant-signals-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.quant-qmt-disclaimer {
  font-size: 12px;
}
.quant-paper-chart-meta {
  font-size: 12px;
  margin: 0 0 8px;
  padding: 0 4px;
}
.quant-paper-chart-inner {
  width: 100%;
  min-height: 220px;
}
.quant-paper-warn {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.quant-paper-trades-card {
  margin-top: 12px;
}
.quant-paper-trades-hint,
.quant-paper-trades-empty {
  font-size: 12px;
  margin: 0 0 10px;
}
.quant-paper-trades-wrap {
  overflow-x: auto;
}
.quant-paper-trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.quant-paper-trades-table th,
.quant-paper-trades-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--pro-border);
  text-align: left;
  white-space: nowrap;
}
.quant-paper-trades-table th {
  color: var(--pro-muted);
  font-weight: 500;
}
