:root {
  color-scheme: light;
  --bg: #f7f4ec;
  --card: #fffdf8;
  --ink: #1d1d1b;
  --muted: #625f57;
  --line: #ddd3c1;
  --accent: #155eef;
  --accent-soft: #e6efff;
  --success: #0a7d32;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #fff4d6 0, transparent 35%),
    linear-gradient(180deg, #f9f6ef 0%, #f1ece1 100%);
  color: var(--ink);
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 0 20px 32px;
  font-size: 14px;
}

.site-footer a {
  color: var(--muted);
}

.topbar,
.section-header,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.admin-grid {
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(29, 29, 27, 0.06);
  margin-bottom: 18px;
}

.login-card {
  max-width: 460px;
  margin: 12vh auto 0;
  text-align: center;
}

.legal-card {
  max-width: 820px;
  margin: 24px auto 0;
  line-height: 1.6;
}

.legal-card ul {
  padding-left: 20px;
}

.metric-card .metric {
  font-size: 52px;
  font-weight: 700;
  margin: 8px 0 0;
}

.label,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

h1,
h2 {
  margin-top: 0;
}

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

.details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

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

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

th {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 14px;
}

label span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.secondary-button {
  background: var(--accent-soft);
  color: var(--accent);
}

.message {
  min-height: 24px;
  margin-top: 12px;
  font-size: 14px;
}

.message.success {
  color: var(--success);
}

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

.hidden {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

code {
  font-family: "JetBrains Mono", monospace;
}

@media (max-width: 720px) {
  .topbar,
  .section-header,
  .button-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .shell {
    padding: 20px 14px 32px;
  }
}
