/* 参考 HaxiTAG-Nav 的视觉与布局 */
:root {
  --vi-ink: #10213a;
  --vi-ocean: #178ed9;
  --vi-teal: #20d3c6;
  --vi-mist: #e8f8fb;
  --vi-amber: #ffb447;

  --bg: #eff5fb;
  --panel: #ffffff;
  --line: #c8d8e7;
  --text: #132238;
  --muted: #5c7088;

  --brand: var(--vi-ocean);
  --brand-dark: #17326b;
  --brand-soft: #edf7ff;

  --radius: 14px;
  --shadow: 0 12px 30px rgba(18, 42, 84, 0.09);

  --success: #0b6f54;
  --warn: #8a5a00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 580px at 8% 2%, rgba(71, 230, 203, 0.25), transparent),
    radial-gradient(1100px 650px at 96% 4%, rgba(34, 124, 255, 0.18), transparent),
    linear-gradient(180deg, #f7fcff, #eef5fb);
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.hidden {
  display: none !important;
}

/* ----- 登录页（参考 Nav guest-view / login-card）----- */
.guest-view {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}

.guest-view.hidden {
  display: none !important;
}

.app-view.hidden {
  display: none !important;
}

.guest-intro .guest-tag {
  margin: 0 0 8px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--vi-ocean);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guest-intro h2 {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--vi-ink);
}

.guest-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--vi-ink);
}

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

.login-card label {
  margin-bottom: 12px;
}

.login-card input {
  margin-top: 4px;
}

.wide-btn {
  display: inline-block;
  width: 100%;
  max-width: 280px;
  padding: 12px 16px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(90deg, #21d3c6 0%, #169ad4 58%, #2268bf 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}

.wide-btn:hover {
  filter: brightness(0.98);
}

.login-error {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff3f3;
  border: 1px solid #f5c6c6;
  color: #c00;
  font-size: 13px;
}

.login-error.hidden {
  display: none !important;
}

.pill.account.hidden,
.pill.logout.hidden {
  display: none !important;
}

.pill.logout {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.52);
}

@media (max-width: 768px) {
  .guest-view {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    row-gap: 10px;
    align-items: center;
  }

  .topbar .brand { grid-area: brand; }
  .topbar .top-actions { grid-area: actions; }
  .topbar .top-nav { grid-area: nav; justify-content: flex-start; }
}

/* ----- Topbar（与 Nav 一致）----- */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, #2dd6cf 0%, #1ca8f8 40%, #0a3f89 100%);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(32, 211, 198, 0.25));
  animation: brand-icon-glow 2.5s ease-in-out infinite;
}
@keyframes brand-icon-glow {
  0%, 100% { filter: drop-shadow(0 2px 6px rgba(32, 211, 198, 0.25)); }
  50% { filter: drop-shadow(0 2px 12px rgba(32, 211, 198, 0.45)); }
}

.brand h1 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.6px;
}

.brand p {
  margin: 4px 0 0;
  color: #e9f8ff;
  font-size: 12px;
}

.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.top-nav .pill {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.top-nav .pill:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.top-actions .pill.account {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    row-gap: 10px;
    align-items: center;
  }

  .topbar .brand { grid-area: brand; }
  .topbar .top-actions { grid-area: actions; }
  .topbar .top-nav { grid-area: nav; justify-content: flex-start; }

  .brand p {
    display: none;
  }
}

/* ----- Intro banner ----- */
.intro-banner {
  padding: 16px 18px 18px;
  margin-bottom: 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(135deg, #0d2d5c 0%, #17326b 50%, #0a3f89 100%);
  color: #e9f8ff;
  box-shadow: var(--shadow);
}

.intro-banner-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.intro-banner-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.intro-banner-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  max-width: 640px;
}

.hero-meta {
  min-width: 240px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  font-size: 13px;
  color: #e9f8ff;
}

.hero-meta p {
  margin: 0 0 6px;
}

.hero-meta p:last-child {
  margin-bottom: 0;
}

/* ----- Page & panels ----- */
.page {
  display: grid;
  gap: 20px;
  padding-bottom: 32px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.section-title-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.section-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.section-actions .btn {
  width: fit-content;
  padding: 8px 14px;
  font-size: 13px;
}

.step {
  margin: 0 0 6px;
  color: var(--vi-ocean);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-title h2 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--vi-ink);
}

