:root {
  --bg: #0a1017;
  --surface: #121b26;
  --surface-2: #182332;
  --line: #253449;
  --text: #d9e6f2;
  --muted: #8fa2b8;
  --accent: #3da5ff;
  --up: #ef5350;
  --down: #26c281;
  --warn: #f4b942;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(10,16,23,.6); }
::-webkit-scrollbar-thumb { background: rgba(61,104,148,.55); border-radius: 6px; border: 2px solid rgba(10,16,23,.6); }
::-webkit-scrollbar-thumb:hover { background: rgba(96,150,205,.75); }
* { scrollbar-width: thin; scrollbar-color: rgba(61,104,148,.55) rgba(10,16,23,.6); }
body {
  font-family: "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 400px at 10% -20%, #17324f 0%, transparent 45%),
              radial-gradient(1200px 400px at 90% -30%, #2a1e3f 0%, transparent 45%),
              var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
}
.app-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
}
.header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(61,165,255,0.08) 0%, rgba(10,16,23,0.88) 100%);
}
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title { font-size: 22px; font-weight: 700; letter-spacing: 0.4px; }
.subtitle { margin-top: 4px; font-size: 13px; color: var(--muted); }
.update { font-size: 12px; color: var(--muted); }
.header-right { display: flex; align-items: center; }
.logout-btn {
  background: rgba(23, 35, 49, 0.45);
  color: #93a8be;
  border: 1px solid rgba(80, 102, 128, 0.5);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
.logout-btn:hover {
  color: #dbe9f8;
  border-color: rgba(129, 163, 201, 0.85);
  background: rgba(29, 45, 63, 0.72);
}
.refresh-btn {
  background: #203044;
  color: #cfe6ff;
  border: 1px solid #335172;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all .2s;
}
.refresh-btn:hover { border-color: var(--accent); }
.refresh-btn:disabled { opacity: .55; cursor: not-allowed; }
.row-refresh-btn {
  width: 26px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #355271;
  background: rgba(27, 43, 61, 0.92);
  color: #d3e8ff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.row-refresh-btn:hover { border-color: var(--accent); }
.row-refresh-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.row-refresh-btn.loading { animation: refreshSpin 0.8s linear infinite; }
@keyframes refreshSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,18,28,.72);
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.tab.active {
  color: #0b1624;
  background: linear-gradient(135deg, #6bc2ff 0%, #3da5ff 100%);
  border-color: #6bc2ff;
  font-weight: 700;
}
.panel { display: none; padding: 20px; }
.panel.active { display: block; }
.trend-engine-shell { display: grid; gap: 16px; }
.trend-engine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.trend-engine-card {
  border: 1px solid rgba(45, 62, 84, 0.9);
  border-radius: 14px;
  background: rgba(15, 23, 34, 0.92);
  padding: 14px;
}
.trend-engine-label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.trend-engine-value { font-size: 22px; font-weight: 750; color: #dff0ff; }
.trend-engine-sub { color: #8fa2b8; font-size: 12px; margin-top: 5px; line-height: 1.5; }
.trend-engine-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(96, 165, 250, 0.55);
  border-radius: 999px;
  padding: 4px 9px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.10);
  font-size: 12px;
}
.trend-engine-pill.good { border-color: rgba(52, 211, 153, .65); color: #bbf7d0; background: rgba(16, 185, 129, .10); }
.trend-engine-pill.warn { border-color: rgba(251, 191, 36, .65); color: #fde68a; background: rgba(251, 191, 36, .10); }
.trend-engine-table { width: 100%; min-width: 1080px; table-layout: fixed; border-collapse: collapse; }
.trend-engine-table th,
.trend-engine-table td { border-bottom: 1px solid rgba(45, 62, 84, 0.7); padding: 9px 8px; font-size: 12px; text-align: center; vertical-align: middle; }
.trend-engine-table th { color: #93c5fd; font-weight: 650; }
.trend-engine-artifacts { display: flex; flex-wrap: wrap; gap: 8px; }
.trend-engine-artifact { color: #cfe6ff; border: 1px solid rgba(80, 102, 128, 0.7); border-radius: 8px; padding: 6px 8px; font-size: 12px; background: rgba(27, 43, 61, 0.55); }
#pan-dash,
#pan-update,
#pan-table,
#pan-watchlist,
#pan-strategy-selection,
#pan-portfolio,
#pan-decision,
#pan-backtest,
#pan-first-buy,
#pan-params {
  padding-left: 0;
  padding-right: 0;
}
#pan-decision,
#pan-decision * {
  box-sizing: border-box;
}
.dashboard-stack {
  display: grid;
  gap: 16px;
}
.dashboard-module {
  border: 1px solid rgba(45, 62, 84, 0.9);
  border-radius: 16px;
  background: rgba(15, 23, 34, 0.92);
  padding: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.dashboard-module:hover {
  border-color: rgba(76, 142, 205, 0.55);
  box-shadow: 0 4px 22px rgba(17, 45, 78, 0.35);
}
.trend-engine-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.trend-engine-card:hover {
  border-color: rgba(76, 142, 205, 0.55);
  transform: translateY(-1px);
}
.market-card {
  transition: border-color .2s ease, transform .2s ease;
}
.market-card:hover {
  border-color: rgba(76, 142, 205, 0.5);
  transform: translateY(-1px);
}
.module-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.module-kicker {
  color: #7ea7d0;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.module-title {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
}
.module-note {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.market-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}
.market-card {
  border: 1px solid rgba(49, 67, 90, 0.8);
  border-radius: 14px;
  background: rgba(17, 28, 41, 0.92);
  padding: 14px 12px;
  min-height: 92px;
}
.market-label {
  color: #93a8be;
  font-size: 11px;
  letter-spacing: .6px;
  margin-bottom: 10px;
}
.market-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.market-value.market-red { color: #ef4444; }
.market-value.market-green { color: #22c55e; }
.market-value.market-blue { color: #6bbcff; }
.market-value.market-neutral { color: #dce8f5; }
.market-pct {
  font-size: 13px;
  font-weight: 700;
}
.market-meta {
  margin-top: 8px;
  color: #7390ad;
  font-size: 11px;
}
.market-regime-strip {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(72, 96, 123, 0.7);
  background: rgba(13, 20, 31, 0.74);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.market-regime-chip {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}
.market-regime-chip.neutral {
  color: #dbe8f6;
  border: 1px solid rgba(145, 167, 193, 0.58);
  background: rgba(46, 64, 84, 0.35);
}
.market-regime-chip.pass {
  color: #d8fde7;
  border: 1px solid rgba(56, 189, 127, 0.58);
  background: rgba(10, 83, 51, 0.42);
}
.market-regime-chip.block {
  color: #ffe4d6;
  border: 1px solid rgba(245, 118, 91, 0.62);
  background: rgba(106, 33, 19, 0.4);
}
.market-regime-reason {
  font-size: 12px;
  color: #93a8be;
}
.pulse-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 14px;
}
.pulse-pane {
  border: 1px solid rgba(95, 127, 163, 0.28);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(20, 31, 46, 0.7), rgba(13, 20, 31, 0.74));
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  padding: 14px;
}
.pulse-pane-title {
  color: #d9e8f6;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.pulse-radar-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.pulse-radar-panel,
.pulse-money-panel {
  min-width: 0;
}
.pulse-radar-track {
  border: 1px solid rgba(83, 113, 146, 0.44);
  border-radius: 14px;
  background: radial-gradient(120% 100% at 50% 120%, rgba(24, 40, 58, 0.92), rgba(12, 20, 31, 0.9));
  padding: 8px 10px 4px;
}
.pulse-radar-svg {
  width: 100%;
  height: auto;
  display: block;
}
.pulse-radar-bg {
  fill: none;
  stroke: rgba(71, 96, 124, 0.65);
  stroke-width: 14;
  stroke-linecap: round;
}
.pulse-radar-progress {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray .45s ease;
}
.pulse-radar-progress.cold {
  stroke: #58b8ff;
}
.pulse-radar-progress.neutral {
  stroke: #e0b35f;
}
.pulse-radar-progress.hot {
  stroke: #f07a66;
}
.pulse-pane-subtitle {
  color: #9ec0df;
  font-size: 12px;
  margin-bottom: 8px;
}
.money-top-list {
  display: grid;
  gap: 7px;
}
.money-top-item {
  border: 1px solid rgba(64, 88, 115, 0.62);
  border-radius: 10px;
  background: rgba(13, 22, 34, 0.75);
  padding: 7px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.money-top-rank {
  color: #e8c27c;
  font-size: 11px;
  font-weight: 800;
  min-width: 42px;
}
.money-top-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.money-top-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.money-top-code {
  color: #8fd0ff;
  font-weight: 700;
  margin-right: 7px;
}
.money-top-name {
  color: #dce9f6;
  font-weight: 700;
}
.money-top-label {
  color: #91afca;
  font-size: 11px;
}
.money-top-score {
  color: #f6cc83;
  font-size: 13px;
  font-weight: 700;
}
.pulse-temp-value {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: #e7f2ff;
}
.pulse-temp-value .unit {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #9ab5cf;
}
.pulse-temp-message {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}
.pulse-temp-message.cold { color: #80e6d0; }
.pulse-temp-message.neutral { color: #ffd97d; }
.pulse-temp-message.hot { color: #ff8a8a; }
.pulse-breakdown {
  margin-top: 8px;
  color: #86a2be;
  font-size: 12px;
}
.heat-list {
  display: grid;
  gap: 10px;
}
.heat-item {
  border: 1px solid rgba(70, 95, 124, 0.48);
  border-radius: 10px;
  background: rgba(11, 18, 29, 0.55);
  padding: 8px 10px;
}
.heat-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.heat-item-rank {
  color: #8cc7ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
}
.heat-item-name {
  color: #d8e5f3;
  font-size: 13px;
  font-weight: 700;
}
.heat-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 34, 49, 0.95);
  overflow: hidden;
}
.heat-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4aa9f4 0%, #6cbfff 45%, #e2b664 100%);
  box-shadow: 0 0 8px rgba(72, 153, 222, 0.24);
  transition: width .45s ease;
}
.heat-empty {
  color: #7f97b0;
  font-size: 13px;
  padding: 18px 0;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.showcase-column {
  border: 1px solid rgba(49, 67, 90, 0.82);
  border-radius: 16px;
  background: rgba(16, 25, 37, 0.95);
  overflow: hidden;
}
.showcase-column.buy-column { border-color: rgba(255, 92, 92, 0.46); }
.showcase-column.add-column { border-color: rgba(217, 119, 6, 0.5); }
.showcase-column.hold-column { border-color: rgba(59, 130, 246, 0.46); }
.showcase-column.add-column .showcase-title {
  color: #ffb869;
  text-shadow: 0 0 10px rgba(217, 119, 6, 0.35);
}
.showcase-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(44, 61, 83, 0.88);
}
.showcase-title {
  font-size: 15px;
  font-weight: 700;
  color: #e5f0fb;
}
.showcase-subtitle {
  font-size: 11px;
  color: #86a2be;
}
.showcase-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}
.showcase-card {
  border: 1px solid rgba(44, 61, 83, 0.84);
  border-radius: 12px;
  background: rgba(20, 31, 46, 0.9);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.showcase-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.showcase-code {
  color: #8bd0ff;
  font-weight: 700;
  cursor: pointer;
}
.showcase-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 16px;
  line-height: 1.2;
}
.showcase-name-inline {
  color: #cdd9e6;
  font-weight: 700;
}
.showcase-price-inline {
  color: #edf4fb;
  font-weight: 700;
}
.showcase-watch-cta {
  border: 1px solid #37587b;
  color: #d7ebff;
  background: #17324a;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.showcase-watch-cta:hover {
  border-color: #74c6ff;
}
.showcase-watch-cta.added {
  background: #214b2f;
  border-color: #47c27e;
  color: #cbf7dd;
}
.showcase-cta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.showcase-decision-cta {
  border: 1px solid #6f4e2a;
  color: #ffe4bf;
  background: #3f2b14;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.showcase-decision-cta:hover {
  border-color: #efc27f;
}
.showcase-decision-cta.added {
  background: #5a3d14;
  border-color: #f0b45b;
  color: #fff0d6;
}
.showcase-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.showcase-metric {
  border: 1px solid rgba(43, 60, 80, 0.8);
  border-radius: 10px;
  background: rgba(13, 22, 34, 0.78);
  padding: 7px 8px;
}
.showcase-metric .label {
  color: #7e98b4;
  font-size: 10px;
  letter-spacing: .5px;
}
.showcase-metric .value {
  margin-top: 5px;
  color: #e2edf8;
  font-size: 15px;
  font-weight: 700;
}
.showcase-metric .value.red { color: #ef4444; }
.showcase-metric .value.blue { color: #6bbcff; }
.showcase-metric .value.amber { color: #f6c177; }
.showcase-risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.showcase-risk-item {
  border: 1px solid rgba(43, 60, 80, 0.8);
  border-radius: 10px;
  background: rgba(13, 22, 34, 0.78);
  padding: 7px 8px;
}
.showcase-risk-item .label {
  color: #7e98b4;
  font-size: 10px;
  letter-spacing: .5px;
}
.showcase-risk-item .value {
  margin-top: 5px;
  color: #dce9f7;
  font-size: 14px;
  font-weight: 700;
}
.showcase-action-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.showcase-empty {
  padding: 26px 12px;
  color: #7f97b0;
  text-align: center;
  font-size: 13px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card {
  background: linear-gradient(160deg, rgba(24,35,50,.94), rgba(18,27,38,.94));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-height: 88px;
}

.stat-card h4 {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .8px;
  margin-bottom: 8px;
}

.stat-card .v { font-size: 27px; font-weight: 800; line-height: 1; }

.stat-card.macro {
  border-color: #4c6f95;
  background: linear-gradient(160deg, rgba(33,52,74,.95), rgba(20,32,47,.95));
}

.stat-card.bull-strong {
  border-color: #dc2626;
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.24);
}

.stat-card.bull-medium {
  border-color: #ef4444;
}

.stat-card.bull-weak {
  border-color: #f87171;
}

.stat-card.bear-strong {
  border-color: #16a34a;
  box-shadow: 0 0 18px rgba(22, 163, 74, 0.24);
}

.stat-card.bear-medium {
  border-color: #22c55e;
}

.stat-card.bear-weak {
  border-color: #4ade80;
}

.stat-card.fund-pass {
  border-color: #60a5fa;
  background: linear-gradient(160deg, rgba(30, 58, 92, 0.95), rgba(18, 33, 52, 0.95));
}

.stat-card.fund-drop {
  border-color: #f59e0b;
  background: linear-gradient(160deg, rgba(76, 48, 13, 0.95), rgba(49, 31, 8, 0.95));
}

.stat-card.fund-risk {
  border-color: #f97316;
}

.stat-card.fund-rate {
  border-color: #38bdf8;
}

.stat-card.schema-ok {
  border-color: #26c281;
  background: linear-gradient(160deg, rgba(18, 62, 54, 0.95), rgba(16, 41, 36, 0.92));
}

.stat-card.schema-warn {
  border-color: #f59e0b;
  background: linear-gradient(160deg, rgba(78, 54, 14, 0.95), rgba(52, 36, 10, 0.92));
}

.stat-card.schema-danger {
  border-color: #ef5350;
  background: linear-gradient(160deg, rgba(73, 30, 33, 0.95), rgba(49, 19, 21, 0.92));
}

.schema-issues {
  display: grid;
  gap: 8px;
}

.schema-issue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(47, 70, 95, 0.65);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(17, 28, 41, 0.8);
  font-size: 12px;
}

.schema-issue-row .label {
  color: #b7cee5;
}

.schema-issue-row .count {
  color: #f4b942;
  font-weight: 700;
}

.schema-samples {
  border: 1px solid rgba(47, 70, 95, 0.65);
  border-radius: 8px;
  background: rgba(17, 28, 41, 0.8);
  padding: 6px 8px;
}

.schema-samples summary {
  color: #9cc2e8;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}

.schema-sample-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.schema-sample-row {
  border: 1px solid rgba(51, 79, 108, 0.7);
  border-radius: 8px;
  background: rgba(14, 23, 34, 0.86);
  padding: 7px 8px;
  font-size: 12px;
}

.schema-sample-row .code {
  color: #7ac7ff;
  font-weight: 700;
}

.schema-sample-row .issues {
  color: #f0b96a;
  margin-top: 4px;
  line-height: 1.4;
}

.v-red { color: #ef5350; }
.v-green { color: #26c281; }
.v-blue { color: #7ac7ff; }
.v-neutral { color: #d9e6f2; }
.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--warn); }
.accent { color: #7ac7ff; }
.section-title { margin: 20px 0 10px; color: var(--muted); font-size: 12px; letter-spacing: 1.2px; }
.dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18,27,38,.9);
  overflow: hidden;
}
.list-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: #bcd3ea;
  font-weight: 700;
}
.list-body { padding: 10px; display: grid; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid transparent;
}
.pill.up { background: rgba(239,83,80,.12); border-color: rgba(239,83,80,.36); }
.pill.down { background: rgba(38,194,129,.12); border-color: rgba(38,194,129,.36); }
.pill.neu { background: rgba(143,162,184,.10); border-color: rgba(143,162,184,.24); color: #b5c7d9; }
.top-card {
  border: 1px solid #2a3b52;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(26,39,56,.92), rgba(18,27,38,.86));
}
.top-card .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.top-card .code { color: #80c8ff; font-weight: 700; cursor: pointer; }
.top-card .name { margin-top: 2px; color: var(--muted); font-size: 12px; }
.top-card .meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.top-card .line { margin-top: 8px; color: #a9bfd4; font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.toolbar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 22, 35, 0.96);
  padding: 12px;
  margin-bottom: 10px;
  position: sticky;
  top: 8px;
  z-index: 15;
  backdrop-filter: blur(4px);
}
.toolbar-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(320px, 1.05fr) minmax(420px, 1.45fr) minmax(320px, 1.15fr);
}
.toolbar.filters-collapsed .toolbar-grid {
  grid-template-columns: 1fr;
}
.toolbar.filters-collapsed .filter-block:not(.control-block),
.toolbar.filters-collapsed .active-filters {
  display: none;
}
.filter-block {
  border: 1px solid rgba(50, 74, 100, 0.7);
  border-radius: 10px;
  background: rgba(15, 26, 39, 0.88);
  padding: 10px;
  min-height: 110px;
}
.filter-title {
  font-size: 11px;
  letter-spacing: .7px;
  color: #88a6c5;
  margin-bottom: 8px;
}
.quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.quick-grid.tactical-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.filter-hint {
  margin-top: 8px;
  font-size: 11px;
  color: #7f98b3;
}
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.actions-block .action-stack {
  display: grid;
  gap: 7px;
}
.control-search {
  margin-bottom: 8px;
}
.control-search input {
  width: 100%;
}
.control-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search-row { margin-top: 10px; display: flex; align-items: center; }
.search-row input { width: min(100%, 460px); }
.watchlist-add-row {
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.watchlist-actions-row {
  margin: 0 0 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.strategy-selection-toolbar {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.strategy-selection-note,
.strategy-selection-plan {
  color: #8fa2b8;
  font-size: 12px;
}
.strategy-selection-plan {
  color: #93c5fd;
}
.watchlist-add-row input {
  width: min(100%, 460px);
  flex: 1;
  min-width: 220px;
}
.watchlist-search-hint {
  font-size: 12px;
  color: #8fa2b8;
}
.watchlist-search-hint.ok {
  color: #8fe2c2;
}
.watchlist-search-hint.warn {
  color: #f4b942;
}
.portfolio-dashboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.portfolio-kpi {
  border: 1px solid rgba(52, 78, 107, 0.76);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(16, 27, 40, 0.94), rgba(11, 20, 31, 0.95));
  padding: 10px;
  min-height: 84px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.portfolio-kpi.cash {
  border-color: rgba(73, 132, 178, 0.84);
  background: linear-gradient(165deg, rgba(17, 39, 61, 0.96), rgba(11, 24, 38, 0.96));
}
.portfolio-kpi-label {
  font-size: 11px;
  color: #8fa7c0;
}
.portfolio-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #dcecff;
  line-height: 1.1;
}
.portfolio-kpi-value.up {
  color: #ff7b87;
}
.portfolio-kpi-value.down {
  color: #56d8a6;
}
.portfolio-edit-cash-btn {
  border: 1px solid rgba(89, 145, 192, 0.78);
  border-radius: 8px;
  background: rgba(27, 62, 94, 0.88);
  color: #d8ebff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  width: fit-content;
  cursor: pointer;
}
.portfolio-edit-cash-btn:hover {
  border-color: #81c8ff;
}
.portfolio-entry-row {
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 0.7fr 0.7fr auto;
  gap: 8px;
  align-items: center;
}
.portfolio-entry-row input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #2f4a68;
  background: #102233;
  color: #d6ecff;
  padding: 8px 10px;
  font-size: 13px;
  box-sizing: border-box;
}
.portfolio-entry-row input[readonly] {
  color: #9eb7cf;
  background: #0f1f2f;
  border-color: #2a4059;
}
.portfolio-table-wrap .num,
.portfolio-table .num {
  text-align: right;
}
.portfolio-table {
  width: 100%;
  table-layout: fixed;
}
.portfolio-table col.portfolio-col-code { width: 6%; }
.portfolio-table col.portfolio-col-name { width: 8%; }
.portfolio-table col.portfolio-col-industry { width: 7%; }
.portfolio-table col.portfolio-col-qty { width: 6%; }
.portfolio-table col.portfolio-col-cost { width: 6%; }
.portfolio-table col.portfolio-col-price { width: 6%; }
.portfolio-table col.portfolio-col-mv { width: 8%; }
.portfolio-table col.portfolio-col-pnl { width: 7%; }
.portfolio-table col.portfolio-col-actual { width: 6%; }
.portfolio-table col.portfolio-col-score { width: 8%; }
.portfolio-table col.portfolio-col-action { width: 7%; }
.portfolio-table col.portfolio-col-suggest { width: 8%; }
.portfolio-table col.portfolio-col-result { width: 11%; }
.portfolio-table col.portfolio-col-op { width: 6%; }
.portfolio-table-wrap table th,
.portfolio-table-wrap table td {
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portfolio-pl.up {
  color: #ff7b87;
  font-weight: 700;
}
.portfolio-pl.down {
  color: #56d8a6;
  font-weight: 700;
}
.portfolio-op-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.portfolio-action-btn {
  border: 1px solid #355777;
  border-radius: 8px;
  background: #17324a;
  color: #d8edff;
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
}
.portfolio-action-btn:hover {
  border-color: #74c6ff;
}
.portfolio-action-btn.danger {
  border-color: #7a2f3e;
  background: #4b1f28;
  color: #ffd3da;
}
.portfolio-trade-modal {
  width: min(620px, 96vw);
}
.portfolio-cash-modal {
  width: min(460px, 94vw);
}
.portfolio-cash-form {
  display: grid;
  gap: 10px;
}
.portfolio-cash-form label {
  font-size: 12px;
  color: #9db4c9;
}
.portfolio-cash-form input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #305172;
  background: #12273b;
  color: #d6ecff;
  padding: 10px 12px;
  font-size: 14px;
  box-sizing: border-box;
}
.portfolio-cash-tip {
  font-size: 12px;
  color: #8fa7c0;
}
.portfolio-cash-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.portfolio-trade-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.portfolio-trade-tabs .action-btn.active {
  background: #2b4d70;
  border-color: #6bc2ff;
  color: #dff0ff;
}
.portfolio-trade-note {
  font-size: 12px;
  color: #9db5cb;
  margin-top: 10px;
}
.portfolio-trade-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.portfolio-trade-field {
  display: grid;
  gap: 6px;
}
.portfolio-trade-field label {
  font-size: 12px;
  color: #9db4c9;
}
.portfolio-trade-field input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #305172;
  background: #12273b;
  color: #d6ecff;
  padding: 8px 10px;
  font-size: 13px;
  box-sizing: border-box;
}
.portfolio-trade-preview {
  margin-top: 12px;
  font-size: 12px;
  color: #b5cbe0;
  border: 1px dashed rgba(70, 102, 134, 0.75);
  border-radius: 10px;
  padding: 10px;
  background: rgba(13, 22, 35, 0.62);
}
.portfolio-trade-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.app-confirm-modal {
  width: min(420px, 92vw);
}
.app-confirm-text {
  font-size: 14px;
  color: #d6e6f6;
  line-height: 1.5;
}
.app-confirm-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.quick-btn, .action-btn {
  border: 1px solid #314963;
  color: #b7cee5;
  background: #1a2a3d;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.quick-btn.active { background: #2b4d70; border-color: #6bc2ff; color: #dff0ff; }
.action-btn:hover, .quick-btn:hover { border-color: #6bc2ff; }
.fund-toggle {
  border: 1px solid #6f4e2a;
  background: #3d2b13;
  color: #ffd8a3;
  font-weight: 800;
}
.fund-toggle:hover {
  border-color: #efb862;
}
.fund-toggle.on {
  border-color: #2f8d64;
  background: #184733;
  color: #c9ffe4;
}
.fund-toggle.loading {
  opacity: .8;
}
.watch-btn {
  border: 1px solid #325375;
  color: #d6ebff;
  background: #17324a;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-width: 34px;
}
.watch-btn:hover { border-color: #74c6ff; }
.watch-btn.active {
  background: #214b2f;
  border-color: #47c27e;
  color: #cbf7dd;
}
.watch-btn.decision {
  border-color: #6f4e2a;
  background: #3f2b14;
  color: #ffe4bf;
}
.watch-btn.decision:hover {
  border-color: #efc27f;
}
.watch-btn.decision.active {
  background: #5a3d14;
  border-color: #f0b45b;
  color: #fff0d6;
}
.watch-btn.remove {
  background: #4b1f28;
  border-color: #7a2f3e;
  color: #ffd3da;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.watch-btn.remove:hover { border-color: #d47184; }
.stock-name-link {
  color: #cde4fb;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(205, 228, 251, 0.35);
}
.stock-name-link:hover {
  color: #7ecbff;
  text-decoration-color: #7ecbff;
}
input, select {
  background: #101b2a;
  border: 1px solid #30455f;
  color: #dce9f5;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 12px;
}
.active-filters {
  margin-top: 8px;
  border: 1px dashed rgba(60, 89, 119, 0.82);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: rgba(11, 18, 28, 0.75);
}
.af-label {
  font-size: 12px;
  color: #8eb0d3;
  font-weight: 600;
}
.af-empty {
  font-size: 12px;
  color: #7f98b3;
}
.af-chip {
  border: 1px solid #2f4b69;
  background: #17324a;
  color: #d8e9fa;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.af-chip .x {
  color: #a6c5e4;
  margin-left: 4px;
}
.af-clear {
  border: 1px solid #395577;
  background: #122539;
  color: #bfd8f2;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.statline {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: rgba(15,24,36,.75);
  font-size: 12px;
  color: var(--muted);
}
.statline strong { color: #bfe1ff; }
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  max-height: calc(100vh - 310px);
  background: rgba(18,27,38,.88);
}
table { width: 100%; border-collapse: collapse; min-width: 1360px; }
table th.col-adv,
table td.col-adv,
table.tactical-table th.col-adv,
table.tactical-table td.col-adv {
  display: none;
}
table.show-advanced th.col-adv,
table.show-advanced td.col-adv,
table.tactical-table.show-advanced th.col-adv,
table.tactical-table.show-advanced td.col-adv {
  display: table-cell;
}
th {
  position: sticky;
  top: 0;
  background: #152233;
  color: #91a8bf;
  font-size: 11px;
  text-align: left;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
}
th .sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  color: var(--accent);
  vertical-align: 1px;
}
th.sort-active { color: #dff0ff; background: #1a2b41; }
td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(37,52,73,.55);
  font-size: 12px;
  white-space: nowrap;
}
tr:hover td { background: rgba(39,56,78,.38); }

/* Data loading skeleton rows */
tr.skeleton-row td {
  padding: 0 9px;
  height: 44px;
}
.skeleton-cell {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(37,52,73,.45) 25%, rgba(61,112,165,.35) 50%, rgba(37,52,73,.45) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.3s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
tr.skeleton-row td:first-child { border-top-left-radius: 0; }

/* Buy-first panel redesign: scoped to this tab only. */
#pan-first-buy {
  --fb-bg: #0f1724;
  --fb-surface: rgba(15, 23, 36, 0.92);
  --fb-surface-2: rgba(18, 28, 42, 0.96);
  --fb-line: rgba(71, 85, 105, 0.42);
  --fb-line-strong: rgba(96, 165, 250, 0.22);
  --fb-text: #e2e8f0;
  --fb-muted: #8fa2b8;
  --fb-soft: #64748b;
  --fb-blue: #93c5fd;
  --fb-green: #34d399;
  --fb-yellow: #fbbf24;
  --fb-red: #f87171;
}
#pan-first-buy .fb-shell {
  display: grid;
  gap: 14px;
  padding: 16px 0 10px;
  color: var(--fb-text);
}
#pan-first-buy .fb-band,
#pan-first-buy .fb-history-grid > div {
  border: 1px solid var(--fb-line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 28, 42, 0.98) 0%, rgba(13, 20, 31, 0.96) 100%);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.14);
}
#pan-first-buy .fb-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}
#pan-first-buy .fb-toolbar-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}
#pan-first-buy .fb-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ea7d0;
}
#pan-first-buy .fb-toolbar-title {
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
}
#pan-first-buy .fb-toolbar-meta,
#pan-first-buy .fb-toolbar-note {
  font-size: 12px;
  color: var(--fb-muted);
  line-height: 1.6;
}
#pan-first-buy .fb-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#pan-first-buy .fb-btn {
  appearance: none;
  border: 1px solid rgba(96, 165, 250, 0.34);
  background: rgba(37, 99, 235, 0.12);
  color: #dbeafe;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
#pan-first-buy .fb-btn:hover {
  border-color: rgba(147, 197, 253, 0.65);
  background: rgba(37, 99, 235, 0.22);
}
#pan-first-buy .fb-btn:disabled {
  opacity: .58;
  cursor: not-allowed;
}
#pan-first-buy .fb-band {
  padding: 14px 16px 16px;
}
#pan-first-buy .fb-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
#pan-first-buy .fb-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #e5edf8;
}
#pan-first-buy .fb-section-subtitle {
  font-size: 11px;
  color: var(--fb-soft);
  line-height: 1.5;
}
#pan-first-buy .fb-grid-4,
#pan-first-buy .fb-grid-5,
#pan-first-buy .fb-grid-6,
#pan-first-buy .fb-summary-grid,
#pan-first-buy .fb-history-grid {
  display: grid;
  gap: 10px;
}
#pan-first-buy .fb-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#pan-first-buy .fb-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#pan-first-buy .fb-grid-6,
#pan-first-buy .fb-summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#pan-first-buy .fb-history-grid { grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr); }
#pan-first-buy .fb-history-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
}
#pan-first-buy .fb-history-panel--stats {
  align-content: start;
}
#pan-first-buy .fb-history-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
#pan-first-buy .fb-history-table thead th {
  padding: 0 10px 12px !important;
  color: #8b949e !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  border-bottom: 1px solid rgba(33, 38, 45, 0.92) !important;
}
#pan-first-buy .fb-history-table tbody td {
  padding: 14px 10px !important;
  color: #c9d1d9 !important;
  font-size: 13px !important;
  border-bottom: 1px solid rgba(33, 38, 45, 0.55) !important;
  vertical-align: top;
}
#pan-first-buy .fb-history-table tbody tr:last-child td {
  border-bottom: 0 !important;
}
#pan-first-buy .fb-history-table tbody tr:hover td {
  background: rgba(24, 32, 44, 0.7) !important;
}
#pan-first-buy .fb-history-table .fb-stock-cell {
  min-width: 0;
}
#pan-first-buy .fb-history-table .fb-stock-name {
  display: block;
  color: #f0f6fc;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
