:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  background: #f5f7f4;
  color: #17211c;
  font-size: 16px;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

.topbar {
  min-height: 66px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1px solid #d9e0db;
}

.brand { display: flex; gap: 11px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: #156c48; color: #ffffff; font-weight: 700; font-size: 18px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 16px; letter-spacing: 0; }
.brand span, .connection, .meta-label { font-size: 13px; color: #637068; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.connection { display: flex; align-items: center; gap: 7px; }
.connection::before { content: ""; width: 8px; height: 8px; background: #8a5a16; border-radius: 50%; }
.connection.ready::before { background: #156c48; }
.connection.error::before { background: #b3261e; }
.button-secondary { min-height: 32px; padding: 0 11px; color: #156c48; background: #eef6f0; border: 1px solid #a9cdb5; font-size: 13px; }
.button-secondary:hover { color: #ffffff; background: #156c48; }

main { width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 36px; }
.overview { display: flex; justify-content: space-between; gap: 28px; padding: 26px 0 28px; border-bottom: 1px solid #cfd8d1; }
.eyebrow { margin: 0 0 5px; color: #627269; font-size: 12px; font-weight: 700; letter-spacing: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 28px; line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 18px; line-height: 1.3; }
.overview-summary { max-width: 620px; margin-bottom: 0; color: #4a5850; line-height: 1.6; }
.overview-source { margin: 7px 0 0; color: #637068; font-size: 12px; }
.index-strip { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 15px 0 0; padding: 0; list-style: none; color: #46534c; font-size: 13px; }
.index-strip li { display: flex; gap: 7px; align-items: baseline; }.index-strip strong { font-weight: 600; }.index-strip .index-value { color: #637068; }

.market-metrics { display: grid; grid-template-columns: repeat(4, minmax(95px, 1fr)); gap: 20px; margin: 0; min-width: 480px; }
.market-metrics div { border-left: 2px solid #d1ddd4; padding-left: 11px; }
.market-metrics dt { color: #637068; font-size: 12px; margin-bottom: 7px; }
.market-metrics dd { margin: 0; font-size: 18px; font-weight: 700; white-space: nowrap; }

.strategy-grid { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 2.2fr); gap: 20px; margin-top: 24px; }
.strategy-detail { margin: 0; padding: 20px; color: #46534c; line-height: 1.6; }
.candidate-name, .candidate-code { display: block; }.candidate-name { font-size: 14px; }.candidate-code, .candidate-pattern, .candidate-rule, .candidate-risk { display: block; margin-top: 4px; color: #637068; font-size: 12px; font-weight: 400; line-height: 1.4; }
.candidate-rule { color: #344c3d; }.candidate-risk { color: #8a5a16; }
.candidate-status { display: inline-block; font-size: 12px; font-weight: 700; }.status-confirmed { color: #c62828; }.status-watch { color: #156c48; }.status-pending { color: #8a5a16; }
.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; margin-top: 24px; }
.panel { min-width: 0; background: #ffffff; border: 1px solid #d9e0db; border-radius: 6px; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 20px 20px 16px; border-bottom: 1px solid #e4e9e5; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; text-align: left; }
th { color: #637068; font-size: 12px; font-weight: 600; }
th, td { padding: 13px 20px; border-bottom: 1px solid #edf0ee; vertical-align: top; }
td { font-size: 14px; line-height: 1.45; }
tbody tr:last-child td { border-bottom: 0; }
.empty-row td { color: #7b8780; text-align: center; padding: 28px; }
.stage, .severity, .action { display: inline-block; font-size: 12px; font-weight: 700; }
.stage-启动 { color: #156c48; }.stage-加速 { color: #0b67a3; }.stage-分歧 { color: #8a5a16; }.stage-退潮 { color: #a2352a; }.stage-观察 { color: #637068; }
.positive { color: #c62828; font-weight: 700; }.negative { color: #18864b; font-weight: 700; }

.alerts-panel { min-height: 232px; }
.alerts-list { margin: 0; padding: 4px 20px 12px; list-style: none; }
.alert-item { padding: 14px 0; border-bottom: 1px solid #edf0ee; }
.alert-item:last-child { border-bottom: 0; }.alert-title { display: block; margin-bottom: 4px; font-size: 14px; }.alert-detail, .empty-alert { color: #637068; font-size: 13px; line-height: 1.5; }
.severity-high { color: #b3261e; }.severity-warning { color: #8a5a16; }.severity-info { color: #0b67a3; }

.snapshot-panel { margin-top: 20px; }
button { min-height: 36px; border: 0; border-radius: 4px; padding: 0 15px; background: #156c48; color: #ffffff; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: #0e593a; } button:disabled { opacity: .6; cursor: wait; }
footer { border-top: 1px solid #d9e0db; padding: 18px 24px; color: #637068; text-align: center; font-size: 12px; background: #ffffff; }

@media (max-width: 980px) {
  .overview { display: block; }.market-metrics { min-width: 0; margin-top: 24px; }.strategy-grid, .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { min-height: 58px; padding: 0 16px; }.topbar-actions { gap: 8px; }.button-secondary { padding: 0 8px; }.connection { display: none; }.brand span { display: none; }
  main { width: min(100% - 28px, 1360px); padding-top: 18px; }.overview { padding-top: 12px; }.market-metrics { grid-template-columns: 1fr 1fr; gap: 16px; }
  .panel-heading { padding: 17px 16px 13px; } th, td { padding-left: 16px; padding-right: 16px; }
}
