/**
 * 大盘逆子 管理端视觉主题（白底 + 蓝点缀 + 黑字，覆盖默认主题皮肤，不改业务逻辑）
 * 依赖：在 style.min.css / skins.css / login.min.css 之后加载
 */
:root {
  --sq-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sq-bg-page: #eef1f6;
  --sq-bg-card: #ffffff;
  /* 浅色侧栏（类 Ant Design / 常见 SaaS 后台） */
  --sq-sidebar-bg: #ffffff;
  --sq-sidebar-border: #e2e8f0;
  --sq-sidebar-text: #0f172a;
  --sq-sidebar-text-dim: #475569;
  --sq-sidebar-hover: #f1f5f9;
  --sq-sidebar-active: #eff6ff;
  --sq-accent: #2563eb;
  --sq-accent-dark: #1d4ed8;
  --sq-accent-soft: #dbeafe;
  --sq-accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 48%, #1e40af 100%);
  --sq-text: #0f172a;
  --sq-text-muted: #64748b;
  --sq-border: #e2e8f0;
  --sq-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sq-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --sq-shadow-lg: 0 12px 40px -8px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  --sq-radius: 12px;
  --sq-radius-sm: 8px;
  --sq-focus-ring: rgba(37, 99, 235, 0.22);
  /** 全站 bootstrap-table / 树表：主表字号（相对 ry-ui 默认 13px 更易读） */
  --sq-quant-table-cell-fs: 15px;
  /** 列表行距与单元格留白（减轻密集感，不改表格逻辑） */
  --sq-quant-table-line-height: 1.58;
  --sq-quant-table-cell-py: 13px;
  --sq-quant-table-cell-px: 16px;
  /** 高风险行：与斑马纹 / 默认灰悬停区分 */
  --sq-high-risk-text: #991b1b;
  --sq-high-risk-bg: #fff1f2;
  --sq-high-risk-bg-hover: #fecdd3;
  --sq-high-risk-text-hover: #7f1d1d;
  --sq-high-risk-bar: #dc2626;
  /** 表体内操作列 btn-xs：与列表字号、行高协调（避免相对 td 显得过扁） */
  --sq-table-op-btn-fs: 13px;
  --sq-table-op-btn-lh: 1.4;
  --sq-table-op-btn-py: 5px;
  --sq-table-op-btn-px: 10px;
  --sq-table-op-btn-min-h: 30px;
  /** 侧栏收起时悬浮菜单（标题 + 子项一体面板） */
  --sq-mini-flyout-w: 176px;
  --sq-mini-flyout-head-h: 36px;
  --sq-mini-flyout-radius: 8px;
}

html,
body {
  font-family: var(--sq-font) !important;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 主框架：侧栏（浅色） ---------- */
.navbar-static-side,
body.mini-navbar .navbar-static-side {
  background: var(--sq-sidebar-bg) !important;
  box-shadow: 1px 0 0 var(--sq-sidebar-border), 4px 0 24px rgba(15, 23, 42, 0.04);
}

.navbar-default.navbar-static-side {
  background: var(--sq-sidebar-bg) !important;
}

.navbar-default .nav > li > a,
#side-menu.nav > li > a,
#side-menu.tab-content .tab-pane > ul.nav > li > a {
  color: var(--sq-sidebar-text) !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.navbar-default .nav > li > a:hover,
.navbar-default .nav > li > a:focus,
#side-menu.nav > li > a:hover,
#side-menu.tab-content .tab-pane > ul.nav > li > a:hover {
  background-color: var(--sq-sidebar-hover) !important;
  color: var(--sq-text) !important;
}

.navbar-default .nav > li.active > a,
#side-menu .nav > li.active > a,
#side-menu.tab-content .nav > li.active > a {
  background: var(--sq-sidebar-active) !important;
  color: var(--sq-accent-dark) !important;
  border-left-color: var(--sq-accent) !important;
}

.nav.nav-second-level,
.nav.nav-third-level {
  background: #fafbfc !important;
}

.nav.nav-second-level > li > a,
.nav.nav-third-level > li > a,
.nav.nav-four-level > li > a {
  color: var(--sq-sidebar-text-dim) !important;
  font-weight: 400 !important;
}

.nav.nav-second-level > li > a:hover,
.nav.nav-third-level > li > a:hover,
.nav.nav-four-level > li > a:hover {
  color: var(--sq-text) !important;
  background: #f3f4f6 !important;
}

/* 侧栏收起（简约模式）：标题 + 子菜单合并为一块悬浮面板 */
.fixed-sidebar.mini-navbar .nav li:hover > a > span.nav-label,
body:not(.fixed-sidebar):not(.canvas-menu).mini-navbar .nav li:hover > a > span.nav-label {
  min-width: var(--sq-mini-flyout-w) !important;
  width: var(--sq-mini-flyout-w) !important;
  box-sizing: border-box !important;
  padding: 0 14px !important;
  height: var(--sq-mini-flyout-head-h) !important;
  line-height: var(--sq-mini-flyout-head-h) !important;
  text-align: left !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: var(--sq-text-muted) !important;
  background: #f8fafc !important;
  border: 1px solid var(--sq-border) !important;
  border-bottom: none !important;
  border-radius: var(--sq-mini-flyout-radius) var(--sq-mini-flyout-radius) 0 0 !important;
  box-shadow: none !important;
}

/* 无子菜单的叶子项：单块圆角卡片 */
.fixed-sidebar.mini-navbar .nav > li:hover:not(:has(> .nav-second-level > li)) > a > span.nav-label,
body:not(.fixed-sidebar):not(.canvas-menu).mini-navbar .nav > li:hover:not(:has(> .nav-second-level > li)) > a > span.nav-label {
  border-bottom: 1px solid var(--sq-border) !important;
  border-radius: var(--sq-mini-flyout-radius) !important;
  background: var(--sq-bg-card) !important;
  color: var(--sq-text) !important;
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.1) !important;
}

.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level,
body:not(.fixed-sidebar):not(.canvas-menu).mini-navbar .nav li:hover > .nav-second-level {
  top: var(--sq-mini-flyout-head-h) !important;
  min-width: var(--sq-mini-flyout-w) !important;
  width: var(--sq-mini-flyout-w) !important;
  box-sizing: border-box !important;
  padding: 4px 6px 6px !important;
  margin: 0 !important;
  font-size: 13px !important;
  background: var(--sq-bg-card) !important;
  border: 1px solid var(--sq-border) !important;
  border-top: 1px solid #eef0f3 !important;
  border-radius: 0 0 var(--sq-mini-flyout-radius) var(--sq-mini-flyout-radius) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.1) !important;
  scrollbar-color: #c5cad3 var(--sq-bg-card) !important;
}

.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level::-webkit-scrollbar-thumb {
  background: #c5cad3 !important;
  border-radius: 4px !important;
}

.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level li,
.fixed-sidebar.mini-navbar .nav li:hover .nav-third-level li {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level li:last-child,
.fixed-sidebar.mini-navbar .nav li:hover .nav-third-level li:last-child {
  margin-bottom: 0 !important;
}

.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level > li > a,
.fixed-sidebar.mini-navbar .nav li:hover .nav-third-level li a,
.fixed-sidebar.mini-navbar .nav-second-level li a,
.canvas-menu.mini-navbar .nav-second-level li a {
  padding: 7px 10px !important;
  padding-left: 10px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--sq-sidebar-text-dim) !important;
  border-left: none !important;
}

.fixed-sidebar.mini-navbar .nav li:hover .nav-third-level li a {
  padding-left: 22px !important;
  font-size: 12px !important;
}

.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level > li.active > a,
.fixed-sidebar.mini-navbar .nav li:hover .nav-third-level li.active > a {
  color: var(--sq-accent-dark) !important;
  background: var(--sq-sidebar-active) !important;
  font-weight: 500 !important;
}

.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level > li > a:hover,
.fixed-sidebar.mini-navbar .nav li:hover > .nav-second-level > li > a:focus,
.fixed-sidebar.mini-navbar .nav li:hover .nav-third-level li a:hover,
.fixed-sidebar.mini-navbar .nav li:hover .nav-third-level li a:focus,
.canvas-menu.mini-navbar .nav-second-level li a:hover,
.canvas-menu.mini-navbar .nav-second-level li a:focus {
  color: var(--sq-accent-dark) !important;
  background: var(--sq-sidebar-hover) !important;
}

.canvas-menu.mini-navbar .nav-second-level {
  min-width: var(--sq-mini-flyout-w) !important;
  padding: 4px 6px 6px !important;
  background: var(--sq-bg-card) !important;
  border: 1px solid var(--sq-border) !important;
  border-radius: var(--sq-mini-flyout-radius) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.1) !important;
}

body.canvas-menu nav.navbar-static-side,
body.canvas-menu.mini-navbar nav.navbar-static-side {
  background: var(--sq-sidebar-bg) !important;
  box-shadow: 2px 0 12px rgba(17, 24, 39, 0.08) !important;
}

.navbar-default .special_link a {
  background: var(--sq-accent) !important;
  color: #fff !important;
}

.navbar-default .special_link a:hover {
  background: var(--sq-accent-dark) !important;
  color: #fff !important;
}

/* Logo */
nav .logo,
.navbar-static-side .logo,
.logo,
li.logo {
  background: var(--sq-bg-card) !important;
  border-bottom: 1px solid var(--sq-sidebar-border) !important;
  padding: 16px 18px !important;
  height: auto !important;
  min-height: 52px !important;
  line-height: 1.35 !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  position: relative;
}

nav .logo::before,
.navbar-static-side .logo::before,
li.logo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sq-accent-gradient);
  border-radius: 0 2px 2px 0;
}

.logo-lg,
.logo-element {
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  color: var(--sq-text) !important;
  display: block !important;
  white-space: normal !important;
  word-break: break-word !important;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 侧栏用户块 */
.user-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-bottom: 1px solid var(--sq-sidebar-border) !important;
  padding: 12px 10px !important;
}

.user-panel .info p {
  color: var(--sq-text) !important;
  font-weight: 600;
  font-size: 13px;
}

.user-panel .info a {
  color: var(--sq-text-muted) !important;
  font-size: 12px;
}

.user-panel .pull-left.image img {
  border: 2px solid var(--sq-border);
  box-shadow: var(--sq-shadow);
}

/* ---------- 顶栏 ---------- */
.border-bottom {
  border-bottom: 1px solid var(--sq-border) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--sq-shadow);
}