#pan-first-buy .fb-history-table .fb-stock-code {
  display: block;
  margin-top: 3px;
  color: #8b949e;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
#pan-first-buy .fb-history-table .fb-result-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.08);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
#pan-first-buy .fb-observe-cell {
  min-width: 220px;
  color: #c9d1d9;
  font-size: 12px;
}
#pan-first-buy .fb-observe-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#pan-first-buy .fb-observe-summary {
  color: #8b949e;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#pan-first-buy .fb-observe-signals {
  display: block;
  min-width: 0;
}
#pan-first-buy .fb-observe-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}
#pan-first-buy .fb-observe-line.is-bull {
  color: #ff4d4f;
}
#pan-first-buy .fb-observe-line.is-risk {
  color: #52c41a;
}
#pan-first-buy .fb-observe-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
#pan-first-buy .fb-observe-copy {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#pan-first-buy .fb-observe-main {
  color: inherit;
}
#pan-first-buy .fb-observe-note {
  color: #8b949e;
  font-weight: 400;
  margin-left: 6px;
}
#pan-first-buy .fb-observe-empty {
  color: #8b949e;
  font-size: 11px;
}
#pan-first-buy .fb-history-table .fb-exit-reason {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #9fb0c3;
  font-size: 11px;
  line-height: 1.45;
}
#pan-first-buy .fb-history-table .fb-profit-positive {
  color: #ff4d4f !important;
  font-weight: 700 !important;
}
#pan-first-buy .fb-history-table .fb-profit-negative {
  color: #52c41a !important;
  font-weight: 700 !important;
}
#pan-first-buy .fb-history-table .fb-profit-flat {
  color: #8b949e !important;
  font-weight: 700 !important;
}
#pan-first-buy .fb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#pan-first-buy .fb-kpi-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 10px;
  border: 1px solid rgba(48, 54, 61, 0.9);
  background: rgba(33, 38, 45, 0.82);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
