:root {
  --bg-panel: rgba(255, 250, 240, 0.84);
  --text: #172126;
  --muted: #5a6770;
  --line: rgba(23, 33, 38, 0.08);
  --healthy: #1f8f61;
  --degraded: #d68018;
  --down: #cf4a32;
  --unknown: #687684;
  --shadow: 0 24px 50px rgba(73, 52, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(230, 176, 118, 0.22), transparent 26%),
    radial-gradient(circle at right 20%, rgba(70, 135, 127, 0.2), transparent 24%),
    linear-gradient(160deg, #f7f2ea 0%, #efe6d8 44%, #e8ddd0 100%);
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #97663c;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 0.95;
}

.hero-text {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-meta {
  display: grid;
  gap: 14px;
  width: min(280px, 100%);
}

.meta-card,
.summary-chip,
.status-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
}

.meta-card {
  border-radius: 22px;
  padding: 18px 20px;
}

.meta-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 28px 0 18px;
}

.toolbar h2 {
  margin: 0;
  font-size: 24px;
}

.toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.search-input {
  width: 260px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.refresh-button {
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(135deg, #1b8060, #235f8a);
  cursor: pointer;
  font-size: 14px;
}

.summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.summary-chip {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.status-card {
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 16px 28px rgba(60, 46, 26, 0.08);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.model-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  word-break: break-word;
}

.model-desc {
  margin: 8px 0 0;
  color: var(--muted);
  min-height: 22px;
}

.status-badge {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.status-badge.healthy {
  color: var(--healthy);
  background: rgba(31, 143, 97, 0.12);
}

.status-badge.degraded {
  color: var(--degraded);
  background: rgba(214, 128, 24, 0.12);
}

.status-badge.down {
  color: var(--down);
  background: rgba(207, 74, 50, 0.12);
}

.status-badge.unknown {
  color: var(--unknown);
  background: rgba(104, 118, 132, 0.12);
}

.status-reason {
  margin: 18px 0;
  min-height: 46px;
  color: #314047;
  line-height: 1.65;
}

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

.metric-item {
  border-radius: 18px;
  padding: 14px;
  background: rgba(249, 245, 238, 0.9);
}

.metric-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric-item strong {
  font-size: 18px;
  word-break: break-word;
}

.empty-state {
  border-radius: 24px;
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
}

.hidden {
  display: none !important;
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 16px, 1200px);
    padding-top: 14px;
    padding-bottom: 32px;
  }

  .hero,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero {
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-text {
    font-size: 14px;
  }

  .toolbar {
    margin-top: 18px;
  }

  .toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input,
  .refresh-button {
    width: 100%;
  }

  .summary-bar {
    gap: 8px;
  }

  .summary-chip {
    width: calc(50% - 4px);
    text-align: center;
  }

  .status-grid {
    gap: 12px;
  }

  .status-card {
    padding: 18px;
    border-radius: 20px;
  }

  .card-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .status-badge {
    align-self: flex-start;
  }

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

  .metric-item {
    padding: 12px;
  }
}