.navbar-static-top {
  background: transparent !important;
}

.navbar-static-top .minimalize-styl-2 {
  color: var(--sq-text-muted) !important;
}

.navbar-top-links > li > a {
  color: var(--sq-text-muted) !important;
}

.navbar-top-links > li > a:hover {
  color: var(--sq-accent) !important;
  background: transparent !important;
}

.gray-bg,
body.gray-bg {
  background-color: var(--sq-bg-page) !important;
}

#page-wrapper.gray-bg {
  background: var(--sq-bg-page) !important;
}

/* 标签页栏 */
.content-tabs {
  border-bottom: 1px solid var(--sq-border) !important;
  background: var(--sq-bg-card) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.content-tabs .nav.nav-tabs li.active a,
.content-tabs .nav.nav-tabs li a.active {
  color: var(--sq-accent) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--sq-accent) !important;
  background: transparent !important;
}

.content-tabs .page-tabs-content .menuTab.active {
  color: var(--sq-accent) !important;
  font-weight: 600;
  background: var(--sq-accent-soft) !important;
  border-radius: 6px 6px 0 0;
}

.content-tabs .nav.nav-tabs li a {
  color: var(--sq-text-muted) !important;
  border-radius: 0 !important;
}

.roll-nav {
  background: transparent !important;
  color: var(--sq-text-muted) !important;
}

.mainContent,
.RuoYi_iframe {
  background: var(--sq-bg-page) !important;
}

/* ---------- 内页（iframe） ---------- */
body {
  color: var(--sq-text);
}

.ibox,
.panel {
  border-radius: var(--sq-radius) !important;
  border-color: var(--sq-border) !important;
  box-shadow: var(--sq-shadow-md);
}

/* 全站筛选区卡片化 */
.search-collapse {
  background: var(--sq-bg-card);
  border: 1px solid var(--sq-border);
  border-radius: var(--sq-radius);
  box-shadow: var(--sq-shadow);
  padding: 16px 18px 6px;
  margin-bottom: 14px;
}

.ibox-title,
.panel-heading {
  border-bottom-color: var(--sq-border) !important;
  background: var(--sq-bg-card) !important;
  font-weight: 600;
  color: var(--sq-text);
}

.btn-primary {
  background-color: var(--sq-accent) !important;
  border-color: var(--sq-accent-dark) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--sq-accent-dark) !important;
}

.btn-success {
  background-color: var(--sq-accent) !important;
  border-color: var(--sq-accent-dark) !important;
  color: #fff !important;
}

.btn-success:hover {
  background-color: var(--sq-accent-dark) !important;
}

.btn-rounded.btn-sm {
  border-radius: 20px !important;
  padding: 6px 16px !important;
  font-weight: 500;
  box-shadow: var(--sq-shadow);
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.btn-rounded.btn-sm:hover {
  box-shadow: var(--sq-shadow-md);
  transform: translateY(-1px);
}

.form-control:focus {
  border-color: var(--sq-accent) !important;
  box-shadow: 0 0 0 2px var(--sq-focus-ring) !important;
}

.table > thead > tr > th {
  border-bottom: 1px solid var(--sq-border) !important;
  background: #fafbfc !important;
  color: var(--sq-text-muted);
  font-weight: 600;
}

.fixed-table-toolbar .btn-group > .btn {
  border-radius: 6px !important;
}

/* ---------- 全站列表：bootstrap-table / ry-ui 树表（字号、行高、留白） ---------- */
/* 加载层：库默认 loadingFontSize:auto 会按列宽算字号，与列表正文统一 */
.bootstrap-table .fixed-table-loading .loading-text {
  font-size: var(--sq-quant-table-cell-fs) !important;
  font-weight: 400;
  line-height: var(--sq-quant-table-line-height);
  color: #64748b;
}

/* 覆盖 ry-ui .table-striped / .table-bordered 表头 13px */
.table-striped .table > thead > tr > th,
.table-striped .table > tbody > tr > th,
.table-bordered .table > thead > tr > th,
.table-bordered .table > tbody > tr > th {
  font-size: var(--sq-quant-table-cell-fs) !important;
}

.select-table .bootstrap-table .fixed-table-container .table > thead > tr > th,
.select-table .bootstrap-table .fixed-table-container .table > tbody > tr > td,
.select-table .bootstrap-table .fixed-table-header .table thead > tr > th,
.container-div .bootstrap-table .fixed-table-container .table > thead > tr > th,
.container-div .bootstrap-table .fixed-table-container .table > tbody > tr > td,
.container-div .bootstrap-table .fixed-table-header .table thead > tr > th {
  font-size: var(--sq-quant-table-cell-fs) !important;
  line-height: var(--sq-quant-table-line-height) !important;
  padding: var(--sq-quant-table-cell-py) var(--sq-quant-table-cell-px) !important;
  vertical-align: middle !important;
}

.bootstrap-tree-table .treetable-thead th,
.bootstrap-tree-table .treetable-tbody td {
  font-size: var(--sq-quant-table-cell-fs) !important;
  line-height: var(--sq-quant-table-line-height) !important;
  padding: calc(var(--sq-quant-table-cell-py) - 1px) var(--sq-quant-table-cell-px) !important;
}

.fixed-table-pagination .pagination-detail,
.fixed-table-pagination .pagination-info,
.fixed-table-pagination .page-list {
  font-size: calc(var(--sq-quant-table-cell-fs) - 1px);
}

/* ---------- 列表操作列：表体内 btn-xs 增高（全站 bootstrap-table / 树表） ---------- */
.bootstrap-table .fixed-table-container tbody td .btn.btn-xs,
.bootstrap-table tbody td .btn.btn-xs,
.bootstrap-tree-table .treetable-tbody td .btn.btn-xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  font-size: var(--sq-table-op-btn-fs) !important;
  line-height: var(--sq-table-op-btn-lh) !important;
  padding: var(--sq-table-op-btn-py) var(--sq-table-op-btn-px) !important;
  min-height: var(--sq-table-op-btn-min-h);
  vertical-align: middle;
}

.bootstrap-table .fixed-table-container tbody td .btn.btn-xs .fa,
.bootstrap-table tbody td .btn.btn-xs .fa,
.bootstrap-tree-table .treetable-tbody td .btn.btn-xs .fa {
  line-height: 1;
}

/* 用户/角色等「更多操作」popover 内次级按钮 */
.popover .btn.btn-xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: var(--sq-table-op-btn-fs) !important;
  line-height: var(--sq-table-op-btn-lh) !important;
  padding: var(--sq-table-op-btn-py) var(--sq-table-op-btn-px) !important;
  min-height: var(--sq-table-op-btn-min-h);
}

/* ---------- 日期/时间：全站单行显示（避免 yyyy-MM-dd 在窄列内折行） ---------- */
/* bootstrap-table 仅在 th 写入 data-field；表体靠 .sq-date-col（ry-ui applyDateColumnClass） */
.sq-date-nowrap,
.bootstrap-table th.sq-date-col,
.bootstrap-table td.sq-date-col,
.bootstrap-table .fixed-table-container th.sq-date-col,
.bootstrap-table .fixed-table-container td.sq-date-col,
.bootstrap-table .fixed-table-container th[data-field$="Date"],
.bootstrap-table .fixed-table-container th[data-field$="Time"],
.bootstrap-table .fixed-table-container th[data-field$="Timestamp"],
.bootstrap-table th[data-field$="Date"],
.bootstrap-table th[data-field$="Time"],
.bootstrap-table th[data-field$="Timestamp"],
.bootstrap-table td.sq-date-col .text-dark,
.bootstrap-table td.sq-date-col .text-muted,
.ann-date-cell,
.limitup-daily-drawdown-col,
[class*="-date-col"],
[class*="-date-cell"] {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.bootstrap-table th.sq-date-col .th-inner,
.bootstrap-table .fixed-table-container th.sq-date-col .th-inner {
  white-space: nowrap !important;
}

.sq-date-nowrap {
  display: inline-block;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

/* 筛选区日期范围：起止与「-」同一行 */
.select-list li.select-time {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.select-list li.select-time label,
.select-list li.select-time span,
.select-list li.select-time input.time-input {
  float: none !important;
  display: inline-block !important;
  margin-top: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
}

.select-list li.select-time span {
  margin: 0 5px !important;
}

.time-input,
input[placeholder="yyyy-MM-dd"],
input[placeholder*="yyyy-MM-dd"] {
  white-space: nowrap;
}

/* 详情表：长文本可折行，日期类字段不因 break-all 从中间断开 */
.detail-table td {
  word-break: normal;
  overflow-wrap: break-word;
}

.qk-val--date,
.quant-risk-item-date,
.quant-kline-axis-date,
.quant-kline-range-hud-dates,
.quant-stock-detail-lu-day,
.quant-stock-detail-lu-summary-meta {
  white-space: nowrap;
}

/* 筛选区 / 工具栏与表格的垂直节奏；表格外壳与分页底栏（仅视觉） */
:is(
    body.quant-fundamental-page,
    body.quant-momentum-page,
    body.quant-limitup-page,
    body.quant-dailyk-page,
    body.quant-activity-page,
    body.quant-announcement-page,
    body.quant-profile-page,
    body.quant-dbtable-page
  )
  .container-div
  .search-collapse {
  margin-bottom: 14px;
}

/*
 * ry-ui.css 在 max-width:768px 对 .search-collapse 设 display:none（面向手机折叠筛选），
 * 量化列表页无「显示搜索」按钮，iPad 竖屏/窄平板会整段过滤区消失。
 */
@media (max-width: 768px) {
  :is(
      body.quant-fundamental-page,
      body.quant-momentum-page,
      body.quant-limitup-page,
      body.quant-dailyk-page,
      body.quant-activity-page,
      body.quant-announcement-page,
      body.quant-profile-page,
      body.quant-dbtable-page,
      body.quant-alpha-predict-page
    )
    .container-div
    .search-collapse {
    display: block;
  }
}

:is(
    body.quant-fundamental-page,
    body.quant-momentum-page,
    body.quant-limitup-page,
    body.quant-dailyk-page,
    body.quant-activity-page,
    body.quant-announcement-page,
    body.quant-profile-page,
    body.quant-dbtable-page
  )
  .container-div
  #toolbar {
  margin-bottom: 12px;
}

:is(
    body.quant-fundamental-page,
    body.quant-momentum-page,
    body.quant-limitup-page,
    body.quant-dailyk-page,
    body.quant-activity-page,
    body.quant-announcement-page,
    body.quant-profile-page,
    body.quant-dbtable-page
  )
  .container-div
  .bootstrap-table {
  background: var(--sq-bg-card);
  border: 1px solid var(--sq-border);
  border-radius: var(--sq-radius);
  box-shadow: var(--sq-shadow);
}

:is(
    body.quant-fundamental-page,
    body.quant-momentum-page,
    body.quant-limitup-page,
    body.quant-dailyk-page,
    body.quant-activity-page,
    body.quant-announcement-page,
    body.quant-profile-page,
    body.quant-dbtable-page
  )
  .bootstrap-table
  .fixed-table-toolbar {
  padding: 8px 14px 10px;
}

:is(
    body.quant-fundamental-page,
    body.quant-momentum-page,
    body.quant-limitup-page,
    body.quant-dailyk-page,
    body.quant-activity-page,
    body.quant-announcement-page,
    body.quant-profile-page,
    body.quant-dbtable-page
  )
  .bootstrap-table
  .fixed-table-pagination {
  padding: 10px 14px 14px;
  background: #fafbfc;
  border-top: 1px solid var(--sq-border);
}

/* 偶数行浅底：跳过高风险、情绪分界、选中行；悬停行交给 table-hover */
:is(
    body.quant-fundamental-page,
    body.quant-momentum-page,
    body.quant-limitup-page,
    body.quant-dailyk-page,
    body.quant-activity-page,
    body.quant-announcement-page,
    body.quant-profile-page,
    body.quant-dbtable-page
  )
  .bootstrap-table
  .fixed-table-container
  tbody
  > tr:nth-child(even):not(:hover):not(.quant-row-high-risk):not(.quant-fundamental-sentinel-divider):not(.selected)
  > td {
  background-color: #f8fafc;
}

/* 选中页：蓝底需浅色字（否则继承 body 深色字 = 蓝底黑字） */
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
  background-color: var(--sq-accent) !important;
  border-color: var(--sq-accent-dark) !important;
  color: #fff !important;
}

/* ---------- 顶栏横向菜单 ---------- */
#navMenu .nav-tabs > li > a {
  border-radius: 0 !important;
  color: var(--sq-text-muted) !important;
}