#pan-first-buy .fb-kpi-title {
  color: #8b949e;
  font-size: 11px;
  line-height: 1.3;
}
#pan-first-buy .fb-kpi-value {
  color: #f0f6fc;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
}
#pan-first-buy .fb-kpi-value.is-positive {
  color: #ff4d4f;
}
#pan-first-buy .fb-kpi-value.is-negative {
  color: #52c41a;
}
#pan-first-buy .fb-kpi-meta {
  color: #8b949e;
  font-size: 11px;
  line-height: 1.45;
}
#pan-first-buy .fb-rating-stack {
  display: grid;
  gap: 8px;
}
#pan-first-buy .fb-rating-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(48, 54, 61, 0.88);
  background: rgba(18, 24, 33, 0.72);
}
#pan-first-buy .fb-rating-main {
  min-width: 0;
  color: #c9d1d9;
  font-size: 12px;
  line-height: 1.45;
}
#pan-first-buy .fb-rating-main strong {
  font-size: 12px;
}
#pan-first-buy .fb-rating-sub {
  flex: none;
  color: #8b949e;
  font-size: 11px;
  white-space: nowrap;
}
#pan-first-buy .fb-card,
#pan-first-buy .fb-metric,
#pan-first-buy .fb-funnel-card {
  min-width: 0;
  border: 1px solid var(--fb-line);
  border-radius: 8px;
  background: rgba(15, 23, 36, 0.68);
}
#pan-first-buy .fb-card,
#pan-first-buy .fb-funnel-card {
  padding: 12px;
}
#pan-first-buy .fb-metric {
  padding: 10px 12px;
}
#pan-first-buy .fb-label {
  font-size: 10px;
  color: var(--fb-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
#pan-first-buy .fb-value {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: #f8fafc;
  word-break: break-word;
}
#pan-first-buy .fb-value.is-muted { color: var(--fb-muted); }
#pan-first-buy .fb-value.is-green { color: var(--fb-green); }
#pan-first-buy .fb-value.is-yellow { color: var(--fb-yellow); }
#pan-first-buy .fb-value.is-red { color: var(--fb-red); }
#pan-first-buy .fb-value.is-blue { color: var(--fb-blue); }
#pan-first-buy .fb-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--fb-muted);
  line-height: 1.5;
}
#pan-first-buy .fb-display-state {
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.38);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  background: rgba(15, 23, 36, 0.55);
  color: #dbe6f4;
}
#pan-first-buy .fb-display-state.audited {
  border-color: rgba(52, 211, 153, 0.35);
}
#pan-first-buy .fb-display-state.runtime-observation {
  border-color: rgba(251, 191, 36, 0.28);
}
#pan-first-buy .fb-disclaimer,
#pan-first-buy .fb-inline-note,
#pan-first-buy .fb-empty {
  margin-top: 10px;
  border: 1px solid rgba(71, 85, 105, 0.32);
  background: rgba(15, 23, 36, 0.54);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--fb-muted);
}
#pan-first-buy .fb-disclaimer-runtime-observation {
  border-color: rgba(251, 191, 36, 0.3);
}
#pan-first-buy .fb-intent-bar,
#pan-first-buy .fb-blocker-list,
#pan-first-buy .fb-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
#pan-first-buy .fb-intent-pill,
#pan-first-buy .fb-blocker-item,
#pan-first-buy .fb-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 36, 0.74);
  color: #cbd5e1;
  font-size: 11px;
}
#pan-first-buy .fb-blocker-count {
  color: var(--fb-red);
  font-weight: 700;
}
#pan-first-buy .fb-candidate-list {
  display: grid;
  gap: 10px;
}
#pan-first-buy .fb-candidate-item {
  border: 1px solid var(--fb-line);
  border-radius: 8px;
  background: rgba(15, 23, 36, 0.7);
  padding: 12px;
}
#pan-first-buy .fb-candidate-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
#pan-first-buy .fb-candidate-name {
  font-size: 14px;
  font-weight: 700;
  color: #dbeafe;
}
#pan-first-buy .fb-candidate-code {
  margin-top: 2px;
  font-size: 11px;
  color: var(--fb-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
#pan-first-buy .fb-candidate-id {
  font-size: 11px;
  color: #93c5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
#pan-first-buy .fb-candidate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
#pan-first-buy .fb-candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
#pan-first-buy .fb-candidate-detail {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--fb-muted);
}
#pan-first-buy .fb-zone {
  margin-top: 12px;
}
#pan-first-buy .fb-zone:first-child {
  margin-top: 0;
}
#pan-first-buy .fb-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--fb-line);
  border-radius: 8px;
  background: rgba(15, 23, 36, 0.54);
}
#pan-first-buy .fb-zone-title {
  font-size: 13px;
  font-weight: 700;
}
#pan-first-buy .fb-zone-meta {
  font-size: 11px;
  color: var(--fb-muted);
}
#pan-first-buy .fb-zone-note {
  margin: 8px 0 10px;
  font-size: 11px;
  color: var(--fb-muted);
  line-height: 1.6;
}
#pan-first-buy .fb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--fb-line);
  border-radius: 8px;
  background: rgba(15, 23, 36, 0.68);
}
#pan-first-buy table {
  width: 100%;
  border-collapse: collapse;
  background: transparent !important;
  color: var(--fb-text) !important;
  font-size: 12px !important;
}
#pan-first-buy thead tr {
  background: rgba(18, 28, 42, 0.96) !important;
  border-bottom-color: var(--fb-line) !important;
}
#pan-first-buy thead th {
  background: rgba(18, 28, 42, 0.96) !important;
  color: var(--fb-soft) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px !important;
  border-bottom-color: var(--fb-line) !important;
}
#pan-first-buy tbody > tr > td {
  min-height: 44px;
  padding-top: 11px !important;
  padding-bottom: 11px !important;
  line-height: 1.55 !important;
  border-bottom: 1px solid var(--fb-line) !important;
  background: transparent !important;
  color: #e2e8f0 !important;
  font-size: 12px !important;
  vertical-align: middle;
}
#pan-first-buy tbody > tr:hover > td {
  background: rgba(30, 41, 59, 0.58) !important;
  transition: background .2s ease;
}
#pan-first-buy tbody > tr:hover + tr > td[colspan="19"] {
  background: rgba(15, 23, 36, 0.72) !important;
  border-left-color: rgba(96, 165, 250, 0.28) !important;
}
#pan-first-buy tbody > tr > td:nth-child(3) {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
}
#pan-first-buy tbody > tr > td:nth-child(4) {
  color: #cbd5e1 !important;
}
#pan-first-buy tbody > tr > td:nth-child(19) {
  white-space: normal;
}
#pan-first-buy td[colspan="19"] {
  padding: 9px 16px 10px 26px !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
  color: #8b949e !important;
  background: rgba(22, 27, 34, 0.4) !important;
  border-bottom: 1px solid rgba(33, 38, 45, 0.92) !important;
  border-left: 2px solid rgba(48, 54, 61, 0.72) !important;
  white-space: normal !important;
}
#pan-first-buy td[colspan="19"] span {
  color: #8b949e !important;
  font-weight: 600;
  background: transparent !important;
  border: 0 !important;
}
#pan-first-buy tbody > tr > td:nth-child(10) span,
#pan-first-buy tbody > tr > td:nth-child(11) span,
#pan-first-buy tbody > tr > td:nth-child(12) span,
#pan-first-buy tbody > tr > td:nth-child(13) span,
#pan-first-buy tbody > tr > td:nth-child(18) span,
#pan-first-buy tbody > tr > td span[style] {
  display: inline-block !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(148, 163, 184, 0.10) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  filter: saturate(1.05);
}
#pan-first-buy tbody > tr > td[colspan="19"] span[style] {
  background: transparent !important;
  border: 0 !important;
  filter: none !important;
}
#pan-first-buy tbody > tr > td:nth-child(7),
#pan-first-buy tbody > tr > td:nth-child(9) {
  font-weight: 600 !important;
}
#pan-first-buy td.buy-first-return-profit {
  color: #f87171 !important;
  font-weight: 600 !important;
}
#pan-first-buy td.buy-first-return-loss {
  color: #4ade80 !important;
  font-weight: 600 !important;
}
#pan-first-buy td.buy-first-return-flat {
  color: #94a3b8 !important;
  font-weight: 600 !important;
}
#pan-first-buy td.buy-first-signal-cell {
  font-size: 12px !important;
  font-weight: 600 !important;
}
#pan-first-buy .buy-first-signal-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: rgba(148,163,184,0.12) !important;
  color: #cbd5e1 !important;
}
#pan-first-buy .buy-first-signal-buy {
  background: rgba(248,113,113,0.15) !important;
  color: #fca5a5 !important;
}
#pan-first-buy .buy-first-signal-add {
  background: rgba(96,165,250,0.15) !important;
  color: #93c5fd !important;
}
#pan-first-buy .buy-first-signal-avoid {
  background: rgba(156,163,175,0.15) !important;
  color: #d1d5db !important;
}
#pan-first-buy .buy-first-signal-watch {
  background: rgba(251,191,36,0.15) !important;
  color: #fcd34d !important;
}
#pan-first-buy .buy-first-signal-neutral {
  background: rgba(148,163,184,0.12) !important;
  color: #cbd5e1 !important;
}
@media (max-width: 1200px) {
  #pan-first-buy .fb-grid-6,
  #pan-first-buy .fb-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #pan-first-buy .fb-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #pan-first-buy .fb-grid-4,
  #pan-first-buy .fb-history-grid,
  #pan-first-buy .fb-candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #pan-first-buy .fb-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  #pan-first-buy .fb-toolbar,
  #pan-first-buy .fb-section-head,
  #pan-first-buy .fb-candidate-top,
  #pan-first-buy .fb-zone-head {
    flex-direction: column;
    align-items: stretch;
  }
  #pan-first-buy .fb-grid-6,
  #pan-first-buy .fb-grid-5,
  #pan-first-buy .fb-grid-4,
  #pan-first-buy .fb-summary-grid,
  #pan-first-buy .fb-history-grid,
  #pan-first-buy .fb-candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #pan-first-buy .fb-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  #pan-first-buy .fb-shell {
    padding-top: 12px;
  }
  #pan-first-buy .fb-band,
  #pan-first-buy .fb-history-grid > div {
    padding: 12px;
  }
  #pan-first-buy .fb-grid-6,
  #pan-first-buy .fb-grid-5,
  #pan-first-buy .fb-grid-4,
  #pan-first-buy .fb-summary-grid,
  #pan-first-buy .fb-history-grid,
  #pan-first-buy .fb-candidate-grid {
    grid-template-columns: 1fr;
  }
  #pan-first-buy .fb-kpi-grid {
    grid-template-columns: 1fr;
  }
  #pan-first-buy .fb-toolbar-title {
    font-size: 18px;
  }
  #pan-first-buy .fb-history-panel {
    padding: 14px 14px 12px;
  }
}
.row-stop-trigger td {
  color: #ffdce3;
  animation: stopRowBlink 1.05s ease-in-out infinite;
  background: rgba(115, 20, 32, 0.34) !important;
  border-bottom-color: rgba(230, 93, 109, 0.36) !important;
}
.row-stop-trigger:hover td {
  background: rgba(140, 24, 38, 0.48) !important;
}
@keyframes stopRowBlink {
  0%, 100% { background: rgba(113, 20, 32, 0.34); }
  50% { background: rgba(162, 29, 44, 0.56); }
}
.score { font-weight: 700; }
.money-tag { font-size: 10px; padding: 2px 6px; border-radius: 8px; }
.money-hot { background: rgba(255,145,56,.18); color: #ffb066; }
.money-inst { background: rgba(171,123,255,.18); color: #d3b4ff; }
.money-in { background: rgba(38,194,129,.18); color: #73e3b6; }
.update-ops {
  display: grid;
  gap: 10px;
}
.update-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.update-top-grid > .list-box {
  display: flex;
  flex-direction: column;
}
.update-top-grid > .list-box .list-body {
  flex: 1;
  display: flex;
}
.macro-op-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
}
.macro-op-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.macro-op-desc {
  color: #9db5cb;
  font-size: 12px;
  line-height: 1.45;
}
.macro-op-status,
.recompute-meta {
  color: #89a6c2;
  font-size: 12px;
}
.macro-op-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.macro-op-actions #validate-data-btn,
.macro-op-actions #update-recompute-btn {
  min-width: 180px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}
.macro-op-actions #update-recompute-btn {
  border: 1px solid #3f6f99;
  border-radius: 9px;
  background: linear-gradient(135deg, #1f4f75, #183f5f);
  color: #e7f3ff;
}
.update-row {
  border: 1px solid rgba(47, 70, 95, 0.75);
  border-radius: 10px;
  background: rgba(16, 26, 39, 0.84);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.update-row.running {
  border-color: #3da5ff;
  box-shadow: 0 0 16px rgba(61, 165, 255, 0.22);
}
.update-row.sequence-failed {
  border-color: rgba(255, 106, 120, 0.92);
  box-shadow: 0 0 16px rgba(255, 106, 120, 0.28);
}
.update-main {
  display: grid;
  gap: 6px;
}
.update-name {
  color: #dce9f7;
  font-size: 14px;
  font-weight: 700;
}
.update-desc {
  color: #94afca;
  font-size: 12px;
}
.update-apis {
  color: #7ea0c4;
  font-size: 11px;
}
.update-meta {
  display: grid;
  gap: 6px;
}
.update-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 8px;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
}
.update-chip.idle {
  color: #a8bfd6;
  background: rgba(95, 122, 148, 0.2);
  border-color: rgba(115, 145, 173, 0.44);
}
.update-chip.running {
  color: #dff4ff;
  background: rgba(37, 135, 205, 0.32);
  border-color: rgba(84, 185, 255, 0.78);
}
.update-chip.success {
  color: #defbe8;
  background: rgba(25, 145, 95, 0.32);
  border-color: rgba(64, 210, 143, 0.7);
}
.update-chip.warning {
  color: #fff1cf;
  background: rgba(184, 111, 18, 0.34);
  border-color: rgba(255, 191, 80, 0.68);
}
.update-chip.failed {
  color: #ffe8e8;
  background: rgba(175, 40, 52, 0.34);
  border-color: rgba(255, 106, 120, 0.72);
}
.update-time {
  color: #9db8d3;
  font-size: 12px;
}
.update-msg {
  color: #86a7c8;
  font-size: 11px;
}
.update-action {
  display: grid;
  gap: 6px;
  justify-items: end;
}
.update-btn {
  border: 1px solid #3a5574;
  border-radius: 8px;
  background: #1a2e45;
  color: #d4e8fc;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  cursor: pointer;
}
.update-btn.primary {
  background: linear-gradient(135deg, #2f7fc6, #185e9d);
  border-color: #63b0ff;
  color: #ecf7ff;
}
.update-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.validate-btn {
  border: 1px solid #3f6f99;
  border-radius: 9px;
  background: linear-gradient(135deg, #1f4f75, #183f5f);
  color: #e7f3ff;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .16s ease, opacity .2s ease, filter .2s ease, border-color .2s ease;
}
.validate-btn:hover {
  border-color: #7ac7ff;
  transform: translateY(-1px);
}
.validate-btn:disabled {
  cursor: not-allowed;
}
.validate-btn.busy {
  opacity: .72;
  filter: grayscale(.08);
}
.validate-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(231, 243, 255, 0.55);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: validateSpin .9s linear infinite;
}
.validate-btn.busy .validate-spinner {
  display: inline-block;
}
@keyframes validateSpin {
  to { transform: rotate(360deg); }
}
.validate-status-text {
  color: #9eb9d4;
  font-size: 12px;
}

/* ── Pipeline Console ── */
.pipeline-card {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(100,116,139,0.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.pipeline-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.pipeline-summary-item {
  background: rgba(30,41,59,0.7);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
}
.pipeline-summary-item .ps-label { color: #64748b; }
.pipeline-summary-item .ps-value { color: #e2e8f0; font-weight: 600; margin-top: 2px; }
.pipeline-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.pipeline-main-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(30,58,138,0.5), rgba(15,23,42,0.7));
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: 10px;
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: left;
}
.pipeline-main-button:hover:not(:disabled) {
  border-color: rgba(59,130,246,0.7);
  background: linear-gradient(135deg, rgba(30,58,138,0.7), rgba(15,23,42,0.9));
}
.pipeline-main-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pipeline-btn-num { font-size: 18px; font-weight: 800; color: #60a5fa; line-height: 1; }
.pipeline-btn-label { font-size: 13px; font-weight: 700; color: #e2e8f0; }
.pipeline-btn-desc { font-size: 10px; color: #64748b; }
.pipeline-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1100px) { .pipeline-phases { grid-template-columns: 1fr; } }
.pipeline-phase {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(100,116,139,0.2);
  border-radius: 8px;
  padding: 10px 14px;
}
.pipeline-phase-title {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pipeline-steps { display: flex; flex-direction: column; gap: 5px; }
.pipeline-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  padding: 3px 0;
}
.pipeline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #334155;
}
.pipeline-dot.idle    { background: #334155; }
.pipeline-dot.running { background: #3b82f6; animation: pipelinePulse 1s ease-in-out infinite; }
.pipeline-dot.success { background: #22c55e; }
.pipeline-dot.warning { background: #f59e0b; }
.pipeline-dot.failed  { background: #ef4444; }
.pipeline-dot.skipped { background: #475569; }
@keyframes pipelinePulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}
.pipeline-step-name { flex: 1; }
.pipeline-step-status { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(100,116,139,0.15); }
.pipeline-step-meta { font-size: 10px; color: #475569; }
.pipeline-step-msg { font-size: 10px; color: #94a3b8; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-issue-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.pipeline-issue-row {
  display: flex; gap: 8px; font-size: 10px; padding: 4px 8px;
  border-radius: 4px; background: rgba(30,41,59,0.5);
}
.pipeline-issue-row.warning { border-left: 3px solid #f59e0b; }
.pipeline-issue-row.fatal   { border-left: 3px solid #ef4444; }

.trade-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.trade-action.action-buy {
  background: rgba(239, 83, 80, 0.14);
  border-color: rgba(239, 83, 80, 0.42);
  color: #ffc8c7;
}
.trade-action.action-add {
  background: rgba(244, 131, 66, 0.14);
  border-color: rgba(255, 167, 99, 0.44);
  color: #ffd1aa;
}
.trade-action.action-hold {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.42);
  color: #c9e3ff;
}
.trade-action.action-reduce {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(192, 132, 252, 0.42);
  color: #e8d2ff;
}
.trade-action.action-sell {
  background: rgba(38, 194, 129, 0.14);
  border-color: rgba(115, 227, 182, 0.42);
  color: #9beccf;
}
.trade-action.action-stop {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.7);
  color: #ffe0e4;
}
.trade-action.action-watch {
  background: rgba(143, 162, 184, 0.14);
  border-color: rgba(143, 162, 184, 0.34);
  color: #c9d8e8;
}
.trade-action.showcase-money {
  font-size: 12px;
  font-weight: 700;
}
.trade-action.showcase-money.money-hot {
  background: rgba(255,145,56,.18);
  border-color: rgba(255,176,102,.52);
  color: #ffb066;
}
.trade-action.showcase-money.money-inst {
  background: rgba(171,123,255,.18);
  border-color: rgba(211,180,255,.52);
  color: #d3b4ff;
}
.trade-action.showcase-money.money-in {
  background: rgba(38,194,129,.18);
  border-color: rgba(115,227,182,.52);
  color: #73e3b6;
}
.trade-action.showcase-money.money-normal {
  background: rgba(143,162,184,.12);
  border-color: rgba(143,162,184,.35);
  color: #b8cbdf;
}
.trade-action.showcase-industry {
  background: rgba(64, 116, 172, 0.18);
  border-color: rgba(120, 174, 232, 0.45);
  color: #d5e9ff;
}
.position-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(124, 152, 182, 0.55);
  background: rgba(31, 52, 74, 0.46);
  color: #d4e7fa;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.position-tag.pos-high {
  border-color: rgba(244, 114, 114, 0.6);
  background: rgba(108, 32, 32, 0.42);
  color: #ffd6d6;
}
.position-tag.pos-mid {
  border-color: rgba(251, 191, 36, 0.62);
  background: rgba(92, 63, 8, 0.4);
  color: #ffe4a6;
}
.position-tag.pos-low {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(28, 58, 93, 0.42);
  color: #cbe4ff;
}
.position-tag.pos-flat {
  border-color: rgba(138, 160, 184, 0.55);
  background: rgba(45, 62, 80, 0.35);
  color: #c1d3e5;
}
.daily-action-panel {
  position: relative;
  width: 100%;
  max-height: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(60, 92, 125, 0.95);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(9, 18, 31, 0.97), rgba(10, 22, 36, 0.97));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}
.daily-action-panel.collapsed .daily-action-body,
.daily-action-panel.collapsed .daily-action-meta {
  display: none;
}
.daily-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(49, 77, 106, 0.85);
  background: rgba(18, 36, 56, 0.76);
}
.daily-action-title {
  font-weight: 800;
  font-size: 13px;
  color: #dcedff;
}
.daily-action-toggle {
  border: 1px solid rgba(95, 138, 180, 0.7);
  background: rgba(26, 52, 79, 0.8);
  color: #d8ebff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
}
.daily-action-meta {
  padding: 8px 12px;
  font-size: 12px;
  color: #9bb7d5;
  border-bottom: 1px dashed rgba(70, 102, 134, 0.75);
}
.daily-action-body {
  overflow: auto;
  max-height: 68vh;
  padding: 10px 12px 12px;
}
.daily-action-group {
  margin-bottom: 10px;
  border: 1px solid rgba(57, 86, 116, 0.65);
  border-radius: 10px;
  background: rgba(17, 31, 49, 0.62);
}
.daily-action-group-title {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #dff0ff;
  border-bottom: 1px solid rgba(53, 79, 104, 0.65);
}
.daily-action-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.daily-action-item {
  padding: 8px 10px;
  border-top: 1px dashed rgba(56, 84, 109, 0.55);
  font-size: 12px;
  color: #cfe4f8;
}
.daily-action-item:first-child {
  border-top: 0;
}
.daily-action-empty {
  padding: 10px;
  font-size: 12px;
  color: #88a6c3;
}
.daily-action-code {
  color: #d8ecff;
  font-weight: 800;
}
.daily-action-sub {
  margin-top: 2px;
  color: #9fb9d5;
}
.daily-action-sub strong {
  color: #d7ecff;
}
.holdings-panel {
  margin-bottom: 12px;
  border: 1px solid rgba(112, 79, 36, 0.95);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(34, 23, 10, 0.95), rgba(24, 18, 9, 0.95));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.holdings-panel.hidden {
  display: none;
}
.holdings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(156, 111, 49, 0.62);
  background: rgba(72, 47, 18, 0.42);
}
.holdings-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffe4c1;
}
.holdings-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.holdings-btn {
  border: 1px solid rgba(214, 156, 70, 0.68);
  background: rgba(66, 44, 18, 0.92);
  color: #ffe7c8;
  border-radius: 8px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 12px;
}
.holdings-btn:hover {
  border-color: rgba(255, 187, 78, 0.95);
}
.holdings-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.holdings-btn.danger {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(88, 23, 23, 0.88);
  color: #ffe3e3;
}
.holdings-btn.mini {
  padding: 3px 8px;
  font-size: 11px;
}
.holdings-meta {
  padding: 8px 12px;
  font-size: 12px;
  color: #f2d8ae;
  border-bottom: 1px dashed rgba(150, 113, 62, 0.65);
}
.holdings-wrap {
  max-height: 42vh;
  overflow: auto;
}
.holdings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}
.holdings-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #3b2811;
  color: #f6ddba;
  font-size: 11px;
  text-align: left;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(175, 132, 74, 0.58);
  white-space: nowrap;
}
.holdings-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(114, 82, 43, 0.48);
  font-size: 12px;
  white-space: nowrap;
}
.holdings-table tr:hover td {
  background: rgba(108, 76, 36, 0.25);
}
.holdings-empty {
  color: #c8a97c;
  text-align: center;
  padding: 16px !important;
}
.pnl-up {
  color: #ff8f93;
  font-weight: 700;
}
.pnl-down {
  color: #68d39f;
  font-weight: 700;
}
.holdings-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.holdings-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.holdings-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}
.holdings-editor-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.holdings-editor-field label {
  font-size: 12px;
  color: #9db4c9;
}
.holdings-editor-field input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #305172;
  background: #12273b;
  color: #d6ecff;
  padding: 8px 10px;
  font-size: 13px;
  box-sizing: border-box;
}
.holdings-editor-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #89a7c5;
}
.holdings-editor-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.holdings-row-retreat td {
  animation: holdingsAlertPulse 1.2s ease-in-out infinite;
  background: rgba(132, 23, 37, 0.24) !important;
}
@keyframes holdingsAlertPulse {
  0%, 100% { background: rgba(124, 22, 35, 0.2); }
  50% { background: rgba(172, 33, 49, 0.34); }
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
.pagination button {
  border: 1px solid #334c69;
  background: #1a2a3d;
  color: #c6dcf2;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination span { font-size: 12px; color: var(--muted); }
.params-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1280px) {
  .params-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .params-layout {
    grid-template-columns: 1fr;
  }
}
.params-card {
  border: 1px solid rgba(49, 70, 96, 0.85);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(16, 27, 40, 0.94), rgba(12, 20, 31, 0.95));
  padding: 12px;
}
.params-card-title {
  color: #d7e9fb;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 5px;
}
.params-card-subtitle {
  color: #8fa7c0;
  font-size: 11px;
  margin-bottom: 10px;
}
.tuning-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid rgba(58, 79, 104, 0.82);
  border-radius: 10px;
  background: rgba(13, 21, 31, 0.74);
}
.tuning-status-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}
.tuning-status-title {
  color: #d7e9fb;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.tuning-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(88, 118, 150, 0.58);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: rgba(27, 43, 60, 0.55);
  color: rgba(190, 208, 226, 0.82);
  box-shadow: none;
  white-space: nowrap;
  transition: opacity .18s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
}
.tuning-status-badge.applied {
  color: #d8ffeb;
  border-color: rgba(52, 211, 153, 0.9);
  background: rgba(10, 83, 54, 0.58);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.34);
}
.tuning-status-badge.dry-run,
.tuning-status-badge.eligible {
  color: #ffe9bb;
  border-color: rgba(251, 191, 36, 0.88);
  background: rgba(95, 66, 8, 0.62);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
}
.tuning-status-badge.running {
  color: #c8e6ff;
  border-color: rgba(66, 165, 245, 0.88);
  background: rgba(13, 71, 161, 0.55);
  box-shadow: 0 0 14px rgba(66, 165, 245, 0.3);
}
.tuning-status-badge.rejected {
  color: #ffd9dd;
  border-color: rgba(248, 113, 113, 0.9);
  background: rgba(118, 28, 38, 0.62);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.35);
}
.tuning-status-badge.unavailable {
  color: #d0dcea;
  background: rgba(60, 76, 96, 0.28);
  border-color: rgba(94, 114, 138, 0.48);
}
.tuning-status-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
  color: #c8d9ea;
  font-size: 12px;
}
.tuning-status-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.tuning-status-summary-label {
  color: #86a1bc;
  white-space: nowrap;
}
.tuning-status-summary-value {
  color: #e1edfa;
  word-break: break-word;
}
.tuning-status-summary-value.muted {
  color: #8fa7c0;
}
.tuning-status-toggle {
  border: 1px solid rgba(69, 96, 127, 0.72);
  background: rgba(21, 34, 49, 0.92);
  color: #d7e9fb;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.tuning-status-toggle:hover {
  border-color: rgba(97, 132, 171, 0.82);
}
.tuning-status-details {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(50, 74, 101, 0.72);
  border-radius: 10px;
  background: rgba(11, 18, 28, 0.82);
}
.tuning-status-details.open {
  display: block;
}
.tuning-status-block + .tuning-status-block {
  margin-top: 10px;
}
.tuning-status-block-title {
  color: #a8c4df;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tuning-status-reasons {
  margin: 0;
  padding-left: 18px;
  color: #d6e5f4;
  font-size: 12px;
  line-height: 1.5;
}
.tuning-status-reasons li + li {
  margin-top: 4px;
}
.tuning-status-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tuning-status-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(78, 110, 144, 0.5);
  background: rgba(18, 35, 54, 0.92);
  color: #dcedfb;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}
