:root {
  --aside: #0b1220;
  --header: #ffffff;
  --main-bg: #f0f2f5;
  --card: #ffffff;
  --text: #1f2a37;
  --muted: #6b7280;
  --accent: #2563eb;
}

* { box-sizing: border-box; }

html, body, #app {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--main-bg);
}

/* ---- Auth ---- */
.auth-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, #0b1220 0%, #1e3a5f 48%, #2563eb 100%);
  padding: 24px;
}

.auth-card {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.auth-brand {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.auth-sub {
  text-align: center;
  color: var(--muted);
  margin: 6px 0 18px;
  font-size: 14px;
}

.auth-btn { width: 100%; }

/* ---- Admin shell ---- */
.admin-layout { height: 100%; }

.aside {
  background: var(--aside);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: width 0.2s ease;
}

.aside-brand {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  white-space: nowrap;
}

.aside-brand-short {
  display: none;
  width: 100%;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.aside.is-collapsed .aside-brand {
  padding: 0;
  justify-content: center;
}

.aside.is-collapsed .aside-brand-full {
  display: none;
}

.aside.is-collapsed .aside-brand-short {
  display: block;
}

.aside-menu-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.aside-menu-wrap::-webkit-scrollbar {
  width: 6px;
}

.aside-menu-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

.aside .el-menu { border-right: none; width: 100% !important; }

.aside .el-menu.el-menu--collapse {
  width: 64px !important;
}

.aside .el-sub-menu__title {
  color: #c5d0e0 !important;
}

.aside .el-menu-item,
.aside .el-sub-menu__title {
  height: 44px;
  line-height: 44px;
}

.aside-menu-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
}

.aside .el-menu--collapse .aside-menu-mark {
  margin-right: 0;
}

.aside .el-menu--collapse .aside-menu-label {
  display: none;
}

.aside .el-menu--collapse .el-sub-menu__title {
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aside .el-menu--collapse .el-menu-item {
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aside-toggle {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.aside-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.aside-toggle-bars,
.aside-toggle-bars::before,
.aside-toggle-bars::after {
  display: block;
  width: 14px;
  height: 1.5px;
  background: #334155;
  border-radius: 1px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.aside-toggle-bars::before,
.aside-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.aside-toggle-bars::before { top: -5px; }
.aside-toggle-bars::after { top: 5px; }

.aside-toggle-bars.open {
  background: transparent;
}

.aside-toggle-bars.open::before {
  top: 0;
  transform: rotate(45deg);
}

.aside-toggle-bars.open::after {
  top: 0;
  transform: rotate(-45deg);
}

.admin-header {
  background: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 20px;
}

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

.header-clock {
  font-variant-numeric: tabular-nums;
  font-family: "Cascadia Mono", "Consolas", "Segoe UI", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-sep {
  width: 1px;
  height: 16px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.user-name {
  color: var(--muted);
  font-size: 14px;
}

.admin-main {
  background: var(--main-bg);
  padding: 16px 18px;
}

.page-card {
  background: var(--card);
  border-radius: 8px;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.page-title {
  margin: 0 0 4px;
  font-size: 18px;
}

.page-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

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

.toolbar .grow { flex: 1; min-width: 180px; }

/* 证券列表：筛选与按钮强制单行，过窄时可横向滚动 */
.toolbar.toolbar-stocks {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
}
.toolbar.toolbar-stocks .grow {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 220px;
}
.toolbar.toolbar-stocks .el-select,
.toolbar.toolbar-stocks .el-button {
  flex-shrink: 0;
}

.chart-box {
  width: 100%;
  height: 420px;
  margin-bottom: 16px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

.chart-box-kline {
  height: 720px;
  cursor: grab;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: none;
  user-select: none;
}

.chart-box-kline:active,
.chart-box-kline.is-panning {
  cursor: grabbing;
}

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

.kline-top-collapsed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 6px 0;
}

.kline-top-collapsed-title {
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}

.kline-top-collapsed-meta {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kline-chart-wrap.is-top-collapsed .chart-box-kline {
  height: min(920px, calc(100vh - 180px));
}

.kline-ma-tag {
  background: #fff !important;
  font-weight: 600;
}

.kline-ma-bar {
  margin-top: -4px;
  margin-bottom: 12px;
  align-items: center;
}

.kline-ma-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 2px;
}

.kline-quote-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: #475569;
  min-height: 38px;
}

.kline-quote-bar.is-empty {
  color: #94a3b8;
}

.kline-quote-bar b {
  font-weight: 700;
  color: #1f2a37;
}

.kline-quote-date {
  font-weight: 700;
  color: #1f2a37;
  margin-right: 4px;
}

/* ---- Home dashboard ---- */
.home-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.home-header .page-desc { margin-bottom: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  min-height: 88px;
}

.stat-card {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 14px 16px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-card.up .stat-value,
.stat-card.limit-up .stat-value { color: #ef4444; }
.stat-card.down .stat-value,
.stat-card.limit-down .stat-value { color: #16a34a; }
.stat-card.flat .stat-value,
.stat-card.total .stat-value { color: #334155; }

.home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.range-chart {
  width: 100%;
  height: 400px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

/* ---- Sync page ---- */
.sync-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.sync-page-header .page-desc {
  margin-bottom: 0;
}

.sync-tabs {
  margin-top: 8px;
}

.sync-tabs .el-tabs__header {
  margin-bottom: 16px;
}

.sync-tabs .el-tabs__item {
  font-weight: 500;
}

.sync-tab-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 50%;
  vertical-align: middle;
}

.sync-tab-dot.is-on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.sync-tab-dot.is-off { background: #cbd5e1; }

.sync-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.sync-panel {
  min-width: 0;
  padding: 16px 18px 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
}

.sync-panel-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sync-form { max-width: none; }

.sync-side {
  position: sticky;
  top: 12px;
}

.sync-summary-card {
  padding: 18px 18px 16px;
  border-radius: 12px;
  background: linear-gradient(160deg, #0b1220 0%, #1e3a5f 100%);
  color: #e8eef7;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.sync-summary-label {
  font-size: 12px;
  opacity: 0.72;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sync-summary-value {
  margin-top: 8px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sync-summary-unit {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.7;
}

.sync-summary-lines {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.sync-summary-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sync-summary-lines span {
  opacity: 0.65;
}

.sync-summary-lines b {
  font-weight: 600;
  text-align: right;
}

.sync-summary-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-summary-actions .el-button {
  margin: 0;
  width: 100%;
}

.sync-control-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sync-control-row .el-button {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.sync-schedule-card .sync-schedule-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 4px;
}

.sync-schedule-state {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.55;
}

.sync-schedule-state.on {
  color: #86efac;
  opacity: 1;
}

.sync-last-run {
  display: inline-flex;
  align-items: center;
}

.sync-last-msg {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.7;
  word-break: break-word;
}

.sync-side-tip {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.55;
}

.sync-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.sync-slider-row .el-slider {
  flex: 1;
}

.sync-slider-val {
  min-width: 24px;
  font-weight: 600;
  color: var(--text);
}

.sync-hint {
  margin-left: 12px;
  color: var(--muted);
  font-size: 13px;
}

.sync-hint-inline {
  margin-left: 0;
}

.sync-progress-card {
  margin: 14px 0 4px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sync-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

.sync-progress-id {
  font-weight: 600;
  color: var(--text);
}

.sync-progress-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text);
}

.sync-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.sync-progress-alert {
  margin-top: 10px;
}
.sync-log-tip {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.85;
}

.sync-error-collapse {
  margin-top: 8px;
  border: none;
}

.sync-error-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding-right: 8px;
  box-sizing: border-box;
}

.sync-error-collapse .el-collapse-item__header {
  height: 36px;
  line-height: 36px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: none;
}

.sync-error-collapse .el-collapse-item__wrap {
  border: none;
  background: transparent;
}

@media (max-width: 960px) {
  .sync-layout {
    grid-template-columns: 1fr;
  }
  .sync-side {
    position: static;
  }
}

/* ---- Reports page ---- */
.reports-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.reports-job-box {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.reports-job-msg {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  word-break: break-word;
}

.reports-sub {
  font-size: 12px;
  color: var(--muted);
}

.reports-preview-body {
  min-height: 72vh;
}

.reports-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

.reports-fin-tabs .el-tabs__header {
  margin-bottom: 12px;
}

.reports-fin-text {
  margin: 0;
  padding: 14px 16px;
  max-height: 68vh;
  overflow: auto;
  background: #0b1220;
  color: #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.reports-pdf-frame {
  width: 100%;
  height: 72vh;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

@media (max-width: 960px) {
  .reports-layout {
    grid-template-columns: 1fr;
  }
}

/* ---- Logs page ---- */
.log-detail p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.log-detail-pre {
  margin: 12px 0 0;
  padding: 12px;
  max-height: 420px;
  overflow: auto;
  background: #0b1220;
  color: #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

/* ---- Industry chain ---- */
.toolbar-sep {
  width: 1px;
  height: 22px;
  background: #e5e7eb;
  margin: 0 4px;
}

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

.chain-top-collapsed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 6px 0;
}

.chain-top-collapsed-title {
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}

.chain-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.chain-legend .lg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chain-legend .lg-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
}
.chain-legend .lg-dot.lg-up {
  background: radial-gradient(circle at 40% 35%, #fff 0%, #ffd0d8 75%);
  border: 2px solid #e86070;
}
.chain-legend .lg-dot.lg-flat {
  background: radial-gradient(circle at 40% 35%, #fff 0%, #e8edf5 75%);
  border: 2px solid #94a3b8;
}
.chain-legend .lg-dot.lg-down {
  background: radial-gradient(circle at 40% 35%, #fff 0%, #b6ead4 75%);
  border: 2px solid #22a87e;
}
.chain-legend .lg-dot.lg-empty {
  background: #ffffff;
  border: 2px solid #bac6d6;
}

.chain-canvas-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.22) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  min-height: 620px;
}

.chain-chart {
  width: 100%;
  height: 620px;
}

.chain-stage-wrap {
  position: relative;
}

.chain-stage-wrap.is-top-collapsed .chain-stage {
  height: min(820px, calc(100vh - 160px));
}

.chain-stage-wrap.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #f1f5f9;
  padding: 12px;
  box-sizing: border-box;
}

.chain-stage-wrap.is-fullscreen .chain-ctx-menu,
.chain-stage-wrap:fullscreen .chain-ctx-menu {
  z-index: 20000;
}

.chain-stage-wrap.is-fullscreen .chain-stage,
.chain-stage-wrap:fullscreen .chain-stage {
  height: calc(100vh - 56px);
}

.chain-stage-wrap:fullscreen {
  background: #f1f5f9;
  padding: 12px;
  box-sizing: border-box;
}

.chain-stage-tools {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
}

.chain-stage {
  position: relative;
  height: 620px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.2) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(165deg, #f8fafc 0%, #eef2ff 55%, #e8edff 100%);
  cursor: grab;
  user-select: none;
}

.chain-stage:active {
  cursor: grabbing;
}

.chain-world {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.chain-svg {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}

.chain-node {
  position: absolute;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 50%;
  border-style: solid;
  border-width: 2px;
  cursor: grab;
  text-align: center;
  line-height: 1.22;
  font-size: 12.5px;
  color: #2a3344;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  overflow: visible;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.chain-node:hover {
  z-index: 4;
  transform: translateY(-1px);
}

.chain-node.selected {
  z-index: 3;
}

.chain-node.editing {
  z-index: 4;
  cursor: text;
}

.chain-node.t-theme {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.chain-node.t-theme .chain-node-name {
  font-size: 1.12em;
  font-weight: 700;
  color: #3730a3;
}

.chain-node.collapsed {
  border-style: dashed;
}

.chain-node.from-chain-root {
  border-color: rgba(99, 102, 241, 0.55) !important;
}

.chain-node.from-chain:not(.from-chain-root) {
  border-color: rgba(129, 140, 248, 0.4) !important;
}

.chain-attach-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 7px 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
  white-space: nowrap;
  pointer-events: none;
}

.chain-attach-icon {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.chain-attach-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  z-index: 5;
}

.lg-chain {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 2px;
  vertical-align: -1px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.chain-collapse-btn {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid #a8b4c4;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}


.chain-collapse-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.chain-node.collapsed .chain-collapse-btn {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.chain-node-resize {
  position: absolute;
  left: -3px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: #2563eb;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  cursor: nwse-resize;
  z-index: 6;
}

.chain-node-resize:hover {
  background: #1d4ed8;
}

.chain-node-name {
  font-size: 1em;
  font-weight: 650;
  letter-spacing: 0.03em;
  max-width: 92%;
  overflow: visible;
  white-space: pre-line;
  word-break: keep-all;
  color: #1e293b;
  line-height: 1.28;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.chain-node-name-input {
  width: 90%;
  max-width: 100%;
  border: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 6px;
  font-size: 1em;
  font-weight: 650;
  text-align: center;
  color: #2a3344;
  padding: 2px 3px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(120, 130, 150, 0.28);
}

.chain-node-code {
  margin-top: 0;
  font-size: 0.76em;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #64748b;
  max-width: 94%;
  overflow: visible;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chain-node-growth {
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.76em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.3;
  max-width: 94%;
  overflow: visible;
  white-space: nowrap;
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.chain-node-growth.up {
  color: #e11d48;
  background: rgba(244, 63, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.14);
}

.chain-node-growth.down {
  color: #0d9488;
  background: rgba(20, 184, 166, 0.1);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.14);
}

.chain-node-growth.flat {
  color: #64748b;
  background: rgba(148, 163, 184, 0.12);
}

/* legacy */
.chain-node-sub {
  margin-top: 1px;
  font-size: 0.82em;
  color: #7a8494;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
}

.chain-node-sub.up { color: #a84a42; font-weight: 700; }
.chain-node-sub.down { color: #2f7a5c; font-weight: 700; }
.chain-node-sub.flat { color: #6b7380; }

.chain-ctx-menu {
  position: fixed;
  z-index: 20000;
  min-width: 168px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  pointer-events: auto;
}

.chain-ctx-title {
  padding: 4px 8px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-ctx-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
}

.chain-ctx-item:hover:not(:disabled) {
  background: #f1f5f9;
}

.chain-ctx-item:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.chain-ctx-item.danger {
  color: #dc2626;
}

.chain-ctx-item.danger:hover:not(:disabled) {
  background: #fef2f2;
}

.chain-ctx-hint {
  padding: 6px 10px 4px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

/* Above CSS-fullscreen stage (3000) and chain dialogs (21000) */
.chain-select-popper {
  z-index: 22000 !important;
}

/* ---- Architecture page ---- */
.arch-page .arch-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eef2f7;
}

.arch-h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
  color: #0f172a;
}

.arch-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.arch-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 10px;
}

.arch-actors,
.arch-exts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arch-arrows {
  color: #94a3b8;
  font-size: 20px;
  font-weight: 600;
  padding: 0 4px;
}

.arch-box {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  font-size: 13px;
  color: #0f172a;
  min-width: 120px;
  text-align: center;
  line-height: 1.35;
}

.arch-box.actor {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.arch-box.core {
  background: linear-gradient(160deg, #0b1220 0%, #1e3a5f 100%);
  border-color: #1e3a5f;
  color: #fff;
  min-width: 180px;
  padding: 16px 18px;
}

.arch-box-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.arch-box-sub {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.85;
}

.arch-box.ext {
  background: #fff;
  text-align: left;
  min-width: 160px;
}

.arch-box.ext span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.arch-layers {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.arch-layer {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: stretch;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.arch-layer-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  padding: 12px 8px;
  text-align: center;
}

.arch-layer.L1 .arch-layer-label { background: #2563eb; }
.arch-layer.L2 .arch-layer-label { background: #0f766e; }
.arch-layer.L3 .arch-layer-label { background: #b45309; }
.arch-layer.L4 .arch-layer-label { background: #334155; }

.arch-layer-body {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.arch-layer-body code,
.arch-steps code,
.arch-job-desc code,
.arch-bullets code {
  font-size: 12px;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  color: #0f172a;
}

.arch-layer-conn {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  padding: 6px 0;
}

.arch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.arch-chips span {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.arch-domain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.arch-domain-grid b {
  display: block;
  color: #0f172a;
  margin-bottom: 2px;
}

.arch-domain-grid span {
  color: #64748b;
  font-size: 12px;
}

.arch-steps {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
}

.arch-jobs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.arch-job {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

.arch-job-title {
  font-weight: 650;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 4px;
}

.arch-job-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.arch-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #334155;
  line-height: 1.75;
}

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

.arch-table th,
.arch-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.arch-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 650;
}

.arch-table .arch-path {
  width: 180px;
  font-family: Consolas, "Courier New", monospace;
  color: #0f766e;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .arch-domain-grid,
  .arch-jobs {
    grid-template-columns: 1fr;
  }
  .arch-layer {
    grid-template-columns: 1fr;
  }
  .arch-arrows {
    display: none;
  }
}

/* ---- Price monitor ---- */
.monitor-rule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.monitor-rule-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.monitor-rule-main {
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.monitor-rule-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 650;
}

.monitor-rule-summary {
  margin-top: 6px;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}

.monitor-rule-note {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.monitor-combine-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: 320px;
  overflow: auto;
}

.monitor-combine-check {
  display: flex !important;
  align-items: flex-start;
  height: auto !important;
  margin-right: 0 !important;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  white-space: normal;
}

.monitor-combine-check-body {
  min-width: 0;
}

.monitor-combine-children {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.monitor-combine-child {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.monitor-combine-child .monitor-rule-title,
.monitor-combine-child > span {
  font-weight: 600;
  margin-left: 6px;
}

.monitor-fin-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.monitor-fin-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.monitor-fin-filter-name {
  width: 72px;
  color: #334155;
  font-size: 13px;
}

.monitor-fin-filter-unit {
  color: #64748b;
  font-size: 13px;
}

.monitor-rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.monitor-detail-head {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.monitor-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.monitor-kline-meta {
  color: #64748b;
  font-size: 12px;
}

.monitor-kline-pager {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* K线/列表结果模式：一屏铺满，无需滚动 */
body.monitor-result-immersive .admin-main,
body.monitor-kline-immersive .admin-main {
  overflow: hidden;
  padding: 8px 10px;
}

.page-card.monitor-kline-focus,
.page-card.monitor-list-focus {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px - 16px);
  max-height: calc(100vh - 56px - 16px);
  overflow: hidden;
  box-sizing: border-box;
}

.page-card.monitor-kline-focus .monitor-mode-bar,
.page-card.monitor-list-focus .monitor-mode-bar {
  margin-bottom: 6px;
}

.monitor-list-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.monitor-list-panel .el-table {
  flex: 1;
}

.page-card.monitor-list-focus .page-title,
.page-card.monitor-list-focus .page-desc,
.page-card.monitor-list-focus .monitor-detail-head,
.page-card.monitor-list-focus .toolbar,
.page-card.monitor-list-focus .home-meta,
.page-card.monitor-list-focus .el-alert {
  flex-shrink: 0;
}

.page-card.monitor-list-focus .page-title {
  margin-bottom: 2px;
  font-size: 16px;
}

.page-card.monitor-list-focus .page-desc {
  margin-bottom: 8px;
  font-size: 12px;
}

.page-card.monitor-list-focus .toolbar {
  margin-bottom: 8px;
}

.page-card.monitor-list-focus .home-meta {
  margin-bottom: 6px !important;
  font-size: 12px;
}

.page-card.monitor-list-focus .el-alert {
  margin-bottom: 6px !important;
  padding: 6px 10px;
}

.monitor-kline-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.monitor-kline-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 6px;
}

.monitor-kline-grid.is-9 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.monitor-kline-grid.is-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.monitor-kline-cell {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.monitor-kline-cell.has-bl-btn .monitor-kline-cell-head {
  padding-right: 72px;
}

.monitor-kline-bl-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 6;
  padding: 0 4px !important;
  height: 18px !important;
  font-size: 9px !important;
  line-height: 18px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-radius: 4px;
}

.monitor-kline-bl-btn.is-link:hover {
  background: rgba(248, 250, 252, 0.98) !important;
}

.monitor-kline-cell-head {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 8px 4px;
  flex-shrink: 0;
  min-height: 22px;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.monitor-kline-cell-head-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  height: 11px;
  line-height: 11px;
}

.monitor-kline-cell-title {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  color: #1f2a37;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  max-width: 38%;
  display: flex;
  align-items: center;
  line-height: 11px;
  height: 11px;
  appearance: none;
  -webkit-appearance: none;
}

.monitor-kline-cell-title:hover {
  color: #2563eb;
}

.monitor-kline-fin-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
  height: 11px;
  line-height: 11px;
}

.monitor-kline-fin-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 11px;
  height: 11px;
  flex-shrink: 0;
}

.monitor-kline-fin-label {
  color: #334155;
  font-weight: 650;
  margin-right: 2px;
  line-height: 11px;
}

.monitor-kline-fin-val {
  font-weight: 700;
  line-height: 11px;
}

.monitor-kline-fin-inline.is-4 {
  gap: 8px;
}

.monitor-kline-fin-inline.is-4 .monitor-kline-fin-item {
  font-size: 10px;
}

.monitor-kline-chart {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.monitor-kline-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  color: #94a3b8;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .monitor-kline-grid.is-9 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .monitor-kline-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .page-card.monitor-kline-focus,
  .page-card.monitor-list-focus {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.monitor-result-immersive .admin-main,
  body.monitor-kline-immersive .admin-main {
    overflow: auto;
  }
}

.fin-snapshot-page .fin-snapshot-prep {
  margin-bottom: 18px;
}

.fin-snapshot-page .fin-snapshot-prep-collapse {
  border: none;
  --el-collapse-border-color: transparent;
}

.fin-snapshot-page .fin-snapshot-prep-collapse .el-collapse-item__header {
  height: auto;
  min-height: 44px;
  line-height: 1.4;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.fin-snapshot-page .fin-snapshot-prep-collapse .el-collapse-item.is-active .el-collapse-item__header {
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
}

.fin-snapshot-page .fin-snapshot-prep-collapse .el-collapse-item__wrap {
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #fff;
}

.fin-snapshot-page .fin-snapshot-prep-collapse .el-collapse-item__content {
  padding: 12px 16px 16px;
}

.fin-snapshot-page .fin-snapshot-prep-title {
  display: flex;
  align-items: center;
}

.fin-snapshot-page .fin-snapshot-board-toolbar {
  flex-wrap: wrap;
}

.fin-snapshot-page .fin-snapshot-board-filters {
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 8px;
}

.fin-snapshot-page .fin-snapshot-filter-title {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
  line-height: 28px;
}

.fin-snapshot-page .fin-snapshot-board-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 6px 12px;
}

.fin-snapshot-page .fin-snapshot-chg-filter {
  display: grid;
  grid-template-columns: 5em 0.85em 3.5em 0.85em 3.5em 1em;
  align-items: center;
  column-gap: 2px;
}

.fin-snapshot-page .fin-snapshot-chg-name {
  font-size: 12px;
  color: #334155;
  white-space: nowrap;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fin-snapshot-page .fin-snapshot-chg-op {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1;
}

.fin-snapshot-page .fin-snapshot-chg-unit {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.fin-snapshot-page .fin-snapshot-chg-input {
  width: 100% !important;
}

.fin-snapshot-page .fin-snapshot-chg-input .el-input__wrapper {
  padding-left: 4px;
  padding-right: 4px;
}

.fin-snapshot-page .fin-snapshot-chg-input .el-input__inner {
  text-align: right;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .fin-snapshot-page .fin-snapshot-board-filters-grid {
    grid-template-columns: repeat(2, max-content);
  }
}

.fin-snapshot-page .fin-snapshot-board-pager {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.fin-snapshot-page .fin-snapshot-board-table {
  overflow: visible;
}

.fin-snapshot-page .fin-snapshot-job-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.fin-snapshot-page .fin-snapshot-parse-errors {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.fin-snapshot-page .fin-snapshot-parse-errors-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 600;
}

.fin-snapshot-page .fin-snapshot-parse-error-summary {
  margin: 0;
  padding-left: 18px;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.7;
}

.fin-snapshot-page .fin-snapshot-parse-error-summary li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.fin-snapshot-page .pct-up {
  color: #ef4444;
  font-size: 12px;
}
.fin-snapshot-page .pct-down {
  color: #16a34a;
  font-size: 12px;
}
.fin-snapshot-page .pct-flat {
  color: #94a3b8;
  font-size: 12px;
}

/* 基本面文章 Markdown 编辑器 */
.article-editor {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  min-height: 480px;
}

.article-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ebeef5;
  margin-bottom: 16px;
}

.article-editor-toolbar .toolbar-left,
.article-editor-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.article-editor-toolbar .title-input {
  width: 280px;
}

.article-editor-toolbar .stock-input {
  width: 120px;
}

.article-editor-toolbar .stock-name-input {
  width: 140px;
}

.article-editor-toolbar .stock-tag {
  font-size: 13px;
  color: #e63131;
  background: #fff5f5;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.article-editor-body {
  flex: 1;
  display: flex;
  gap: 16px;
  min-height: 0;
}

.article-editor-body.mode-edit-only .editor-pane,
.article-editor-body.mode-preview-only .preview-pane {
  flex: 1;
}

.article-editor-body.mode-split .editor-pane,
.article-editor-body.mode-split .preview-pane {
  flex: 1;
  min-width: 0;
}

.editor-pane,
.preview-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.markdown-textarea {
  flex: 1;
  width: 100%;
  min-height: 360px;
  padding: 16px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  outline: none;
  color: #303133;
  background: #fff;
}

.markdown-textarea:focus {
  border-color: #409eff;
}

.preview-pane {
  border: 1px solid #ebeef5;
  border-radius: 4px;
  background: #fff;
  overflow: auto;
}

.markdown-body {
  padding: 20px 24px;
  line-height: 1.75;
  color: #303133;
  word-break: break-word;
}

.markdown-body .empty-preview {
  color: #909399;
  font-style: italic;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.2em 0 0.6em;
  font-weight: 600;
  line-height: 1.4;
}

.markdown-body h1 { font-size: 1.8em; border-bottom: 1px solid #eee; padding-bottom: 0.3em; }
.markdown-body h2 { font-size: 1.5em; border-bottom: 1px solid #eee; padding-bottom: 0.25em; }
.markdown-body h3 { font-size: 1.25em; }

.markdown-body p { margin: 0.8em 0; }

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.6em;
  margin: 0.8em 0;
}

.markdown-body li { margin: 0.25em 0; }

.markdown-body blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 4px solid #409eff;
  background: #f5f7fa;
  color: #606266;
}

.markdown-body code {
  padding: 0.15em 0.4em;
  background: #f5f7fa;
  border-radius: 3px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

.markdown-body pre {
  margin: 1em 0;
  padding: 14px 16px;
  background: #282c34;
  color: #abb2bf;
  border-radius: 4px;
  overflow: auto;
}

.markdown-body pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.markdown-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid #dcdfe6;
  padding: 8px 12px;
}

.markdown-body th {
  background: #f5f7fa;
  font-weight: 600;
}

.markdown-body a {
  color: #409eff;
  text-decoration: none;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body img {
  max-width: 100%;
}

.markdown-body hr {
  border: none;
  border-top: 1px solid #ebeef5;
  margin: 1.5em 0;
}

