/* ========================================================
   投研战法与量化工具箱专用样式 (tools.css)
   ======================================================== */
.tools-tab-bar {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  border-radius: 14px;
}
.tool-nav-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.tool-nav-btn:hover {
  background: var(--surface);
  color: var(--ink);
}
.tool-nav-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.4);
}

.tool-panel {
  display: none;
  padding: 24px;
  border-radius: 16px;
  animation: fadeIn 0.2s ease;
}
.tool-panel.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.tool-panel-head h2 {
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 6px;
}
.tool-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 800px;
}

/* 1. 斩杀线体检 */
.pareto-search-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.p-search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.p-search-box input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: all 0.2s;
}
.p-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.p-search-box button {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.35);
  transition: all 0.15s;
}
.p-search-box button:hover {
  transform: translateY(-1px);
}
.p-quick-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.p-tag-btn {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.p-tag-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pareto-diag-card {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.04) 0%, var(--card) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 22px;
  animation: fadeIn 0.2s ease;
}
.pareto-diag-card.online {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.04) 0%, var(--card) 100%);
  border-color: rgba(5, 150, 105, 0.2);
}

.pareto-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pareto-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.pareto-table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.pareto-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  font-feature-settings: "tnum";
}
.pareto-table tr:last-child td {
  border-bottom: none;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.status-pill.online {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}
.status-pill.dominated {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* 2. 双轨高波打卡器 */
.dt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.dt-target-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dt-target-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s;
}
.dt-target-btn small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.dt-target-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, 0.45);
}
.dt-target-btn.active small {
  color: rgba(255, 255, 255, 0.85);
}
.dt-target-rm {
  margin-left: 2px;
  font-size: 13px;
  line-height: 1;
  opacity: 0.65;
  padding: 0 2px;
}
.dt-target-rm:hover {
  opacity: 1;
  color: #dc2626;
}
.dt-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.dt-add-etf {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}
.dt-add-etf input {
  width: 102px;
  height: 30px;
  border: none;
  background: transparent;
  padding: 0 8px;
  font-size: 12px;
  color: var(--ink);
  outline: none;
  font-feature-settings: "tnum";
}
.dt-add-etf button {
  height: 30px;
  padding: 0 10px;
  border: none;
  border-left: 1px solid var(--line);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.dt-add-etf button:hover {
  background: var(--primary);
  color: #fff;
}
.dt-config-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dt-config-inline label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
}
.dt-config-inline input {
  width: 68px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  text-align: right;
  outline: none;
  font-feature-settings: "tnum";
}

.dt-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dt-kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dt-kpi-card.tp-ready {
  border-color: rgba(220, 38, 38, 0.5);
  background: rgba(220, 38, 38, 0.05);
}
.dt-kpi-lbl {
  font-size: 12px;
  color: var(--muted);
}
.dt-kpi-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.dt-kpi-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}

.dt-progress-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.dt-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.dt-progress-track {
  height: 8px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}
.dt-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #dc2626);
  transition: width 0.25s ease;
}
.dt-progress-fill.down {
  background: #059669;
}

.dt-checkin-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.dt-checkin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.dt-checkin-head h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.dt-reset-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
}
.dt-reset-btn:hover {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.4);
}
.dt-form-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.dt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dt-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.dt-field input[type="number"],
.dt-field input[type="date"] {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  outline: none;
  font-feature-settings: "tnum";
}
.dt-field input:focus {
  border-color: var(--primary);
}
.dt-track-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.dt-track-toggle button {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 6px;
  white-space: nowrap;
}
.dt-track-toggle button.on {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}
.dt-mult-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dt-mult-row input {
  width: 66px;
  flex: 0 0 66px;
}
.dt-quick-mults {
  display: flex;
  gap: 4px;
  flex: 1;
}
.dt-quick-mults button {
  flex: 1;
  height: 36px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.dt-quick-mults button:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.dt-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.dt-btn-primary {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.dt-btn-primary:hover {
  filter: brightness(1.06);
}
.dt-btn-tp {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.dt-btn-tp.hot {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
  box-shadow: 0 4px 14px -4px rgba(220, 38, 38, 0.55);
}
.dt-btn-tp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.dt-action-tip {
  font-size: 12px;
  color: var(--muted);
}

.dt-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.dt-section-head h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.dt-section-sub {
  font-size: 12px;
  color: var(--muted);
}
.dt-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dt-table th,
.dt-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  font-feature-settings: "tnum";
}
.dt-table th {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  font-weight: 700;
}
.dt-table tr:last-child td {
  border-bottom: none;
}
.dt-empty-cell {
  text-align: center !important;
  color: var(--muted);
  padding: 20px !important;
}
.dt-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
}
.dt-pill.dca {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}
.dt-pill.lock {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}
.dt-del-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.dt-del-btn:hover {
  color: #dc2626;
}

@media (max-width: 900px) {
  .dt-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dt-form-grid { grid-template-columns: 1fr 1fr; }
  .dt-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dt-hero-grid { grid-template-columns: 1fr; }
  .dt-form-grid { grid-template-columns: 1fr; }
}

.dt-rules-box {
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.dt-rules-box ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

.dt-history-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.dt-round-box {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}
.dt-round-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.dt-round-ret {
  font-size: 16px;
  font-weight: 900;
  color: #dc2626;
  margin-bottom: 4px;
}
.dt-round-tag {
  font-size: 10.5px;
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* 3. 行业恐贪与实战战法绑定 */
.ind-fg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ind-fg-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px -8px rgba(0, 0, 0, 0.05);
  transition: transform 0.18s, border-color 0.18s;
}
.ind-fg-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-focus);
}
.ind-fg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ind-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ind-score-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
}
.ind-score-badge.fear { background: rgba(5, 150, 105, 0.12); color: #059669; }
.ind-score-badge.greed { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.ind-score-badge.neutral { background: rgba(217, 119, 6, 0.12); color: #d97706; }

.ind-strat-box {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.ind-strat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.ind-strat-win {
  color: #dc2626;
  font-feature-settings: "tnum";
}
.ind-strat-action {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}
.ind-etf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.ind-etf-row b {
  color: var(--primary);
  font-weight: 700;
}

/* 4. 聪明钱共识池 & 牛股反查 */
.sm-consensus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.sm-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sm-stock-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sm-stock-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}
.sm-stock-code {
  font-size: 12px;
  color: var(--muted);
}
.sm-score-pill {
  font-size: 12px;
  font-weight: 800;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  padding: 2px 9px;
  border-radius: 999px;
}
.sm-holders {
  font-size: 12.5px;
  color: var(--ink-2);
}
.sm-etf-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 8px 12px;
}
.sm-etf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line-2);
}
.sm-etf-item:last-child {
  border-bottom: none;
}
.sm-etf-name {
  font-weight: 700;
  color: var(--ink);
}
.sm-etf-ytd {
  font-weight: 800;
  color: #dc2626;
  font-feature-settings: "tnum";
}

