:root {
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --bg-soft: #fafcff;
  --line: #e5eaf3;
  --text-main: #1f2d3d;
  --text-sub: #6b7a90;
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
  --radius: 10px;
}

body.app-body {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.app-shell { max-width: 1200px; }
.letter-space { letter-spacing: .06em; }

.brand-en {
  margin: 0;
  color: #98a3b3;
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: .12em;
  font-weight: 500;
}

.brand-cn {
  margin: 4px 0 0;
  color: #1f2d3d;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
}

.hero-kicker {
  margin-bottom: 6px;
  color: #8a98ad;
  font-size: 11px;
  letter-spacing: .06em;
  font-weight: 600;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 10px;
  color: #1f2d3d;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 600;
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}

.hero-subtitle {
  margin: 0 0 12px;
  color: #6b7a90;
  font-size: 13px;
  line-height: 1.65;
}

.glass-nav {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(18, 38, 63, .06);
}

.nav-pills .nav-link {
  color: #44546a;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  padding: 6px 14px;
}

.nav-pills .nav-link:hover {
  color: var(--primary);
  background: #e6f4ff;
}

.nav-pills .nav-link.active {
  color: var(--primary);
  background: #e6f4ff;
  font-weight: 600;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fcfdff);
  box-shadow: 0 2px 8px rgba(18, 38, 63, .05);
}

.hero-panel .text-white,
.hero-panel .text-white-50,
.hero-panel .display-6,
.hero-panel p,
.hero-panel h2,
.hero-panel small,
.hero-panel strong {
  color: var(--text-main) !important;
}

.hero-panel .badge {
  color: var(--primary) !important;
  background: #e6f4ff !important;
  border: 1px solid #bae0ff;
  font-weight: 500;
}

.hero-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 10px 12px;
}

.hero-metric small { display: block; color: var(--text-sub); font-size: 12px; }
.hero-metric strong { color: var(--text-main); font-size: 14px; font-weight: 600; }

.card {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(18, 38, 63, .05);
}

.card .text-secondary,
.small.text-secondary { color: var(--text-sub) !important; }

.form-label {
  color: #34455a;
  font-size: 14px;
  font-weight: 500;
}

.form-control,
.form-select {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  color: var(--text-main);
  min-height: 38px;
  font-size: 14px;
}

.form-control::placeholder { color: #94a3b8; }

.form-control:focus,
.form-select:focus {
  border-color: #91caff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .15);
}

.form-control[readonly] {
  background: #f5f7fa;
  color: #1d39c4;
  font-weight: 600;
}

.btn {
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.art-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 12px;
}

.is-hidden { display: none !important; }

.kpi-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 10px 12px;
}

.kpi-card small { display: block; color: var(--text-sub); font-size: 12px; }
.kpi-card strong { color: var(--text-main); font-size: 15px; font-weight: 600; }

.tier-row { display: flex; flex-wrap: wrap; gap: 8px; }

.tier-filter {
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  background: #fff;
  color: #4b5d75;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
}

.tier-filter:hover { border-color: #91caff; color: var(--primary); }

.tier-filter.active {
  color: #fff;
  border-color: transparent;
  background: #334155;
}

.tier-filter.active[data-tier-filter="全部"] { background: var(--primary); }
.tier-filter.active.crash { background: var(--danger); }
.tier-filter.active.steady { background: var(--warning); }
.tier-filter.active.safe { background: var(--success); }

.guide-item {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 9px 10px;
}

.guide-item p { margin: 0; font-size: 12px; color: #4b5d75; }
.guide-item strong { display: block; font-size: 14px; color: var(--text-main); }
.guide-item span { font-size: 12px; color: var(--text-sub); }

.recommendation-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
}

.recommendation-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-main);
  --bs-table-striped-bg: #fafcff;
  --bs-table-striped-color: var(--text-main);
  --bs-table-hover-bg: #f0f7ff;
  --bs-table-hover-color: var(--text-main);
  min-width: 900px;
}

.recommendation-table thead th {
  background: #fafcff;
  color: #44546a;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.recommendation-table td,
.recommendation-table th {
  border-color: var(--line);
  font-size: 13px;
}

tbody tr.is-row-hidden { display: none; }

.tier-pill {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
}

.tier-crash { background: #fff1f0; color: #cf1322; }
.tier-steady { background: #fffbe6; color: #d48806; }
.tier-safe { background: #f6ffed; color: #389e0d; }

.prob-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  border-radius: 999px;
  border: 1px solid #d9e2ef;
  background: #fff;
  color: #334155;
  padding: 2px 10px;
  cursor: help;
}

.prob-chip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: 228px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1f2d3d;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  z-index: 5;
}

.prob-chip:hover::after { opacity: 1; }

.about-card .about-block,
.admin-block .admin-list-col {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 12px;
}

.admin-inline-form {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed #dbe3ef;
  padding: 8px 0;
}

.admin-inline-form:last-child { border-bottom: 0; }

@media (max-width: 768px) {
  .brand-cn { font-size: 17px; }
  .hero-title { font-size: 22px; padding-left: 8px; border-left-width: 3px; }
  .hero-subtitle { font-size: 12px; line-height: 1.6; }
  .recommendation-wrap { border: 0; background: transparent; }
  .recommendation-table { min-width: 0; }
  .recommendation-table thead { display: none; }

  .recommendation-table tbody {
    display: grid;
    gap: 8px;
  }

  .recommendation-table tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
  }

  .recommendation-table tbody td {
    display: grid;
    grid-template-columns: 82px 1fr;
    align-items: start;
    gap: 8px;
    border-bottom: 1px dashed #e5eaf3;
    padding: 5px 4px;
  }

  .recommendation-table tbody td:last-child { border-bottom: 0; }

  .recommendation-table tbody td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 12px;
  }
}
