/* ===== A股智析 · 东方财富风格 ===== */
:root {
  --bg-page: #f5f6fa;
  --bg-card: #ffffff;
  --bg-hover: #f0f2f5;
  --bg-sidebar: #2c3e50;
  --bg-sidebar-hover: #34495e;
  --bg-sidebar-active: #1890ff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --up: #ff3b30;
  --down: #00b578;
  --warning: #faad14;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
body, html {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px; color: var(--text-primary);
  background: var(--bg-page);
}
#app {
  height: 100vh !important; width: 100vw !important;
  display: grid !important;
  grid-template-columns: 72px 1fr !important;
  grid-template-rows: 48px 36px 1fr !important;
  grid-template-areas:
    "nav topbar"
    "nav indices"
    "nav workspace" !important;
  overflow: hidden !important;
}

.ew-nav        { grid-area: nav !important; height: 100% !important; }
.ew-topbar     { grid-area: topbar !important; }
.ew-indices-bar { grid-area: indices !important; }
.ew-workspace  { grid-area: workspace !important; overflow: auto !important; height: 100% !important; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }

/* ============ 顶部栏 ============ */
.ew-topbar {
  height: 48px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 16px;
  flex-shrink: 0; z-index: 100;
}
.ew-logo { display: flex; align-items: center; gap: 10px; }
.ew-logo-mark {
  width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #1890ff, #096dd9);
  color: #fff; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.ew-logo-title { font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--text-primary); }
.ew-logo-sub { font-size: 10px; color: var(--primary); font-weight: 600; }
.ew-logo-text { line-height: 1.1; }

.ew-top-announce {
  flex: 0 0 auto; font-size: 12px; color: var(--text-secondary);
  padding: 4px 10px; background: #fffbe6; border: 1px solid #ffe58f; border-radius: 4px;
}
.ew-ann-hl { color: var(--primary); cursor: pointer; }

.ew-search { flex: 1; max-width: 360px; position: relative; }
.ew-search-input .el-input__wrapper { border-radius: 18px; }
.ew-search-dd {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); max-height: 320px; overflow-y: auto; z-index: 200;
}
.ew-dd-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}
.ew-dd-row:hover { background: var(--bg-hover); }
.ew-ddc { font-family: monospace; color: var(--text-secondary); font-size: 12px; }
.ew-ddn { flex: 1; color: var(--text-primary); font-weight: 500; }
.ew-ddp { font-family: monospace; font-size: 12px; }
.ew-ddp small { font-size: 11px; margin-left: 4px; }

