:root {
  --bg: #eef5f8;
  --panel: #ffffff;
  --text: #123040;
  --muted: #617683;
  --accent: #00698f;
  --accent-dark: #004965;
  --ok: #216e45;
  --warn: #985900;
  --danger: #a12828;
  --shadow: 0 18px 55px rgba(18, 48, 64, 0.13);
  --radius: 26px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #d8edf5, var(--bg) 44%, #f8fbfc 100%);
  color: var(--text);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 54px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
}

.club-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.metric-card, .info-card, .bridge-card, .error-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 24px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card--primary {
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #fff;
}

.metric-card--primary .metric-label,
.metric-card--primary .metric-unit { color: rgba(255, 255, 255, 0.82); }

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  margin: 8px 0 2px;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1;
}

.metric-value--small { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.metric-unit { color: var(--muted); font-weight: 650; }

.info-card {
  padding: 24px 28px;
  line-height: 1.58;
  margin-bottom: 22px;
}

.info-card p { margin: 0 0 16px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card a { color: var(--accent-dark); font-weight: 750; }

.bridge-card { overflow: hidden; }
.bridge-image {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  background: #d7e3e9;
}

.below-image { padding: 24px 28px 30px; }
.timestamp { margin: 0 0 18px; font-size: 1.1rem; }

.trend-wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
}

.trend-subline {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.trend-label {
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 850;
  background: #edf5f8;
  color: var(--accent-dark);
  white-space: nowrap;
}

.trend-label.up { color: var(--ok); background: #e8f4ed; }
.trend-label.down { color: var(--danger); background: #f7eaea; }
.trend-label.flat { color: var(--warn); background: #fff4df; }

#trend-chart {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #f6fafc;
  border: 1px solid #d8e7ed;
}

.error-box {
  margin-top: 22px;
  padding: 18px 22px;
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 820px) {
  .hero { align-items: flex-start; }
  .club-logo { width: 74px; height: 74px; }
  .status-panel { grid-template-columns: 1fr; }
  .metric-card { min-height: 138px; }
  .trend-wrap { align-items: flex-start; flex-direction: column; }
}