.section-note {
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.gap-lg {
  margin-top: 18px;
}

.summary-card {
  background: #fafcff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.summary-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--vi-ink);
}

/* ----- Forms ----- */
.task-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.task-form label,
.review-dimension {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.task-form input,
.task-form textarea,
.task-form select {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
}

.task-form input:focus,
.task-form textarea:focus,
.task-form select:focus {
  outline: none;
  border-color: var(--vi-teal);
  box-shadow: 0 0 0 3px rgba(32, 211, 198, 0.15);
}

.task-form textarea,
.task-form .full {
  grid-column: 1 / -1;
}

.task-form #open-model-picker-btn {
  width: fit-content;
}

/* 业务场景 + 权重模式 区块与 i 信息按钮 */
.weight-mode-block {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
}

.weight-mode-block .info-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--vi-ocean);
  background: var(--brand-soft);
  color: var(--vi-ocean);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.weight-mode-block .info-btn:hover {
  background: var(--vi-ocean);
  color: #fff;
}

/* ----- Chips, lists, cards ----- */
.chip-list,
.plain-list,
.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--vi-ink);
}

.card-grid,
.kpi-row,
.weight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.kpi-card,
.source-card {
  padding: 16px;
  background: #fafcff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--vi-ink);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ----- Table ----- */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 13px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.bar {
  height: 10px;
  background: #e8edf2;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--vi-teal), var(--vi-ocean));
}

/* ----- Buttons ----- */
.btn {
  padding: 10px 18px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(90deg, #21d3c6 0%, #169ad4 58%, #2268bf 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.btn.primary {
  background: linear-gradient(90deg, #21d3c6 0%, #169ad4 58%, #2268bf 100%);
  color: #fff;
}

/* ----- Run status & scene bar ----- */
.run-status-bar {
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--brand-soft);
  border: 1px solid #bee0e3;
  border-radius: 10px;
  font-size: 14px;
  color: var(--vi-ink);
}

.run-scene-bar {
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #e6fbf5;
  border: 1px solid #a9e7d4;
  border-radius: 10px;
  font-size: 14px;
  color: var(--vi-ink);
}

.run-detail-panel {
  margin-top: 12px;
}

.run-detail-panel .table.small {
  font-size: 12px;
}

.run-detail-model {
  margin-bottom: 20px;
}

.run-detail-model h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--vi-ink);
}

/* ----- Review ----- */
.review-list {
  display: grid;
  gap: 16px;
}