.ew-top-user { flex-shrink: 0; }
.ew-user-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px;
  background: var(--bg-hover); border-radius: 16px; cursor: pointer; color: var(--text-primary); font-size: 12px;
}
.ew-user-chip:hover { background: #e5e7eb; }

/* ============ 左侧垂直导航 ============ */
.ew-nav {
  background: var(--bg-sidebar);
  display: flex; flex-direction: column; padding: 8px 0;
  height: 100% !important;
  /* grid 控制宽度 72px，不要这里再设 */
}
.ew-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 0; cursor: pointer; color: #c0c8d4;
  border-left: 3px solid transparent; transition: all 0.15s;
}
.ew-nav-item:hover { background: var(--bg-sidebar-hover); color: #fff; }
.ew-nav-item.active {
  background: var(--bg-sidebar-active); color: #fff;
  border-left-color: #fff;
}
.ew-nav-icon { width: 22px; height: 22px; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.ew-nav-icon svg { width: 20px; height: 20px; fill: currentColor; }
.ew-nav-label { font-size: 11px; }

/* ============ 大盘指数横条 ============ */
.ew-indices-bar {
  height: 36px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 24px;
  flex-shrink: 0; overflow-x: auto;
}
.ew-ind { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.ew-ind.up .ew-ind-chg { color: var(--up); }
.ew-ind.down .ew-ind-chg { color: var(--down); }
.ew-ind.up .ew-ind-val { color: var(--up); }
.ew-ind.down .ew-ind-val { color: var(--down); }
.ew-ind-name { color: var(--text-secondary); }
.ew-ind-val { font-family: monospace; font-weight: 600; }
.ew-ind-chg { font-family: monospace; }
.ew-ind-stats { margin-left: auto; }

/* ============ 主工作区 ============ */
.ew-workspace {
  flex: 1; overflow: auto; display: flex; flex-direction: column;
  background: var(--bg-page);
}

/* ============ 视图 1：自选 ============ */
.view-watch {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 288px;
  gap: 0; overflow: hidden;
  height: 100%; min-height: 0;
}

/* 左列自选列表 */
.ew-watch-side {
  background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  min-height: 0;
}
.ew-side-header {
  padding: 12px 16px; font-weight: 700; font-size: 14px;
  border-bottom: 1px solid var(--border); color: var(--text-primary);
}
.ew-side-tabs {
  display: flex; padding: 0 8px; border-bottom: 1px solid var(--border);
  overflow-x: auto; overflow-y: hidden;
}
.ew-side-tabs span {
  padding: 8px 6px; font-size: 12px; color: var(--text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; flex-shrink: 0;
}
.ew-side-tabs span.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.ew-watch-list { flex: 1; overflow-y: auto; }
.ew-wl-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border-light);
}
.ew-wl-item:hover { background: var(--bg-hover); }
.ew-wl-info { flex: 1 1 auto; min-width: 0; }
.ew-wl-nm {
  font-size: 13px; color: var(--text-primary); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ew-wl-name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.ew-wl-code { font-size: 10px; color: var(--text-muted); font-family: monospace; }
.ew-wl-name .ew-wl-code { margin-left: 4px; }
.ew-wl-quote { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.ew-wl-price { font-family: monospace; font-size: 13px; font-weight: 600; min-width: 46px; text-align: right; }
.ew-wl-pct { font-family: monospace; font-size: 12px; font-weight: 600; min-width: 58px; text-align: right; }
.ew-rk {
  display: inline-block; width: 20px; height: 20px; border-radius: 4px;
  background: var(--bg-hover); font-size: 11px; color: var(--text-secondary);
  text-align: center; line-height: 20px; margin-right: 8px; font-weight: 600;
}
.ew-rk.rk-1 { background: #ff3b30; color: #fff; }
.ew-rk.rk-2 { background: #ff6b35; color: #fff; }
.ew-rk.rk-3 { background: #ff9500; color: #fff; }
.ew-empty-tip { padding: 40px 16px; text-align: center; color: var(--text-muted); }

/* 窄屏：压缩两翼，报价网格独占一行 */
@media (max-width: 1200px) {
  .view-watch { grid-template-columns: 184px minmax(0, 1fr) 256px; }
  .ew-qb-grid { flex-basis: 100%; border-left: 0; padding-left: 0; }
}

/* 中间主图 */
.ew-main-chart {
  display: flex; flex-direction: column; overflow: hidden; background: #fff;
  min-width: 0; min-height: 0;
}
.ew-quote-bar {
  padding: 8px 16px; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.ew-qb-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ew-qb-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ew-qb-name { font-size: 16px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.ew-qb-code { font-size: 12px; color: var(--text-muted); font-family: monospace; white-space: nowrap; }
.ew-qb-tag { flex-shrink: 0; }
.ew-qb-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ew-qb-price-row { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.ew-qb-price { font-size: 24px; font-weight: 700; font-family: 'DIN', monospace; line-height: 1.1; }
.ew-qb-chg, .ew-qb-pct { font-size: 13px; font-family: monospace; }

.ew-qb-grid {
  flex: 1 1 300px; min-width: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 17px; gap: 2px 10px;
  padding-left: 12px; border-left: 1px solid var(--border);
}
.ew-qb-cell { display: flex; align-items: center; gap: 4px; font-size: 11px; min-width: 0; white-space: nowrap; }
.ew-qb-cell .c-lbl { color: var(--text-muted); flex-shrink: 0; }
.ew-qb-cell .c-val { color: var(--text-primary); font-family: monospace; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

.ew-toolbar {
  padding: 6px 12px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); background: #fafbfc;
  flex-shrink: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
}
.ew-toolbar::-webkit-scrollbar { height: 4px; }
.ew-toolbar .el-radio-group { flex-shrink: 0; }
.ew-toolbar .el-radio-button__inner { padding: 6px 9px; }
.ew-toolbar .ew-tb-right { margin-left: auto; flex-shrink: 0; }

.ew-chart-main {
  display: flex; flex-direction: column; overflow: hidden;
  flex: 1 1 auto; min-height: 0;
}
.ew-kline-canvas { flex: 1 1 0; min-height: 0; width: 100%; height: auto; }
.ew-sub-charts { border-top: 1px solid var(--border); height: 150px; flex: 0 0 150px; }
.ew-sub-tabs { height: 100%; display: flex; flex-direction: column; }
.ew-sub-tabs .el-tabs__header { margin: 0; padding: 0 8px; background: #fafbfc; flex: 0 0 auto; }
.ew-sub-tabs .el-tabs__content { padding: 0; flex: 1 1 0; min-height: 0; overflow: hidden; }
.ew-sub-tabs .el-tab-pane { height: 100%; }
.ew-sub-canvas { width: 100%; height: 100%; }

/* 右侧面板 */
.ew-right-panel {
  background: #fff; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  overflow-y: auto; min-height: 0;
}
.ew-indicator-card, .ew-depth-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px;
}
.ew-ind-head { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.ew-dist-chart { height: 96px; }
.ew-tiny-chart { height: 56px; }
.ew-ind-stats { display: flex; justify-content: space-around; margin-top: 3px; font-size: 12px; }
.ew-ind-stats span { color: var(--text-muted); }
.ew-ind-stats b { font-family: monospace; margin-left: 4px; }

/* 资金流向 */
.ew-flow-list { display: flex; flex-direction: column; gap: 3px; padding: 2px 0; }
.ew-flow-row { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.ew-flow-row .ef-lbl { color: var(--text-muted); }
.ew-flow-row b { font-family: monospace; font-weight: 600; }

/* 五档盘口 */
.ew-depth-row {
  display: flex; align-items: center; gap: 8px; padding: 1.5px 0; font-size: 12px;
}
.dl-lv { width: 36px; color: var(--text-muted); }
.dl-price { flex: 1; font-family: monospace; font-weight: 600; }
.dl-vol { width: 60px; text-align: right; font-family: monospace; color: var(--text-secondary); }
.ew-depth-mid {
  text-align: center; font-size: 15px; font-weight: 700; padding: 3px 0; margin: 2px 0;
  border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
  font-family: 'DIN', monospace;
}

/* ============ 视图 2：行情 ============ */
.view-market { padding: 16px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.ew-market-header {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.ew-ind-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.ew-ind-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.ew-index-chart-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
#index-detail-chart { width: 100%; height: 420px; }
.ew-indc-name { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.ew-indc-val { font-size: 22px; font-weight: 700; font-family: 'DIN', monospace; line-height: 1.2; }
.ew-indc-pct { font-size: 12px; font-family: monospace; margin-top: 4px; }

/* 视口偏矮时压缩指数卡，给行情表格留出更多行 */
@media (max-height: 760px) {
  .view-market { padding: 10px; gap: 10px; }
  .ew-market-header { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ew-ind-card { padding: 8px 12px; }
  .ew-indc-name { margin-bottom: 2px; }
  .ew-indc-val { font-size: 18px; }
  .ew-indc-pct { margin-top: 2px; }
}

.ew-table-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.ew-tbl-head {
  display: flex; align-items: center; padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.ew-tbl-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-right: 18px; }
.ew-tb-right { margin-left: auto; }
/* 行情页榜单 / 分类 */
.ew-mkt-tabs { display: flex; align-items: center; gap: 4px; }
.ew-mkt-tabs span, .ew-sec-sorts span, .ew-news-tabs span {
  padding: 3px 10px; font-size: 12px; color: var(--text-secondary);
  border-radius: 12px; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.ew-mkt-tabs span:hover, .ew-sec-sorts span:hover, .ew-news-tabs span:hover { background: var(--bg-hover); }
.ew-mkt-tabs span.on, .ew-sec-sorts span.on, .ew-news-tabs span.on {
  background: var(--primary-weak, rgba(24, 144, 255, 0.1)); color: var(--primary, #1890ff); font-weight: 600;
}
.ew-mkt-classes { display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--border-light); }
.ew-mkt-classes span {
  padding: 2px 10px; font-size: 12px; color: var(--text-secondary);
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
}
.ew-mkt-classes span.on { color: var(--primary, #1890ff); border-color: var(--primary, #1890ff); background: rgba(24, 144, 255, 0.06); }
.ew-sec-sorts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.ew-news-tabs { display: flex; align-items: center; gap: 2px; }
.ew-sector-index-chart { height: 160px; margin-bottom: 8px; }
.ew-f10-body { min-height: 460px; }
.ew-f10-news-item { padding: 10px 2px; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.ew-f10-news-item:hover { background: var(--bg-hover); }
/* 行情表头：单行不换行，排序图标与文字同行 */
.ew-stock-table .el-table__header-wrapper th .cell {
  font-size: 12px; white-space: nowrap; padding: 0 6px;
  display: flex; align-items: center; justify-content: flex-start;
}
.ew-stock-table .el-table__header-wrapper th .cell .caret-wrapper { flex-shrink: 0; }

.ew-stock-table .up { color: var(--up); font-weight: 600; }
.ew-stock-table .down { color: var(--down); font-weight: 600; }
.ew-st-name { font-weight: 500; margin-right: 6px; }
.ew-st-code { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.ew-limit-tag {
  display: inline-block; font-size: 10px; line-height: 14px; padding: 0 3px;
  border-radius: 3px; margin-right: 6px; font-weight: 600; white-space: nowrap;
}
.ew-limit-tag.up-tag { background: #fff1f0; color: var(--up); border: 1px solid #ffccc7; }
.ew-limit-tag.down-tag { background: #e9f8f1; color: var(--down); border: 1px solid #b7e6d0; }

/* ============ 视图 3：个股（三栏详情页） ============ */
.view-sector { padding: 0; overflow: hidden; height: 100%; min-height: 0; display: flex; flex-direction: column; }
/* 详情 / 列表 切换条 */
.pg-mode-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 5px 12px; background: #fff; border-bottom: 1px solid var(--border);
}
.pg-mode-tabs { display: flex; gap: 2px; background: var(--bg-hover); border-radius: 4px; padding: 2px; }
.pg-mode-tabs span {
  padding: 3px 14px; font-size: 12px; color: var(--text-secondary);
  border-radius: 3px; cursor: pointer; user-select: none;
}
.pg-mode-tabs span.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }
.pg-mode-hint { font-size: 12px; color: var(--text-muted); }
.pg-listview { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.pg-listview .ew-stock-table { flex: 1 1 auto; min-height: 0; }
.pg-listview-more { flex: 0 0 auto; padding: 6px; text-align: center; border-top: 1px solid var(--border); }
.ew-sector-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; padding: 16px;
}
.ew-load-more { display: flex; justify-content: center; padding: 0 16px 16px; }
.ew-sector-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; cursor: pointer; transition: all 0.15s;
}
.ew-sector-item:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ew-sec-name { font-weight: 600; font-size: 14px; color: var(--text-primary); margin-bottom: 8px; }
.ew-sec-type {
  display: inline-block; padding: 1px 5px; font-size: 10px;
  background: var(--bg-hover); color: var(--text-secondary); border-radius: 3px; margin-left: 4px;
}
.ew-sec-main { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.ew-sec-pct { font-family: monospace; font-weight: 700; }
.ew-sec-lead { color: var(--text-secondary); }
.ew-sec-counts { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--text-secondary); }
.ew-sec-flow { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 11px; color: var(--text-secondary); }
.ew-sec-flow b { margin-left: auto; font-family: monospace; font-size: 12px; }
.ew-sec-flow small { min-width: 48px; text-align: right; font-family: monospace; }
.ew-sec-limit {
  padding: 0 5px; border-radius: 3px; background: rgba(255, 59, 48, 0.08); color: var(--up);
}
.ew-sec-limit.down { background: rgba(0, 181, 120, 0.08); color: var(--down); }

/* ============ 视图 4：资讯（参考图4风格） ============ */
.view-news { padding: 0; overflow-y: auto; background: #f5f6fa; height: 100%; }
.ew-news-card { background: #fff; border: 0; border-radius: 0; min-height: 100%; }

/* 顶部导航条 */
.ew-news-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #fafbfc 0%, #ffffff 100%);
}
.ew-news-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ew-nb-logo {
  font-size: 14px; font-weight: 900; letter-spacing: 1px;
  background: linear-gradient(135deg, #ff3b30, #ff9500);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ew-nb-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.ew-news-tabs {
  display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto;
}
.ew-news-tabs span {
  padding: 6px 14px; font-size: 13px; color: var(--text-secondary);
  border-radius: 4px; cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.ew-news-tabs span:hover { background: var(--bg-hover); color: var(--text-primary); }
.ew-news-tabs span.on {
  background: var(--primary); color: #fff; font-weight: 600;
}
.ew-news-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 新闻列表 */
.ew-news-list { max-height: calc(100vh - 180px); overflow-y: auto; padding: 8px 24px 24px; }

/* 图片卡片样式 */
.ew-ni-featured {
  display: flex; gap: 16px; padding: 16px;
  border-bottom: 1px solid var(--border-light); cursor: pointer;
  transition: background 0.15s;
}
.ew-ni-featured:hover { background: #fafbfc; }

/* 左侧图片占位 */
.ew-ni-thumb {
  flex-shrink: 0; width: 180px; height: 110px; border-radius: 6px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8f0fe, #f5f7fa);
}
.ew-ni-thumb.thumb-flash   { background: linear-gradient(135deg, #fff7e6, #ffd591); }
.ew-ni-thumb.thumb-global  { background: linear-gradient(135deg, #e6f4ff, #91caff); }
.ew-ni-thumb.thumb-notice  { background: linear-gradient(135deg, #f6ffed, #b7eb8f); }
.ew-ni-thumb.thumb-research{ background: linear-gradient(135deg, #f9f0ff, #d3adf7); }
.ew-ni-thumb.thumb-stock   { background: linear-gradient(135deg, #fff1f0, #ffa39e); }
.ew-ni-img { width: 100%; height: 100%; object-fit: cover; }
.ew-ni-thumb-icon {
  font-size: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.ew-ni-thumb-tag {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
  background: rgba(0,0,0,0.6); color: #fff; font-weight: 600;
}

/* 右侧正文 */
.ew-ni-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ew-ni-title {
  font-weight: 700; font-size: 15px; color: var(--text-primary);
  line-height: 1.5; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ew-ni-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ew-ni-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.ew-ni-meta { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }
.ew-ni-meta .ew-ni-stock { color: var(--primary); font-weight: 600; }
.ew-ni-meta .ew-ni-org { color: var(--text-secondary); }
.ew-ni-meta .ew-ni-ntype {
  padding: 1px 6px; border-radius: 3px; font-size: 11px;
  background: #f0f0f0; color: #595959;
}
.ew-ni-actions { display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 12px; }
.ew-ni-actions .ew-ni-time { color: var(--text-muted); font-family: 'SF Mono', monospace; font-size: 11px; }
.ew-ni-actions .ew-ni-share:hover, .ew-ni-actions .ew-ni-comment:hover {
  color: var(--primary); cursor: pointer;
}

/* 旧 tag 样式保留兼容 */
.ew-ni-tag {
  flex-shrink: 0; height: fit-content; font-size: 11px; padding: 3px 8px; border-radius: 4px;
  font-weight: 600; margin-top: 2px;
}
.ew-ni-tag.t-flash   { background: #fff2e8; color: #d46b08; }
.ew-ni-tag.t-global  { background: #e6f4ff; color: #0958d9; }
.ew-ni-tag.t-notice  { background: #f6ffed; color: #389e0d; }
.ew-ni-tag.t-research{ background: #f9f0ff; color: #531dab; }
.ew-ni-tag.t-stock   { background: #fff1f0; color: #cf1322; }
.ew-ni-tag-b {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 3px;
  background: #f0f0f0; color: #595959; margin-right: 6px;
}

/* ============ 快讯时间轴（LIVE 7×24） ============ */
.ew-flash-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.ew-flash-badge {
  background: #ff3b30; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px;
  animation: ew-pulse 2s infinite;
}
@keyframes ew-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.ew-flash-count { margin-left: auto; font-weight: 400; color: var(--text-muted); font-size: 12px; }
.ew-flash-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-bottom: 1px solid var(--border-light); cursor: pointer;
}
.ew-flash-item:hover { background: #fafbfc; }
.ew-flash-time {
  flex-shrink: 0; font-family: 'SF Mono', Consolas, monospace;
  font-size: 12px; color: var(--text-muted); padding-top: 2px; width: 72px; text-align: right;
}
.ew-flash-dot {
  flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
  background: #eb2f96; margin-top: 6px; box-shadow: 0 0 0 3px rgba(235,47,150,0.15);
}
.ew-flash-text {
  flex: 1; font-size: 13px; color: var(--text-primary); line-height: 1.6;
}
.ew-flash-cat {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 3px;
  background: #f0f0f0; color: var(--text-secondary); margin-right: 6px; font-weight: 600;
}

/* ============ 辅助类 ============ */
.ew-sep { color: var(--text-muted); margin: 0 2px; font-size: 12px; }
.ew-lead-pct { font-size: 11px; }

/* ============ 自选页布局（参考图风格） ============ */
.view-watch {
  display: flex; flex-direction: column;
  height: 100%; padding: 10px; gap: 10px;
  overflow: auto;  /* 允许页面整体滚动（之前是 hidden 导致底部看不到） */
}
.ew-watch-layout { display: flex; gap: 10px; flex-shrink: 0; }
.ew-watch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ew-watch-main .ew-table-card { display: flex; flex-direction: column; }
.ew-watch-right {
  width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
  /* 允许右侧 panel 内部滚动 */
  overflow-y: auto; max-height: calc(100vh - 120px);
  padding-right: 2px;
}
.ew-watch-bottom { flex-shrink: 0; border-top: 1px solid var(--border); padding-top: 8px; }
.ew-market-ticker {
  display: flex; gap: 0; padding: 8px 12px; background: var(--bg-card);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow-x: auto; flex-shrink: 0; margin-top: 4px;
}
.ew-mt-item {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px;
  border-right: 1px solid var(--border); cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.ew-mt-item:hover { background: var(--bg-hover); }
.ew-mt-name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.ew-mt-val { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 68px; }
.ew-mt-pct { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 62px; }
.ew-mt-vol { font-size: 12px; color: var(--text-muted); }

/* 右侧面板资金流向可视化 */
.ew-flow-card { padding: 6px 0; }
.ew-flow-bars { display: flex; flex-direction: column; gap: 6px; }
.ew-flow-bar-row {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 6px;
  font-size: 12px;
}
.ew-flow-bar-row .ef-lbl { color: var(--text-muted); }
.ef-bar-wrap { height: 6px; background: var(--bg-muted); border-radius: 3px; overflow: hidden; }
.ef-bar { display: block; height: 100%; border-radius: 3px; transition: width .3s; }
.ef-bar.up { background: var(--up-color, #ef4444); }
.ef-bar.down { background: var(--down-color, #22c55e); }
.ew-flow-stat-row {
  display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border); font-size: 12px; color: var(--text-muted);
}
.ew-flow-stat-row b { margin-left: 4px; }

/* 底部基础行情 tab */
.ew-basic-quotes { padding: 10px 0; }
.ew-bq-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 24px;
  margin-bottom: 8px;
}
.ew-bq-item { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.ew-bq-item .b-lbl { color: var(--text-muted); }
.ew-bq-item .b-val { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* 个股资讯列表样式 */
.ew-watch-news-item {
  display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border);
  cursor: pointer; transition: background .15s;
}
.ew-watch-news-item:hover { background: var(--bg-hover); }
.ew-watch-news-item:last-child { border-bottom: none; }
.ew-wn-tag {
  flex-shrink: 0; padding: 3px 8px; border-radius: 4px; font-size: 12px;
  height: fit-content; font-weight: 500;
}
.ew-wn-tag.t-flash { background: rgba(234,179,8,0.15); color: #b45309; }
.ew-wn-tag.t-global { background: rgba(59,130,246,0.15); color: #1d4ed8; }
.ew-wn-tag.t-notice { background: rgba(139,92,246,0.15); color: #7c3aed; }
.ew-wn-tag.t-research { background: rgba(16,185,129,0.15); color: #047857; }
.ew-wn-body { flex: 1; min-width: 0; }
.ew-wn-title { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; line-height: 1.4; }
.ew-wn-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 4px; }
.ew-wn-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); }
.ew-wn-read { color: var(--primary, #2563eb); font-weight: 500; margin-left: auto; }

/* ============ 个股行情 / 自选表格：横向滚动 + 固定前3列 + 表头居中 ============ */
/* 表头居中：Element Plus 默认左对齐 */
.view-sector .ew-stock-table .el-table__header th.el-table__cell .cell,
.view-watch .ew-stock-table .el-table__header th.el-table__cell .cell {
  text-align: center !important;
  font-weight: 600;
}
/* 表体单元格垂直居中 */
.view-sector .ew-stock-table .el-table__body td.el-table__cell .cell,
.view-watch .ew-stock-table .el-table__body td.el-table__cell .cell {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* 序号/代码列：固定列保持居中 */
.view-sector .ew-stock-table .el-table-fixed-column--left .cell,
.view-watch .ew-stock-table .el-table-fixed-column--left .cell {
  text-align: center !important;
}
/* 名称列固定列里的名字左对齐（特殊处理）*/
.view-sector .ew-stock-table .el-table-fixed-column--left:nth-child(3) .cell,
.view-watch .ew-stock-table .el-table-fixed-column--left:nth-child(3) .cell {
  justify-content: flex-start;
}
.view-sector .ew-stock-table,
.view-watch .ew-stock-table {
  table-layout: fixed !important;
}
/* 强制内部 table 固定总宽 */
.view-sector .ew-stock-table .el-table__header-wrapper table,
.view-sector .ew-stock-table .el-table__body-wrapper table,
.view-watch .ew-stock-table .el-table__header-wrapper table,
.view-watch .ew-stock-table .el-table__body-wrapper table {
  table-layout: fixed !important;
  width: 1632px !important;
  min-width: 1632px !important;
  max-width: 1632px !important;
}
/* ⭐ 关键！覆盖三层 Element Plus 默认的 overflow:hidden → visible */
.view-sector .ew-stock-table.el-table--fit,
.view-watch .ew-stock-table.el-table--fit {
  overflow: visible !important;
}
.view-sector .ew-stock-table .el-table__inner-wrapper,
.view-watch .ew-stock-table .el-table__inner-wrapper {
  overflow: visible !important;
}
.view-sector .ew-stock-table .el-table__header-wrapper,
.view-sector .ew-stock-table .el-table__body-wrapper,
.view-watch .ew-stock-table .el-table__header-wrapper,
.view-watch .ew-stock-table .el-table__body-wrapper {
  overflow: visible !important;
}
/* card 层启用滚动 */
.view-watch .ew-table-card,
.view-sector .ew-table-card {
  overflow: auto !important;
}
/* 行业板块表保持 auto（板块名长短不一） */
.view-sector .ew-sector-table,
.view-sector .ew-sector-table .el-table__header-wrapper table,
.view-sector .ew-sector-table .el-table__body-wrapper table {
  table-layout: auto !important;
}
/* 表格列内文字溢出省略，避免挤压 */
.view-sector .ew-stock-table .cell,
.view-watch .ew-stock-table .cell {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============ 空视图 ============ */
.view-empty { display: flex; align-items: center; justify-content: center; height: 100%; }

/* ============ 弹窗内 ============ */
.ew-captcha { height: 32px; cursor: pointer; border: 1px solid var(--border); border-radius: 4px; }
.ew-drill-count { font-size: 12px; color: var(--text-muted); padding: 6px 0; }
.ew-sector-flow { min-height: 42px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.ew-sector-flow-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.ew-sector-flow-head small { color: var(--text-muted); font-weight: 400; }
.ew-sector-flow-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 9px; }
.ew-sector-flow-item { display: flex; flex-direction: column; gap: 3px; color: var(--text-secondary); font-size: 11px; }
.ew-sector-flow-item b { font-family: monospace; font-size: 13px; }
.ew-sector-flow-meta { display: flex; gap: 20px; margin-top: 8px; color: var(--text-secondary); font-size: 11px; }
.ew-sector-flow-empty { padding-top: 8px; color: var(--text-muted); font-size: 11px; }
.ew-drill-table { width: 100%; }
.ew-drill-table .el-table__header-wrapper th .cell { font-size: 12px; white-space: nowrap; }
.ew-drill-table .up { color: var(--up); font-weight: 600; }
.ew-drill-table .down { color: var(--down); font-weight: 600; }

/* Element Plus 主题覆盖 — 东财蓝 */
.el-radio-button__inner {
  border-color: var(--border) !important;
  background: #fff !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}
.el-radio-button__orig-radio:checked + .el-radio-button__inner {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: -1px 0 0 0 var(--primary) !important;
}
.el-button--primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.el-button--primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.el-checkbox__input.is-checked .el-checkbox__inner {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.el-switch.is-checked .el-switch__core {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

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

/* 骨架屏（简单兜底） */
#boot { display: none; }

/* 所属行业 tag */
.ew-industry-tag {
  display: inline-block;
  padding: 1px 8px;
  background: linear-gradient(135deg, #e8f4fd, #f0f7ff);
  border: 1px solid #b3d9ff;
  border-radius: 10px;
  color: #2196f3;
  font-size: 12px;
  white-space: nowrap;
}

/* 所属概念 tag */
.ew-concept-tag {
  display: inline-block;
  padding: 1px 8px;
  background: linear-gradient(135deg, #f3e5f5, #fce4ec);
  border: 1px solid #ce93d8;
  border-radius: 10px;
  color: #9c27b0;
  font-size: 12px;
  white-space: nowrap;
}

/* ============ 个股详情抽屉 ============ */
.sd-drawer .el-drawer__body { padding: 0 !important; overflow: hidden; }
.sd-wrap {
  height: 100%; display: flex; flex-direction: column;
  background: #fff; min-height: 0;
}
.sd-top {
  flex: 0 0 auto; height: 46px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 0 16px;
  border-bottom: 1px solid var(--border); background: #fff;
}
.sd-top-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sd-name { font-size: 17px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.sd-code { font-family: monospace; font-size: 12px; color: var(--text-muted); }
.sd-top-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sd-time { font-size: 12px; color: var(--text-muted); font-family: monospace; }

.sd-main {
  flex: 1 1 auto; display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 0; overflow: hidden;
}
.sd-chart-col {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  border-right: 1px solid var(--border);
}
.sd-periods {
  flex: 0 0 auto; display: flex; align-items: center; gap: 3px;
  padding: 5px 10px; border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap; row-gap: 3px;
}
.sd-chip {
  padding: 2px 10px; font-size: 12px; color: var(--text-secondary);
  border-radius: 3px; cursor: pointer; user-select: none; white-space: nowrap;
  line-height: 18px; transition: all .12s;
}
.sd-chip:hover { color: var(--primary); background: #f0f7ff; }
.sd-chip.active { color: #fff; background: var(--primary); font-weight: 600; }
.sd-chip.small { padding: 1px 8px; font-size: 11px; }
.sd-chip-sep { width: 1px; height: 14px; background: var(--border); margin: 0 4px; }
.sd-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.sd-tool {
  padding: 1px 8px; font-size: 11px; line-height: 18px; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  cursor: pointer; user-select: none; white-space: nowrap; transition: all .12s;
}
.sd-tool:hover { color: var(--primary); border-color: var(--primary); }
.sd-tool.active { color: var(--primary); border-color: var(--primary); background: #eef5ff; font-weight: 600; }

.sd-chart { flex: 1 1 auto; min-height: 100px; width: 100%; }
.sd-sub-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-top: 1px solid var(--border-light);
  background: #fafbfc;
}
.sd-sub-chart { flex: 0 1 128px; height: 128px; min-height: 72px; width: 100%; }

.sd-side-col {
  min-width: 0; min-height: 0; overflow-y: auto;
  padding: 10px 14px 14px; background: #fff;
}
.sd-quote-head { padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.sd-price { font-size: 30px; font-weight: 700; font-family: 'DIN', monospace; line-height: 1.1; }
.sd-chg { display: flex; gap: 12px; font-size: 13px; font-family: monospace; margin-top: 2px; }
.sd-quote-sub {
  display: flex; gap: 16px; margin-top: 6px;
  font-size: 12px; color: var(--text-secondary); font-family: monospace;
}
.sd-sector { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 7px; font-size: 12px; }
.sd-sector-lb { color: var(--text-muted); flex-shrink: 0; }

.sd-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px; padding: 8px 0; border-bottom: 1px solid var(--border-light);
}
.sd-gi {
  display: flex; align-items: center; justify-content: space-between;
  height: 22px; font-size: 12px; border-bottom: 1px dotted #f3f4f6;
}
.sd-gi > span { color: var(--text-muted); }
.sd-gi > b { font-family: monospace; font-weight: 500; color: var(--text-primary); }
.sd-gi.wide { grid-column: 1 / -1; }
.sd-gi-wide {
  grid-column: 1 / -1; height: auto; min-height: 22px;
  align-items: flex-start; padding: 3px 0; gap: 10px;
}
.sd-gi-wide > b {
  flex: 1; text-align: right; font-family: inherit; font-size: 12px;
  line-height: 16px; word-break: break-all;
}
.sd-gi.wide > b { font-family: inherit; font-weight: 500; font-size: 12px; text-align: right; }

.sd-sec-title {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  padding: 10px 0 6px; display: flex; align-items: center; gap: 6px;
}
.sd-sec-title::before {
  content: ''; width: 3px; height: 12px; border-radius: 2px;
  background: var(--primary); display: inline-block;
}

.sd-ob { border: 1px solid var(--border-light); border-radius: 4px; padding: 6px 8px 8px; }
.sd-ob-bar {
  display: flex; justify-content: space-between; font-size: 12px;
  color: var(--text-secondary); padding-bottom: 5px; border-bottom: 1px dashed var(--border-light);
  margin-bottom: 4px;
}
.sd-ob-bar b { font-family: monospace; }
.sd-ob-row {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 20px; font-size: 12px; font-family: monospace; overflow: hidden;
}
.sd-ob-row > span { position: relative; z-index: 1; }
.sd-ob-lb { width: 26px; color: var(--text-muted); flex-shrink: 0; }
.sd-ob-px { width: 56px; flex-shrink: 0; }
.sd-ob-vol { flex: 1; text-align: right; color: var(--text-secondary); }
.sd-ob-bar-bg {
  position: absolute; right: 0; top: 2px; bottom: 2px;
  background: rgba(24, 144, 255, 0.08); border-radius: 2px; z-index: 0;
}
.sd-ob-mid {
  text-align: center; font-family: monospace; font-size: 15px; font-weight: 700;
  padding: 4px 0; margin: 4px 0; border-top: 1px dashed var(--border-light);
  border-bottom: 1px dashed var(--border-light);
}

.sd-flow { border: 1px solid var(--border-light); border-radius: 4px; padding: 8px; }
.sd-flow-main {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-secondary); padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-light);
}
.sd-flow-main b { font-family: monospace; font-size: 14px; }
.sd-flow-rows { padding: 4px 0; }
.sd-flow-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 22px; font-size: 12px; font-family: monospace;
}
.sd-flow-row > span { color: var(--text-secondary); font-family: inherit; }
.sd-donuts { display: flex; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--border-light); }
.sd-donut {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  font-size: 11px; color: var(--text-muted);
}
.sd-donut-el { width: 100%; height: 90px; }

.sd-radar { display: flex; flex-direction: column; gap: 5px; }
.sd-radar-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary);
}
.sd-radar-row > span { width: 46px; flex-shrink: 0; }
.sd-radar-row > b { width: 26px; text-align: right; font-family: monospace; color: var(--text-primary); }
.sd-radar-bar { flex: 1; height: 6px; background: #f0f1f3; border-radius: 3px; overflow: hidden; }
.sd-radar-bar > i { display: block; height: 100%; border-radius: 3px; transition: width .3s; }

.sd-bottom {
  flex: 0 1 178px; min-height: 140px; display: flex; flex-direction: column;
  border-top: 1px solid var(--border); background: #fff;
}
.sd-tabs {
  flex: 0 0 auto; display: flex; gap: 2px; padding: 0 14px;
  border-bottom: 1px solid var(--border-light); background: #fafbfc;
}
.sd-tab {
  padding: 7px 14px; font-size: 13px; color: var(--text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent;
}
.sd-tab:hover { color: var(--primary); }
.sd-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.sd-news { flex: 1 1 auto; overflow-y: auto; padding: 0 14px; min-height: 0; }
.sd-news-item {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0; border-bottom: 1px dotted #f3f4f6; font-size: 12px;
}
.sd-news-time { flex: 0 0 96px; color: var(--text-muted); font-family: monospace; }
.sd-news-title {
  flex: 1; color: var(--text-primary); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sd-news-src { flex: 0 0 auto; color: var(--text-muted); }
.sd-empty { padding: 16px; text-align: center; font-size: 12px; }

@media (max-width: 1400px) {
  .sd-main { grid-template-columns: minmax(0, 1fr) 300px; }
  .sd-sub-chart { flex-basis: 108px; height: 108px; }
}
@media (max-width: 1100px) {
  .sd-main { grid-template-columns: minmax(0, 1fr) 280px; }
  .sd-price { font-size: 26px; }
  .sd-grid { gap: 0 8px; }
}

/* ============ 个股页（三栏：左列表 / 中图表 / 右报价） ============ */
.pg-detail {
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 340px;
  flex: 1 1 auto; min-height: 0; background: #fff;
}
/* 左：个股 / 板块列表 */
.pg-list {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: #fff; border-right: 1px solid var(--border); overflow: hidden;
}
.pg-list-head {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.pg-list-tabs { display: flex; gap: 2px; }
.pg-list-tabs span {
  flex: 1; text-align: center; padding: 5px 0; font-size: 13px;
  color: var(--text-secondary); cursor: pointer;
  border-bottom: 2px solid transparent;
}
.pg-list-tabs span.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.pg-sorts { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-sort-groups { display: flex; flex-direction: column; gap: 6px; }
.pg-sorts span {
  padding: 2px 8px; font-size: 12px; line-height: 16px; border-radius: 3px;
  color: var(--text-secondary); background: var(--bg-hover); cursor: pointer; user-select: none;
}
.pg-sorts span:hover { color: var(--primary); }
.pg-sorts span.on { color: #fff; background: var(--primary); font-weight: 600; }
.pg-back { font-size: 12px; color: var(--primary); cursor: pointer; padding: 2px 0; }
.pg-list-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pg-row { padding: 6px 10px; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.pg-row-stock { display: flex; align-items: center; gap: 8px; }
.pg-row-main { flex: 1; min-width: 0; }
.pg-row:hover { background: var(--bg-hover); }
.pg-row.active { background: #e6f4ff; border-left: 2px solid var(--primary); padding-left: 8px; }
.pg-row-l1, .pg-row-l2 { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pg-row-name {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-row-price { font-family: monospace; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.pg-row-code { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.pg-row-tag { font-size: 10px; color: var(--primary); background: #eef4ff; border-radius: 3px; padding: 1px 5px; flex-shrink: 0; }
.pg-row-pct { font-family: monospace; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.pg-list-foot {
  flex: 0 0 auto; padding: 6px 10px; font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border); text-align: right;
}
.pg-empty { padding: 24px 10px; text-align: center; font-size: 12px; color: var(--text-muted); }
.pg-more { padding: 6px; text-align: center; }
/* 中：图表 + 资讯 */
.pg-center {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  overflow: hidden; position: relative; background: #fff;
}
.pg-center > .sd-top { flex: 0 0 auto; }
.pg-center > .sd-chart-col { flex: 1 1 auto; min-height: 0; border-right: 0; overflow: hidden; }
/* 右：报价栏 */
.pg-side { border-left: 1px solid var(--border); background: #fff; }

@media (max-width: 1400px) {
  .pg-detail { grid-template-columns: 200px minmax(0, 1fr) 300px; }
  .pg-center > .sd-chart-col .sd-sub-chart { flex-basis: 108px; height: 108px; min-height: 80px; }
}
@media (max-width: 1100px) {
  .pg-detail { grid-template-columns: 176px minmax(0, 1fr) 280px; }
  .pg-side { padding-left: 10px; padding-right: 10px; }
}

/* 个股列表：名称下的所属概念小字 */
/* 左侧列表「所属概念」列：可点击筛选标签 */
.pg-row-cc {
  flex: none; width: 94px;
  display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end;
  max-height: 30px; overflow: hidden;
}
.pg-row-cc .cc-t {
  font-size: 9px; line-height: 12px; padding: 0 3px;
  border: 1px solid var(--border); border-radius: 2px;
  color: var(--text-muted); cursor: pointer;
  max-width: 46px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pg-row-cc .cc-t:hover { color: var(--primary); border-color: var(--primary); }
.ew-concept-tag.cc-click { cursor: pointer; }
.ew-concept-tag.cc-click:hover { background: #e1bee7; border-color: #ab47bc; }

/* 列表模式表格字号收紧 */
.pg-listview .el-table { font-size: 12px; }
.pg-listview .el-table .cell { font-size: 12px; line-height: 20px; padding: 0 6px; }
.pg-listview .el-table th.el-table__cell .cell { font-size: 12px; }

/* 自选表：字号与个股列表保持一致（略小） */
.view-watch .el-table { font-size: 12px; }
.view-watch .el-table .cell { font-size: 12px; line-height: 20px; padding: 0 6px; }
.view-watch .el-table th.el-table__cell .cell { font-size: 12px; }
.view-watch .ew-st-name, .view-watch .ew-st-code { font-size: 12px; }

/* 详情页周期条 + K线缩放工具 */
.sd-periods { flex-wrap: wrap; row-gap: 4px; }
.sd-zoom-bar { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin: 0 0 3px; }
.sd-zoom-btn {
  min-width: 20px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 3px;
  cursor: pointer; user-select: none; line-height: 1;
}
.sd-zoom-btn:hover { color: var(--text); border-color: var(--text-muted); }
.sd-zoom-btn.wide { padding: 0 7px; }

/* 详情页可点击概念标签 + 筛选提示条 */
.sd-cc-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.sd-cc-tag {
  padding: 0 6px; height: 17px; line-height: 16px; font-size: 11px;
  border: 1px solid var(--border); border-radius: 9px;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
}
.sd-cc-tag:hover { color: var(--primary); border-color: var(--primary); }
.sd-cc-tag.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-filter-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin: 4px 0; padding: 2px 8px; font-size: 11px; border-radius: 3px;
  color: var(--primary); background: rgba(59, 130, 246, .08);
}
.pg-filter-chip .x { cursor: pointer; color: var(--text-muted); }

/* 资讯分页条 */
.ew-news-more { display: flex; justify-content: center; padding: 8px 0 4px; }
.ew-news-more-done { font-size: 11px; color: var(--text-muted); }
.ew-news-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 8px 0 2px; padding: 6px 2px 0; border-top: 1px solid var(--border);
}
.ew-news-pager-hint { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ===== 选股视图（行业板块导航） ===== */
.view-screen { padding: 12px 16px; display: flex; flex-direction: column; min-height: 0; }
.ew-screen-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 4px 2px 10px; border-bottom: 1px solid var(--border); }
.ew-screen-title { font-size: 16px; font-weight: 700; color: var(--text); }
.ew-screen-tabs, .ew-screen-sorts { display: flex; align-items: center; gap: 4px; }
.ew-screen-tabs span, .ew-screen-sorts span {
  padding: 3px 10px; font-size: 12px; color: var(--text-muted); border-radius: 6px; cursor: pointer;
  background: var(--bg-soft); transition: all .15s;
}
.ew-screen-tabs span.on, .ew-screen-sorts span.on { color: #fff; background: var(--primary); }
.ew-screen-count { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.ew-screen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 12px 0; overflow: auto; }
.ew-sc-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.ew-sc-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.ew-sc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ew-sc-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-sc-tag { font-size: 11px; color: var(--text-muted); background: var(--bg-soft); padding: 1px 6px; border-radius: 4px; flex: none; }
.ew-sc-pct { font-size: 22px; font-weight: 700; margin: 8px 0 4px; }
.ew-sc-idx { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.ew-sc-lead { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.ew-sc-count { font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; }
.ew-sc-flow { font-size: 12px; margin-top: 6px; }

/* ===== 行情视图：榜单/行业板块切换 ===== */
.ew-market-mode { display: flex; align-items: center; gap: 6px; padding: 8px 2px 2px; }
.ew-market-mode span {
  padding: 5px 16px; font-size: 13px; color: var(--text-muted); border-radius: 6px; cursor: pointer;
  background: var(--bg-soft); transition: all .15s;
}
.ew-market-mode span.on { color: #fff; background: var(--primary); }

/* 行情视图：市场标签顶栏 */
.ew-mkt-regions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 2px 0 8px; }
.ew-mkt-region {
  padding: 4px 14px; font-size: 13px; color: var(--text-muted); border-radius: 6px; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.ew-mkt-region:hover { color: var(--primary); background: var(--bg-hover); }
.ew-mkt-region.on { color: #fff; background: var(--primary); }

/* 行情视图：资金流入/流出榜 */
.ew-flow-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ew-flow-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 2px; }
.ew-flow-tabs span {
  padding: 3px 14px; font-size: 12px; color: var(--text-muted); border-radius: 6px; cursor: pointer; background: var(--bg-soft);
}
.ew-flow-tabs span.on { color: #fff; background: var(--primary); }
.ew-flow-tabs .ew-flow-hint { background: none; cursor: default; font-size: 11px; color: var(--text-muted); margin-left: auto; }
.ew-flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 4px 0 12px; overflow: auto; }
.ew-flow-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ew-flow-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ew-flow-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ew-flow-code { font-size: 11px; color: var(--text-muted); font-family: monospace; flex: none; }
.ew-flow-net { font-size: 18px; font-weight: 700; font-family: monospace; margin-bottom: 4px; }
.ew-flow-sub { font-size: 11px; color: var(--text-muted); }
.ew-industry-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ew-industry-sorts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 2px; }
.ew-industry-sorts span {
  padding: 3px 10px; font-size: 12px; color: var(--text-muted); border-radius: 6px; cursor: pointer; background: var(--bg-soft);
}
.ew-industry-sorts span.on { color: #fff; background: var(--primary); }
.ew-industry-sorts span.sep { width: 1px; height: 14px; background: var(--border); padding: 0; cursor: default; }
.ew-industry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 4px 0 12px; overflow: auto; }

/* 行情视图：涨跌家数统计条 */
.ew-mkt-breadth { display: flex; align-items: center; gap: 14px; padding: 8px 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
.ew-mkt-breadth-title { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.ew-breadth-item { display: flex; align-items: baseline; gap: 4px; }
.ew-breadth-lb { font-size: 12px; color: var(--text-muted); }
.ew-breadth-item b { font-size: 15px; font-weight: 700; }
.ew-breadth-total { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* 行情：涨跌分布 + 指数分时图 */
.ew-mkt-top { display: flex; gap: 12px; align-items: stretch; }
.ew-mkt-breadth { flex: 1; }
.ew-mkt-dist { flex: 1.2; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.ew-mkt-dist-title { font-size: 12px; color: var(--text-muted); font-weight: 600; flex: none; }
.ew-mkt-dist-chart { flex: 1; height: 56px; }
.ew-mkt-idx-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.ew-mkt-idx-chart { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.ew-mkt-idx-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 2px; }
.ew-mkt-idx-name { color: var(--text); font-weight: 600; }
.ew-mkt-idx-val { font-weight: 600; }
.ew-mkt-idx-mini { height: 120px; }

/* 个股视图左侧「综合」混排：行业板块/个股分区标题 */
.pg-sec-hd { padding: 8px 8px 4px; font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; }

/* ===== 账号管理弹窗（浅色主题） ===== */
.acct-body .acct-sec { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.acct-body .acct-sec:last-child { border-bottom: none; }
.acct-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.acct-input { margin-bottom: 8px; }
.acct-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12px; color: var(--text-primary); }
.acct-row .mono { font-family: monospace; color: var(--text-secondary); }
.acct-meta { font-size: 11px; color: var(--text-muted); }
.acct-note { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.acct-row .el-button { margin-left: auto; }
.acct-row .el-input { flex: 1; margin-bottom: 0; }
.danger-zone .acct-title { color: var(--up); }
.profile-row { display: flex; gap: 8px; margin-bottom: 8px; }
.avatar-select { width: 92px; flex-shrink: 0; }

/* ===== 管理后台弹窗（浅色主题） ===== */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-bottom: 14px; }
.admin-stat { background: var(--bg-hover); border: 1px solid var(--border); border-radius: 6px; padding: 10px 6px; text-align: center; }
.as-val { font-size: 19px; font-weight: 700; color: var(--primary); }
.as-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.admin-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.admin-search { flex: 1; }
.admin-filter { width: 120px; }
.admin-table { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.admin-row { display: flex; align-items: center; padding: 8px 12px; font-size: 12px; color: var(--text-primary); border-bottom: 1px solid var(--border-light); }
.admin-row:last-child { border-bottom: none; }
.admin-head-row { background: var(--bg-hover); color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.ac-user { flex: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-role, .ac-status { flex: 1; }
.ac-num { flex: .6; text-align: center; }
.ac-time { flex: 1.2; color: var(--text-secondary); }
.ac-act { flex: 1; text-align: right; }
.admin-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0; }
.admin-page-info { font-size: 12px; color: var(--text-secondary); }
.admin-broadcast { border-top: 1px dashed var(--border); padding-top: 12px; }

/* ===== 消息中心（浅色主题） ===== */
.notif-bell { position: relative; cursor: pointer; padding: 0 6px; font-size: 18px; color: var(--text-secondary); display: inline-flex; align-items: center; }
.notif-bell:hover { color: var(--primary); }
.bell-badge { position: absolute; top: -6px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--up); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 600; }
.notif-toolbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); margin-bottom: 8px; }
.notif-unread { font-size: 12px; color: var(--text-secondary); }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif-item { padding: 10px 12px; border-radius: 6px; cursor: pointer; margin-bottom: 6px; background: var(--bg-hover); border-left: 3px solid transparent; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { border-left-color: var(--primary); background: rgba(24, 144, 255, .05); }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.notif-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.notif-content { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-top: 4px; }

/* ===== 新手引导（浅色主题） ===== */
.onboard-step { display: flex; gap: 12px; margin-bottom: 16px; }
.ob-num { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: rgba(24, 144, 255, .12); color: var(--primary); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ob-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ob-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-top: 2px; }

/* ===== 参数自定义（浅色主题） ===== */
.params-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; padding: 10px 0; }
.p-row { display: grid; grid-template-columns: 100px 150px 1fr; gap: 10px; align-items: center; padding: 8px; background: var(--bg-hover); border-radius: 6px; }
.p-label { color: var(--text-secondary); font-size: 13px; }
.p-desc { color: var(--text-muted); font-size: 11px; }
.p-note { color: var(--text-muted); font-size: 12px; font-style: italic; }
.p-row-note { background: transparent !important; border: 1px dashed var(--border); }
.p-row-note .p-label { color: var(--text-muted); font-style: italic; }
.preset-row { background: linear-gradient(135deg, rgba(24,144,255,.06), rgba(198,120,221,.05)); border: 1px solid rgba(24,144,255,.18); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.preset-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.preset-cat { display: flex; flex-direction: column; gap: 2px; }
.preset-cat-name { font-size: 11px; color: var(--primary); font-weight: 600; padding-left: 2px; }
.preset-btn { padding: 2px 6px !important; font-size: 12px !important; color: var(--text-primary) !important; border-radius: 4px !important; transition: all .2s; }
.preset-btn:hover { color: var(--primary) !important; background: rgba(24,144,255,.1) !important; }
.p-help { color: var(--primary); cursor: help; margin-left: 4px; font-size: 11px; opacity: .6; transition: opacity .2s; }
.p-help:hover { opacity: 1; }