#navMenu .nav-tabs > li.active > a {
  color: var(--sq-accent) !important;
  border-bottom: 2px solid var(--sq-accent) !important;
  background: transparent !important;
}

/* ---------- 登录 / 注册：分栏品牌页 + 表单 ---------- */
body.signin.sq-login-page {
  min-height: 100vh;
  margin: 0;
  height: auto !important;
  background: #0f172a !important;
  background-image: none !important;
}

.sq-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 40px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(37, 99, 235, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 90%, rgba(30, 64, 175, 0.25), transparent 50%),
    linear-gradient(145deg, #0f172a 0%, #1e293b 42%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.sq-login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 75%);
}

.sq-login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 920px;
  min-height: 520px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 64px -12px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.2);
}

.sq-login-hero {
  flex: 1 1 48%;
  display: flex;
  align-items: center;
  padding: 48px 40px;
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.92) 0%, rgba(29, 78, 216, 0.88) 45%, rgba(30, 58, 138, 0.95) 100%);
  position: relative;
  overflow: hidden;
}

.sq-login-hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  top: -120px;
  right: -80px;
  pointer-events: none;
}

.sq-login-hero::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -60px;
  left: -40px;
  pointer-events: none;
}

.sq-login-hero__inner {
  position: relative;
  z-index: 1;
}

.sq-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.sq-login-brand__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 24px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sq-login-brand__name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
}

.sq-login-hero__tagline {
  margin: 0 0 32px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.12em;
  font-weight: 400;
}

.sq-login-hero__features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sq-login-hero__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.sq-login-hero__features li i {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

.sq-login-card {
  flex: 1 1 52%;
  width: auto;
  max-width: none;
  padding: 44px 40px 36px;
  background: var(--sq-bg-card);
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sq-login-card--minimal {
  padding-top: 44px;
}

.sq-login-head {
  text-align: left;
  margin-bottom: 28px;
}

.sq-login-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sq-text);
  letter-spacing: 0.02em;
}

.sq-login-sub {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--sq-text-muted);
  font-weight: 400;
}

.sq-login-card #signupForm,
.sq-login-card #registerForm {
  margin: 0;
}

.sq-login-card .form-control.uname,
.sq-login-card .form-control.pword,
.sq-login-card .form-control.code {
  margin-top: 14px;
  height: 46px !important;
  border-radius: var(--sq-radius-sm) !important;
  border: 1px solid var(--sq-border) !important;
  background-image: none !important;
  background-color: #f8fafc !important;
  color: var(--sq-text) !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.sq-login-card form > input.form-control:first-of-type {
  margin-top: 0;
}

.sq-login-card .form-control.uname:focus,
.sq-login-card .form-control.pword:focus,
.sq-login-card .form-control.code:focus {
  background-color: #fff !important;
  border-color: var(--sq-accent) !important;
  box-shadow: 0 0 0 3px var(--sq-focus-ring) !important;
}

.sq-login-captcha {
  margin-top: 14px;
}

.sq-login-captcha-img {
  text-align: right;
  padding-top: 14px;
}

.sq-login-captcha .imgcode {
  border-radius: 8px;
  border: 1px solid var(--sq-border);
  vertical-align: middle;
}

.sq-login-remember,
.sq-login-terms,
.sq-login-hint {
  margin-top: 16px;
}

.sq-login-hint {
  margin-bottom: 0;
  font-size: 13px;
  text-align: center;
  line-height: 1.4;
}

.sq-login-card .checkbox-custom label {
  color: var(--sq-text-muted);
  font-size: 14px;
}

.sq-login-card .checkbox-custom label:before {
  border-color: #cbd5e1;
}

.sq-login-terms a {
  color: var(--sq-accent);
}

.sq-login-submit {
  margin-top: 22px !important;
  height: 46px !important;
  border-radius: var(--sq-radius-sm) !important;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  background: var(--sq-accent-gradient) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.sq-login-submit:hover,
.sq-login-submit:focus {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45) !important;
  transform: translateY(-1px);
}

.sq-login-alt {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
}

.sq-login-alt a {
  color: var(--sq-accent);
  font-weight: 500;
  text-decoration: none;
}

.sq-login-alt a:hover {
  color: var(--sq-accent-dark);
  text-decoration: underline;
}

/* 已废弃分栏 hero（HTML 已移除），保留选择器无害 */

@media (max-width: 768px) {
  .sq-login-shell {
    flex-direction: column;
    min-height: auto;
    max-width: 420px;
  }

  .sq-login-hero {
    flex: none;
    padding: 32px 28px 28px;
  }

  .sq-login-brand__name {
    font-size: 1.4rem;
  }

  .sq-login-hero__features {
    display: none;
  }

  .sq-login-card {
    padding: 32px 28px 28px;
  }

  .sq-login-head {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .sq-login-wrap {
    padding: 20px 16px 28px;
  }

  .sq-login-shell {
    border-radius: 12px;
  }

  .sq-login-hero {
    padding: 24px 22px 20px;
  }

  .sq-login-card {
    padding: 28px 22px 24px;
  }
}

/* ---------- 首页欢迎面板 ---------- */
.sq-dashboard {
  padding-top: 8px;
}

.sq-dashboard-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  margin-bottom: 24px;
  background: var(--sq-accent-gradient);
  border-radius: var(--sq-radius);
  box-shadow: var(--sq-shadow-lg);
  color: #fff;
}

.sq-dashboard-hero__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 26px;
}

.sq-dashboard-hero__text h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sq-dashboard-hero__text p {
  margin: 0;
  font-size: 14px;
  opacity: 0.88;
}

.sq-dashboard-cards {
  margin-left: -8px;
  margin-right: -8px;
}

.sq-dash-card {
  background: var(--sq-bg-card);
  border: 1px solid var(--sq-border);
  border-radius: var(--sq-radius);
  padding: 24px 22px;
  margin-bottom: 16px;
  box-shadow: var(--sq-shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}

.sq-dash-card:hover {
  box-shadow: var(--sq-shadow-lg);
  transform: translateY(-2px);
}

.sq-dash-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 18px;
  margin-bottom: 14px;
}

.sq-dash-card__icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.sq-dash-card__icon--green {
  background: #ecfdf5;
  color: #059669;
}

.sq-dash-card__icon--purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.sq-dash-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--sq-text);
}

.sq-dash-card p {
  margin: 0;
  font-size: 13px;
  color: var(--sq-text-muted);
  line-height: 1.55;
}

/* ---------- 锁屏（与全站白底蓝点缀一致） ---------- */
body.lockscreen {
  background: var(--sq-bg-page) !important;
  font-family: var(--sq-font) !important;
}

.lockscreen-time {
  color: var(--sq-border) !important;
}

.lockscreen-name {
  color: var(--sq-text) !important;
}

.lockscreen-item {
  border-radius: var(--sq-radius) !important;
  box-shadow: var(--sq-shadow) !important;
  border: 1px solid var(--sq-border) !important;
  background: var(--sq-bg-card) !important;
}

/* 高风险行：左侧实色条 + 玫红底与字色；悬停再加深，避免与斑马纹(#f8fafc)、table-hover 灰底混淆 */
.bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk > td,
.bootstrap-table tbody tr.quant-row-high-risk > td,
.dailyk-ev-layer .bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk > td,
.dailyk-ev-layer .bootstrap-table tbody tr.quant-row-high-risk > td {
  color: var(--sq-high-risk-text) !important;
  background-color: var(--sq-high-risk-bg) !important;
  font-weight: 500;
}

.bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk > td:first-child,
.bootstrap-table tbody tr.quant-row-high-risk > td:first-child,
.dailyk-ev-layer .bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk > td:first-child,
.dailyk-ev-layer .bootstrap-table tbody tr.quant-row-high-risk > td:first-child {
  box-shadow: inset 4px 0 0 0 var(--sq-high-risk-bar);
}

.bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk:hover > td,
.bootstrap-table tbody tr.quant-row-high-risk:hover > td,
.dailyk-ev-layer .bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk:hover > td,
.dailyk-ev-layer .bootstrap-table tbody tr.quant-row-high-risk:hover > td {
  background-color: var(--sq-high-risk-bg-hover) !important;
  color: var(--sq-high-risk-text-hover) !important;
}