.tuning-status-result {
  color: #d6e5f4;
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 860px) {
  .tuning-status-bar {
    align-items: flex-start;
  }
  .tuning-status-main {
    width: 100%;
  }
  .tuning-status-summary {
    width: 100%;
  }
}
.params-grid {
  display: grid;
  gap: 8px;
}
.param-field {
  display: grid;
  gap: 5px;
}
.param-field > label {
  color: #9ab6d1;
  font-size: 12px;
}
.param-default-hint {
  margin-left: 6px;
  color: rgba(154, 182, 209, 0.52);
  font-size: 11px;
  font-weight: 500;
}
.param-field > input[type="number"] {
  width: 100%;
}
.param-field > select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #2a3647;
  background: #0f141d;
  color: #dce8f5;
}
.param-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(50, 74, 101, 0.72);
  border-radius: 10px;
  background: rgba(14, 24, 37, 0.88);
  padding: 8px 10px;
}
.param-switch-label {
  color: #c4d8ec;
  font-size: 12px;
}
.param-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.param-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.param-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #31465f;
  border: 1px solid #486280;
  transition: .2s;
}
.param-switch-slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #d3e7f9;
  transition: .2s;
}
.param-switch input:checked + .param-switch-slider {
  background: #1f6145;
  border-color: #2ea16f;
}
.param-switch input:checked + .param-switch-slider::before {
  transform: translateX(20px);
}
.params-actions {
  margin-top: 14px;
  border-top: 1px solid rgba(49, 70, 96, 0.7);
  padding-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.params-btn {
  border: 1px solid #3d5877;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.params-btn.ghost {
  background: transparent;
  color: #b7cee5;
}
.params-btn.primary {
  background: linear-gradient(135deg, #2f7fc6, #185e9d);
  border-color: #63b0ff;
  color: #ebf7ff;
}
.params-btn:hover {
  border-color: #7bc7ff;
}
.params-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.app-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  background: rgba(14, 31, 46, 0.96);
  border: 1px solid #3f6f99;
  color: #dff0ff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .22s ease;
}
.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.app-toast.toast-success {
  background: rgba(22, 53, 36, 0.96);
  border-color: #38b27a;
  color: #d7f8e8;
}
.app-toast.toast-warn {
  background: rgba(68, 46, 16, 0.96);
  border-color: #d29b45;
  color: #ffe7bf;
}
.app-toast.toast-error {
  background: rgba(82, 27, 31, 0.97);
  border-color: #e76f7a;
  color: #ffd7dc;
}
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 50; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal {
  width: min(1150px, 95vw);
  height: min(760px, 92vh);
  background: #101a27;
  border: 1px solid #2a3c55;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}
.modal-hd { padding: 14px 18px; border-bottom: 1px solid #27405f; display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-weight: 700; }
.modal-title span { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 12px; }
.modal-close { background: transparent; border: 1px solid #324a69; color: #b4c7da; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.modal-bd { flex: 1; padding: 14px 16px; }
#kline-chart { width: 100%; height: 100%; }
.validate-modal {
  width: min(920px, 95vw);
  height: auto;
  max-height: min(820px, 92vh);
}
.validate-modal .modal-bd {
  overflow: auto;
}
.validate-banner {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.validate-banner.healthy {
  border-color: rgba(38, 194, 129, 0.55);
  background: linear-gradient(160deg, rgba(23, 75, 58, 0.9), rgba(16, 43, 34, 0.9));
}
.validate-banner.warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(160deg, rgba(87, 59, 12, 0.92), rgba(57, 39, 8, 0.92));
}
.validate-banner.fatal {
  border-color: rgba(239, 83, 80, 0.68);
  background: linear-gradient(160deg, rgba(110, 31, 34, 0.96), rgba(74, 18, 20, 0.95));
}
.validate-banner-title {
  font-size: 18px;
  font-weight: 800;
}
.validate-banner.fatal .validate-banner-title {
  font-weight: 900;
}
.validate-banner-meta {
  margin-top: 6px;
  color: #c2d7eb;
  font-size: 12px;
}
.validate-block {
  border: 1px solid rgba(51, 79, 108, 0.75);
  border-radius: 10px;
  padding: 10px;
  background: rgba(14, 24, 37, 0.88);
  margin-bottom: 10px;
}
.validate-block h4 {
  font-size: 13px;
  margin-bottom: 8px;
}
.validate-block ul {
  margin: 0;
  padding-left: 18px;
  color: #bdd5ec;
}
.validate-block li {
  margin: 4px 0;
  line-height: 1.45;
  font-size: 12px;
}
.validate-block.fatal {
  border-color: rgba(239, 83, 80, 0.7);
  background: rgba(80, 24, 27, 0.56);
}
.validate-block.fatal h4 { color: #ffd5d5; font-weight: 900; }
.validate-block.warning {
  border-color: rgba(245, 158, 11, 0.64);
  background: rgba(83, 59, 20, 0.48);
}
.validate-block.warning h4 { color: #ffd79a; }
.validate-block.suggest h4 { color: #b8d7f5; }
.validate-check-list {
  display: grid;
  gap: 8px;
}
.validate-check {
  border: 1px solid rgba(58, 88, 118, 0.72);
  border-radius: 10px;
  background: rgba(15, 25, 39, 0.9);
  padding: 10px;
}
.validate-check-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.validate-level-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid transparent;
}
.validate-check.pass .validate-level-tag {
  color: #d8fbea;
  border-color: rgba(38, 194, 129, 0.58);
  background: rgba(31, 133, 93, 0.32);
}
.validate-check.warning .validate-level-tag {
  color: #ffe6bb;
  border-color: rgba(245, 158, 11, 0.62);
  background: rgba(145, 97, 15, 0.34);
}
.validate-check.fatal {
  border-color: rgba(239, 83, 80, 0.72);
  background: rgba(83, 26, 29, 0.56);
}
.validate-check.fatal .validate-level-tag {
  color: #ffe0de;
  border-color: rgba(239, 83, 80, 0.72);
  background: rgba(172, 49, 47, 0.45);
}
.validate-check-name {
  color: #e4effa;
  font-size: 13px;
  font-weight: 700;
}
.validate-check-msg {
  color: #bdd2e7;
  font-size: 12px;
  line-height: 1.45;
}
.validate-detail-summary {
  margin-top: 7px;
  color: #8fc3f7;
  cursor: pointer;
  font-size: 12px;
}
.validate-detail-pre {
  margin-top: 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(9, 15, 24, 0.84);
  border: 1px solid rgba(52, 82, 111, 0.72);
  color: #bdd5ec;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.validate-modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.validate-ok-btn {
  border: 1px solid #446285;
  border-radius: 8px;
  background: #1a3149;
  color: #d7e9fb;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 14px;
  cursor: pointer;
}
.validate-ok-btn:hover {
  border-color: #7cc8ff;
}

.decision-lab {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-topbar {
  border: 1px solid rgba(67, 93, 123, 0.86);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(13, 23, 36, 0.94), rgba(11, 19, 31, 0.94));
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-topbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.decision-intake-title {
  color: #e9f3fe;
  font-size: 14px;
  font-weight: 800;
}

.decision-intake-note {
  color: #95aec8;
  font-size: 11px;
}

.decision-workflow-tip {
  color: #7f95ab;
  font-size: 11px;
  letter-spacing: .2px;
}

.decision-topbar-row {
  display: grid;
  grid-template-columns: minmax(0, 6fr) auto auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-input {
  min-height: 40px;
  max-height: 40px;
  resize: none;
  width: 100%;
  background: #0f1a2a;
  border: 1px solid #3a536f;
  color: #dce9f6;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.2;
  overflow-y: auto;
  min-width: 0;
  box-sizing: border-box;
}

.decision-btn {
  border: 1px solid #466483;
  border-radius: 9px;
  background: #1b2f46;
  color: #d7e9fb;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 14px;
  cursor: pointer;
  min-width: 90px;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.decision-btn:hover {
  border-color: #7fc6ff;
}

.decision-btn.primary {
  border-color: #6ea6db;
  background: linear-gradient(140deg, #2d5e8f, #214667);
  color: #edf6ff;
}

.decision-btn.primary.strong {
  border-color: #e4bb6a;
  background: linear-gradient(140deg, #4b76a8, #2b5682 68%, #214568);
  color: #fff7e8;
  box-shadow: 0 6px 14px rgba(51, 106, 164, 0.35);
}

.decision-btn.secondary {
  border-color: #4f7094;
  background: #1b3550;
}

.decision-btn.ghost {
  border-color: #3f5771;
  background: rgba(23, 38, 56, 0.9);
  color: #b9cde2;
}

.decision-btn.weak {
  border-color: rgba(95, 118, 145, 0.48);
  background: rgba(20, 32, 47, 0.62);
  color: #a9bfd6;
  padding: 5px 10px;
  min-width: 0;
  font-size: 11px;
}

.decision-btn.weak.active {
  border-color: rgba(120, 160, 196, 0.62);
  color: #cfe4f7;
  background: rgba(36, 56, 78, 0.85);
}

.decision-btn:disabled {
  opacity: .66;
  cursor: not-allowed;
}

.decision-import-tip {
  min-height: 18px;
  font-size: 12px;
  color: #8ca7c2;
}

.decision-import-tip.error {
  color: #ff8f98;
}

.decision-import-tip.success {
  color: #8fe2c2;
}

.decision-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-section {
  border: 1px solid rgba(53, 78, 105, 0.86);
  border-radius: 12px;
  background: rgba(14, 24, 37, 0.92);
  padding: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-flow-tip {
  margin-bottom: 8px;
  color: #8099b2;
  font-size: 11px;
}

.decision-candidate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.decision-candidate-title {
  color: #dcecfb;
  font-size: 14px;
  font-weight: 800;
}

.decision-candidate-sub {
  margin-top: 3px;
  color: #8fa8c4;
  font-size: 11px;
}

.decision-candidate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.decision-filter-summary {
  font-size: 12px;
  color: #9eb7d1;
  margin-bottom: 8px;
}

.decision-progress {
  display: none;
  margin-bottom: 10px;
}

.decision-progress.active {
  display: block;
}

.decision-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(84, 121, 157, 0.78);
  background: rgba(11, 18, 29, 0.92);
}

.decision-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #52b7ff 0%, #ffd77a 60%, #ffb54d 100%);
  transition: width .22s ease;
}

.decision-progress-text {
  margin-top: 6px;
  font-size: 11px;
  color: #9ebadb;
}

.decision-table-wrap {
  border: 1px solid rgba(56, 82, 110, 0.84);
  border-radius: 10px;
  overflow: auto;
  max-height: 52vh;
  background: rgba(17, 28, 41, 0.88);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-table-wrap table {
  width: max-content;
  min-width: 1560px;
}

.decision-table-wrap td {
  padding-top: 11px;
  padding-bottom: 11px;
}

.decision-soft-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(120, 150, 183, 0.34);
  color: #a9c0d8;
  background: rgba(23, 35, 50, 0.45);
}

.decision-soft-tag.money {
  border-color: rgba(138, 156, 177, 0.36);
  color: #b6cada;
}

.decision-soft-tag.industry {
  border-color: rgba(105, 140, 174, 0.38);
  color: #9fc3e6;
}

.decision-right-head {
  font-size: 13px;
  font-weight: 800;
  color: #b8cde2;
  margin-bottom: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.decision-summary-card {
  border: 1px solid rgba(74, 102, 133, 0.72);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(22, 34, 50, 0.95), rgba(15, 25, 38, 0.95));
  padding: 10px;
  margin-bottom: 0;
  min-height: 124px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-summary-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.decision-summary-target {
  color: #f0f7ff;
  font-size: 14px;
  font-weight: 800;
}

.decision-summary-code {
  color: #f0ca80;
  font-size: 12px;
  font-weight: 700;
}

.decision-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.decision-summary-item {
  border: 1px solid rgba(57, 82, 109, 0.76);
  border-radius: 8px;
  background: rgba(17, 28, 43, 0.78);
  padding: 6px 8px;
  min-width: 0;
  max-width: 100%;
}

.decision-summary-label {
  color: #90abc5;
  font-size: 10px;
}

.decision-summary-value {
  margin-top: 2px;
  color: #e7f1fb;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-top-list {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.decision-target-empty {
  border: 1px dashed rgba(84, 109, 138, 0.82);
  border-radius: 10px;
  color: #91acc6;
  font-size: 12px;
  padding: 14px;
  background: rgba(12, 20, 31, 0.82);
}

.decision-top-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(61, 88, 116, 0.82);
  border-radius: 10px;
  background: rgba(15, 26, 40, 0.86);
  padding: 11px 10px;
  min-height: 68px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.decision-top-item.top1 {
  min-height: 76px;
  border-color: rgba(235, 189, 95, 0.72);
  background: linear-gradient(145deg, rgba(34, 44, 55, 0.95), rgba(21, 30, 42, 0.94));
  box-shadow: 0 4px 10px rgba(140, 101, 30, 0.22);
}

.decision-top-rank {
  border: 1px solid rgba(235, 191, 104, 0.64);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  color: #ffe6b5;
  background: rgba(89, 63, 24, 0.33);
  font-weight: 800;
  min-width: 42px;
  text-align: center;
}

.decision-top-main {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.decision-top-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.decision-top-code {
  color: #f1cf8d;
  font-size: 13px;
  font-weight: 800;
}

.decision-top-name {
  color: #dce9f6;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.decision-top-action {
  flex: 0 0 auto;
  font-size: 11px;
  color: #c5d8eb;
  border: 1px solid rgba(98, 125, 154, 0.56);
  border-radius: 999px;
  padding: 1px 8px;
  background: rgba(29, 43, 60, 0.8);
}

.decision-top-metrics {
  color: #a8bed3;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}

.decision-top-reason {
  color: #95afc9;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.decision-top-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.decision-top-score {
  color: #f6cd83;
  font-size: 15px;
  font-weight: 700;
  min-width: 54px;
  text-align: right;
}

.decision-detail-panel {
  border: 1px solid rgba(56, 82, 109, 0.82);
  border-radius: 10px;
  background: rgba(13, 23, 35, 0.86);
  padding: 10px;
  min-height: 118px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.decision-detail-title {
  color: #d9e9f8;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.decision-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.decision-detail-item {
  border: 1px solid rgba(56, 82, 109, 0.8);
  border-radius: 7px;
  background: rgba(16, 26, 40, 0.76);
  padding: 6px 7px;
  min-width: 0;
  max-width: 100%;
}

.decision-detail-label {
  color: #8fa9c4;
  font-size: 10px;
}

.decision-detail-value {
  margin-top: 2px;
  color: #e3effb;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-detail-reason {
  border: 1px solid rgba(214, 174, 97, 0.44);
  border-radius: 8px;
  background: rgba(74, 53, 20, 0.24);
  color: #f6e0b9;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 9px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.decision-stop-distance {
  margin-top: 6px;
  font-size: 11px;
  color: #a9c0d6;
}

.decision-stop-distance.warn {
  color: #ff8790;
  font-weight: 800;
}

.decision-tactical-board {
  display: grid;
  gap: 12px;
}

.decision-tactical-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.decision-tactical-pill {
  border: 1px solid rgba(67, 93, 123, 0.82);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(18, 31, 47, 0.94), rgba(13, 22, 35, 0.94));
  padding: 10px 11px;
}

.decision-tactical-label {
  color: #8ea7c0;
  font-size: 11px;
}

.decision-tactical-value {
  margin-top: 4px;
  color: #eef6ff;
  font-size: 16px;
  font-weight: 800;
}

.decision-tactical-sub {
  margin-top: 3px;
  color: #8faecc;
  font-size: 11px;
  line-height: 1.35;
}

.decision-tactical-empty {
  border: 1px dashed rgba(108, 131, 157, 0.82);
  border-radius: 12px;
  padding: 14px;
  background: rgba(12, 20, 31, 0.84);
  color: #9cb4cb;
  font-size: 12px;
  line-height: 1.6;
}

.decision-op-section {
  display: grid;
  gap: 8px;
}

.decision-op-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.decision-op-section-title {
  color: #dbeaf8;
  font-size: 13px;
  font-weight: 800;
}

.decision-op-section-sub {
  color: #91abc5;
  font-size: 11px;
}

.decision-op-cards {
  display: grid;
  gap: 10px;
}

.decision-op-card {
  border: 1px solid rgba(65, 92, 119, 0.82);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(17, 27, 41, 0.96), rgba(13, 21, 33, 0.95));
  padding: 12px;
  display: grid;
  gap: 10px;
}

.decision-op-card.top {
  border-color: rgba(223, 177, 92, 0.72);
  box-shadow: 0 6px 14px rgba(112, 83, 28, 0.22);
}

.decision-op-card.diagnostic {
  border-color: rgba(98, 120, 145, 0.72);
  background: linear-gradient(150deg, rgba(18, 28, 41, 0.9), rgba(12, 19, 30, 0.9));
}

.decision-op-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.decision-op-card-title {
  color: #edf6ff;
  font-size: 15px;
  font-weight: 800;
}

.decision-op-card-subtitle {
  margin-top: 3px;
  color: #8eaac6;
  font-size: 11px;
}

.heat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(110, 130, 152, 0.48);
  background: rgba(24, 36, 49, 0.82);
  color: #c9d7e6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.heat-badge[data-heat="极热"] {
  color: #ffd6c4;
  border-color: rgba(251, 146, 60, 0.82);
  background: rgba(116, 46, 24, 0.58);
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.18);
}

.heat-badge[data-heat="热"] {
  color: #ffe7ae;
  border-color: rgba(250, 204, 21, 0.8);
  background: rgba(94, 73, 12, 0.5);
}

.heat-badge[data-heat="正常"] {
  color: #d5ead9;
  border-color: rgba(110, 231, 183, 0.42);
  background: rgba(22, 63, 47, 0.42);
}

.heat-badge[data-heat="冷淡"] {
  color: #c8d8ee;
  border-color: rgba(125, 146, 173, 0.48);
  background: rgba(34, 46, 63, 0.56);
}

.heat-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.heat-legend-label {
  color: #7f94ab;
  font-size: 11px;
}

.decision-op-card-rank {
  flex: 0 0 auto;
  border: 1px solid rgba(235, 191, 104, 0.56);
  border-radius: 999px;
  padding: 3px 9px;
  color: #ffe2ae;
  background: rgba(91, 62, 18, 0.3);
  font-size: 11px;
  font-weight: 800;
}

.decision-op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.decision-op-metric {
  border: 1px solid rgba(56, 82, 109, 0.8);
  border-radius: 9px;
  background: rgba(15, 24, 37, 0.82);
  padding: 8px 9px;
}

.decision-op-metric-label {
  color: #8ca8c2;
  font-size: 10px;
}

.decision-op-metric-value {
  margin-top: 4px;
  color: #e6f1fb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.decision-op-note {
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.5;
}

.decision-op-note.primary {
  border: 1px solid rgba(80, 111, 142, 0.72);
  background: rgba(18, 29, 43, 0.82);
  color: #bdd4ea;
}

.decision-op-note.warn {
  border: 1px solid rgba(198, 137, 72, 0.56);
  background: rgba(69, 45, 17, 0.28);
  color: #f4d7a6;
}

.decision-op-note.error {
  border: 1px solid rgba(194, 87, 85, 0.56);
  background: rgba(74, 24, 27, 0.3);
  color: #ffcbcb;
}

.backtest-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

.backtest-side,
.backtest-main {
  border: 1px solid rgba(64, 86, 113, 0.84);
  border-radius: 14px;
  background: rgba(16, 25, 37, 0.8);
  backdrop-filter: blur(8px);
  padding: 14px;
}

.backtest-side-title,
.backtest-main-title {
  font-size: 16px;
  font-weight: 700;
  color: #d8e7f7;
  margin-bottom: 8px;
}

.backtest-side-note {
  color: #8ea5bd;
  font-size: 12px;
  margin-bottom: 10px;
}

.backtest-input {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(67, 91, 119, 0.9);
  background: rgba(11, 18, 29, 0.95);
  color: #d6e6f6;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.backtest-ops {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.backtest-days {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(67, 91, 119, 0.9);
  background: rgba(11, 18, 29, 0.95);
  color: #d6e6f6;
  padding: 10px 12px;
  font-size: 13px;
}

.backtest-run-btn {
  border: 1px solid rgba(248, 173, 48, 0.72);
  background: linear-gradient(145deg, #f7b63f 0%, #ea8c20 100%);
  color: #291708;
  font-weight: 800;
  font-size: 13px;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.backtest-run-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.backtest-status {
  margin-top: 10px;
  font-size: 12px;
  color: #9db4ca;
}

.backtest-status.success { color: #89e3b8; }
.backtest-status.error { color: #ff9ea5; }

.backtest-loading {
  margin-top: 12px;
  display: none;
  align-items: center;
  gap: 10px;
  color: #9cc5ef;
  font-size: 12px;
}

.backtest-loading.active {
  display: flex;
}

.backtest-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(135, 178, 221, 0.4);
  border-top-color: #6bbcff;
  animation: backtest-spin .9s linear infinite;
}

@keyframes backtest-spin {
  to { transform: rotate(360deg); }
}

.backtest-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.backtest-summary-card {
  border: 1px solid rgba(71, 96, 126, 0.85);
  border-radius: 10px;
  background: rgba(11, 18, 29, 0.8);
  padding: 10px;
}

.backtest-summary-label {
  font-size: 11px;
  color: #86a2be;
}

.backtest-summary-value {
  margin-top: 7px;
  font-size: 22px;
  font-weight: 800;
  color: #e2effb;
}

.backtest-summary-value.good { color: #80e6b7; }
.backtest-summary-value.warn { color: #ffd48a; }
.backtest-summary-value.bad { color: #ff9a9a; }

.backtest-table-wrap table tbody tr {
  cursor: pointer;
}

.backtest-table-wrap table {
  width: 100%;
  min-width: 1220px;
}

.backtest-table-wrap table th,
.backtest-table-wrap table td {
  white-space: nowrap;
}

.backtest-table-wrap table tbody tr.disabled {
  opacity: 0.75;
  cursor: default;
}

.backtest-row-msg {
  color: #8ea5bd;
  font-size: 12px;
  white-space: normal;
  min-width: 220px;
}

.backtest-trigger-cell {
  color: #b7d6f4;
  font-weight: 700;
  cursor: help;
}

.backtest-modal {
  max-width: 980px;
}

.backtest-modal-note {
  color: #9ab4cb;
  font-size: 12px;
  margin-bottom: 10px;
}

.backtest-trade-table-wrap {
  max-height: 58vh;
}

.backtest-empty {
  text-align: center;
  color: #8fa2b8;
  padding: 36px 0;
}
@media (max-width: 1280px) {
  .market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .showcase-grid { grid-template-columns: 1fr 1fr; }
  .tactical-briefing-body { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portfolio-entry-row { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }
  .portfolio-entry-row .action-btn { grid-column: 1 / -1; justify-self: end; }
  .toolbar-grid { grid-template-columns: 1fr 1fr; }
  .filter-block.control-block { grid-column: 1 / -1; }
  .control-actions { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .quick-grid.tactical-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-summary-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .backtest-layout { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .pulse-layout { grid-template-columns: 1fr; }
  .pulse-radar-layout { grid-template-columns: 1fr; }
  .toolbar-grid { grid-template-columns: 1fr; }
  .funnel-grid { grid-template-columns: 1fr 1fr; }
  .control-actions { grid-template-columns: 1fr 1fr; }
  .update-row { grid-template-columns: 1fr; }
  .update-top-grid { grid-template-columns: 1fr; }
  .update-action { justify-items: start; }
  .macro-op-row { flex-direction: column; align-items: flex-start; }
  .macro-op-actions { width: 100%; justify-content: flex-start; }
  .portfolio-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-entry-row { grid-template-columns: 1fr 1fr; }
  .portfolio-entry-row .action-btn { grid-column: 1 / -1; justify-self: stretch; }
  .portfolio-trade-form { grid-template-columns: 1fr; }
  .decision-topbar-row { grid-template-columns: 1fr 1fr; }
  .decision-topbar-row .decision-input { grid-column: 1 / -1; }
  .decision-candidate-actions { width: 100%; justify-content: flex-start; }
  .decision-top-item {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
  .decision-top-side {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .decision-op-card-head {
    flex-direction: column;
  }
}
@media (max-width: 960px) {
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-grid { grid-template-columns: 1fr; }
  .dual-grid { grid-template-columns: 1fr; }
  .params-layout { grid-template-columns: 1fr; }
  .holdings-editor-form { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header-top { flex-direction: column; align-items: flex-start; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .tactical-briefing-body { grid-template-columns: 1fr; }
  .showcase-metrics { grid-template-columns: 1fr 1fr; }
  .showcase-risk-grid { grid-template-columns: 1fr; }
  .toolbar { top: 4px; padding: 10px; }
  .funnel-grid { grid-template-columns: 1fr; }
  .control-actions { grid-template-columns: 1fr; }
  .quick-grid.tactical-grid { grid-template-columns: 1fr; }
  .portfolio-dashboard { grid-template-columns: 1fr; }
  .portfolio-entry-row { grid-template-columns: 1fr; }
  .module-head { flex-direction: column; align-items: flex-start; }
  .module-note { text-align: left; }
  .decision-topbar-row { grid-template-columns: 1fr; }
  .decision-summary-grid { grid-template-columns: 1fr; }
  .decision-detail-grid { grid-template-columns: 1fr; }
  .decision-top-line { flex-wrap: wrap; }
  .decision-top-action { order: 3; }
  .decision-top-score { min-width: 0; }
  .backtest-summary { grid-template-columns: 1fr; }
  .backtest-ops { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .panel { padding: 14px; }
  #pan-dash,
  #pan-update,
  #pan-table,
  #pan-watchlist,
  #pan-strategy-selection,
  #pan-portfolio,
  #pan-decision,
  #pan-backtest,
  #pan-action,
  #pan-params { padding-left: 6px; padding-right: 6px; }
}

/* P2 Stage3 Command Center + Process View */
.command-center {
  margin-top: 10px;
  border: 1px solid rgba(67, 104, 144, 0.72);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 31, 49, 0.92) 0%, rgba(11, 20, 33, 0.96) 100%);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}
.command-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.command-title {
  font-size: 12px;
  color: #8ab8e2;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.regime-traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.regime-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  border-radius: 999px;
  border: 1px solid rgba(88, 118, 150, 0.58);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: rgba(27, 43, 60, 0.55);
  color: rgba(190, 208, 226, 0.72);
  opacity: 0.4;
  transition: opacity .18s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
}
.regime-pill.active {
  opacity: 1;
}
.regime-pill.active[data-regime="RISK_OFF"] {
  color: #ffd9dd;
  border-color: rgba(248, 113, 113, 0.9);
  background: rgba(118, 28, 38, 0.62);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.35);
}
.regime-pill.active[data-regime="RANGE"] {
  color: #ffe9bb;
  border-color: rgba(251, 191, 36, 0.88);
  background: rgba(95, 66, 8, 0.62);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
}
.regime-pill.active[data-regime="TREND_UP"] {
  color: #d8ffeb;
  border-color: rgba(52, 211, 153, 0.9);
  background: rgba(10, 83, 54, 0.58);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.34);
}
.regime-pill.active[data-regime="RANGE_HIGH"] {
  color: #ffe9bb;
  border-color: rgba(251, 191, 36, 0.88);
  background: rgba(95, 66, 8, 0.62);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
}
.regime-pill.active[data-regime="RANGE_LOW"] {
  color: #c8e6ff;
  border-color: rgba(66, 165, 245, 0.88);
  background: rgba(13, 71, 161, 0.55);
  box-shadow: 0 0 14px rgba(66, 165, 245, 0.3);
}
.command-weight-line {
  color: #e1ecf8;
  font-size: 13px;
}
.command-meta {
  font-size: 12px;
  color: #8fa2b8;
}

.module-market-hidden { display: none !important; }



.tactical-layout {
  display: grid;
  gap: 12px;
}
.tactical-brief-card {
  border-color: rgba(52, 83, 116, 0.85);
}
.tactical-briefing-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tactical-brief-empty {
  border: 1px dashed rgba(76, 106, 139, 0.82);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  color: #8fa2b8;
  background: rgba(14, 22, 34, 0.76);
}
.tactical-hero-card {
  border: 1px solid rgba(53, 80, 108, 0.82);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(18, 31, 46, 0.94), rgba(13, 23, 35, 0.92));
  padding: 12px;
  min-height: 196px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.tactical-hero-card.buy {
  border-color: rgba(244, 91, 105, 0.65);
}
.tactical-hero-card.add {
  border-color: rgba(249, 168, 37, 0.62);
}
.tactical-hero-card.hold {
  border-color: rgba(96, 165, 250, 0.6);
}
.tactical-hero-head {
  font-size: 14px;
  font-weight: 700;
  color: #deedfb;
}
.tactical-hero-main {
  text-align: center;
  margin-top: 2px;
}
.tactical-hero-code {
  font-size: 24px;
  font-weight: 800;
  color: #e8f4ff;
  letter-spacing: .4px;
}
.tactical-hero-name {
  margin-top: 3px;
  color: #bfd6ec;
  font-size: 13px;
  font-weight: 700;
}
.tactical-hero-metrics {
  margin-top: 4px;
  border-top: 1px dashed rgba(70, 103, 136, 0.58);
  padding-top: 8px;
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #d4e5f7;
  justify-items: center;
}
.tactical-hero-row {
  display: flex;
  justify-content: center;
  gap: 2ch;
  width: 100%;
}
.tactical-hero-row .label {
  color: #8fb0cf;
  display: inline-block;
  min-width: 10ch;
  text-align: right;
}
.tactical-hero-row .value {
  color: #e8f3ff;
  font-weight: 700;
  display: inline-block;
  min-width: 22ch;
  text-align: left;
}
.tactical-hero-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8fa2b8;
  font-size: 13px;
  min-height: 112px;
}
.tactical-slicer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tactical-pill {
  border: 1px solid #365477;
  background: #14273b;
  color: #cfe2f6;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tactical-pill:hover {
  border-color: #72bffc;
}
.tactical-pill.active {
  background: #1f4c72;
  border-color: #72c3ff;
  color: #e9f6ff;
}

/* STOCK-DETAIL-FILTER-LAYOUT-FIX-01: 股票明细筛选工作台布局,作用域严格限定 #pan-table */
/* 工作台整体: 单列全宽, 不再保留三栏等宽 .toolbar-grid */
#pan-table .toolbar-grid {
  display: block;
  grid-template-columns: none;
  gap: 0;
}
#pan-table .stock-detail-filter-workbench {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
/* 主筛选与控制工具条两段: 去除 panel 边框/背景/min-height, 让其在工作台中自然流式排版 */
#pan-table .stock-detail-filter-workbench > .filter-block {
  border: 0;
  background: transparent;
  min-height: 0;
  padding: 6px 0 4px;
  border-radius: 0;
}
/* section 标题与既有视觉语言一致 */
#pan-table .stock-detail-section-title {
  font-size: 11px;
  letter-spacing: .7px;
  color: #88a6c5;
  margin: 0 0 8px;
  font-weight: 700;
}
/* 主筛选区行: 双行胶囊自然换行, search 框行末对齐 */
#pan-table .stock-detail-filter-workbench > .stock-detail-main {
  display: block;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-main .tactical-slicer {
#pan-table .stock-detail-filter-workbench > .stock-detail-main .tactical-slicer-group {
  padding: 4px 0;
}
  margin: 0;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-main .filter-hint {
  margin: 6px 0 0;
}
/* 高级筛选行: 紧凑入口, 默认收起时不占用独立固定列宽 */
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row {
  border: 1px solid rgba(50, 74, 100, 0.55);
  background: rgba(15, 26, 39, 0.6);
  border-radius: 8px;
  padding: 6px 12px;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced {
  width: 100%;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > summary {
  list-style: none;
  cursor: pointer;
  color: #cfe2f6;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 2px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > summary::-webkit-details-marker { display: none; }
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > summary::marker { content: ""; }
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s ease;
  color: #88a6c5;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced[open] > summary::before {
  transform: rotate(90deg);
}
#pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > .funnel-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
/* 工具条行: 横向紧凑布局, 不再独立占据桌面端三分之一栏位 */
#pan-table .stock-detail-filter-workbench > .stock-detail-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-toolbar .control-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  grid-template-columns: none;
  width: auto;
}
#pan-table .stock-detail-filter-workbench > .stock-detail-toolbar .control-actions .action-btn {
  white-space: nowrap;
}
/* 响应式: 1440px 及以上桌面保持 4 列高级筛选抽屉 */
@media (min-width: 1440px) {
  #pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > .funnel-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* 中等桌面 1024-1439px: 3 列高级筛选 */
@media (min-width: 1024px) and (max-width: 1439px) {
  #pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > .funnel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #pan-table .stock-detail-filter-workbench > .stock-detail-toolbar .control-actions .action-btn {
    font-size: 11.5px;
    padding: 5px 8px;
  }
}
/* 窄屏 <1024px: 工具条与 search 自然换行, 高级筛选 2 列 */
@media (max-width: 1023px) {
  #pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > .funnel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #pan-table .stock-detail-filter-workbench > .stock-detail-toolbar {
    justify-content: flex-start;
  }
  #pan-table .stock-detail-filter-workbench > .stock-detail-toolbar .control-actions {
    justify-content: flex-start;
  }
  #pan-table .stock-detail-search {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  #pan-table .stock-detail-search input {
    max-width: 100%;
  }
}
/* 移动 <640px: 高级筛选单列 */
@media (max-width: 639px) {
  #pan-table .stock-detail-filter-workbench > .stock-detail-advanced-row > #stock-detail-advanced > .funnel-grid {
    grid-template-columns: 1fr;
  }
}

/* STOCK-DETAIL-FILTER-ALIGN-01: 股票明细主筛选区 + 高级筛选最小补丁,作用域严格限定 #pan-table */
#pan-table .stock-detail-search {
  display: inline-flex;
  align-items: center;
  flex: 1 1 200px;
  min-width: 200px;
  justify-content: flex-end;
  margin-left: auto;
}
#pan-table .stock-detail-search input {
  width: 100%;
  max-width: 320px;
  background: #14273b;
  border: 1px solid #365477;
  border-radius: 6px;
  color: #cfe2f6;
  font-size: 12px;
  padding: 6px 10px;
}
#pan-table .stock-detail-search input:focus {
  outline: none;
  border-color: #72bffc;
}
#pan-table .stock-detail-advanced > summary {
  list-style: none;
  cursor: pointer;
  color: #cfe2f6;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 2px;
  user-select: none;
}
#pan-table .stock-detail-advanced > summary::-webkit-details-marker { display: none; }
#pan-table .stock-detail-advanced > summary::marker { content: ""; }
#pan-table .stock-detail-advanced > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s ease;
  color: #88a6c5;
}
#pan-table .stock-detail-advanced[open] > summary::before {
  transform: rotate(90deg);
}
#pan-table .stock-detail-advanced > .funnel-grid {
  margin-top: 8px;
}

/* M3-OBSERVE-UI-06-FIX: 天策观察 slicer 两组胶囊 */
.tactical-slicer-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  padding: 2px 0;
}
.tactical-slicer-group + .tactical-slicer-group {
  border-top: 1px dashed rgba(54, 84, 119, 0.35);
  padding-top: 8px;
  margin-top: 4px;
}
.tactical-slicer-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #88a6c5;
  letter-spacing: 0.02em;
  margin-right: 4px;
  min-width: 64px;
}

/* M3-OBSERVE-UI-07-FIX: 天策观察筛选栏紧凑化(只作用于 #pan-observe #dash-slicer) */
#pan-observe #dash-slicer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 6px 0 8px;
  padding: 0;
}
#pan-observe #dash-slicer .tactical-slicer-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 5px;
  min-height: 24px;
  padding: 0;
  border: 0;
}
#pan-observe #dash-slicer .tactical-slicer-group + .tactical-slicer-group {
  padding-top: 5px;
  margin-top: 1px;
  border-top: 1px dashed rgba(64, 92, 124, 0.32);
}
#pan-observe #dash-slicer .tactical-slicer-label {
  flex: 0 0 auto;
  min-width: 58px;
  color: #8fa2b8;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-right: 4px;
}
#pan-observe #dash-slicer .tactical-pill {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 10.5px;
  line-height: 1.15;
  border-radius: 999px;
}
#pan-observe #dash-slicer .tactical-pill.active {
  box-shadow: 0 0 0 1px rgba(61, 165, 255, 0.18);
}
@media (max-width: 760px) {
  #pan-observe #dash-slicer {
    gap: 6px;
  }
  #pan-observe #dash-slicer .tactical-slicer-label {
    min-width: 100%;
  }
}