/* 5. 拥挤度预警雷达 */
.crowding-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 12px;
}
.c-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
}
.c-tag.safe { background: rgba(5, 150, 105, 0.08); color: #059669; }
.c-tag.warn { background: rgba(217, 119, 6, 0.08); color: #d97706; }
.c-tag.danger { background: rgba(220, 38, 38, 0.08); color: #dc2626; }

.crowding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.crowd-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
}
.crowd-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.crowd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crowd-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.crowd-score-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.crowd-score-badge.danger { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.crowd-score-badge.warn { background: rgba(217, 119, 6, 0.12); color: #d97706; }
.crowd-score-badge.safe { background: rgba(5, 150, 105, 0.12); color: #059669; }

.crowd-meter {
  height: 6px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}
.crowd-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}
.crowd-fill.danger { background: #dc2626; }
.crowd-fill.warn { background: #d97706; }
.crowd-fill.safe { background: #059669; }

.crowd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--card);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  text-align: center;
}
.crowd-stats div span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.crowd-stats div b {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.crowd-advice {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  background: rgba(0, 0, 0, 0.02);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--line);
}
.crowd-card.danger .crowd-advice { border-left-color: #dc2626; }
.crowd-card.warn .crowd-advice { border-left-color: #d97706; }
.crowd-card.safe .crowd-advice { border-left-color: #059669; }

/* 6. 网格交易测算器 */
.grid-sim-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-controls, .grid-results {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px 20px;
}
.grid-preset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.grid-p-tag {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.grid-p-tag:hover, .grid-p-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.grid-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.grid-form-group {
  margin-top: 12px;
}
.grid-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.grid-form-group input {
  width: 100%;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  font-feature-settings: "tnum";
}
.grid-form-group input:focus {
  border-color: var(--primary);
}
.grid-mode-btns {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.grid-m-btn {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.grid-m-btn.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.grid-res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.gr-target-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  display: block;
}
.gr-vol-pill {
  font-size: 11.5px;
  color: #dc2626;
  font-weight: 700;
}
.gr-annual-box {
  text-align: right;
}
.gr-annual-box small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.gr-annual-val {
  font-size: 22px;
  font-weight: 900;
  color: #dc2626;
  font-feature-settings: "tnum";
}

.grid-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.gm-item {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.gm-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.gm-item b {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.grid-action-guide {
  background: var(--card);
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
}
.grid-action-guide h4 {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 4px;
}
.grid-action-guide p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

/* 7. 宏观逃顶抄底罗盘 */
.macro-hero-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.macro-score-card .m-lbl {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.m-score-val {
  font-size: 42px;
  font-weight: 900;
  color: #dc2626;
  line-height: 1.1;
  margin: 6px 0;
  font-feature-settings: "tnum";
}
.m-score-val small {
  font-size: 16px;
  color: var(--muted);
  font-weight: normal;
}
.m-status-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.m-advice {
  max-width: 680px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}

.macro-factors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.mf-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 16px;
}
.mf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.mf-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}
.mf-val {
  font-size: 18px;
  font-weight: 900;
  color: #dc2626;
  font-feature-settings: "tnum";
}
.mf-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mf-sig {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  background: rgba(5, 150, 105, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

.macro-anchor-table-wrap {
  overflow-x: auto;
}
.macro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.macro-table th, .macro-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
}
.macro-table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}
.macro-table td b {
  font-feature-settings: "tnum";
}

/* 响应式 */
@media (max-width: 900px) {
  .dt-hero-grid { grid-template-columns: 1fr 1fr; }
  .dt-history-grid { grid-template-columns: repeat(3, 1fr); }
  .ind-fg-grid { grid-template-columns: 1fr; }
  .sm-consensus-grid { grid-template-columns: 1fr; }
  .grid-sim-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dt-hero-grid { grid-template-columns: 1fr; }
  .dt-history-grid { grid-template-columns: 1fr 1fr; }
  .tool-panel { padding: 14px; }
  .grid-metrics-grid { grid-template-columns: 1fr 1fr; }
}