/* 行内 formatter 常用 .text-dark，会盖住 td 的警示色；高风险行内统一继承行文字色（含悬停） */
.bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk > td .text-dark,
.bootstrap-table tbody tr.quant-row-high-risk > td .text-dark,
.dailyk-ev-layer .bootstrap-table .fixed-table-container tbody tr.quant-row-high-risk > td .text-dark,
.dailyk-ev-layer .bootstrap-table tbody tr.quant-row-high-risk > td .text-dark {
  color: inherit !important;
}

/* 行情指标：市场情绪分界「独立分隔行」（非数据行，由 post-body 插入） */
body.quant-fundamental-page .bootstrap-table tbody tr.quant-fundamental-sentinel-divider,
body.quant-fundamental-page .bootstrap-table.table-striped tbody tr.quant-fundamental-sentinel-divider:nth-child(2n + 1) {
  background: transparent !important;
}
body.quant-fundamental-page .bootstrap-table tbody tr.quant-fundamental-sentinel-divider > td {
  /* 上下留白；保留与表体一致的横线，避免下一行顶线被 border:none 吃掉 */
  padding: 7px 0 !important;
  border-top: 1px solid var(--sq-border) !important;
  border-bottom: 1px solid var(--sq-border) !important;
  border-left: none !important;
  border-right: none !important;
  vertical-align: middle !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.quant-fundamental-page .quant-fundamental-sentinel-card {
  margin: 0 4px;
  padding: 1px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
/* 两侧虚线向中间「展开」，随列宽拉伸 */
body.quant-fundamental-page .quant-fundamental-sentinel-dash {
  flex: 1 1 0;
  min-width: 12px;
  height: 0;
  align-self: center;
  border: 0;
  border-top: 1px dashed rgba(156, 163, 175, 0.55);
  margin: 0;
}
body.quant-fundamental-page .quant-fundamental-sentinel-core {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  padding: 0 6px;
  max-width: 100%;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 400;
  color: rgba(107, 114, 128, 0.88);
}
body.quant-fundamental-page .quant-fundamental-sentinel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: inherit;
  text-transform: none;
}
body.quant-fundamental-page .quant-fundamental-sentinel-badge .fa {
  opacity: 0.45;
  font-size: 10px;
}
body.quant-fundamental-page .quant-fundamental-sentinel-value {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  border: none;
}

/* ---------- K 线弹层（列表点击最新涨跌幅 / 最大跌幅等列） ---------- */
body .layui-layer.quant-kline-skin {
  border-radius: 8px;
}

body .layui-layer.quant-kline-skin .layui-layer-setwin {
  display: none;
}

body .layui-layer.quant-kline-skin .layui-layer-content {
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

body .layui-layer.quant-kline-skin .layui-layer-content > .quant-kline-modal {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.quant-kline-modal.quant-stock-detail-root {
  min-height: 100%;
}

.quant-kline-modal-header {
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  border-bottom: none;
}

.quant-kline-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: left;
  line-height: 1.4;
}

/* 行情摘要：与详情页卡片风格一致 */
.quant-kline-meta {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.quant-kline-top-card {
  margin-bottom: 4px;
  padding: 6px 12px 6px;
}

.quant-kline-top-card .quant-stock-detail-hero-head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.quant-kline-top-card .quant-stock-detail-hero-identity {
  flex-wrap: wrap;
  row-gap: 4px;
}

.quant-kline-top-card .quant-stock-detail-head-name {
  max-width: min(100%, 200px);
}

.quant-kline-theme-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 5px;
  min-width: 0;
  max-width: 100%;
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid #e2e8f0;
}

.quant-kline-theme-tag {
  font-size: 11px;
  line-height: 1.35;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

a.quant-kline-theme-tag.quant-theme-concept-tag--pick:hover,
a.quant-kline-theme-tag.quant-theme-concept-tag--pick:focus {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.quant-kline-theme-more {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  padding: 1px 5px;
  border-radius: 4px;
}

.quant-kline-theme-more:hover,
.quant-kline-theme-more:focus {
  color: #2563eb;
  text-decoration: none;
}

/* 行情顶栏：分时/日K 类横向行情带 + 辅助指标 */
.qk-head {
  display: flex;
  flex-direction: column;
}

.qk-head-row--title {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 12px;
  min-height: 44px;
  padding: 8px 0 8px 18px;
  border-bottom: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.qk-head-row--title .qk-title {
  flex: 1;
  min-width: 0;
}

.qk-head-actions {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 8px;
}

.qk-head-actions .btn {
  font-weight: 600;
  border-radius: 6px;
  /* 宽度由下方「自选 / AI」同宽规则统一（btn-sm） */
}

.qk-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.qk-head-fav {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 2px;
}

/* legacy：旧结构仅包裹自选图标时使用 */

.qk-title-code {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.qk-title-name {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qk-head-row--tape {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.qk-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 0 10px;
  min-width: 56px;
}

.qk-cell:first-of-type {
  padding-left: 4px;
}

.qk-lbl {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0.02em;
}

.qk-val {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.2;
}

.qk-val--date {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.qk-val--emph {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.qk-vsep {
  align-self: stretch;
  width: 1px;
  min-height: 36px;
  margin: 2px 0;
  background: #cbd5e1;
  opacity: 0.65;
  flex-shrink: 0;
}

.qk-tone-up {
  color: #dc2626 !important;
}

.qk-tone-down {
  color: #16a34a !important;
}

.qk-tone-flat {
  color: #64748b !important;
}

.qk-head-row--risk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 8px 18px 10px;
  font-size: 12px;
  color: #64748b;
  background: #fff;
}

.qk-risk-main {
  flex: 1 1 auto;
  min-width: 0;
}

.qk-risk-item {
  display: inline;
}

.qk-risk-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
  margin-left: 4px;
}

.qk-risk-dd {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #b45309;
  margin-left: 4px;
}

.qk-risk-sep {
  margin: 0 10px;
  color: #cbd5e1;
  font-weight: 300;
}

.quant-kline-h-tip {
  cursor: help;
  font-size: 12px;
  color: #94a3b8;
  margin-left: 2px;
  vertical-align: middle;
}

/* 区间累加卡片内仍使用 */
.quant-kline-h-meta {
  font-weight: 500;
}

.quant-kline-modal-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
}

.quant-kline-chart-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--sq-shadow, 0 1px 2px rgba(17, 24, 39, 0.06));
}

.quant-kline-chart-hud-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  touch-action: pan-y;
}

.quant-kline-bar-detail {
  position: absolute;
  z-index: 15;
  pointer-events: none;
  left: 0;
  top: 0;
  max-width: min(440px, calc(100% - 24px));
}

.quant-kline-bar-tag {
  position: relative;
  padding: 5px 10px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dbeafe;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(4px);
}

.quant-kline-bar-tag::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.98);
  filter: drop-shadow(0 1px 0 #dbeafe);
}

.quant-kline-bar-detail--below .quant-kline-bar-tag::before {
  bottom: auto;
  top: -6px;
  border-top-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.98);
  filter: drop-shadow(0 -1px 0 #dbeafe);
}

.quant-kline-bar-detail--on-body .quant-kline-bar-tag::before {
  display: none;
}

.quant-kline-bar-tag-date {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1e40af;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 4px;
}

.quant-kline-bar-tag-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 10px;
}

.quant-kline-bar-tag-item {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.quant-kline-bar-tag-item em {
  font-style: normal;
  font-weight: 500;
  color: #64748b;
}

.quant-kline-bar-tag-item strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.quant-kline-bar-tag-item--emph strong {
  font-size: 12px;
}

.quant-kline-bar-tag-item.qk-tone-up strong {
  color: #dc2626;
}

.quant-kline-bar-tag-item.qk-tone-down strong {
  color: #16a34a;
}

.quant-kline-bar-tag-item.qk-tone-flat strong {
  color: #64748b;
}

.quant-kline-axis-date {
  position: absolute;
  z-index: 11;
  pointer-events: none;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #374151;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.08);
  line-height: 1.3;
  white-space: nowrap;
}

.quant-kline-floating-hud {
  position: absolute;
  z-index: 12;
  pointer-events: none;
  padding: 9px 14px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.1);
  min-width: 88px;
}

/* 区间累加：选区后显示在图表区左上角，避免挤占弹层顶部标题栏 */
.quant-kline-range-hud {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 10;
  pointer-events: none;
  max-width: min(340px, calc(100% - 24px));
  text-align: left;
}

.quant-kline-range-hud-inner {
  padding: 10px 14px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.12);
  line-height: 1.35;
}

.quant-kline-range-hud--pick .quant-kline-range-hud-pick-title {
  font-size: 13px;
  color: #374151;
}

.quant-kline-range-hud--pick .quant-kline-range-hud-pick-hint {
  margin-top: 4px;
  font-size: 12px;
}

.quant-kline-range-hud-title {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}

.quant-kline-range-hud-pct-row {
  margin: 2px 0 4px;
}