/* M3-OBSERVE-UI-06-FIX: 底部两说明区默认折叠 details/summary 样式 */
.tiance-fold-card > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tiance-fold-card > summary::-webkit-details-marker { display: none; }
.tiance-fold-card > summary::marker { content: ""; }
.tiance-fold-summary { user-select: none; }
.tiance-fold-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #88a6c5;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(54, 84, 119, 0.6);
  background: rgba(20, 39, 59, 0.55);
  white-space: nowrap;
  margin-left: auto;
}
.tiance-fold-indicator::after { content: "展开"; }
.tiance-fold-card[open] .tiance-fold-indicator::after { content: "收起"; }
.tiance-fold-card[open] > summary {
  border-bottom: 1px dashed rgba(54, 84, 119, 0.5);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.quality-filter-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #88a6c5;
  font-size: 12px;
  font-weight: 700;
}
.quality-filter-control select {
  min-width: 128px;
}
.tactical-table-wrap {
  max-height: calc(100vh - 350px);
}
.tactical-table {
  min-width: 1260px;
  table-layout: fixed;
}
.tactical-table th,
.tactical-table td {
  text-align: center;
  vertical-align: middle;
  /* M3-STRATEGY-11-UI-03-FIX: 不在 td 层面加 text-overflow:ellipsis,
     否则 display:inline-block 的 badge(综合评级/操作建议/质量/环境/板块)
     会被 cell 边界裁掉, 视觉上变成 "..两个小点" 残影。改为可见+裁切,
     保证 badge 完整渲染; 超长字段由上层 (col width / name 单独 white-space:nowrap) 控制。 */
  overflow: visible;
}
.tactical-table th.num,
.tactical-table td.tactical-num {
  text-align: center;
}
.tactical-table tbody tr:nth-child(even) td {
  background: rgba(20, 32, 47, 0.74);
}
.tactical-table tbody tr:hover td {
  background: rgba(45, 67, 93, 0.48);
}
.tactical-code-tag {
  display: inline-block;
  border-radius: 7px;
  padding: 3px 8px;
  border: 1px solid rgba(98, 166, 220, 0.62);
  background: rgba(30, 62, 92, 0.58);
  color: #b6ddff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.tactical-score-main {
  font-size: 13px;
  font-weight: 800;
  color: #f4fafc;
}
.tactical-score-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #90a9c3;
}
.tactical-pos-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tactical-pos-track {
  width: 78px;
  height: 8px;
  border-radius: 999px;
  background: rgba(65, 84, 104, 0.82);
  overflow: hidden;
}
.tactical-pos-fill {
  height: 100%;
  border-radius: 999px;
  background: #6eb8ff;
}
.tactical-pos-fill.high {
  background: linear-gradient(90deg, #3b82f6, #38bdf8);
}
.tactical-pos-fill.mid {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.tactical-pos-fill.low {
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
}
.tactical-pos-fill.zero {
  background: rgba(107, 128, 150, 0.6);
}
.tactical-pos-text {
  min-width: 46px;
  text-align: left;
  font-weight: 700;
  color: #dcecff;
  font-size: 12px;
}
.tactical-overview-card {
  border-color: rgba(67, 104, 144, 0.72);
}
.tactical-overview-conclusion {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(78, 110, 144, 0.58);
  background: rgba(11, 22, 35, 0.62);
  color: #d7e8f9;
  font-size: 13px;
  line-height: 1.55;
}
.tactical-overview-conclusion.pass {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(18, 55, 42, 0.42);
  color: #d7f8e8;
}
.tactical-overview-conclusion.warn {
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(72, 49, 15, 0.42);
  color: #ffe4b5;
}
.tactical-overview-conclusion.block {
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(78, 28, 31, 0.42);
  color: #ffd7dc;
}
.tactical-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tactical-overview-item {
  border: 1px solid rgba(56, 83, 112, 0.8);
  border-radius: 10px;
  background: rgba(13, 23, 35, 0.86);
  padding: 10px 12px;
  min-height: 86px;
}
.tactical-overview-item-label {
  font-size: 11px;
  color: #90a9c3;
  letter-spacing: .02em;
}
.tactical-overview-item-value {
  margin-top: 5px;
  font-size: 18px;
  font-weight: 800;
  color: #e6f2ff;
}
.tactical-overview-item-sub {
  margin-top: 5px;
  font-size: 11px;
  color: #8fa2b8;
  line-height: 1.45;
  word-break: break-word;
}
.tactical-overview-tags {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tactical-overview-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(80, 111, 142, 0.56);
  background: rgba(18, 31, 46, 0.68);
  color: #c9ddf0;
  font-size: 10px;
  line-height: 1.35;
}
.tactical-brief-text {
  max-width: 260px;
  color: #b9cfe5;
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}
.tactical-brief-text .main {
  color: #dcecfb;
  font-weight: 700;
}
.tactical-brief-text .sub {
  margin-top: 2px;
  color: #8fa2b8;
}

/* M3-STRATEGY-11-UI-05-FIX: 质感胶囊同款形态 + 状态分色
   — 保留 UI-04 的统一 .tiance-capsule 形态(圆角 / 内嵌高光 / 外发光 / hover 亮化),
     改为 CSS 变量驱动(--cap-bg / --cap-border / --cap-border-hover / --cap-glow / --cap-glow-hover / --cap-text),
     10 个状态分色修饰类决定视觉颜色。
   — 形态参考 "纳入评估" 按钮: 较深半透明背景 + 状态色边框 + 轻微渐变 + 浅色文字。
   — 状态分类:
     * 操作建议 6 档: 买入首仓=绿 / 动能加仓=青 / 持股待涨=琥珀 / 减仓止盈=橙 / 离场=红 / 观望=石板灰
     * 综合评级 9 类: 筑底反转=绿 / 右侧主升=青 / 高位加速=琥珀 / 低位筑底=蓝 / 突破临界=紫
                      / 高位震荡=石板 / 高位见顶=橙 / 阴跌不止=红 / 左侧超跌=玫瑰
     * L1市场 6 档: 强势环境=绿 / 可做环境=青 / 震荡环境=琥珀 / 弱势环境=橙 / 风险环境=红 / 数据异常=石板
     * L5板块 4 档: 强共振=绿 / 有共振=青 / 弱共振=琥珀 / 无共振=石板
     * 跟踪状态 4 档: 跟踪中=青 / 强势持有=绿 / 观察中=琥珀 / 历史待迁移=红 / 空=muted
   — 不使用 color-mix 避免兼容风险; 渐变两段使用 var() 与 fallback rgba 双轨。 */

/* M3-TACTICAL-OBSERVE-01: 天策看板 (KPI / 上升评级 / 底部入口) + 天策观察 (总览 / 9 词字典) 样式 */
/* 复用现有 --bg / --surface / --line / --text / --muted / --accent; 不引入新颜色变量. */

.tiance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 2px 8px 2px;
}
.tiance-kpi-item {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.55) 100%);
  border: 1px solid rgba(37, 52, 73, 0.85);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 64px;
}
.tiance-kpi-label {
  font-size: 10.5px;
  color: #8fa2b8;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.tiance-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: #d9e6f2;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tiance-kpi-sub {
  font-size: 10.5px;
  color: #8fa2b8;
  line-height: 1.3;
}

.tiance-rising-meta {
  font-size: 11px;
  color: #8fa2b8;
  padding: 4px 2px 10px 2px;
  border-bottom: 1px dashed rgba(37, 52, 73, 0.7);
  margin-bottom: 12px;
}
.tiance-rising-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.tiance-rising-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(37, 52, 73, 0.85);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 130px;
}
.tiance-rising-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tiance-rising-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #d9e6f2;
  line-height: 1.2;
}
.tiance-rising-card-code {
  font-size: 12px;
  color: #3da5ff;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.tiance-rising-card-code:hover {
  color: #60b6ff;
  text-decoration: underline;
}
.tiance-rising-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tiance-rising-card-meta {
  font-size: 11px;
  color: #8fa2b8;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tiance-rising-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 8px;
  font-size: 10.5px;
  color: #8fa2b8;
}
.tiance-rising-card-metrics .v {
  color: #d9e6f2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tiance-rising-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #8fa2b8;
}

.tiance-board-entry-card {
  padding: 14px 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.4) 100%);
  border: 1px dashed rgba(37, 52, 73, 0.9);
  border-radius: 8px;
}
.tiance-board-entry-line {
  font-size: 12px;
  color: #8fa2b8;
  margin-bottom: 8px;
}
.tiance-board-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #d9e6f2;
  background: linear-gradient(180deg, rgba(61, 165, 255, 0.18) 0%, rgba(61, 165, 255, 0.08) 100%);
  border: 1px solid rgba(61, 165, 255, 0.55);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 8px rgba(61, 165, 255, 0.15);
}
.tiance-board-entry-btn:hover {
  border-color: rgba(61, 165, 255, 0.95);
  filter: brightness(1.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 14px rgba(61, 165, 255, 0.34);
}
.tiance-board-entry-btn span#tiance-board-entry-count {
  color: #3da5ff;
  font-weight: 700;
}