.review-card {
  padding: 18px;
  background: #fafcff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.review-meta,
.review-grid {
  display: grid;
  gap: 12px;
}

.review-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.review-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.review-dimensions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.review-dimension input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.review-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.review-actions label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.review-actions input[type="text"] {
  width: 120px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ----- Weight mode ----- */
.weight-mode {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.weight-mode:hover {
  border-color: var(--vi-ocean);
  background: var(--brand-soft);
}

.weight-mode.active {
  border-color: var(--vi-ocean);
  background: var(--brand-soft);
}

.mode-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

/* ----- Charts ----- */
.chart-container {
  min-height: 220px;
}

.radar-note {
  margin-top: -8px;
  margin-bottom: 8px;
}

.radar-mode-note {
  font-size: 12px;
  line-height: 1.55;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f6fbff;
  border: 1px solid #d9e6f3;
  border-radius: 8px;
}

.radar-legend {
  margin-top: 8px;
  margin-bottom: 4px;
}

.radar-caption {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
  margin-bottom: 0;
}

.radar-and-table {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.radar-chart-wrap {
  flex: 1 1 380px;
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-chart-wrap .chart-container {
  width: 100%;
  max-width: 420px;
  min-height: 320px;
}

.radar-and-table .chart-container {
  flex: 0 0 auto;
}

.scenario-table-wrap {
  flex: 1 1 320px;
  min-width: 280px;
}

#radar-legend-caption {
  margin-bottom: 16px;
}

.scenario-table-title {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--vi-ink);
  font-weight: 700;
}

.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.scenario-table th,
.scenario-table td {
  padding: 8px 10px;
  text-align: left;
  border: 1px solid var(--line);
  vertical-align: top;
}

.scenario-table th:first-child,
.scenario-table td:first-child {
  white-space: nowrap;
}

.scenario-table th {
  background: #f0f7ff;
  color: var(--vi-ink);
  font-weight: 700;
}

.scenario-table tbody tr:nth-child(even) {
  background: #fafcff;
}

.radar-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-width: 280px;
}

.error-attribution-bars {
  font-size: 13px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.bar-label {
  min-width: 140px;
  color: var(--muted);
}

.bar-track {
  flex: 1;
  display: flex;
  height: 20px;
  background: #e8edf2;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bar-seg {
  display: inline-block;
  height: 100%;
  min-width: 2px;
}

.bar-legend {
  min-width: 180px;
  font-size: 11px;
  color: var(--muted);
}

/* ----- Footer ----- */
.footer {
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.footer code {
  font-family: "SF Mono", Consolas, monospace;
  background: rgba(92, 112, 136, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
}

/* 权重模式说明弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 18, 38, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overscroll-behavior: contain;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(18, 42, 84, 0.2);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head .modal-head-back {
  margin-right: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--vi-ink);
  flex: 1;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #e8edf2;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--line);
  color: var(--text);
}

/* 模型选择弹层（参考模型管理界面） */
.model-picker-overlay .modal-content {
  max-width: 960px;
}

.model-picker-modal {
  overflow: hidden;
}

.model-picker-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.model-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #fafcff;
}

.model-picker-filters {
  display: flex;
  align-items: center;
  gap: 16px;
}

.model-picker-filters label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.model-picker-filters select,
.model-picker-filters input[type="text"] {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  min-width: 180px;
}

.model-picker-count {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--vi-ocean);
}

#model-settings-entry-btn {
  flex-shrink: 0;
}

.model-picker-main.hidden {
  display: none !important;
}

.model-picker-overlay.model-settings-active .modal-foot,
.model-picker-overlay.price-monitor-active .modal-foot {
  display: none;
}

/* 价格监控视图：仅表格区域滚动，弹层主体不滚动 */
.model-picker-overlay.price-monitor-active .modal-content {
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.model-picker-overlay.price-monitor-active .price-monitor-view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.model-picker-overlay.price-monitor-active #price-monitor-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.model-picker-overlay.price-monitor-active .price-monitor-view .provider-api-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.model-picker-overlay.price-monitor-active .price-monitor-view .provider-api-card-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.model-settings-view {
  padding: 20px;
}

.model-settings-view.hidden {
  display: none !important;
}

.model-settings-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.model-settings-head h4 {
  margin: 0;
  font-size: 16px;
}

.model-settings-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.model-data-toolbar {
  margin-bottom: 16px;
}

.model-data-auto-update {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}

.model-data-auto-update input[type="checkbox"] {
  margin: 0;
}

.model-settings-content {
  min-height: 120px;
}

.provider-api-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.provider-api-card-head {
  padding: 12px 16px;
  font-weight: 700;
  background: #fafcff;
  border-bottom: 1px solid var(--line);
}

.provider-api-card-body {
  padding: 0;
}

/* 模型数据视图中仅表格区域滚动，不滚动底层弹层 */
.model-settings-view .provider-api-card .provider-api-card-body .modal-table-wrap,
.price-monitor-view .provider-api-card .provider-api-card-body .modal-table-wrap {
  max-height: 600px;
  overflow: auto;
  overflow-x: auto;
}

/* 价格监控激活时表格容器占满剩余空间，仅此处可滚动 */
.model-picker-overlay.price-monitor-active .price-monitor-view .modal-table-wrap.price-monitor-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.price-monitor-table {
  table-layout: fixed;
  min-width: 100%;
  width: 1300px;
}

.price-monitor-table .price-monitor-cell-bold {
  font-weight: bold;
}

.price-monitor-table .price-monitor-price {
  color: #1890ff;
  font-size: 13px;
  font-weight: bold;
}

.price-monitor-table .price-monitor-update-time {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}

.price-monitor-table .ant-tag {
  display: inline-block;
  padding: 0 6px;
  font-size: 12px;
  line-height: 20px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.price-monitor-table .ant-tag-blue {
  color: #1677ff;
  background: #e6f4ff;
  border-color: #91caff;
}

.price-monitor-table .ant-tag-green {
  color: #52c41a;
  background: #f6ffed;
  border-color: #b7eb8f;
}

.price-monitor-table .ant-tag-orange {
  color: #fa8c16;
  background: #fff7e6;
  border-color: #ffd591;
}

.price-monitor-table th.price-monitor-th-fix-left,
.price-monitor-table td.price-monitor-td-fix-left {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}

.price-monitor-table th.price-monitor-th-fix-right,
.price-monitor-table td.price-monitor-td-fix-right {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.06);
}

.price-monitor-table th,
.price-monitor-table td {
  padding: 8px;
  white-space: nowrap;
}

.price-monitor-table td:nth-child(2) {
  white-space: normal;
}

.provider-api-table {
  font-size: 12px;
}

.provider-api-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f5f9fc;
}

.provider-api-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.provider-api-table code {
  font-size: 11px;
  background: #eee;
  padding: 2px 6px;
  border-radius: 4px;
}

.ant-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.ant-tag-blue { background: #e6f4ff; color: #1677ff; }
.ant-tag-green { background: #f6ffed; color: #52c41a; }
.ant-tag-purple { background: #f9f0ff; color: #722ed1; }

.btn-link.btn-sm {
  padding: 0 4px;
  font-size: 12px;
}

.text-secondary { color: var(--muted); }

.provider-api-links { margin-top: 4px; }

.model-picker-table-wrap {
  padding: 0 20px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.model-picker-table th:first-child,
.model-picker-table td:first-child {
  width: 44px;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

/* 客观数据集弹窗 */
.objective-dataset-modal {
  max-width: 980px;
  overflow: hidden;
}

.objective-dataset-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
}

.objective-dataset-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--vi-ink);
}

.objective-dataset-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.objective-dataset-source {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcff;
}

.objective-dataset-source .muted {
  margin: 2px 0 0;
}

.objective-dataset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.objective-dataset-grid .full {
  grid-column: 1 / -1;
}

.objective-dataset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  color: var(--text);
}

.objective-dataset-foot {
  position: sticky;
  bottom: 0;
}

@media (max-width: 768px) {
  .objective-dataset-sources {
    grid-template-columns: 1fr;
  }

  .objective-dataset-grid {
    grid-template-columns: 1fr;
  }
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #fafcff;
}

.modal-body {
  padding: 20px;
  overflow: auto;
}

.modal-intro {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-table-wrap {
  overflow-x: auto;
}

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

.modal-table th,
.modal-table td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
  vertical-align: top;
}

.modal-table th {
  background: #f0f7ff;
  color: var(--vi-ink);
  font-weight: 700;
}

.modal-table td {
  color: var(--text);
}

.modal-table tbody tr:nth-child(even) {
  background: #fafcff;
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
  .intro-banner-inner {
    flex-direction: column;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .two-col,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .weight-mode-block {
    grid-template-columns: 1fr;
  }

  .weight-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .kpi-row,
  .review-dimensions {
    grid-template-columns: 1fr 1fr;
  }
}

/* 社区与专项排行榜 */
.leaderboard-entry-bar {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.leaderboard-modal.modal-content {
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.leaderboard-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.leaderboard-modal-head h3 {
  flex: 0 0 auto;
}

.leaderboard-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-source-note {
  font-size: 11px;
  line-height: 1.4;
  margin: 0 0 8px 0;
}

.leaderboard-count-bar {
  font-size: 13px;
  margin-bottom: 8px;
}

.leaderboard-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #fafcff;
}

.leaderboard-tab {
  padding: 12px 20px;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.leaderboard-tab:hover {
  color: var(--text);
}

.leaderboard-tab.active {
  color: var(--vi-ocean);
  font-weight: 600;
  border-bottom-color: var(--vi-ocean);
}

.leaderboard-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.leaderboard-view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.leaderboard-view.hidden {
  display: none !important;
}

.leaderboard-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overflow-x: auto;
}

.leaderboard-table {
  font-size: 12px;
  min-width: 1400px;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 8px 10px;
  white-space: nowrap;
  vertical-align: top;
}

.leaderboard-table td:nth-child(2),
.leaderboard-table td:nth-child(15) {
  white-space: normal;
}

.leaderboard-cell-bold {
  font-weight: bold;
}

.leaderboard-table small {
  font-size: 11px;
}

.specialized-leaderboard-list {
  overflow-y: auto;
  padding-right: 8px;
}

.specialized-leaderboard-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--panel);
}

.specialized-leaderboard-card:last-child {
  margin-bottom: 0;
}

.specialized-leaderboard-name {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: var(--vi-ink);
}

.specialized-leaderboard-top3 {
  margin-bottom: 8px;
  font-size: 13px;
}

.specialized-leaderboard-source {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 680px) {
  .task-form,
  .card-grid,
  .kpi-row,
  .review-dimensions {
    grid-template-columns: 1fr;
  }

  .top-nav {
    overflow-x: auto;
    width: 100%;
  }
}
