:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1a2340;
  --muted: #5c668a;
  --ok: #0a8f4d;
  --warn: #d08700;
  --full: #c62828;
  --border: #dce2f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #0f1d4f;
  color: #fff;
}

header nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 12px;
  opacity: 0.9;
}

header nav a.active {
  font-weight: 700;
  opacity: 1;
}

main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

input,
select,
button,
textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
}

button {
  cursor: pointer;
  background: #273b88;
  color: #fff;
  border: none;
}

button.secondary {
  background: #e7ecfb;
  color: var(--text);
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.metric {
  font-size: 2rem;
  font-weight: 700;
}

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

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-ok {
  background: var(--ok);
}

.status-warning {
  background: var(--warn);
}

.status-full {
  background: var(--full);
}

.status-stale {
  background: #6a1b9a;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.chart {
  width: 100%;
  height: 220px;
  background: #fbfcff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.form-stack {
  display: grid;
  gap: 8px;
}

.notice {
  margin-top: 8px;
  font-size: 0.9rem;
}
