:root {
  --mhf-blue: #1e3a5f;
  --mhf-accent: #2d6a9f;
  --surface: #f7f9fc;
  --border: #d8dee9;
  --text: #1a1a1a;
  --muted: #5c6570;
  --error: #b42318;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--mhf-blue);
  color: #fff;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header a {
  color: #fff;
  text-decoration: none;
}

.site-header a:hover { text-decoration: underline; }

.site-header form.inline { margin: 0; }

.site-header button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

#content { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.card-narrow { max-width: 420px; margin: 2rem auto; }

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 { margin: 0; font-size: 1.5rem; }

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

.error { color: var(--error); }

.stack { display: grid; gap: 1rem; }

.stack label { display: grid; gap: 0.35rem; font-weight: 500; }

.stack input, .org-select select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.stack button {
  padding: 0.6rem 1rem;
  background: var(--mhf-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.app-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.app-grid a {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}

.app-grid a:hover { border-color: var(--mhf-accent); }

.metrics-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  background: var(--surface);
}

.metric-card h2 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--mhf-blue);
}

.metric-value.loading { opacity: 0.4; }

.metric-value.error { color: var(--error); font-size: 1rem; }