.quant-kline-range-hud-pct {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.quant-kline-range-hud-dates {
  font-size: 12px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

.quant-kline-idle-hint {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 8;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.quant-kline-hv-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  line-height: 1.3;
}

.quant-kline-hv-date {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #374151;
}

.quant-kline-hv-pct {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.quant-kline-hv-pct-only {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-align: center;
}

.quant-kline-hv-ma {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.quant-kline-hv-ma-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.2;
  color: #475569;
  white-space: nowrap;
}

.quant-kline-hv-ma-dot {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.quant-kline-hv-ma-lbl {
  font-weight: 600;
  min-width: 2.4em;
}

.quant-kline-hv-ma-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1e293b;
  margin-left: auto;
}

.quant-kline-pct-up {
  color: #dc2626;
}

.quant-kline-pct-down {
  color: #16a34a;
}

.quant-kline-pct-none {
  font-size: 15px;
  font-weight: 600;
  color: #9ca3af;
}

.quant-kline-modal-chart {
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.quant-kline-chart-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 14px;
}

/* —— 风险分析 / 事件分析 弹层（quant-risk-analysis-view.js） —— */
.quant-risk-modal-scroll {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 0 0 4px 4px;
}

.quant-risk-modal-scroll::-webkit-scrollbar {
  width: 8px;
}

.quant-risk-modal-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

.quant-risk-modal-wrap {
  padding: 16px 20px 22px;
}

/* —— AI 分析弹层（quant-stock-ai-yuanbao.js） —— */
.quant-ai-analysis-modal-scroll {
  max-height: min(620px, calc(100vh - 120px));
  overflow-y: auto;
  overflow-x: hidden;
  background: #eef2f7;
  border-radius: 0 0 6px 6px;
}

.quant-ai-analysis-modal-scroll::-webkit-scrollbar {
  width: 8px;
}

.quant-ai-analysis-modal-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

.quant-ai-analysis-wrap {
  padding: 18px 20px 24px;
}

.quant-ai-empty {
  margin: 0;
  padding: 20px;
  text-align: center;
}

.quant-ai-h1,
.quant-ai-h2,
.quant-ai-h3,
.quant-ai-section-title {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.quant-ai-h1 {
  font-size: 18px;
  line-height: 1.45;
  padding: 0 0 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid #cbd5e1;
}

.quant-ai-h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
  margin: 18px 0 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #64748b;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.quant-ai-h2:first-child {
  margin-top: 0;
}

.quant-ai-h3 {
  font-size: 14px;
  line-height: 1.5;
  margin: 14px 0 8px;
  padding-left: 10px;
  border-left: 3px solid #94a3b8;
  color: #334155;
}

.quant-ai-section-title {
  font-size: 14px;
  margin: 16px 0 8px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #475569;
}

.quant-ai-block {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.quant-ai-block--quote {
  background: #fffbeb;
  border-color: #fde68a;
}

.quant-ai-p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.75;
  color: #334155;
  text-align: justify;
}

.quant-ai-p:last-child {
  margin-bottom: 0;
}

.quant-ai-list {
  margin: 0;
  padding: 0 0 0 4px;
  list-style: none;
}

.quant-ai-li {
  position: relative;
  margin: 0 0 10px;
  padding: 8px 10px 8px 28px;
  font-size: 13px;
  line-height: 1.7;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 8px;
}

.quant-ai-li:last-child {
  margin-bottom: 0;
}

ul.quant-ai-list > .quant-ai-li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}

ol.quant-ai-list {
  counter-reset: quant-ai-ol;
}

ol.quant-ai-list > .quant-ai-li {
  counter-increment: quant-ai-ol;
  padding-left: 34px;
}

ol.quant-ai-list > .quant-ai-li::before {
  content: counter(quant-ai-ol);
  position: absolute;
  left: 10px;
  top: 8px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #64748b;
  border-radius: 999px;
}

.quant-ai-kv {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.quant-ai-kv:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.quant-ai-kv-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.6;
}

.quant-ai-kv-value {
  font-size: 13px;
  line-height: 1.7;
  color: #1e293b;
}

.quant-ai-quote {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #92400e;
  border-left: 3px solid #f59e0b;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 0 6px 6px 0;
}

.quant-ai-divider {
  margin: 16px 0;
  border: none;
  border-top: 1px dashed #cbd5e1;
}

.quant-ai-strong {
  color: #0f172a;
  font-weight: 700;
}

.quant-ai-em {
  color: #475569;
  font-style: normal;
  background: #f1f5f9;
  padding: 0 4px;
  border-radius: 4px;
}

.quant-ai-tag {
  display: inline-block;
  margin: 0 2px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #e2e8f0;
  border-radius: 4px;
}

.quant-ai-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.quant-ai-rating-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.quant-ai-rating-value {
  flex: 1 1 200px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.quant-ai-rating--high {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
  color: #991b1b;
}

.quant-ai-rating--high .quant-ai-rating-label {
  color: #b91c1c;
}

.quant-ai-rating--medium {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
  color: #92400e;
}

.quant-ai-rating--medium .quant-ai-rating-label {
  color: #b45309;
}

.quant-ai-rating--low {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
  color: #065f46;
}

.quant-ai-rating--low .quant-ai-rating-label {
  color: #047857;
}

.quant-ai-rating--neutral {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
  color: #334155;
}

.quant-ai-rating--neutral .quant-ai-rating-label {
  color: #475569;
}

.quant-risk-lead {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: inline-block;
}

.quant-risk-timeline {
  margin: 0;
  padding: 0;
}

/* 超过默认条数时：其余记录在 <details> 内点击展开 */
.quant-risk-expand-block {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.quant-risk-expand-summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
  background: linear-gradient(180deg, #fef2f2 0%, #fafafa 100%);
  list-style: none;
}

.quant-risk-expand-block:not([open]) .quant-risk-expand-when-open {
  display: none;
}

.quant-risk-expand-block[open] .quant-risk-expand-when-collapsed {
  display: none;
}

.quant-risk-expand-summary::-webkit-details-marker {
  display: none;
}

.quant-risk-expand-summary::marker {
  content: '';
}

.quant-risk-expand-block[open] .quant-risk-expand-summary {
  border-bottom: 1px solid #e2e8f0;
}

.quant-risk-expand-block .quant-risk-timeline--rest {
  margin: 0;
  padding: 8px 10px 12px;
}

.quant-risk-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 0 14px;
  padding: 0;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  border-left: 4px solid #dc2626;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.quant-risk-item:hover {
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.12);
  border-color: #fecaca;
}

.quant-risk-item--link {
  cursor: pointer;
}

.quant-risk-item--link:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.quant-risk-item--link:focus:not(:focus-visible) {
  outline: none;
}

.quant-risk-item--link:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.quant-risk-item-date {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #991b1b;
  letter-spacing: 0.02em;
  line-height: 1.45;
  padding: 14px 12px;
  background: linear-gradient(180deg, #fef2f2 0%, #fafafa 100%);
  border-right: 1px solid #e2e8f0;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
}

.quant-risk-item-main {
  min-width: 0;
  padding: 12px 14px 14px 0;
}

.quant-risk-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.55;
  word-break: break-word;
}

.quant-risk-item-reason {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  word-break: break-word;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.quant-risk-reason-label {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  background: linear-gradient(180deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca;
  border-radius: 999px;
  vertical-align: middle;
}

.quant-risk-loose {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #cbd5e1;
}

.quant-risk-loose-h {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 10px;
  text-transform: none;
  letter-spacing: 0.03em;
}

.quant-risk-loose-p {
  margin: 0 0 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.65;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.quant-risk-loose-p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .quant-risk-item {
    grid-template-columns: 1fr;
    gap: 0;
    border-left-width: 3px;
  }
  .quant-risk-item-date {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
  }
  .quant-risk-item-main {
    padding: 12px 14px 14px;
  }
}

/* —— 股票详情弹层内容（layer 仅负责外层滚动，避免嵌套滚动错乱） —— */
.quant-stock-detail-root,
.quant-stock-detail-root * {
  box-sizing: border-box;
}

.quant-stock-detail-root {
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  padding: 10px 12px 12px;
  background: #f4f6f9;
}

/* 弹层 skin：铺满内容区，滚动交给 layer content */
body .layui-layer.quant-stock-detail-skin {
  border-radius: 8px;
}

body .layui-layer.quant-stock-detail-skin .layui-layer-setwin {
  display: none;
}

body .layui-layer.quant-stock-detail-skin .layui-layer-content {
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

body .layui-layer.quant-stock-detail-skin .layui-layer-content > .quant-stock-detail-root {
  min-height: 100%;
}

/* 双栏网格：宽屏并排展示，减少纵向滚动 */
.quant-stock-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.quant-stock-detail-section--half {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.quant-stock-detail-section--half .quant-stock-detail-h {
  flex: 0 0 auto;
}

.quant-stock-detail-section--wide {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .quant-stock-detail-grid {
    grid-template-columns: 1fr;
  }
}

.quant-stock-detail-grid > .quant-stock-detail-section {
  margin-bottom: 0;
}

.quant-stock-detail-muted {
  color: #999;
}

.quant-stock-detail-fg {
  color: #333;
}

.quant-stock-detail-empty-cell {
  text-align: center;
  color: #999;
  padding: 16px 8px !important;
}

/* 弹层顶栏：左列表导航 | 中标题 | 右预留给 layer 最小化/最大化/关闭 */
.quant-layer-head-toolbar {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  min-height: 44px;
  box-sizing: border-box;
}

.quant-layer-head-setwin-gap {
  flex: 0 0 96px;
  width: 96px;
  min-width: 96px;
  align-self: stretch;
  pointer-events: none;
}

/* 顶部标题条：代码/名称/操作（无 layer 标题栏，切换股票时随内容刷新） */
.quant-stock-detail-head {
  margin: -10px -12px 10px;
  padding: 8px 0 8px 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.quant-stock-detail-head-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.quant-stock-detail-head-code {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.quant-stock-detail-head-name {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 顶部：指标格（浅色，与后台一致） */
.quant-stock-detail-hero {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin-bottom: 10px;
  padding: 10px 12px 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.quant-stock-detail-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.quant-stock-detail-hero-head .qk-head-nav {
  margin-left: auto;
}

.quant-stock-detail-hero-head-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

/* 代码 + 名称 + 自选/AI：紧挨排列，名称不再撑满整行 */
.quant-stock-detail-hero-identity {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px 8px;
  min-width: 0;
  max-width: 100%;
}

.quant-stock-detail-hero-identity .quant-stock-detail-head-name {
  flex: 0 1 auto;
  max-width: min(100%, 360px);
}

.quant-stock-detail-hero-identity .quant-stock-detail-hero-inline-ops {
  margin-left: 0;
  flex-shrink: 0;
}

.quant-stock-detail-hero-fav {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 2px;
}

.quant-stock-detail-hero-inline-ops,
.qk-head-inline-ops {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  margin-left: 4px;
}

.qk-head-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin: 0;
  padding: 3px 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.qk-head-nav::before {
  content: '列表';
  margin: 0 4px 0 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #94a3b8;
  user-select: none;
  line-height: 1;
}

.quant-kline-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}

.quant-kline-nav-btn .fa {
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}

.quant-kline-nav-btn:hover:not(:disabled),
.quant-kline-nav-btn:focus:not(:disabled) {
  color: #2563eb;
  border-color: #93c5fd;
  background: #eff6ff;
  outline: none;
}

.quant-kline-nav-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.quant-kline-nav-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.qk-head-nav-pos {
  min-width: 2.8em;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  font-variant-numeric: tabular-nums;
  user-select: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  line-height: 22px;
}

/* 股票详情 / K 线标题栏：AI 与自选 +/- 统一小标签风格 */
.quant-stock-ai-icon-btn,
.quant-watchlist-fav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  margin: 0;
  border: 1px solid #c4b5fd;
  border-radius: 4px;
  background: #f5f3ff;
  color: #6d28d9;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}

.quant-stock-ai-icon-btn__label,
.quant-watchlist-fav-icon-btn__glyph {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
}

.quant-stock-ai-icon-btn:hover,
.quant-stock-ai-icon-btn:focus,
.quant-watchlist-fav-icon-btn:hover,
.quant-watchlist-fav-icon-btn:focus {
  color: #5b21b6;
  border-color: #a78bfa;
  background: #ede9fe;
  outline: none;
}

.quant-stock-ai-icon-btn:active,
.quant-watchlist-fav-icon-btn:active {
  transform: scale(0.94);
}

.quant-watchlist-fav-icon-btn.is-active,
.quant-watchlist-fav-icon-btn.quant-watchlist-remove-btn {
  color: #5b21b6;
  border-color: #a78bfa;
  background: #ede9fe;
}

.quant-stock-detail-hero-actions {
  flex-shrink: 0;
  margin-left: auto;
}

.quant-stock-detail-hero-actions .btn {
  font-weight: 600;
  border-radius: 6px;
  /* 宽度由下方「自选 / AI」同宽规则统一（btn-sm） */
}

/* 加入自选 / 取消自选 / AI分析：同宽、略收紧左右留白（仍居中） */
.btn-xs.quant-watchlist-add-btn,
.btn-xs.quant-watchlist-remove-btn,
.btn-xs.btn-info.quant-stock-ai-analysis-btn {
  box-sizing: border-box;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  width: 76px;
  min-width: 76px;
  max-width: 76px;
}

.btn-sm.quant-watchlist-add-btn,
.btn-sm.quant-watchlist-remove-btn,
.btn-sm.btn-info.quant-stock-ai-analysis-btn {
  box-sizing: border-box;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}

/* 操作列：单行 flex + 等宽按钮（与下方 76px/86px 规则一致，平板不换行） */
.quant-stock-op-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  max-width: 100%;
  vertical-align: middle;
}

.quant-stock-op-actions > .btn {
  flex: 0 0 auto;
}

.quant-stock-detail-hero-actions > .quant-stock-op-actions,
.qk-head-actions > .quant-stock-op-actions {
  justify-content: flex-end;
}

.quant-stock-op-actions > .quant-stock-ai-analysis-btn {
  margin-left: 0 !important;
}

.bootstrap-table .fixed-table-container td:has(> .quant-stock-op-actions) {
  /* 两枚 76px 按钮 + 间距，避免平板操作列被压窄后换行 */
  min-width: 11rem;
  white-space: nowrap;
}

.bootstrap-table .fixed-table-container .quant-stock-op-actions .btn-xs.quant-watchlist-add-btn,
.bootstrap-table .fixed-table-container .quant-stock-op-actions .btn-xs.quant-watchlist-remove-btn,
.bootstrap-table .fixed-table-container .quant-stock-op-actions .btn-xs.btn-info.quant-stock-ai-analysis-btn {
  white-space: nowrap;
}

/* 列表仅「自选」无 AI 时无 .quant-stock-op-actions 包裹 */
.bootstrap-table .fixed-table-container tbody td > .btn-xs.quant-watchlist-add-btn,
.bootstrap-table .fixed-table-container tbody td > .btn-xs.quant-watchlist-remove-btn {
  white-space: nowrap;
}

/* 「AI分析」：与「加入自选」同为 btn-info，仅换为低调的灰蓝实色（无渐变、无额外阴影） */
.btn.btn-info.quant-stock-ai-analysis-btn {
  margin-left: 4px;
  color: #fff !important;
  background-color: #7d8fa3 !important;
  border-color: #6d7f94 !important;
  text-shadow: none;
  box-shadow: none;
}

.btn.btn-info.quant-stock-ai-analysis-btn:hover,
.btn.btn-info.quant-stock-ai-analysis-btn:focus {
  color: #fff !important;
  background-color: #6d7f94 !important;
  border-color: #5d6f82 !important;
  box-shadow: none;
}

.btn.btn-info.quant-stock-ai-analysis-btn:active {
  color: #fff !important;
  background-color: #5d6f82 !important;
  border-color: #4d5f70 !important;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.12);
}

.btn.btn-info.quant-stock-ai-analysis-btn:focus-visible {
  outline: 2px solid rgba(125, 143, 163, 0.55);
  outline-offset: 1px;
}

.qk-head-actions .quant-stock-ai-analysis-btn,
.quant-stock-detail-hero-actions .quant-stock-ai-analysis-btn {
  margin-left: 8px;
}

/* 表格操作列内与左侧自选对齐 */
.bootstrap-table .fixed-table-container .btn.quant-stock-ai-analysis-btn {
  vertical-align: middle;
}

.quant-stock-detail-hero-code-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  max-width: 100%;
}

/* 各列表「名称」列：名称与龙徽章分列，省略号仅作用于名称文本（不截徽章） */
.quant-stock-detail-name {
  display: inline;
  vertical-align: middle;
}

.quant-stock-name-nowrap {
  white-space: nowrap !important;
  vertical-align: middle;
}

.bootstrap-table .fixed-table-container tbody td:has(.quant-stock-name-cell),
.bootstrap-table tbody td:has(.quant-stock-name-cell) {
  white-space: nowrap;
}

/* 日 K · 区间统计极值区：股票名称不换行 */
.dailyk-rs-stock-extreme .dailyk-rs-stock-name {
  white-space: nowrap;
}

.quant-stock-detail-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  vertical-align: middle;
}

.quant-stock-detail-badge-warn {
  background: #fdeaea;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}

/* 近3年涨停龙200：名称 + 徽章横向排列 */
.quant-stock-name-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  vertical-align: middle;
  box-sizing: border-box;
}

.quant-stock-name-text-wrap {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}

.quant-stock-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

.quant-limit-up-elite-badge {
  display: inline-block;
  flex: 0 0 auto;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  color: #e65100;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 3px;
  vertical-align: middle;
  cursor: help;
}

/* 涨停统计 / 模型预测：名称列加宽且完整展示（含龙徽章） */
body.quant-limitup-page .limitup-pivot-name-col,
body.quant-limitup-page .limitup-daily-name-col,
body.quant-alpha-predict-page .alpha-predict-name-col {
  min-width: 9.5rem !important;
  width: auto !important;
  max-width: none !important;
}

body.quant-limitup-page .quant-stock-name-text-wrap,
body.quant-alpha-predict-page .quant-stock-name-text-wrap {
  min-width: auto;
  flex: 0 0 auto;
  max-width: none;
}

body.quant-limitup-page .quant-stock-name-text,
body.quant-alpha-predict-page .quant-stock-name-text {
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

body.quant-limitup-page td .quant-stock-name-cell,
body.quant-alpha-predict-page td .quant-stock-name-cell {
  max-width: none;
}

@media (max-width: 768px) {
  .quant-limit-up-elite-badge {
    font-size: 9px;
    padding: 0 4px;
  }

  body.quant-limitup-page .limitup-pivot-name-col,
  body.quant-limitup-page .limitup-daily-name-col,
  body.quant-alpha-predict-page .alpha-predict-name-col {
    min-width: 8.25rem !important;
  }
}

.quant-stock-detail-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 640px) {
  .quant-stock-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .quant-stock-detail-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.quant-stock-detail-metric {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 8px 8px 6px;
  min-width: 0;
}

.quant-stock-detail-metric--emph {
  background: #f0f7ff;
  border-color: #c5daf5;
}

.quant-stock-detail-metric-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
  line-height: 1.3;
}

.quant-stock-detail-metric-val {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #222;
  word-break: break-all;
}

.quant-stock-detail-metric-val .quant-kline-pct-up,
.quant-stock-detail-metric-val .quant-kline-pct-down,
.quant-stock-detail-metric-val .quant-kline-pct-none {
  font-size: inherit;
  font-weight: inherit;
}

.quant-stock-detail-metric-val--lg {
  font-size: 17px;
}

.quant-stock-detail-metric-val--md {
  font-size: 15px;
}

.quant-stock-detail-section {
  margin-bottom: 0;
}

.quant-stock-detail-section--card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 10px 12px 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.quant-stock-detail-h {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
}

.quant-stock-detail-h i {
  margin-right: 6px;
  color: #1ab394;
}

.quant-stock-detail-lead {
  font-size: 12px;
  color: #888;
  margin: -4px 0 10px;
  line-height: 1.5;
}

.quant-stock-detail-prose {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  padding: 8px 10px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  color: #444;
  font-size: 13px;
}

.quant-stock-detail-prose--biz {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(220px, 40vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quant-stock-detail-section--theme .quant-stock-detail-theme-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quant-stock-detail-section--theme .quant-stock-detail-theme-tags {
  align-content: flex-start;
}

.quant-stock-detail-section--theme .quant-stock-detail-theme-empty {
  margin: 0;
  flex: 1 1 auto;
}

.quant-stock-detail-prose-muted {
  max-height: 220px;
  overflow-y: auto;
}

/* 股票详情 · 题材概念（theme_concept，| 分隔） */
.quant-stock-detail-theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
  align-content: flex-start;
  min-height: 0;
}

.quant-stock-detail-theme-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f0f7ff;
  border: 1px solid #c5daf5;
  border-radius: 4px;
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
}

/* 列表 · 题材概念列（theme_concept，| 分隔；单行紧凑，+N 浮层查看全部） */
.bootstrap-table td.quant-theme-concept-col,
.bootstrap-table .fixed-table-container td.quant-theme-concept-col {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  line-height: 1 !important;
}

.quant-theme-concept-col {
  min-width: 9rem;
  width: auto !important;
  max-width: none !important;
}

.quant-theme-concept-empty {
  font-size: var(--sq-quant-table-cell-fs);
  line-height: 22px;
}

.quant-theme-concept-cell {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: none;
  line-height: 1;
  vertical-align: middle;
}

.quant-theme-concept-tags {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: none;
}

.quant-theme-concept-tag {
  flex: 0 0 auto;
  padding: 0 8px;
  height: 22px;
  line-height: 22px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  white-space: nowrap;
}

a.quant-theme-concept-tag--pick {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

a.quant-theme-concept-tag--pick:hover,
a.quant-theme-concept-tag--pick:focus {
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
  text-decoration: none;
}

.quant-theme-concept-popover-tag.quant-theme-concept-tag--pick:hover,
.quant-theme-concept-popover-tag.quant-theme-concept-tag--pick:focus {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

.quant-theme-concept-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #64748b;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.quant-theme-concept-more:hover,
.quant-theme-concept-more:focus {
  color: #4338ca;
  background: #e0e7ff;
  border-color: #a5b4fc;
  text-decoration: none;
}

.quant-theme-concept-popover {
  position: fixed;
  z-index: 19891020;
  max-width: min(320px, calc(100vw - 16px));
  max-height: min(160px, calc(100vh - 16px));
  padding: 6px 8px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1;
}

.quant-theme-concept-popover-tag {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  white-space: normal;
  word-break: break-all;
}

/* 股票详情 · 风险分析（内嵌与弹层相同的结构化 HTML） */
.quant-stock-detail-risk-structured {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background: #fafafa;
  /* 不限制高度：整块随弹层滚动，模块内不出现独立滚动条 */
}

.quant-stock-detail-risk-structured .quant-risk-modal-wrap {
  padding: 8px 10px 10px;
}

.quant-stock-detail-risk-structured .quant-risk-expand-block {
  margin-top: 10px;
}

.quant-stock-detail-risk-structured .quant-risk-expand-summary {
  font-size: 12px;
  padding: 8px 12px;
}

/* 详情内嵌：压缩每条时间线卡片占位，便于一屏多看几条 */
.quant-stock-detail-risk-structured .quant-risk-lead {
  margin: 0 0 8px;
  padding: 4px 8px;
  font-size: 11px;
}

.quant-stock-detail-risk-structured .quant-risk-item {
  margin-bottom: 6px;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0 8px;
  border-radius: 6px;
  border-left-width: 3px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.quant-stock-detail-risk-structured .quant-risk-item:last-child {
  margin-bottom: 0;
}

.quant-stock-detail-risk-structured .quant-risk-item:hover {
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
}

.quant-stock-detail-risk-structured .quant-risk-item--link:hover {
  border-color: #f87171;
}

.quant-stock-detail-risk-structured .quant-risk-item-date {
  padding: 8px 6px;
  font-size: 11px;
  line-height: 1.35;
}

.quant-stock-detail-risk-structured .quant-risk-item-main {
  padding: 8px 8px 8px 0;
}

.quant-stock-detail-risk-structured .quant-risk-item-title {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}

.quant-stock-detail-risk-structured .quant-risk-item-reason {
  margin-top: 6px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 6px;
}

.quant-stock-detail-risk-structured .quant-risk-reason-label {
  padding: 1px 5px;
  font-size: 10px;
  margin-bottom: 2px;
  margin-right: 4px;
}

.quant-stock-detail-risk-structured .quant-risk-loose {
  margin-top: 10px;
  padding-top: 10px;
}

.quant-stock-detail-risk-structured .quant-risk-loose-h {
  margin-bottom: 6px;
  font-size: 11px;
}

.quant-stock-detail-risk-structured .quant-risk-loose-p {
  margin: 0 0 6px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.55;
  border-radius: 6px;
}

@media (min-width: 960px) {
  .quant-stock-detail-risk-structured .quant-risk-timeline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    margin: 0;
    padding: 0;
  }

  .quant-stock-detail-risk-structured .quant-risk-timeline > li {
    margin: 0;
  }
}

@media (max-width: 768px) {
  .quant-stock-detail-risk-structured .quant-risk-item-main {
    padding: 8px 10px 10px;
  }
}

.quant-stock-detail-risk-placeholder {
  margin: 0;
  padding: 16px 12px;
  text-align: center;
}

/* 股票详情 · 反弹水平（对齐 dashboard 卡片：琥珀强调 + 表 + 说明） */
.quant-stock-detail-section--rebound .quant-stock-detail-h {
  margin-bottom: 10px;
}

.quant-stock-detail-rebound-empty {
  margin: 0;
  padding: 4px 2px 2px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
}

.quant-stock-detail-rebound-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.quant-stock-detail-rebound-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.quant-stock-detail-rebound-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.quant-stock-detail-rebound-th-l {
  text-align: left;
}

.quant-stock-detail-rebound-th-r {
  text-align: right;
}

.quant-stock-detail-rebound-td-l {
  padding: 10px 12px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.quant-stock-detail-rebound-td-r {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
}

.quant-stock-detail-rebound-table tbody tr:last-child .quant-stock-detail-rebound-td-l,
.quant-stock-detail-rebound-table tbody tr:last-child .quant-stock-detail-rebound-td-r {
  border-bottom: none;
}

.quant-stock-detail-rebound-pct {
  font-weight: 600;
  color: #059669;
  font-variant-numeric: tabular-nums;
}

.quant-stock-detail-rebound-days {
  font-weight: 600;
  color: #2563eb;
  font-variant-numeric: tabular-nums;
}

.quant-stock-detail-rebound-count {
  font-weight: 600;
  color: #7c3aed;
  font-variant-numeric: tabular-nums;
}

.quant-stock-detail-rebound-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
  font-size: 12px;
  color: #92400e;
  line-height: 1.55;
}

.quant-stock-detail-rebound-note p {
  margin: 0;
}

.quant-stock-detail-rebound-note code {
  font-size: 11px;
  padding: 0 3px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 3px;
}

/* 股票详情弹层 · 涨停潜力（dashboard 风格，接在涨停记录后） */
.quant-stock-detail-section--lupot .quant-stock-detail-h {
  margin-bottom: 8px;
}

.quant-stock-detail-lupot-empty {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.quant-stock-detail-lupot-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.quant-stock-detail-lupot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.quant-stock-detail-lupot-table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  font-weight: 600;
  color: #334155;
}

.quant-stock-detail-lupot-th-l {
  text-align: left;
}

.quant-stock-detail-lupot-th-r {
  text-align: right;
}

.quant-stock-detail-lupot-td-l {
  padding: 8px 10px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.quant-stock-detail-lupot-td-r {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
}

.quant-stock-detail-lupot-table tbody tr:last-child .quant-stock-detail-lupot-td-l,
.quant-stock-detail-lupot-table tbody tr:last-child .quant-stock-detail-lupot-td-r {
  border-bottom: none;
}

.quant-stock-detail-lupot-val-total {
  color: #2563eb;
  font-weight: 600;
}

.quant-stock-detail-lupot-val-pairs {
  color: #7c3aed;
  font-weight: 600;
}

.quant-stock-detail-lupot-val-prob {
  color: #059669;
  font-weight: 600;
}

.quant-stock-detail-lupot-denom {
  margin: 0;
  padding: 6px 10px 8px;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.quant-stock-detail-lupot-note {
  margin: 0;
  padding: 10px 12px;
  background: #fffbeb;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
  font-size: 12px;
  color: #854d0e;
  line-height: 1.55;
}

.quant-stock-detail-lupot-note p {
  margin: 0;
}

.quant-stock-detail-section--limitup .quant-stock-detail-h {
  margin-bottom: 8px;
}

.quant-stock-detail-section--limitup.quant-stock-detail-section--half .quant-stock-detail-lu-shell {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(220px, 40vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quant-stock-detail-section--activity .quant-stock-detail-tablewrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(220px, 40vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quant-stock-detail-section--activity .quant-stock-detail-table-responsive {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.quant-stock-detail-lu-module-latest {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
  background: linear-gradient(90deg, #ecfdf5 0%, #f0fdfa 40%, #fff 100%);
  border: 1px solid #c5ebe0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.quant-stock-detail-lu-module-latest-lbl {
  font-weight: 600;
  color: #0f766e;
}

.quant-stock-detail-lu-module-latest-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #134e4a;
}

/* 涨停记录：默认展示最新年明细；历史年份整块折叠 → 年内再按年折叠 → 月行 + 日期芯片 */
.quant-stock-detail-lu-shell {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 4px 4px 8px;
}

.quant-stock-detail-lu {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.quant-stock-detail-lu-empty {
  text-align: center;
  padding: 28px 16px;
  font-size: 13px;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 6px;
  margin: 8px;
}

.quant-stock-detail-lu-yearfold {
  margin: 8px 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
}

.quant-stock-detail-lu-yearfold:last-child {
  margin-bottom: 8px;
}

.quant-stock-detail-lu-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid transparent;
}

.quant-stock-detail-lu-yearfold[open] > .quant-stock-detail-lu-summary {
  border-bottom-color: #e2e8f0;
}

.quant-stock-detail-lu-summary::-webkit-details-marker {
  display: none;
}

.quant-stock-detail-lu-summary::marker {
  content: '';
}

.quant-stock-detail-lu-summary-year {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  min-width: 4.5em;
}

.quant-stock-detail-lu-summary-meta {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.quant-stock-detail-lu-summary-meta strong {
  color: #334155;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.quant-stock-detail-lu-summary-chev {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.quant-stock-detail-lu-summary-chev .fa {
  transition: transform 0.2s ease;
}

.quant-stock-detail-lu-yearfold[open] .quant-stock-detail-lu-summary-chev .fa {
  transform: rotate(180deg);
}

/* 最新公历年：始终展开，无折叠三角 */
.quant-stock-detail-lu-yearfold--latest {
  margin-bottom: 10px;
}

.quant-stock-detail-lu-summary--latest {
  cursor: default;
  user-select: text;
}

/* 更早的公历年：整块折叠，展开后再按年 details */
.quant-stock-detail-lu-history-fold {
  margin: 0 8px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
}

.quant-stock-detail-lu-history-summary {
  margin: 0;
}

.quant-stock-detail-lu-history-fold:not([open]) .quant-lu-hist-when-open {
  display: none;
}

.quant-stock-detail-lu-history-fold[open] .quant-lu-hist-when-collapsed {
  display: none;
}

.quant-stock-detail-lu-history-fold[open] .quant-stock-detail-lu-summary-chev .fa {
  transform: rotate(180deg);
}

.quant-stock-detail-lu-history-body {
  padding: 4px 0 8px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.quant-stock-detail-lu-history-body .quant-stock-detail-lu-yearfold {
  margin-left: 6px;
  margin-right: 6px;
}

.quant-stock-detail-lu-year-body {
  padding: 4px 0 2px;
  background: #fff;
}

.quant-stock-detail-lu-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.quant-stock-detail-lu-row:last-child {
  border-bottom: none;
}

.quant-stock-detail-lu-month-badge {
  flex: 0 0 auto;
  min-width: 52px;
  margin-top: 2px;
  padding: 4px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  line-height: 1.35;
}

.quant-stock-detail-lu-dates {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.quant-stock-detail-lu-day {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  line-height: 1.35;
}

.quant-stock-detail-lu-day:hover {
  border-color: #1ab394;
  color: #0f766e;
  background: #f0fdfa;
}

.quant-stock-detail-lu-day--kline {
  cursor: pointer;
  text-decoration: none;
  border-style: dashed;
}

.quant-stock-detail-lu-day--kline:hover {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.quant-stock-detail-tablewrap {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background: #fff;
}

.quant-stock-detail-table-responsive {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.quant-stock-detail-table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0 !important;
  font-size: 12px;
  table-layout: fixed;
}

.quant-stock-detail-table thead th {
  background: #f5f5f5;
  font-weight: 600;
  color: #555;
  font-size: 12px;
  white-space: nowrap;
  word-break: normal;
  vertical-align: middle;
}

.quant-stock-detail-table td {
  word-break: normal;
  overflow-wrap: break-word;
  vertical-align: middle;
}

.quant-stock-detail-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.quant-stock-detail-code,
.quant-stock-detail-name,
.quant-stock-kline-code,
.quant-stock-kline-name {
  font-weight: 600;
  text-decoration: none;
  border-bottom: none;
  box-shadow: none;
}

.quant-stock-detail-code span,
.quant-stock-detail-name span,
.quant-stock-kline-code span,
.quant-stock-kline-name .quant-stock-name-text {
  pointer-events: none;
}

/* 列表行空白处可点出股票详情（代码/名称列仍走 K 线入口） */
.bootstrap-table .fixed-table-container tbody tr[data-index],
.bootstrap-table tbody tr[data-index],
.quant-momentum-pb-result-scroll tbody tr,
.limitup-pivot-detail-table tbody tr {
  cursor: pointer;
}

/* 首页：日 K 表最后更新时间提示条 */
.sq-stock-k-freshness-banner {
  margin: 0;
  padding: 10px 40px 10px 14px;
  border-color: var(--sq-border) !important;
  background: var(--sq-accent-soft) !important;
  color: var(--sq-text) !important;
  position: relative;
  z-index: 1200;
}

.sq-stock-k-freshness-banner .close {
  opacity: 0.55;
  line-height: 1.2;
}

.sq-stock-k-freshness-banner .fa-database {
  margin-right: 6px;
  color: var(--sq-accent);
}

/* 股票详情弹层 · 财务分析（东方财富 RPT_LICO_FN_CPD 按条列表，懒加载） */
.quant-stock-detail-section--financial .quant-stock-detail-h {
  margin-bottom: 8px;
}

.quant-stock-detail-financial-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

.quant-stock-detail-fin-pending {
  margin: 0;
}

.quant-stock-detail-financial-err {
  margin: 0;
  color: #dc2626;
  font-size: 13px;
}

.quant-stock-detail-fin-empty {
  margin: 0 0 10px;
}

.quant-stock-detail-fin-tableblock {
  margin-bottom: 14px;
}

.quant-stock-detail-fin-subh {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 8px;
}

.quant-stock-detail-fin-table thead th {
  font-size: 12px;
  white-space: nowrap;
}

.quant-stock-detail-fin-collapsible:not(.quant-stock-detail-fin-collapsible--open) .quant-stock-detail-fin-extra-row {
  display: none;
}

.quant-stock-detail-fin-collapsible--open .quant-stock-detail-fin-extra-row {
  display: table-row;
}

.quant-stock-detail-fin-more-wrap {
  margin: 0;
  padding-top: 4px;
  text-align: center;
}

.quant-stock-detail-fin-more-toggle {
  font-size: 13px;
  cursor: pointer;
}

/* ---------- 列表排除：与筛选行对齐的「排除」+ 横向双段开关（独立勾选，视觉一体） ---------- */
.select-list .sq-exclude-li,
#alphaPredict-form .select-list .sq-exclude-li {
  list-style: none;
  float: left !important;
  clear: none;
  width: auto;
  margin-right: 28px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.select-list .sq-exclude-li label.sq-exclude-seg__cell,
#alphaPredict-form .select-list .sq-exclude-li label.sq-exclude-seg__cell {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

.sq-exclude-prefix {
  font-weight: normal;
  color: #333;
  line-height: 28px;
  flex-shrink: 0;
}

.sq-exclude-seg {
  display: inline-flex;
  align-items: stretch;
  height: 28px;
  box-sizing: border-box;
  border: 1px solid #d1dae4;
  border-radius: 4px;
  overflow: hidden;
  background: #fcfcfd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  /* 与 ry-ui .select-list li 下正文一致（body 13px），避免比带 form-control 的控件显大 */
  font-size: 13px;
}

/* 日 K 弹层等窄位：略矮、略小一号 */
.sq-exclude-seg.sq-exclude-seg--compact {
  height: 26px;
  font-size: 12px;
  border-radius: 3px;
}

.sq-exclude-seg:focus-within {
  border-color: #d1dae4;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.sq-exclude-seg--compact .sq-exclude-seg__face {
  padding: 0 8px;
  line-height: 1.35;
}

.sq-exclude-seg__divider {
  width: 1px;
  background: #cbd5e1;
  flex-shrink: 0;
}

.sq-exclude-seg__cell {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  user-select: none;
  min-width: 5rem;
  align-self: stretch;
}

.sq-exclude-seg__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.sq-exclude-seg__face {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  height: 100%;
  padding: 0 10px;
  font-size: inherit;
  font-weight: normal;
  color: #64748b;
  background: #f8fafc;
  line-height: 1.4;
  pointer-events: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    gap 0.15s ease;
}

.sq-exclude-seg__cell:hover .sq-exclude-seg__face {
  background: #f1f5f9;
  color: #475569;
}

.sq-exclude-seg__input:focus + .sq-exclude-seg__face {
  outline: 1px solid rgba(148, 163, 184, 0.55);
  outline-offset: -1px;
}

/* 选中：仅略深平色底 + 勾；不用 inset 描边，避免与外层边框叠成双线 */
.sq-exclude-seg__input:checked + .sq-exclude-seg__face {
  gap: 5px;
  background: #f0f2f8;
  color: #4b5563;
  font-weight: normal;
}

.sq-exclude-seg__input:checked + .sq-exclude-seg__face::before {
  content: '\2713';
  display: block;
  font-size: 12px;
  font-weight: normal;
  line-height: 1;
  color: #94a3b8;
  flex-shrink: 0;
  transform: translateY(0.5px);
}

.sq-exclude-seg--compact .sq-exclude-seg__input:checked + .sq-exclude-seg__face::before {
  font-size: 11px;
}

.sq-exclude-seg__cell:hover .sq-exclude-seg__input:checked + .sq-exclude-seg__face {
  background: #e9ecf4;
  color: #374151;
}

.sq-exclude-seg__cell:hover .sq-exclude-seg__input:checked + .sq-exclude-seg__face::before {
  color: #64748b;
}

.sq-exclude-seg__input:focus:checked + .sq-exclude-seg__face {
  outline-color: rgba(100, 116, 139, 0.45);
}

.sq-exclude-inline-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

/* ---------- 我的持仓 · 题材集中度分析弹层 ---------- */
body .layui-layer.quant-holding-theme-skin {
  border-radius: 8px;
  overflow: hidden;
}

body .layui-layer.quant-holding-theme-skin .layui-layer-setwin {
  display: none;
}

body .layui-layer.quant-holding-theme-skin .layui-layer-title {
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

body .layui-layer.quant-holding-theme-skin .layui-layer-title.quant-holding-theme-layer-title {
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 44px;
  box-sizing: border-box;
  overflow: visible;
}

.quant-holding-theme-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  pointer-events: auto;
}

.quant-holding-theme-close:hover {
  color: #0f172a;
  background: #e2e8f0;
}

body .layui-layer.quant-holding-theme-skin .layui-layer-content {
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

body .layui-layer.quant-holding-theme-skin .layui-layer-content > .quant-holding-theme-panel {
  width: 100%;
  min-width: 0;
  height: 100%;
}

.quant-holding-theme-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 12px 14px 14px;
  box-sizing: border-box;
  font-size: 13px;
  color: #334155;
}

.quant-holding-theme-panel__head {
  flex: 0 0 auto;
}

.quant-holding-theme-panel__main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 40%) minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .quant-holding-theme-panel__main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 34vh) minmax(180px, 1fr);
  }
}

.quant-holding-theme-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 860px) {
  .quant-holding-theme-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quant-holding-theme-card {
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.quant-holding-theme-card--accent {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.quant-holding-theme-card--warn {
  background: #fffbeb;
  border-color: #fcd34d;
}

.quant-holding-theme-card__label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
}

.quant-holding-theme-card__value {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.quant-holding-theme-card__value--sm {
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

.quant-holding-theme-card__sub {
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.quant-holding-theme-insight {
  padding: 8px 10px;
  margin-bottom: 0;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  line-height: 1.5;
  font-size: 12px;
}

.quant-holding-theme-insight--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.quant-holding-theme-insight .fa {
  margin-right: 4px;
  opacity: 0.85;
}

.quant-holding-theme-chart-wrap,
.quant-holding-theme-table-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.quant-holding-theme-section-title {
  flex: 0 0 auto;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.quant-holding-theme-section-title .fa {
  margin-right: 6px;
  color: #64748b;
}

.quant-holding-theme-chart {
  flex: 1 1 auto;
  width: 100%;
  min-height: 160px;
  height: auto;
  padding: 4px 6px 6px;
  box-sizing: border-box;
}

.quant-holding-theme-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: none;
  border-radius: 0;
  -webkit-overflow-scrolling: touch;
}

.quant-holding-theme-table {
  margin-bottom: 0;
  font-size: 12px;
}

.quant-holding-theme-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 12px;
  white-space: nowrap;
}

.quant-holding-theme-rank {
  color: #94a3b8;
  text-align: center;
}

.quant-holding-theme-stocks {
  line-height: 1.45;
  word-break: break-word;
  font-size: 12px;
}

.quant-holding-theme-stocks .quant-stock-detail-trigger {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.quant-holding-theme-stocks .quant-stock-detail-trigger:hover,
.quant-holding-theme-stocks .quant-stock-detail-trigger:focus {
  color: #1d4ed8;
  text-decoration: underline;
}

.quant-holding-theme-stock-paren {
  color: #94a3b8;
}

.quant-holding-theme-stock-sep {
  color: #64748b;
  margin: 0 1px;
}

.quant-holding-theme-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  vertical-align: middle;
}

a.quant-holding-theme-filter-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

a.quant-holding-theme-filter-link:hover,
a.quant-holding-theme-filter-link:focus {
  color: #1d4ed8;
  text-decoration: underline;
}