/* ====== 六维作战总览右侧三摘要(2026-08-08 重构: 迁入 cockpit 第三列, 垂直等距堆叠) ====== */
.tiance-overview-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tiance-overview-command-card {
  border: 1px solid rgba(56, 83, 112, 0.78);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.5) 100%);
  padding: 10px 12px;
  min-height: 76px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tiance-overview-command-label {
  font-size: 11px;
  color: #8fa2b8;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.tiance-overview-command-value {
  font-size: 18px;
  font-weight: 700;
  color: #e6f2ff;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.tiance-overview-command-sub {
  font-size: 11px;
  color: #8fa2b8;
  line-height: 1.4;
  word-break: break-word;
}
/* 三摘要: 迁入 cockpit 后垂直等距堆叠 + 玻璃拟态, 与雷达/势能条高度对齐 */
.tiance-overview-command-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin-top: 0; /* 覆盖 .tiance-overview-command-grid 的 margin-top:12px, 保证三列顶部严格对齐 */
  padding: 12px 14px;
  border: 1px solid rgba(56, 83, 112, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11, 20, 32, 0.55) 0%, rgba(15, 23, 36, 0.35) 100%);
  backdrop-filter: blur(6px);
}
.tiance-overview-command-stack .tiance-overview-command-card {
  flex: 1 1 0;
  min-height: 84px;
  justify-content: space-between;
}
/* 市场环境: 30日评分平滑面积图 */
.tiance-market-chart {
  height: 92px;
  min-width: 0;
  margin: 0 -2px;
}
.tiance-market-chart .ec-tip { font-size: 11px; }
/* 市场环境: 微型指标(30D均值 / 较昨日) */
.tiance-market-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: #7d8fa6;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tiance-market-metrics b {
  font-weight: 600;
  color: #c9d9ec;
  font-variant-numeric: tabular-nums;
}
.tiance-market-metrics .m-delta-down b { color: #ff4d4f; }
.tiance-market-metrics .m-delta-up   b { color: #4ad295; }
/* 市场环境: 底部警示卡(左侧 Accent 竖线) */
.tiance-market-note {
  font-size: 12px;
  color: #b7c6d8;
  line-height: 1.5;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid #ff4d4f;
  padding: 6px 8px;
  border-radius: 4px;
}
/* 市场环境: 放大得分(霓虹发光) + 胶囊 Tag */
.tiance-market-score {
  display: inline-block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  margin: 0 3px;
  padding: 0 2px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.tiance-market-score--block   { color: #ff4d4f; box-shadow: 0 0 12px rgba(255, 77, 79, 0.3);  text-shadow: 0 0 10px rgba(255, 77, 79, 0.55); }
.tiance-market-score--caution { color: #ffa940; box-shadow: 0 0 12px rgba(255, 169, 64, 0.3);  text-shadow: 0 0 10px rgba(255, 169, 64, 0.5); }
.tiance-market-score--normal  { color: #4ad295; box-shadow: 0 0 12px rgba(74, 210, 149, 0.3);   text-shadow: 0 0 10px rgba(74, 210, 149, 0.45); }
.tiance-market-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.tiance-market-tag--block   { color: #ff4d4f; background: rgba(255, 77, 79, 0.2); }
.tiance-market-tag--caution { color: #ffa940; background: rgba(255, 169, 64, 0.18); }
.tiance-market-tag--observe { color: #d4a35a; background: rgba(212, 163, 90, 0.16); }
.tiance-market-tag--normal  { color: #4ad295; background: rgba(74, 210, 149, 0.16); }
/* 观察池漏斗: 高亮数据 + 微型进度条 */
.tiance-funnel-value-highlight { color: #66d9ff; font-weight: 800; }
.tiance-funnel-track {
  height: 5px;
  background: rgba(64, 92, 124, 0.25);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.tiance-funnel-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #2e7fd6, #66d9ff);
  box-shadow: 0 0 6px rgba(102, 217, 255, 0.5);
  transition: width 0.5s;
}
/* 势能分布: 彩色胶囊 Badge */
.tiance-exec-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.tiance-exec-badge {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.tiance-exec-badge--buy    { color: #4ad295; background: rgba(74, 210, 149, 0.14); border: 1px solid rgba(74, 210, 149, 0.4); }
.tiance-exec-badge--add    { color: #66d9ff; background: rgba(102, 217, 255, 0.12); border: 1px solid rgba(102, 217, 255, 0.4); }
.tiance-exec-badge--hold   { color: #b78bff; background: rgba(183, 139, 255, 0.12); border: 1px solid rgba(183, 139, 255, 0.4); }
.tiance-exec-badge--observe{ color: #d4a35a; background: rgba(212, 163, 90, 0.12); border: 1px solid rgba(212, 163, 90, 0.4); }
.tiance-exec-badge--reduce { color: #ff6b6b; background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4); }

/* 内嵌入口 (替代独立 tiance-board-entry-card) */
.tiance-board-entry-inline {
  margin-top: 12px;
  padding: 12px 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.35) 100%);
  border: 1px dashed rgba(37, 52, 73, 0.9);
  border-radius: 8px;
}

/* ====== M3-TACTICAL-BOARD-02/06: 四类趋势精选 4x4 矩阵 ====== */
.tiance-rising-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.tiance-rising-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(56, 83, 112, 0.7);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.4) 100%);
  padding: 8px 8px 10px 8px;
  min-height: 180px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
/* M3-TACTICAL-BOARD-06: 列头升级 — 增加高度/背景/边框/阶段编号胶囊 */
.tiance-rising-column-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 30px;
  padding: 6px 8px 8px 8px;
  border-bottom: 1px solid rgba(64, 92, 124, 0.55);
  margin-bottom: 4px;
  background:
    linear-gradient(180deg, rgba(36, 52, 78, 0.55) 0%, rgba(18, 28, 44, 0.0) 100%);
  border-radius: 6px 6px 0 0;
}
.tiance-rising-stage-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f6d37a;
  background:
    linear-gradient(160deg, rgba(74, 56, 28, 0.85) 0%, rgba(48, 36, 16, 0.85) 100%);
  border: 1px solid rgba(212, 163, 90, 0.55);
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-shadow: 0 0 4px rgba(255, 214, 107, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 220, 130, 0.12);
}
.tiance-rising-column-name {
  font-size: 13px;
  font-weight: 800;
  color: #eaf2fb;
  letter-spacing: 0.03em;
  text-shadow: 0 0 6px rgba(120, 180, 220, 0.18);
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tiance-rising-column-count {
  font-size: 10.5px;
  color: #8fa2b8;
  font-variant-numeric: tabular-nums;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(80, 111, 142, 0.5);
  background: rgba(18, 31, 46, 0.7);
  flex: 0 0 auto;
  margin-left: auto;
}
.tiance-rising-stock-mini {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(56, 83, 112, 0.8);
  border-radius: 8px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tiance-rising-stock-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.tiance-rising-stock-mini-name {
  font-size: 13px;
  font-weight: 600;
  color: #d9e6f2;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.tiance-rising-stock-mini-code {
  font-size: 10.5px;
  color: #3da5ff;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  line-height: 1.3;
}
.tiance-rising-stock-mini-code:hover {
  color: #60b6ff;
  text-decoration: underline;
}
/* M3-TACTICAL-BOARD-06: pan-dash 小卡内 .tiance-capsule 垂直居中, 避免文字偏上 */
#pan-dash .tiance-rising-stock-mini-badges .tiance-capsule,
#pan-dash .tiance-rising-stock-mini-metrics.compact .metric-chip {
  line-height: 1;
  min-height: 20px;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
}
.tiance-rising-stock-mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}
.tiance-rising-stock-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px 6px;
  font-size: 10px;
  color: #8fa2b8;
}
.tiance-rising-stock-mini-metrics .v {
  color: #d9e6f2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* M3-TACTICAL-BOARD-06: 底部说明文字不再横向省略, 允许 2-3 行自动换行 */
.tiance-rising-stock-mini-foot {
  font-size: 10px;
  color: #8fa2b8;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  display: block;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: none;
  margin-top: 1px;
}
.tiance-rising-column-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8fa2b8;
  font-size: 11px;
  line-height: 1.45;
  padding: 12px 6px;
  border: 1px dashed rgba(56, 83, 112, 0.6);
  border-radius: 8px;
  background: rgba(11, 22, 35, 0.45);
}

/* 响应式: 1180px 以下 2 列, 720px 以下 1 列 */
@media (max-width: 1180px) {
  .tiance-overview-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiance-rising-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tiance-overview-command-grid { grid-template-columns: 1fr; }
  .tiance-rising-matrix { grid-template-columns: 1fr; }
}

/* ====== M3-TACTICAL-BOARD-03: Cabinet 舱室化变量 + 高级化 ====== */
:root {
  --tiance-cabinet-bg: linear-gradient(160deg, rgba(18, 27, 42, 0.92) 0%, rgba(11, 20, 32, 0.88) 60%, rgba(15, 23, 36, 0.95) 100%);
  --tiance-cabinet-line: rgba(64, 92, 124, 0.78);
  --tiance-cabinet-line-soft: rgba(64, 92, 124, 0.55);
  --tiance-cabinet-brush: repeating-linear-gradient(115deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 2px, rgba(0,0,0,0) 2px, rgba(0,0,0,0) 5px);
  --tiance-tactical-green: #4ad295;
  --tiance-warning-soft: #d4a35a;
  --tiance-danger-soft: #d96b78;
}
/* Cabinet 化: pan-dash 内部三 section 高级化 (不影响其它 tab) */
#pan-dash .tactical-overview-card,
#pan-dash .tactical-brief-card,
#pan-dash .tiance-board-rising-card {
  border-radius: 16px;
  border: 1px solid var(--tiance-cabinet-line);
  background:
    var(--tiance-cabinet-brush),
    radial-gradient(120% 80% at 0% 0%, rgba(64, 110, 156, 0.18) 0%, rgba(0,0,0,0) 60%),
    radial-gradient(120% 80% at 100% 100%, rgba(74, 210, 149, 0.08) 0%, rgba(0,0,0,0) 60%),
    var(--tiance-cabinet-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.32);
  padding: 16px 18px 18px 18px;
  position: relative;
  overflow: hidden;
}
/* Cabinet 标题: 轻微东方 serif (仅 pan-dash) */
#pan-dash .module-title {
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", "PingFang SC", serif;
  letter-spacing: 0.04em;
}
/* Cabinet 之间间距 */
#pan-dash .tactical-layout > .dashboard-module { margin-bottom: 16px; }
#pan-dash .tactical-layout > .dashboard-module:last-child { margin-bottom: 0; }

/* ====== M3-TACTICAL-BOARD-04: 雷达驾驶舱三列布局 (雷达 / 六维势能 / 三摘要) ====== */
.tiance-battle-cockpit {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.15fr) minmax(320px, 0.9fr);
  gap: 16px;
  margin-top: 4px;
  align-items: stretch;
}
.tiance-battle-radar-wrap {
  position: relative;
  border: 1px solid var(--tiance-cabinet-line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11, 20, 32, 0.7) 0%, rgba(15, 23, 36, 0.5) 100%);
  padding: 12px 10px 10px 10px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.tiance-battle-radar {
  width: 100%;
  height: 340px;
}
/* 状态球改为左上角胶囊角标 (M3-TACTICAL-BOARD-05), 真正定位在主 .tiance-battle-core 定义 */
.tiance-battle-core {
  width: 78px;
  height: 34px;
  font-size: 12px;
  border-radius: 999px;
}

/* 作战结论独立成完整一行 (M3-TACTICAL-BOARD-04) */
#pan-dash .tactical-overview-conclusion {
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  margin-bottom: 14px;
}
/* 降低红色风险条压迫感: 边框/背景降饱和 */
#pan-dash .tactical-overview-conclusion.block,
#pan-dash .tactical-overview-conclusion.warn {
  background: rgba(64, 30, 38, 0.42);
  border-color: rgba(217, 107, 120, 0.42);
  box-shadow: none;
}
#pan-dash .tactical-overview-conclusion.pass {
  background: rgba(20, 50, 38, 0.4);
  border-color: rgba(74, 210, 149, 0.4);
  box-shadow: none;
}

/* 底部入口 (从天策看板顶部下沉到四类趋势精选之后, M3-TACTICAL-BOARD-04) */
.tiance-board-footer-entry {
  margin-top: 16px;
  padding: 14px 16px;
  text-align: center;
  border: 1px dashed rgba(64, 92, 124, 0.55);
  border-radius: 12px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(61, 165, 255, 0.04) 0%, rgba(0,0,0,0) 70%),
    rgba(11, 20, 32, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.tiance-board-footer-entry .tiance-board-entry-line {
  font-size: 11.5px;
  color: #8fa2b8;
  line-height: 1.5;
  letter-spacing: 0.02em;
  max-width: 720px;
}
.tiance-board-footer-entry .tiance-board-entry-btn {
  min-width: 200px;
}

/* 旧 #tactical-overview-grid 隐藏 (避免与新版三列重复展示, 保留 id 以兼容 JS) */
#pan-dash #tactical-overview-grid { display: none !important; }
.tiance-battle-core {
  position: absolute;
  top: 14px;
  left: 14px;
  transform: none;
  width: auto;
  min-width: 78px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #d9e6f2;
  background:
    linear-gradient(160deg, rgba(42, 58, 82, 0.92) 0%, rgba(26, 37, 53, 0.92) 100%);
  border: 1px solid rgba(120, 160, 200, 0.45);
  box-shadow:
    0 0 10px rgba(74, 210, 149, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tiance-battle-core.tone-active {
  border-color: rgba(74, 210, 149, 0.7);
  box-shadow:
    0 0 14px rgba(74, 210, 149, 0.22),
    inset 0 0 10px rgba(74, 210, 149, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: tiance-core-breathing 3.6s ease-in-out infinite;
}
.tiance-battle-core.tone-warning {
  border-color: rgba(212, 163, 90, 0.7);
  box-shadow:
    0 0 12px rgba(212, 163, 90, 0.20),
    inset 0 0 10px rgba(212, 163, 90, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: tiance-core-breathing 4.2s ease-in-out infinite;
}
.tiance-battle-core.tone-danger {
  border-color: rgba(217, 107, 120, 0.7);
  box-shadow:
    0 0 12px rgba(217, 107, 120, 0.20),
    inset 0 0 10px rgba(217, 107, 120, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: tiance-core-breathing 4.8s ease-in-out infinite;
}
.tiance-battle-core.tone-neutral {
  border-color: rgba(110, 142, 178, 0.55);
  box-shadow:
    0 0 10px rgba(110, 142, 178, 0.14),
    inset 0 0 8px rgba(110, 142, 178, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
@keyframes tiance-core-breathing {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50%      { transform: scale(1.03); filter: brightness(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .tiance-battle-core { animation: none !important; }
}
.tiance-battle-radar-fallback {
  width: 100%;
  text-align: center;
  color: #8fa2b8;
  font-size: 12px;
  padding: 40px 8px;
}

/* 极简图例 (右) */
.tiance-battle-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.tiance-power-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--tiance-cabinet-line-soft);
  border-radius: 10px;
  background: rgba(13, 22, 36, 0.45);
  min-width: 220px;
}
.tiance-power-bars-title {
  color: #8fa2b8;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
/* 2026-08-08 饱和布局: 内容上下均布、行内两段式(头+轨道), 消除方块内空白 */
.tiance-power-bars-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  justify-content: space-around;
}
.tiance-power-bar-row {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 2px;
  padding: 4px 0;
}
.tiance-power-bar-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 8px;
}
.tiance-power-bar-name {
  color: #9ab2cc;
  font-size: 11px;
  font-weight: 600;
}
.tiance-power-bar-grade {
  font-size: 11px;
  font-weight: 700;
}
.tiance-power-bar-score {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tiance-power-bar-track {
  height: 7px;
  background: rgba(64, 92, 124, 0.25);
  border-radius: 4px;
  overflow: hidden;
}
.tiance-power-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}
.tiance-power-bar-desc {
  color: #5f7186;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tiance-power-total {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(71, 85, 105, 0.3);
  color: #d9e6f2;
  font-size: 12px;
  font-weight: 600;
}
.tiance-power-total-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tiance-power-total-head > span:first-child {
  flex: 1;
}
.tiance-power-total-grade {
  font-size: 10px;
  border: 1px solid;
  border-radius: 999px;
  padding: 0 7px;
  line-height: 16px;
}
.tiance-power-total-track {
  height: 6px;
  background: rgba(64, 92, 124, 0.25);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 5px;
}
.tiance-power-total-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}

.tiance-radar-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--tiance-cabinet-line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11, 20, 32, 0.65) 0%, rgba(15, 23, 36, 0.45) 100%);
}
.tiance-radar-legend-head {
  font-size: 11px;
  color: #8fa2b8;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(64, 92, 124, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tiance-radar-legend-head .label {
  font-weight: 600;
  color: #c2d4e8;
}
.tiance-radar-legend-head .tone-pill {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(110, 142, 178, 0.5);
  background: rgba(18, 31, 46, 0.7);
  color: #c2d4e8;
}
.tiance-radar-legend-row {
  display: grid;
  grid-template-columns: 78px 1fr 38px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #c2d4e8;
}
.tiance-radar-legend-row .name {
  color: #d9e6f2;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tiance-radar-legend-row .bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(56, 83, 112, 0.55);
  overflow: hidden;
  position: relative;
}
.tiance-radar-legend-row .bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(74, 210, 149, 0.85) 0%, rgba(61, 165, 255, 0.85) 100%);
  box-shadow: 0 0 6px rgba(74, 210, 149, 0.35);
  transition: width 0.5s ease;
}
.tiance-radar-legend-row .value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #d9e6f2;
  font-weight: 700;
}
.tiance-radar-legend-row .desc {
  grid-column: 1 / -1;
  font-size: 10px;
  color: #6b7c91;
  padding-left: 78px;
}

/* 压缩原 tactical-overview-grid: 在 cockpit 下视觉降级 (但仍保留) */
.tiance-battle-summary .tactical-overview-grid { margin-top: 4px; }
.tiance-battle-summary .tactical-overview-grid { display: none; } /* 简化为右侧摘要即可, 详情见天策观察 */

/* ====== M3-TACTICAL-BOARD-03: 势能路径 (四类好股标题下流向) ====== */
.tiance-rising-energy-path {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 10px 10px;
  font-size: 11px;
  color: #9ab2cc;
  border-bottom: 1px dashed rgba(64, 92, 124, 0.55);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tiance-rising-energy-path .path-label {
  color: #6b7c91;
  margin-right: 4px;
  letter-spacing: 0.02em;
}
.tiance-rising-energy-path .path-step {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
border-radius: 999px;
  border: 1px solid rgba(74, 210, 149, 0.4);
  background: rgba(74, 210, 149, 0.08);
  color: #b8e2c9;
  font-weight: 600;
}
.tiance-rising-energy-path .path-arrow {
  color: rgba(74, 210, 149, 0.5);
  font-size: 12px;
  font-weight: 700;
}

/* ====== M3-TACTICAL-BOARD-03: 势能星级 (小卡) ====== */
.tiance-rising-stock-mini-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #6b7c91;
  margin-top: 1px;
}
/* M3-TACTICAL-BOARD-06: 势能星级统一改光亮黄金色, 不论 s6 < 50 也保留金色 */
.tiance-rising-stock-mini-stars {
  color: #f6d37a;
}
.tiance-rising-stock-mini-stars .label {
  color: #f6d37a;
}
.tiance-rising-stock-mini-stars .stars,
.tiance-rising-stock-mini-stars .stars-low {
  color: #ffd66b;
  font-size: 11px;
  letter-spacing: 1px;
  text-shadow:
    0 0 5px rgba(255, 214, 107, 0.45),
    0 0 10px rgba(255, 180, 70, 0.20);
}

/* 紧凑徽章: 六维 / 质量 / L5 一行 */
.tiance-rising-stock-mini-metrics.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  grid-template-columns: none;
  font-size: 10.5px;
}
/* M3-TACTICAL-BOARD-06: 紧凑 metric-chip 文字垂直居中, line-height 收紧 */
.tiance-rising-stock-mini-metrics.compact .metric-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 6px;
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(64, 92, 124, 0.5);
  background: rgba(18, 31, 46, 0.6);
  color: #9ab2cc;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}
.tiance-rising-stock-mini-metrics.compact .metric-chip .v {
  color: #d9e6f2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* 卡片 hover 微亮 + 1px 上浮 */
#pan-dash .tiance-rising-stock-mini,
#pan-dash .tactical-hero-card {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
#pan-dash .tiance-rising-stock-mini:hover {
  border-color: rgba(74, 210, 149, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 14px rgba(74, 210, 149, 0.18);
  transform: translateY(-1px);
}
#pan-dash .tactical-hero-card:hover {
  border-color: rgba(74, 210, 149, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 14px rgba(74, 210, 149, 0.18);
  transform: translateY(-1px);
}

/* ====== M3-TACTICAL-BOARD-03: 精致空态 (三类核心操作 + 四类好股) ====== */
.tiance-cabinet-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 14px;
  border: 1px dashed rgba(64, 92, 124, 0.65);
  border-radius: 12px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(74, 210, 149, 0.06) 0%, rgba(0,0,0,0) 70%),
    rgba(11, 20, 32, 0.55);
  color: #8fa2b8;
  gap: 6px;
}
.tiance-cabinet-empty .empty-title {
  font-size: 13px;
  font-weight: 700;
  color: #c2d4e8;
  letter-spacing: 0.04em;
}
.tiance-cabinet-empty .empty-main {
  font-size: 11.5px;
  color: #9ab2cc;
  line-height: 1.4;
}
.tiance-cabinet-empty .empty-sub {
  font-size: 10.5px;
  color: #6b7c91;
  line-height: 1.4;
  font-style: italic;
}

/* ====== M3-TACTICAL-SEMANTIC-04-FIX: 弱共振观察折叠区 ====== */
.tiance-weak-sector-fold {
  margin-top: 8px;
  border: 1px dashed rgba(108, 132, 162, 0.55);
  border-radius: 8px;
  background: rgba(11, 20, 32, 0.42);
  padding: 6px 10px;
  color: #8fa2b8;
}
.tiance-weak-sector-fold > .tiance-weak-sector-summary {
  cursor: pointer;
  font-size: 10.5px;
  color: #9ab2cc;
  letter-spacing: 0.04em;
  list-style: none;
  user-select: none;
  padding: 2px 0;
}
.tiance-weak-sector-fold > .tiance-weak-sector-summary::-webkit-details-marker {
  display: none;
}
.tiance-weak-sector-fold > .tiance-weak-sector-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  color: #6da3d4;
  transition: transform 0.15s ease;
}
.tiance-weak-sector-fold[open] > .tiance-weak-sector-summary::before {
  transform: rotate(90deg);
}
.tiance-weak-sector-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(64, 92, 124, 0.4);
}
.tiance-weak-sector-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 10.5px;
  line-height: 1.45;
  color: #8fa2b8;
}
.tiance-weak-sector-code {
  font-weight: 600;
  color: #9ab2cc;
  cursor: pointer;
  flex-shrink: 0;
}
.tiance-weak-sector-code:hover {
  color: #6da3d4;
}
.tiance-weak-sector-meta {
  color: #6b7c91;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tiance-weak-sector-more {
  font-size: 9.5px;
  color: #6b7c91;
  font-style: italic;
  margin-top: 4px;
}

/* ====== M3-TACTICAL-SEMANTIC-07-FIX: fallback 灰底徽标 + 低强度 hint ====== */
.tiance-weak-sector-badge {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tiance-weak-sector-badge--fallback {
  border: 1px solid rgba(125, 139, 154, 0.35);
  background: rgba(84, 96, 112, 0.22);
  color: #a2adba;
}
.tiance-weak-sector-hint {
  flex: 0 0 auto;
  font-size: 9.5px;
  color: #6b7c91;
  white-space: nowrap;
}

/* 三类核心操作空态: 直接覆盖 tactical-hero-empty */
#pan-dash .tactical-hero-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px 14px;
  border: 1px dashed rgba(64, 92, 124, 0.65);
  border-radius: 10px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(74, 210, 149, 0.06) 0%, rgba(0,0,0,0) 70%),
    rgba(11, 20, 32, 0.4);
  color: #8fa2b8;
  font-size: 12px;
  line-height: 1.5;
  gap: 4px;
  min-height: 130px;
}
#pan-dash .tactical-hero-empty .empty-title {
  font-size: 12px;
  font-weight: 700;
  color: #c2d4e8;
}
#pan-dash .tactical-hero-empty .empty-sub {
  font-size: 10.5px;
  color: #6b7c91;
  font-style: italic;
}

/* 三类核心操作: 股票代码字号弱化, 名称加粗 */
#pan-dash .tactical-hero-code {
  font-size: 22px;
  font-weight: 800;
  color: #e8f4ff;
  line-height: 1.2;
}
#pan-dash .tactical-hero-name {
  font-size: 11px;
  font-weight: 500;
  color: #6b7c91;
  margin-top: 2px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* 响应式: 1280px / 900px / 1180px / 720px 适配 cockpit (M3-TACTICAL-BOARD-04 升级, 2026-08-08 重构) */
@media (max-width: 1280px) {
  .tiance-battle-cockpit { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .tiance-battle-cockpit > .tiance-overview-command-grid.tiance-overview-command-stack { grid-column: 1 / -1; }
  .tiance-battle-cockpit > .tiance-overview-command-grid.tiance-overview-command-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiance-battle-radar-wrap { min-height: 320px; }
  .tiance-battle-radar { height: 300px; }
}
@media (max-width: 900px) {
  .tiance-battle-cockpit { grid-template-columns: 1fr; }
  .tiance-overview-command-grid.tiance-overview-command-stack { grid-template-columns: 1fr; }
  .tiance-battle-radar-wrap { min-height: 300px; }
  .tiance-battle-radar { height: 280px; }
}@media (max-width: 1180px) {
  .tiance-battle-cockpit { grid-template-columns: 1fr; }
  .tiance-battle-radar-wrap { min-height: 280px; }
  .tiance-battle-radar { height: 260px; }
}
@media (max-width: 720px) {
  .tiance-battle-cockpit { grid-template-columns: 1fr; gap: 12px; }
  .tiance-battle-radar-wrap { min-height: 240px; }
  .tiance-battle-radar { height: 220px; }
  .tiance-radar-legend-row { grid-template-columns: 68px 1fr 32px; }
  .tiance-board-footer-entry { margin-top: 12px; padding: 12px 12px; }
  .tiance-board-footer-entry .tiance-board-entry-btn { min-width: 0; width: 100%; }
}

.tiance-observe-overview-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.6) 100%);
}
.tiance-observe-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 2px 10px 2px;
}
.tiance-observe-overview-item {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(37, 52, 73, 0.7);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tiance-observe-overview-label {
  font-size: 10.5px;
  color: #8fa2b8;
}
.tiance-observe-overview-value {
  font-size: 16px;
  color: #d9e6f2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tiance-observe-overview-sub {
  font-size: 10.5px;
  color: #8fa2b8;
}
.tiance-observe-overview-note {
  font-size: 12px;
  color: #8fa2b8;
  padding: 8px 10px;
  border-left: 2px solid rgba(61, 165, 255, 0.5);
  background: rgba(15, 23, 42, 0.4);
  border-radius: 0 4px 4px 0;
  line-height: 1.55;
}

.tiance-rating-dict-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.6) 100%);
}
.tiance-rating-dict-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 0 8px 0;
}
.tiance-rating-dict-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(37, 52, 73, 0.7);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tiance-rating-dict-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tiance-rating-dict-item-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.5;
}
.tiance-rating-dict-item-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tiance-rating-dict-footer {
  font-size: 11px;
  color: #8fa2b8;
  padding: 6px 2px 0 2px;
  border-top: 1px dashed rgba(37, 52, 73, 0.7);
  margin-top: 6px;
  line-height: 1.5;
}
.tiance-rating-dict-footer code {
  font-size: 10.5px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(37, 52, 73, 0.6);
  border-radius: 3px;
  padding: 1px 5px;
  color: #cbd5e1;
}

@media (max-width: 1180px) {
  .tiance-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiance-rising-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiance-observe-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiance-rating-dict-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tiance-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiance-rising-matrix { grid-template-columns: 1fr; }
  .tiance-observe-overview-grid { grid-template-columns: 1fr; }
  .tiance-rating-dict-grid { grid-template-columns: 1fr; }
}

