/* 实盘/关键位放大页:与 instance_theme 联动,高对比 meta + 主题感知图表区 */
body.focus-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 14px;
  margin: 0;
  background: var(--focus-bg, #0b0d14);
  color: var(--focus-fg, #eaeaea);
}

html[data-theme="light"] body.focus-page {
  --focus-bg: #eef3f8;
  --focus-fg: #142232;
  --focus-card-bg: #fff;
  --focus-card-border: #b8c8d8;
  --focus-meta-bg: #fff;
  --focus-meta-border: #9eb4c8;
  --focus-meta-label: #2a4a66;
  --focus-meta-value: #0a1628;
  --focus-status: #4a6078;
  --focus-chart-bg: #f0f4f9;
  --focus-chart-border: #b8c8d8;
  --focus-btn-bg: #fff;
  --focus-btn-fg: #006e9a;
  --focus-btn-border: rgba(0, 95, 140, 0.22);
  --focus-input-bg: #fff;
  --focus-input-fg: #142232;
  --focus-input-border: #b8c8d8;
  --focus-title: #0a1628;
  --focus-pnl-up: #0a7a3d;
  --focus-pnl-down: #c62828;
  --focus-dir-short: #b71c1c;
  --focus-dir-long: #0a7a3d;
}

html[data-theme="dark"] body.focus-page {
  --focus-bg: #0b0d14;
  --focus-fg: #eaeaea;
  --focus-card-bg: #121726;
  --focus-card-border: #2a3150;
  --focus-meta-bg: #141b2f;
  --focus-meta-border: #3d4f72;
  --focus-meta-label: #c8d8f0;
  --focus-meta-value: #f0f4ff;
  --focus-status: #95a2c2;
  --focus-chart-bg: #0f1320;
  --focus-chart-border: #2a3150;
  --focus-btn-bg: #151a2a;
  --focus-btn-fg: #8fc8ff;
  --focus-btn-border: #304164;
  --focus-input-bg: #1a1a29;
  --focus-input-fg: #fff;
  --focus-input-border: #2e2e45;
  --focus-title: #dbe4ff;
  --focus-pnl-up: #3ddc84;
  --focus-pnl-down: #ff7070;
  --focus-dir-short: #ff8a80;
  --focus-dir-long: #69f0ae;
}

body.focus-page * {
  box-sizing: border-box;
}

.focus-page .container {
  width: min(98vw, 1900px);
  margin: 0 auto;
}

.focus-page .card {
  background: var(--focus-card-bg);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--focus-card-border);
  margin-bottom: 12px;
}

.focus-page .row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.focus-page .btn {
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--focus-btn-border);
  background: var(--focus-btn-bg);
  color: var(--focus-btn-fg);
  cursor: pointer;
}

.focus-page .btn:hover {
  filter: brightness(1.06);
}

.focus-page select,
.focus-page input,
.focus-page button {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--focus-input-border);
  background: var(--focus-input-bg);
  color: var(--focus-input-fg);
}

.focus-page .focus-title {
  color: var(--focus-title);
  font-weight: 700;
}

.focus-page .meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.focus-page .meta-item {
  background: var(--focus-meta-bg);
  border: 1px solid var(--focus-meta-border);
  border-radius: 8px;
  padding: 10px 10px 9px;
}

.focus-page .meta-item .k {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--focus-meta-label);
}

.focus-page .meta-item .v {
  font-size: 1.02rem;
  font-weight: 600;
  margin-top: 5px;
  word-break: break-all;
  color: var(--focus-meta-value);
}

.focus-page .meta-item--emph {
  border-width: 2px;
  border-color: var(--focus-meta-label);
}

.focus-page .meta-item--emph .k {
  font-size: 0.82rem;
  font-weight: 700;
}

.focus-page .meta-item--emph .v {
  font-size: 1.12rem;
  font-weight: 800;
}

.focus-page .meta-item--pnl .v {
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.focus-page .meta-pnl-up {
  color: var(--focus-pnl-up) !important;
}

.focus-page .meta-pnl-down {
  color: var(--focus-pnl-down) !important;
}

.focus-page .meta-dir-long {
  color: var(--focus-dir-long) !important;
}

.focus-page .meta-dir-short {
  color: var(--focus-dir-short) !important;
}

.focus-page .status {
  font-size: 0.84rem;
  color: var(--focus-status);
}

.focus-page .status.err {
  color: var(--focus-pnl-down);
}

.focus-page #chart-wrap {
  height: 560px;
  background: var(--focus-chart-bg);
  border: 1px solid var(--focus-chart-border);
  border-radius: 10px;
  padding: 8px;
}

.focus-page #chart {
  width: 100%;
  height: 100%;
}

.focus-page .empty {
  padding: 18px;
  color: var(--focus-status);
}

.focus-page .exchange-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #b8f5d0;
  background: #14241e;
  border: 1px solid #2d6a4f;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 8px;
}

html[data-theme="light"] .focus-page .exchange-tag {
  color: #0a5c38;
  background: #e8f5ee;
  border-color: #7bc9a0;
}