.tiance-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--cap-border, rgba(148, 163, 184, 0.52));
  background:
    linear-gradient(180deg, var(--cap-bg, rgba(51, 65, 85, 0.82)) 0%, rgba(15, 23, 42, 0.78) 100%);
  color: var(--cap-text, #f8fafc);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.20),
    0 0 8px var(--cap-glow, rgba(148, 163, 184, 0.16));
  cursor: help;
  transition: border-color .16s ease, filter .16s ease, box-shadow .16s ease, background .16s ease;
}
.tiance-capsule:hover {
  border-color: var(--cap-border-hover, rgba(255, 255, 255, 0.72));
  filter: brightness(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 12px var(--cap-glow-hover, rgba(148, 163, 184, 0.26));
}
.tiance-capsule > * { color: inherit; }

/* 10 个状态分色修饰类 — 仅注入 CSS 变量, 形态完全共享 */
.tiance-capsule--green {
  --cap-bg: rgba(16, 95, 65, 0.82);
  --cap-border: rgba(52, 211, 153, 0.62);
  --cap-border-hover: rgba(110, 231, 183, 0.95);
  --cap-glow: rgba(52, 211, 153, 0.18);
  --cap-glow-hover: rgba(52, 211, 153, 0.34);
  --cap-text: #ecfdf5;
}
.tiance-capsule--cyan {
  --cap-bg: rgba(12, 89, 106, 0.82);
  --cap-border: rgba(34, 211, 238, 0.62);
  --cap-border-hover: rgba(103, 232, 249, 0.95);
  --cap-glow: rgba(34, 211, 238, 0.18);
  --cap-glow-hover: rgba(34, 211, 238, 0.34);
  --cap-text: #ecfeff;
}
.tiance-capsule--blue {
  --cap-bg: rgba(30, 64, 120, 0.82);
  --cap-border: rgba(96, 165, 250, 0.62);
  --cap-border-hover: rgba(147, 197, 253, 0.95);
  --cap-glow: rgba(96, 165, 250, 0.18);
  --cap-glow-hover: rgba(96, 165, 250, 0.34);
  --cap-text: #eff6ff;
}
.tiance-capsule--purple {
  --cap-bg: rgba(88, 52, 139, 0.82);
  --cap-border: rgba(167, 139, 250, 0.62);
  --cap-border-hover: rgba(196, 181, 253, 0.95);
  --cap-glow: rgba(167, 139, 250, 0.18);
  --cap-glow-hover: rgba(167, 139, 250, 0.34);
  --cap-text: #f5f3ff;
}
.tiance-capsule--amber {
  --cap-bg: rgba(120, 82, 8, 0.82);
  --cap-border: rgba(251, 191, 36, 0.62);
  --cap-border-hover: rgba(253, 224, 71, 0.95);
  --cap-glow: rgba(251, 191, 36, 0.18);
  --cap-glow-hover: rgba(251, 191, 36, 0.34);
  --cap-text: #fffbeb;
}
.tiance-capsule--orange {
  --cap-bg: rgba(124, 68, 20, 0.82);
  --cap-border: rgba(251, 146, 60, 0.62);
  --cap-border-hover: rgba(253, 186, 116, 0.95);
  --cap-glow: rgba(251, 146, 60, 0.18);
  --cap-glow-hover: rgba(251, 146, 60, 0.34);
  --cap-text: #fff7ed;
}
.tiance-capsule--red {
  --cap-bg: rgba(127, 29, 29, 0.82);
  --cap-border: rgba(248, 113, 113, 0.62);
  --cap-border-hover: rgba(252, 165, 165, 0.95);
  --cap-glow: rgba(248, 113, 113, 0.18);
  --cap-glow-hover: rgba(248, 113, 113, 0.34);
  --cap-text: #fef2f2;
}
.tiance-capsule--rose {
  --cap-bg: rgba(136, 19, 55, 0.82);
  --cap-border: rgba(251, 113, 133, 0.62);
  --cap-border-hover: rgba(253, 164, 175, 0.95);
  --cap-glow: rgba(251, 113, 133, 0.18);
  --cap-glow-hover: rgba(251, 113, 133, 0.34);
  --cap-text: #fff1f2;
}
.tiance-capsule--slate {
  --cap-bg: rgba(51, 65, 85, 0.82);
  --cap-border: rgba(148, 163, 184, 0.58);
  --cap-border-hover: rgba(203, 213, 225, 0.90);
  --cap-glow: rgba(148, 163, 184, 0.14);
  --cap-glow-hover: rgba(148, 163, 184, 0.26);
  --cap-text: #f8fafc;
}
.tiance-capsule--muted {
  --cap-bg: rgba(51, 65, 85, 0.58);
  --cap-border: rgba(100, 116, 139, 0.42);
  --cap-border-hover: rgba(148, 163, 184, 0.70);
  --cap-glow: rgba(100, 116, 139, 0.10);
  --cap-glow-hover: rgba(100, 116, 139, 0.18);
  --cap-text: #cbd5e1;
}

.tactical-info-row td {
  padding: 0 18px 12px 18px;
  border-top: none;
  background: rgba(8, 16, 26, 0.54);
}
.tactical-info-box {
  /* M3-STRATEGY-11-UI-03-FIX: 改为单行 + 左对齐, 横向滚动条兜底, 不再换行成两行。 */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 6px 12px;
  border: 1px solid rgba(56, 83, 112, 0.58);
  border-radius: 10px;
  background: rgba(11, 22, 35, 0.66);
  color: #b9cfe5;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  word-break: normal;
}
.tactical-info-box .tactical-info-label {
  flex: 0 0 auto;
}
.tactical-info-box .tactical-info-content {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}
.tactical-info-label {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(110, 184, 255, 0.45);
  background: rgba(30, 62, 92, 0.36);
  color: #dcecfb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.tactical-info-content {
  flex: 1 1 auto;
  min-width: 0;
}
.tactical-info-content .main {
  color: #dcecfb;
  font-weight: 700;
}
.tactical-info-content .sub {
  margin-top: 3px;
  color: #8fa2b8;
}
.tactical-info-content .tactical-brief-text {
  max-width: none;
  width: 100%;
}
.tactical-info-content .tactical-brief-text .main,
.tactical-info-content .tactical-brief-text .sub {
  max-width: none;
  white-space: normal;
  word-break: break-word;
}
.tactical-guide-card {
  border: 1px solid rgba(88, 114, 148, 0.34);
  background: linear-gradient(180deg, rgba(12, 25, 39, 0.92), rgba(8, 16, 26, 0.92));
}
.tactical-guide-lead {
  margin: 8px 0 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(99, 179, 237, 0.22);
  background: rgba(15, 31, 48, 0.76);
  color: #c8d8e8;
  font-size: 13px;
  line-height: 1.65;
}
.tactical-guide-lead strong {
  color: #e6f1ff;
}
.tactical-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tactical-guide-item {
  border: 1px solid rgba(68, 93, 123, 0.48);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(10, 21, 34, 0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.tactical-guide-title {
  color: #dcecfb;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}
.tactical-guide-subtitle {
  margin-top: 3px;
  color: #7dd3fc;
  font-size: 12px;
}
.tactical-guide-row {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.55;
}
.tactical-guide-label {
  display: inline-block;
  min-width: 58px;
  color: #8fa2b8;
  font-weight: 700;
}
.tactical-guide-value {
  color: #cbdcec;
}
.tactical-guide-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.18);
  color: #f6d98f;
  font-size: 12px;
  line-height: 1.55;
}
.tactical-guide-footer {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #8fa2b8;
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 1180px) {
  .tactical-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .tactical-guide-grid {
    grid-template-columns: 1fr;
  }
}
.tactical-table-wrap table.tactical-table {
  min-width: 1480px;
}
@media (max-width: 1280px) {
  .tactical-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tactical-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .tactical-overview-grid { grid-template-columns: 1fr; }
}

.tactical-table .watch-btn {
  margin: 0 auto;
}

.score-breakdown-main {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.score-breakdown-sub {
  margin-top: 3px;
  font-size: 11px;
  color: #8fa2b8;
  line-height: 1.25;
}
.select-result-tag {
  font-size: 12px;
  font-weight: 700;
  color: #9fb3ca;
}
.select-result-tag.fail {
  color: #f0b45b;
}
.select-result-tag.pass {
  color: #34d399;
}

.tracking-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.tracking-toolbar .action-btn,
.tracking-toolbar input,
.tracking-toolbar select {
  width: 100%;
}
.tracking-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.tracking-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.tracking-kpi-card {
  border: 1px solid rgba(56, 83, 112, 0.8);
  border-radius: 10px;
  background: rgba(13, 23, 35, 0.86);
  padding: 10px 12px;
}
.tracking-kpi-label {
  font-size: 12px;
  color: #90a9c3;
}
.tracking-kpi-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  color: #e6f2ff;
}
.tracking-summary {
  color: #9ab0c8;
  font-size: 13px;
  margin-bottom: 8px;
}
#pan-review .review-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
#pan-review .review-toolbar .action-btn,
#pan-review .review-toolbar input,
#pan-review .review-toolbar select {
  width: 100%;
}
#pan-review .review-summary {
  color: #9ab0c8;
  font-size: 13px;
  margin-bottom: 8px;
}
#pan-review .review-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr);
  gap: 12px;
  align-items: start;
}
#pan-review .review-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}
#pan-review .review-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
#pan-review .review-kpi-card {
  border: 1px solid rgba(56, 83, 112, 0.8);
  border-radius: 10px;
  background: rgba(13, 23, 35, 0.86);
  padding: 10px 12px;
}
#pan-review .review-kpi-label {
  font-size: 12px;
  color: #90a9c3;
}
#pan-review .review-kpi-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  color: #e6f2ff;
}
#pan-review .review-main .table-wrap table {
  min-width: 920px;
}
#pan-review .review-sidebar {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}
#pan-review .review-form {
  display: grid;
  gap: 10px;
}
#pan-review .review-form textarea,
#pan-review .review-form input,
#pan-review .review-form select {
  width: 100%;
}
#pan-review .review-form textarea {
  min-height: 82px;
  border-radius: 10px;
  border: 1px solid #325173;
  background: #0f1c2b;
  color: #e6f1fd;
  padding: 8px 10px;
  font-size: 13px;
}
#pan-review .review-prompt-box {
  min-height: 180px;
  white-space: pre-wrap;
  line-height: 1.5;
  color: #d7e8f9;
}
@media (max-width: 1200px) {
  #pan-review .review-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #pan-review .review-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #pan-review .review-layout {
    grid-template-columns: 1fr;
  }
  #pan-review .review-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
@media (max-width: 1180px) {
  .tracking-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tracking-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


  /* BUY-FIRST-TAB-OPTIMIZATION-IMPLEMENT-01: 受控上下文三区样式(沿用现有卡/胶囊/字色体系) */
  #first-buy-admission-overview,
  #first-buy-admission-funnel,
  #first-buy-admission-rows {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #e2e8f0;
  }
  #first-buy-admission-overview .fb-admission-title,
  #first-buy-admission-funnel .fb-admission-title,
  #first-buy-admission-rows .fb-admission-title {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  #first-buy-admission-overview .fb-admission-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }
  #first-buy-admission-funnel .fb-funnel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }
  #first-buy-admission-overview .fb-admission-cell,
  #first-buy-admission-funnel .fb-funnel-cell {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 6px;
    padding: 8px;
  }
  #first-buy-admission-overview .fb-admission-cell .fb-cell-label,
  #first-buy-admission-funnel .fb-funnel-cell .fb-cell-label {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 4px;
  }
  #first-buy-admission-overview .fb-admission-cell .fb-cell-value,
  #first-buy-admission-funnel .fb-funnel-cell .fb-cell-value {
    font-size: 15px;
    font-weight: 600;
    color: #f1f5f9;
  }
  #first-buy-admission-overview .fb-display-state {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 6px;
  }
  #first-buy-admission-overview .fb-display-state.audited {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
  }
  #first-buy-admission-overview .fb-display-state.unaudited,
  #first-buy-admission-overview .fb-display-state.stale,
  #first-buy-admission-overview .fb-display-state.data_not_ready {
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.25);
    color: #cbd5e1;
  }
  #first-buy-admission-overview .fb-disclaimer {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 6px;
    font-size: 11px;
    color: #fbbf24;
  }
  #first-buy-admission-funnel .fb-intent-bar {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
  }
  #first-buy-admission-funnel .fb-intent-pill {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.25);
  }
  #first-buy-admission-funnel .fb-blocker-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  #first-buy-admission-funnel .fb-blocker-item {
    font-size: 11px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 6px;
    padding: 6px 10px;
  }
  #first-buy-admission-funnel .fb-blocker-item .fb-blocker-count {
    color: #f87171;
    font-weight: 600;
    margin-right: 6px;
  }
  #first-buy-admission-rows .fb-rows-empty {
    font-size: 12px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.5);
    border: 1px dashed rgba(100, 116, 139, 0.3);
    border-radius: 6px;
    padding: 14px;
    line-height: 1.7;
  }
  #first-buy-admission-rows .fb-rows-empty strong {
    color: #cbd5e1;
  }


/* ===== D3 mobile/experience polish ===== */
@media (max-width: 760px) {
  .title { font-size: 18px; }
  .subtitle { font-size: 11px; line-height: 1.5; }
  .tab { padding: 9px 16px; font-size: 13px; min-height: 38px; }
  .command-center { padding: 10px; }
  .command-title { font-size: 14px; }
  .regime-traffic-lights { flex-wrap: wrap; row-gap: 6px; }
  .regime-pill { font-size: 11px; padding: 3px 8px; }
}
@media (max-width: 520px) {
  .header { padding: 12px 12px; }
  .tabs { padding: 10px 12px; }
  .logout-btn { padding: 8px 12px; }
  .table-wrap { max-height: calc(100vh - 220px); }
  .refresh-btn, .action-btn { min-height: 36px; }
  input, select { font-size: 16px; }
  #pan-table .pagination { flex-wrap: wrap; justify-content: center; }
}
@media (min-width: 1440px) {
  .app-shell { max-width: 1760px; }
}

/* ===== D6: 手动回测折叠区（并入标准回测 Tab） ===== */
.backtest-lab-details {
  margin: 16px 4px 4px;
  border: 1px dashed rgba(96, 165, 250, 0.35);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
}
.backtest-lab-details > summary.backtest-lab-summary {
  cursor: pointer;
  padding: 12px 16px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  list-style: none;
}
.backtest-lab-details > summary.backtest-lab-summary::-webkit-details-marker { display: none; }
.backtest-lab-details > summary.backtest-lab-summary::before {
  content: '▸ ';
  transition: transform .2s;
}
.backtest-lab-details[open] > summary.backtest-lab-summary::before { content: '▾ '; }
.backtest-lab-details[open] { border-style: solid; background: rgba(15, 23, 42, 0.55); }

/* ===== D9: SOP 行情观察 Tab（重构排版 D9.2 + 布局坍塌修复 D9.3） ===== */
.sop-shell { display: grid; gap: 16px; width: 100%; min-width: 0; box-sizing: border-box; }
#pan-sop { width: 100%; min-width: 0; box-sizing: border-box; }
#sop-content { width: 100%; min-width: 0; box-sizing: border-box; display: grid; gap: 16px; }

/* Header：标题 + 状态 + 控件一行 */
.sop-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border: 1px solid rgba(61,104,148,.28); border-radius: 12px;
  background: rgba(15,23,42,.55); backdrop-filter: blur(8px);
  width: 100%; min-width: 0; box-sizing: border-box;
}
.sop-header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.sop-title { font-size: 17px; font-weight: 800; color: #dff0ff; letter-spacing: .3px; }
.sop-session-badge {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(61,165,255,.12); border: 1px solid rgba(61,165,255,.4); color: #93c5fd;
}
.sop-session-badge[data-stage="CLOSED"] { background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.4); color: #94a3b8; }
.sop-session-badge[data-stage="SESSION"] { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.4); color: #6ee7b7; }
.sop-fetched { font-size: 12px; color: #8fa2b8; }
.sop-cache-tag { font-size: 11px; color: #64748b; }
.sop-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 持仓编辑（紧凑） */
.sop-holding-editor { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid rgba(61,104,148,.25); border-radius: 10px; background: rgba(13,21,31,.6); }
.sop-holding-label { font-size: 11px; color: #8fa2b8; white-space: nowrap; }
.sop-holding-input {
  width: 210px; background: rgba(13,21,31,.9); border: 1px solid rgba(80,102,128,.5); border-radius: 7px;
  color: #dff0ff; padding: 5px 10px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.sop-holding-input:focus { border-color: var(--accent); outline: none; }
.sop-mini-btn {
  background: #203044; color: #cfe6ff; border: 1px solid #335172; border-radius: 7px;
  padding: 5px 12px; font-size: 12px; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.sop-mini-btn:hover { border-color: var(--accent); }
.sop-mini-btn:disabled { opacity: .55; cursor: not-allowed; }
.sop-interval-select {
  background: #203044; color: #cfe6ff; border: 1px solid #335172; border-radius: 7px;
  padding: 5px 8px; font-size: 12px; cursor: pointer;
}
.sop-refresh-btn { font-weight: 600; }

/* 通用模块卡片：暗色玻璃拟态 */
.sop-module {
  border: 1px solid rgba(48,66,88,.75); border-radius: 12px; background: rgba(15,23,34,.85);
  box-shadow: 0 4px 18px rgba(0,0,0,.28); padding: 16px;
  width: 100%; min-width: 0; box-sizing: border-box;
}
.sop-module-title { font-size: 13px; font-weight: 700; color: #93c5fd; margin-bottom: 12px; letter-spacing: .4px; display: flex; align-items: baseline; gap: 8px; }
.sop-module-note { font-size: 11px; font-weight: 400; color: #64748b; }
.sop-sub-title { font-size: 12px; font-weight: 600; color: #cfe6ff; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.sop-sub-title-spaced { margin-top: 14px; }

/* 涨跌配色（A股习惯） */
.sop-up { color: #FF4D4F; }
.sop-down { color: #52C41A; }
.sop-warn { color: #f4b942; }
.sop-neutral { color: #94a3b8; }
.sop-dim { color: #64748b; font-size: 11px; }

/* 等宽数字 */
.mono, .sop-env-price, .sop-hold-price, .sop-kpi-value, .sop-ind-table td, .sop-td-chg, .sop-hold-stop b, .sop-tag b {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
}

/* 0) 决策 Banner */
.sop-decision-banner { border-radius: 12px; overflow: hidden; border: 1px solid; width: 100%; min-width: 0; box-sizing: border-box; }
.sop-banner-off { background: linear-gradient(135deg, rgba(120,20,22,.55), rgba(60,10,12,.75)); border-color: rgba(255,77,79,.45); }
.sop-banner-on { background: linear-gradient(135deg, rgba(18,90,55,.5), rgba(10,50,32,.75)); border-color: rgba(82,196,26,.45); }
.sop-banner-main { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; flex-wrap: wrap; width: 100%; min-width: 0; box-sizing: border-box; }
.sop-banner-icon { font-size: 30px; line-height: 1; }
.sop-banner-text { min-width: 210px; }
.sop-banner-title { font-size: 26px; font-weight: 900; letter-spacing: .5px; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sop-banner-sub { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 4px; }
.sop-banner-lines { flex: 1; min-width: 240px; }
.sop-banner-lines-title { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.7); margin-bottom: 6px; letter-spacing: .5px; }
.sop-watch-list { margin: 0; padding-left: 18px; color: rgba(255,255,255,.85); font-size: 12px; line-height: 1.9; }
.sop-banner-risk { min-width: 200px; }
.sop-banner-risk .sop-tag { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); color: #fff; }

/* 1) 环境雷达 4 列 */
.sop-env-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; }
.sop-env-card {
  border: 1px solid rgba(48,66,88,.8); border-radius: 10px; padding: 14px;
  background: linear-gradient(160deg, rgba(20,31,46,.9), rgba(13,20,31,.92));
  transition: border-color .2s; min-width: 0; width: 100%; box-sizing: border-box;
}
.sop-env-card:hover { border-color: rgba(76,142,205,.5); }
.sop-env-name { font-size: 13px; font-weight: 700; color: #dff0ff; margin-bottom: 8px; }
.sop-env-price { font-size: 26px; font-weight: 800; line-height: 1.1; }
.sop-env-chg { font-size: 13px; font-weight: 700; margin: 4px 0 10px; }
.sop-env-tag { font-size: 10px; font-weight: 500; color: #64748b; margin-left: 4px; }
.sop-env-inds { border-top: 1px dashed rgba(61,84,110,.4); padding-top: 8px; display: grid; gap: 4px; }
.sop-env-ind-line { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.sop-ind-key { color: #64748b; min-width: 30px; }
.sop-ind-val { font-weight: 600; }
.sop-env-gap { color: #f87171; font-size: 12px; padding: 8px 0; }

/* 2) 第二排左右分栏（minmax(0,1fr) 防内容撑破轨道） */
.sop-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; width: 100%; }
.sop-row-2 > * { min-width: 0; width: 100%; }

/* 情绪 KPI */
.sop-kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; width: 100%; }
.sop-kpi-card { border: 1px solid rgba(48,66,88,.8); border-radius: 10px; padding: 10px; background: rgba(17,28,41,.8); text-align: center; min-width: 0; width: 100%; box-sizing: border-box; }
.sop-kpi-label { font-size: 11px; color: #8fa2b8; margin-bottom: 6px; }
.sop-kpi-value { font-size: 22px; font-weight: 800; }
.sop-kpi-text { font-size: 12px; color: #dff0ff; line-height: 1.5; }
.sop-kpi-regime { grid-column: span 1; }

/* 胶囊标签 + 数字 Badge（强制横向流式排列） */
.sop-tag-wrap { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; min-width: 0; }
.sop-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: rgba(61,165,255,.1); border: 1px solid rgba(61,165,255,.35); color: #93c5fd;
  white-space: nowrap; flex: 0 0 auto; max-width: 100%;
}
.sop-tag b.sop-tag-badge {
  background: rgba(61,165,255,.25); border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 700;
  flex: 0 0 auto;
}
.sop-tag-hot { background: rgba(244,185,66,.1); border-color: rgba(244,185,66,.4); color: #fde68a; }
.sop-zt-list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; min-width: 0; }
.sop-zt-item {
  padding: 3px 9px; border-radius: 6px; font-size: 12px; cursor: default;
  background: rgba(52,211,153,.08); border: 1px solid rgba(52,211,153,.3); color: #a7f3d0;
  white-space: nowrap; flex: 0 0 auto; max-width: 100%;
}

/* 行业表格 */
.sop-ind-width { font-size: 12px; color: #9ab0c8; margin-bottom: 10px; }
.sop-ind-table-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; min-width: 0; }
.sop-ind-table { width: 100%; border-collapse: collapse; table-layout: auto; min-width: 0; }
.sop-ind-table thead th {
  text-align: left; font-size: 11px; color: #64748b; font-weight: 600;
  padding: 6px 8px; border-bottom: 1px solid rgba(61,84,110,.45); white-space: nowrap;
}
.sop-ind-table tbody td { padding: 6px 8px; font-size: 12px; border-bottom: 1px solid rgba(61,84,110,.22); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.sop-td-name { color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; }
.sop-td-chg { font-weight: 700; text-align: right; }
.sop-td-breadth { color: #64748b; text-align: right; }
.sop-ind-table tbody tr:hover td { background: rgba(39,56,78,.3); }

/* 3) 持仓卡片阵列 */
.sop-hold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; width: 100%; min-width: 0; }
.sop-hold-card {
  border: 1px solid rgba(48,66,88,.8); border-radius: 10px; padding: 14px;
  background: linear-gradient(160deg, rgba(20,31,46,.9), rgba(13,20,31,.92));
  transition: border-color .2s, transform .2s; min-width: 0; width: 100%; box-sizing: border-box;
}
.sop-hold-card:hover { border-color: rgba(76,142,205,.5); transform: translateY(-1px); }
.sop-hold-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.sop-hold-name { font-size: 14px; font-weight: 700; color: #dff0ff; }
.sop-hold-code { font-size: 11px; color: #64748b; font-weight: 400; margin-left: 6px; }
.sop-hold-chg { font-size: 13px; font-weight: 700; }
.sop-hold-price { font-size: 28px; font-weight: 800; line-height: 1.15; }
.sop-hold-mas { font-size: 11px; color: #9ab0c8; line-height: 1.8; margin: 6px 0; }
.sop-hold-meta { font-size: 11px; color: #8fa2b8; line-height: 1.8; }
.sop-hold-stop {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(61,84,110,.4);
  font-size: 11px; color: #8fa2b8; display: flex; justify-content: space-between;
}

/* 缺口提示 */
.sop-gaps {
  margin-top: 4px; padding: 10px 14px; border-radius: 10px; font-size: 11px; line-height: 1.7;
  background: rgba(244,185,66,.06); border: 1px dashed rgba(244,185,66,.35); color: #fde68a;
}

/* 加载/错误态 */
.sop-loading { padding: 60px 20px; text-align: center; color: #8fa2b8; font-size: 13px; }
.sop-error { padding: 40px 20px; text-align: center; color: #f87171; font-size: 13px; }

/* 响应式 */
@media (max-width: 1280px) {
  .sop-env-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .sop-row-2 { grid-template-columns: 1fr; }
  .sop-ind-table-wrap { grid-template-columns: 1fr; }
  .sop-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sop-env-grid { grid-template-columns: 1fr; }
  .sop-header { flex-direction: column; align-items: stretch; }
  .sop-header-right { justify-content: space-between; }
  .sop-holding-editor { width: 100%; }
  .sop-holding-input { flex: 1; width: auto; }
  .sop-banner-main { flex-direction: column; }
}

/* ===== D9.4: SOP 资金账户编辑器 ===== */
.sop-account-editor {
  display: grid; gap: 10px; padding: 14px 16px; border: 1px solid rgba(61,104,148,.3);
  border-radius: 12px; background: rgba(15,23,42,.45); width: 100%; min-width: 0; box-sizing: border-box;
}
.sop-account-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sop-account-title { font-size: 13px; font-weight: 700; color: #93c5fd; }
.sop-account-hint { font-size: 11px; color: #64748b; }
.sop-account-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sop-account-label { font-size: 12px; color: #9ab0c8; min-width: 64px; }
.sop-account-currency { font-size: 12px; color: #64748b; }
.sop-account-input {
  background: rgba(13,21,31,.9); border: 1px solid rgba(80,102,128,.5); border-radius: 7px;
  color: #dff0ff; padding: 6px 10px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.sop-account-input:focus { border-color: var(--accent); outline: none; }
.sop-account-cash { width: 160px; }
.sop-account-positions { display: grid; gap: 6px; }
.sop-account-row-head { font-size: 11px; color: #64748b; font-weight: 600; }
.sop-account-pos-row { display: grid; grid-template-columns: 90px 1fr 110px 110px 32px; gap: 8px; align-items: center; }
.sop-account-pos-row .sop-pos-code { width: 100%; }
.sop-account-pos-row .sop-pos-name { width: 100%; }
.sop-account-pos-row .sop-pos-cost { width: 100%; }
.sop-account-pos-row .sop-pos-qty { width: 100%; }
.sop-pos-del { background: rgba(239,83,80,.12); border-color: rgba(239,83,80,.4); color: #fca5a5; padding: 4px 8px; }
.sop-account-empty { font-size: 12px; color: #64748b; padding: 8px 0; }
.sop-account-actions { display: flex; gap: 8px; }
.sop-account-save { border-color: rgba(52,211,153,.45); color: #6ee7b7; }
.sop-hold-pnl { font-size: 11px; font-weight: 600; margin: 2px 0 6px; }

/* SOP 双源融合、10分钟趋势与持仓行情 */
.sop-banner-boundary { border-color: rgba(245, 158, 11, .45); background: linear-gradient(135deg, rgba(120, 74, 8, .32), rgba(27, 35, 43, .88)); }
.sop-trend-module { border-color: rgba(76, 142, 205, .32); }
.sop-trend-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.sop-trend-card { display: flex; flex-direction: column; gap: 5px; padding: 11px 12px; border: 1px solid rgba(61, 104, 148, .24); border-radius: 9px; background: rgba(13, 21, 31, .58); }
.sop-trend-card span { color: #8fa2b8; font-size: 11px; }
.sop-trend-card b { font-size: 13px; line-height: 1.45; }
.sop-hold-price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sop-ten-chip { padding: 3px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; opacity: .9; }
.sop-hold-portfolio { margin: 5px 0; color: #9ab0c8; font-size: 11px; }
.sop-risk-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.sop-risk-flags span { padding: 2px 6px; border-radius: 999px; background: rgba(220, 38, 38, .16); color: #ff9b9b; font-size: 10px; font-weight: 700; }
.sop-hold-action { margin-top: 8px; padding: 7px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; }
.sop-action-watch { background: rgba(14, 116, 144, .16); color: #8ee7ff; }
.sop-action-warn { background: rgba(245, 158, 11, .17); color: #ffd27b; }
.sop-action-risk { background: rgba(220, 38, 38, .17); color: #ff9b9b; }
.sop-source-health { padding: 10px 12px; border: 1px solid rgba(245, 158, 11, .28); border-radius: 9px; background: rgba(74, 50, 8, .16); color: #b9c8d8; font-size: 11px; line-height: 1.7; }
@media (max-width: 900px) { .sop-trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sop-trend-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .sop-account-pos-row { grid-template-columns: 80px 1fr 90px 90px 30px; }
}
/* ============================================================
 * 买入首仓 · 全流程作战台 样式 (fbx-*)
 * 2026-08-11 重构 · 深色科技风 · 独立命名空间避免与旧 fb-* 冲突
 * ============================================================ */

/* ---- 外壳 ---- */
.fbx-shell { display: flex; flex-direction: column; gap: 14px; }

.fbx-band { background: linear-gradient(160deg, rgba(24,35,50,.94), rgba(18,27,38,.94)); border: 1px solid rgba(67,104,144,0.28); border-radius: 12px; padding: 14px 16px; }

.fbx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fbx-kicker { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #3da5ff; font-weight: 700; margin-bottom: 2px; }
.fbx-section-title { font-size: 15px; font-weight: 700; color: #e2e8f0; }
.fbx-section-subtitle { font-size: 11px; color: #64748b; text-align: right; }

/* ---- 顶部工具栏 ---- */
.fbx-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.fbx-toolbar-title { font-size: 19px; font-weight: 800; color: #f1f5f9; background: linear-gradient(90deg, #6bc2ff, #e2b664); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.fbx-toolbar-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fbx-tag { font-size: 10px; color: #93c5fd; background: rgba(61,165,255,0.10); border: 1px solid rgba(61,165,255,0.30); border-radius: 999px; padding: 2px 9px; font-family: monospace; }
.fbx-badge { font-size: 10px; border-radius: 999px; padding: 2px 9px; font-weight: 600; border: 1px solid; }
.fbx-badge--ok { color: #34d399; border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.10); }
.fbx-badge--warn { color: #fbbf24; border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.10); }
.fbx-badge--muted { color: #94a3b8; border-color: rgba(148,163,184,.35); background: rgba(148,163,184,.08); }
.fbx-badge--neutral { color: #60a5fa; border-color: rgba(96,165,250,.45); background: rgba(96,165,250,.10); }
.fbx-badge--ro { color: #c084fc; border-color: rgba(192,132,252,.45); background: rgba(192,132,252,.08); }
.fbx-toolbar-note { font-size: 11px; color: #64748b; margin-top: 6px; line-height: 1.6; max-width: 720px; }
.fbx-btn { background: linear-gradient(135deg, #3da5ff 0%, #2563eb 100%); color: #f1f5f9; border: none; border-radius: 7px; font-size: 12px; font-weight: 600; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.fbx-btn:hover { filter: brightness(1.12); }
.fbx-btn:disabled { opacity: .55; cursor: not-allowed; }
.fbx-btn--ghost { background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.35); }
.fbx-inline-note { font-size: 11px; color: #94a3b8; margin-top: 8px; line-height: 1.7; }
.fbx-display-reason { font-size: 11px; color: #fbbf24; background: rgba(251,191,36,.07); border: 1px dashed rgba(251,191,36,.35); border-radius: 7px; padding: 6px 10px; margin-top: 10px; line-height: 1.6; }

/* ---- 流程泳道 ---- */
.fbx-pipeline { display: flex; align-items: stretch; gap: 0; margin-top: 4px; }
.fbx-stage { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(13,22,34,0.72); border: 1px solid rgba(67,104,144,0.25); border-radius: 10px; cursor: pointer; transition: border-color .18s, transform .18s, box-shadow .18s; }
.fbx-stage:hover { border-color: #3da5ff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(61,165,255,0.15); }
.fbx-stage-icon { font-size: 20px; filter: saturate(1.1); }
.fbx-stage-body { min-width: 0; }
.fbx-stage-title { font-size: 13px; font-weight: 700; color: #e2e8f0; }
.fbx-stage-desc { font-size: 10px; color: #64748b; margin-top: 1px; }
.fbx-stage-value { font-size: 16px; font-weight: 800; font-family: monospace; margin-top: 3px; }
.fbx-stage-arrow { display: flex; align-items: center; color: #3da5ff; font-size: 14px; padding: 0 6px; opacity: .85; }
.fbx-pipeline-note { font-size: 10px; color: #64748b; margin-top: 8px; line-height: 1.7; }

/* ---- 准入上下文 ---- */
.fbx-ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fbx-ov-card { background: rgba(15,23,42,0.6); border: 1px solid rgba(67,104,144,0.22); border-radius: 9px; padding: 10px 12px; }
.fbx-ov-label { font-size: 10px; color: #64748b; letter-spacing: .06em; }
.fbx-ov-value { font-size: 15px; font-weight: 700; color: #e2e8f0; margin-top: 3px; }
.fbx-ov-value.ok { color: #34d399; }
.fbx-ov-value.warn { color: #fbbf24; }
.fbx-ov-value.bad { color: #f87171; }
.fbx-ov-value.neutral { color: #cbd5e1; }
.fbx-ov-meta { font-size: 10px; color: #64748b; margin-top: 3px; line-height: 1.5; }

/* ---- 准入漏斗 ---- */
.fbx-funnel { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.fbx-funnel-row { display: flex; align-items: center; gap: 10px; }
.fbx-funnel-label { width: 88px; font-size: 11px; color: #94a3b8; text-align: right; flex-shrink: 0; }
.fbx-funnel-track { flex: 1; background: rgba(15,23,42,0.6); border-radius: 5px; height: 26px; overflow: hidden; }
.fbx-funnel-bar { height: 100%; border-radius: 5px; display: flex; align-items: center; justify-content: flex-end; padding-right: 9px; min-width: 34px; transition: width .5s ease; }
.fbx-funnel-bar.is-zero { background: rgba(148,163,184,0.25) !important; }
.fbx-funnel-count { font-size: 11px; font-weight: 700; color: #0f172a; font-family: monospace; }
.fbx-funnel-extra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fbx-extra-pill { font-size: 10px; color: #94a3b8; background: rgba(148,163,184,0.10); border: 1px solid rgba(148,163,184,0.28); border-radius: 999px; padding: 2px 9px; }
.fbx-extra-pill.is-red { color: #f87171; border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.08); }
.fbx-funnel-intent { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fbx-intent-pill { font-size: 10px; color: #93c5fd; background: rgba(61,165,255,0.08); border: 1px solid rgba(61,165,255,0.30); border-radius: 5px; padding: 2px 8px; font-family: monospace; }
.fbx-blocker-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fbx-blocker-item { font-size: 10px; color: #fca5a5; background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.28); border-radius: 5px; padding: 3px 8px; }
.fbx-blocker-count { font-weight: 800; margin-right: 5px; color: #f87171; font-family: monospace; }

/* ---- 候选层 ---- */
.fbx-cand-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.fbx-cand-stat { background: rgba(15,23,42,0.6); border: 1px solid rgba(67,104,144,0.22); border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; }
.fbx-cand-stat-num { font-size: 20px; font-weight: 800; font-family: monospace; }
.fbx-cand-stat-num.is-blue { color: #60a5fa; }
.fbx-cand-stat-num.is-green { color: #34d399; }
.fbx-cand-stat-num.is-yellow { color: #fbbf24; }
.fbx-cand-stat-num.is-red { color: #f87171; }
.fbx-cand-stat-num.is-muted { color: #64748b; }
.fbx-cand-stat-label { font-size: 10px; color: #64748b; margin-top: 2px; }
.fbx-cand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fbx-cand-card { background: rgba(15,23,42,0.65); border: 1px solid rgba(67,104,144,0.25); border-radius: 9px; padding: 11px 13px; }
.fbx-cand-card:hover { border-color: rgba(61,165,255,0.5); }
.fbx-cand-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fbx-cand-name { font-size: 13px; font-weight: 700; color: #e2e8f0; }
.fbx-cand-code { font-size: 10px; color: #64748b; font-family: monospace; margin-left: 6px; }
.fbx-cand-rank { font-size: 10px; color: #3da5ff; font-family: monospace; font-weight: 700; }
.fbx-cand-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.fbx-pill { font-size: 10px; color: #94a3b8; background: rgba(148,163,184,0.10); border: 1px solid rgba(148,163,184,0.35); border-radius: 999px; padding: 1px 8px; }
.fbx-pill--buy { color: #34d399; border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.08); }
.fbx-pill--final { color: #fbbf24; border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.08); }
.fbx-cand-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.fbx-cand-metric { background: rgba(10,16,23,0.55); border-radius: 7px; padding: 7px 9px; }
.fbx-cand-m-label { font-size: 9px; color: #64748b; }
.fbx-cand-m-value { font-size: 13px; font-weight: 700; color: #e2e8f0; font-family: monospace; margin-top: 2px; }
.fbx-cand-m-value.is-green { color: #34d399; }
.fbx-cand-m-value.is-yellow { color: #fbbf24; }
.fbx-cand-m-sub { font-size: 9px; color: #475569; margin-top: 2px; }
.fbx-more-btn { margin-top: 12px; width: 100%; padding: 8px 12px; background: rgba(61,165,255,0.10); border: 1px dashed rgba(61,165,255,0.4); color: #93c5fd; border-radius: 8px; font-size: 12px; cursor: pointer; }
.fbx-more-btn:hover { background: rgba(61,165,255,0.18); }

/* ---- KPI 条 ---- */
.fbx-kpi-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.fbx-kpi { background: rgba(15,23,42,0.65); border: 1px solid rgba(67,104,144,0.25); border-radius: 9px; padding: 10px 12px; }
.fbx-kpi-label { font-size: 10px; color: #64748b; }
.fbx-kpi-value { font-size: 19px; font-weight: 800; font-family: monospace; margin-top: 3px; }
.fbx-kpi-sub { font-size: 9px; color: #475569; margin-top: 2px; }
.fbx-kpi--green .fbx-kpi-value { color: #34d399; }
.fbx-kpi--red .fbx-kpi-value { color: #f87171; }
.fbx-kpi--amber .fbx-kpi-value { color: #fbbf24; }
.fbx-kpi--blue .fbx-kpi-value { color: #60a5fa; }
.fbx-kpi--muted .fbx-kpi-value { color: #94a3b8; }
.fbx-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }

/* ---- 生命周期卡池 ---- */
.fbx-zone { margin-bottom: 14px; }
.fbx-zone-head { display: flex; align-items: baseline; gap: 10px; }
.fbx-zone-title { font-size: 14px; font-weight: 800; }
.fbx-zone-meta { font-size: 11px; color: #64748b; font-family: monospace; }
.fbx-zone-desc { font-size: 10px; color: #64748b; margin: 3px 0 8px; }
.fbx-lc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fbx-lc-card { background: rgba(15,23,42,0.7); border: 1px solid rgba(67,104,144,0.28); border-left: 3px solid #60a5fa; border-radius: 9px; padding: 11px 13px; cursor: pointer; transition: border-color .18s, transform .18s, box-shadow .18s; }
.fbx-lc-card:hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(0,0,0,0.35); border-color: rgba(61,165,255,0.55); }
.fbx-lc--today_new { border-left-color: #34d399; }
.fbx-lc--history { border-left-color: #60a5fa; }
.fbx-lc--weak { border-left-color: #f59e0b; }
.fbx-lc--risk { border-left-color: #f87171; }
.fbx-lc--pending { border-left-color: #c084fc; }
.fbx-lc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fbx-lc-name { font-size: 13px; font-weight: 700; color: #e2e8f0; }
.fbx-lc-code { font-size: 10px; color: #64748b; font-family: monospace; margin-left: 5px; }
.fbx-lc-ind { font-size: 9px; color: #475569; margin-left: 5px; }
.fbx-lc-badges { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fbx-rating-badge { font-size: 10px; font-weight: 800; border: 1px solid; border-radius: 4px; padding: 1px 6px; }
.fbx-lc-price-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; background: rgba(10,16,23,0.55); border-radius: 7px; padding: 8px 10px; }
.fbx-lc-price-item { flex: 1; }
.fbx-lc-plabel { font-size: 9px; color: #64748b; }
.fbx-lc-pvalue { font-size: 14px; font-weight: 700; color: #e2e8f0; font-family: monospace; margin-top: 2px; }
.fbx-lc-psub { font-size: 9px; color: #475569; margin-top: 1px; }
.fbx-lc-arrow { color: #3da5ff; font-size: 13px; }
.fbx-lc-return { text-align: right; }
.fbx-lc-return-value { font-size: 17px; font-weight: 800; font-family: monospace; }
.fbx-lc-return-label { font-size: 9px; color: #64748b; margin-top: 2px; }
.fbx-lc-risk-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fbx-lc-risk-item { flex: 1; min-width: 64px; background: rgba(10,16,23,0.45); border-radius: 6px; padding: 6px 8px; display: flex; flex-direction: column; }
.fbx-lc-rlabel { font-size: 9px; color: #64748b; }
.fbx-lc-rvalue { font-size: 12px; font-weight: 700; color: #e2e8f0; font-family: monospace; margin-top: 2px; }
.fbx-lc-rvalue.is-stop { color: #f87171; }
.fbx-lc-rvalue.is-tp1 { color: #34d399; }
.fbx-lc-rvalue.is-tp2 { color: #2dd4bf; }
.fbx-lc-rvalue.is-good { color: #34d399; }
.fbx-lc-rvalue.is-warn { color: #fbbf24; }
.fbx-lc-observe-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fbx-lc-observe-text { font-size: 10px; color: #94a3b8; flex: 1; min-width: 80px; line-height: 1.5; }
.fbx-lc-expand { font-size: 10px; color: #3da5ff; white-space: nowrap; }

/* ---- 详情抽屉 ---- */
.fbx-drawer { margin-top: 2px; background: linear-gradient(160deg, rgba(20,32,47,.98), rgba(13,22,34,.98)); border: 1px solid rgba(96,165,250,0.4); border-radius: 12px; padding: 14px 16px; }
.fbx-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.fbx-drawer-title { font-size: 15px; font-weight: 800; color: #f1f5f9; }
.fbx-drawer-actions { display: flex; gap: 8px; }
.fbx-drawer-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(67,104,144,0.22); }
.fbx-drawer-block-title { font-size: 12px; font-weight: 700; color: #93c5fd; margin-bottom: 8px; }
.fbx-timeline { display: flex; flex-direction: column; gap: 0; }
.fbx-tl-node { display: flex; gap: 10px; position: relative; padding-bottom: 10px; }
.fbx-tl-node::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: rgba(67,104,144,0.35); }
.fbx-tl-node:last-child::before { display: none; }
.fbx-tl-dot { width: 12px; height: 12px; border-radius: 50%; background: #3da5ff; border: 2px solid rgba(10,16,23,0.9); margin-top: 3px; flex-shrink: 0; }
.fbx-tl-node.is-done .fbx-tl-dot { background: #34d399; }
.fbx-tl-node.is-live .fbx-tl-dot { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.8); animation: fbx-pulse 1.6s ease infinite; }
.fbx-tl-node.is-risk .fbx-tl-dot { background: #f87171; }
@keyframes fbx-pulse { 0%,100% { box-shadow: 0 0 4px rgba(251,191,36,.5); } 50% { box-shadow: 0 0 12px rgba(251,191,36,.95); } }
.fbx-tl-title { font-size: 12px; font-weight: 700; color: #e2e8f0; }
.fbx-tl-meta { font-size: 10px; color: #64748b; margin-top: 2px; }
.fbx-ev-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fbx-ev-grid--4 { grid-template-columns: repeat(4, 1fr); }
.fbx-ev-item { background: rgba(10,16,23,0.5); border-radius: 7px; padding: 7px 10px; }
.fbx-ev-label { font-size: 9px; color: #64748b; }
.fbx-ev-value { font-size: 12px; font-weight: 700; color: #e2e8f0; font-family: monospace; margin-top: 2px; }
.fbx-ev-value.is-stop { color: #f87171; }
.fbx-ev-note { font-size: 11px; color: #94a3b8; margin-top: 8px; line-height: 1.6; }
.fbx-check-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.fbx-check-pill { font-size: 10px; border-radius: 999px; padding: 2px 9px; border: 1px solid; }
.fbx-check-pill.is-pass { color: #34d399; border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.07); }
.fbx-check-pill.is-block { color: #f87171; border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.07); }
.fbx-check-pill.is-warn { color: #fbbf24; border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.07); }

/* ---- 退出归档表 ---- */
.fbx-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid rgba(67,104,144,0.28); }
.fbx-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.fbx-table th { background: rgba(15,23,42,0.85); color: #64748b; font-weight: 600; text-align: left; padding: 8px 10px; white-space: nowrap; border-bottom: 1px solid rgba(67,104,144,0.3); }
.fbx-table td { padding: 7px 10px; border-bottom: 1px solid rgba(67,104,144,0.13); color: #cbd5e1; }
.fbx-table tr:last-child td { border-bottom: none; }
.fbx-td-nowrap { white-space: nowrap; color: #94a3b8; }
.fbx-td-num { font-family: monospace; color: #e2e8f0; }
.fbx-td-sub { font-size: 9px; color: #475569; }
.fbx-stock-name { font-weight: 600; color: #e2e8f0; margin-right: 6px; }
.fbx-stock-code { font-size: 9px; color: #64748b; font-family: monospace; }
.fbx-profit-positive { color: #34d399; font-weight: 700; font-family: monospace; }
.fbx-profit-negative { color: #f87171; font-weight: 700; font-family: monospace; }
.fbx-profit-flat { color: #94a3b8; font-family: monospace; }
.fbx-exit-reason { color: #94a3b8; font-size: 10px; }
.fbx-result-pill { font-size: 10px; border: 1px solid; border-radius: 999px; padding: 1px 9px; font-weight: 600; }
.fbx-more-note { font-size: 10px; color: #475569; text-align: center; margin-top: 8px; }

/* ---- 统计区 ---- */
.fbx-rating-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fbx-rating-card { background: rgba(15,23,42,0.6); border: 1px solid rgba(67,104,144,0.22); border-radius: 9px; padding: 10px 12px; }
.fbx-rating-main { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.fbx-rating-count { font-size: 10px; color: #64748b; font-family: monospace; }
.fbx-rating-bar { height: 6px; background: rgba(148,163,184,0.15); border-radius: 3px; margin-top: 7px; overflow: hidden; }
.fbx-rating-fill { height: 100%; border-radius: 3px; }
.fbx-rating-sub { font-size: 10px; color: #64748b; margin-top: 5px; font-family: monospace; }

/* ---- 图表区 ---- */
.fbx-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fbx-chart-card { background: rgba(15,23,42,0.6); border: 1px solid rgba(67,104,144,0.22); border-radius: 10px; padding: 11px 13px; }
.fbx-chart-head { margin-bottom: 6px; }
.fbx-chart-title { font-size: 12px; font-weight: 700; color: #e2e8f0; }
.fbx-chart-sub { font-size: 10px; color: #64748b; margin-top: 1px; }
.fbx-chart-body { height: 190px; }
.fbx-chart-empty { height: 190px; display: flex; align-items: center; justify-content: center; color: #475569; font-size: 11px; }

/* ---- 空态 ---- */
.fbx-empty { background: rgba(15,23,42,0.5); border: 1px dashed rgba(67,104,144,0.35); border-radius: 9px; padding: 14px 16px; color: #94a3b8; font-size: 12px; line-height: 1.7; }
.fbx-empty--mini { padding: 9px 12px; font-size: 11px; }
.fbx-empty-sub { margin-top: 6px; font-size: 11px; color: #64748b; }
.fbx-observe-signals { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }

/* ---- 响应式 ---- */
@media (max-width: 1400px) {
  .fbx-lc-grid { grid-template-columns: repeat(2, 1fr); }
  .fbx-cand-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .fbx-ov-grid, .fbx-cand-stats { grid-template-columns: repeat(2, 1fr); }
  .fbx-kpi-strip { grid-template-columns: repeat(4, 1fr); }
  .fbx-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .fbx-charts-grid { grid-template-columns: 1fr; }
  .fbx-pipeline { flex-direction: column; gap: 6px; }
  .fbx-stage-arrow { transform: rotate(90deg); justify-content: center; padding: 0; }
  .fbx-ev-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .fbx-rating-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .fbx-lc-grid { grid-template-columns: 1fr; }
  .fbx-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .fbx-toolbar { flex-direction: column; }
}
