:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #5f646d;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #dedbd2;
  --accent: #1f6f78;
  --accent-dark: #164f56;
  --danger: #9e2f2f;
  --warning: #8a650f;
  --ok: #226443;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.96);
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px clamp(18px, 4vw, 56px) 64px;
}

.hero {
  padding: clamp(34px, 7vw, 82px) 0 28px;
  border-bottom: 1px solid var(--line);
}

.hero.compact {
  padding-top: 34px;
}

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

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.85rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
}

.hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.panel,
.content-band,
.admin-tools,
.table-wrap {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stacked-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c9c4b8;
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.checkbox-row {
  grid-template-columns: 20px 1fr;
  align-items: start;
  color: var(--muted);
  font-weight: 500;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

button,
.button {
  appearance: none;
  border: 0;
  border-radius: 6px;
  padding: 11px 15px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.button.secondary {
  background: #eef6f6;
  color: var(--accent-dark);
}

.notice {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.notice.error {
  background: #fff1f1;
  color: var(--danger);
  border: 1px solid #f0c2c2;
}

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

.record-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.record-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

dl {
  display: grid;
  grid-template-columns: minmax(130px, 0.32fr) 1fr;
  gap: 10px 18px;
  margin: 18px 0;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-confirmed {
  background: #e8f4ed;
  color: var(--ok);
}

.status-needs-correction,
.status-pending-activation {
  background: #fff7df;
  color: var(--warning);
}

.status-suspended,
.status-removed,
.status-revoked,
.status-invalid-claim {
  background: #fff1f1;
  color: var(--danger);
}

.admin-tools form {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

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

th {
  color: var(--muted);
  font-size: 0.85rem;
}

.actions,
.actions form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.actions input {
  width: 260px;
}

.actions select {
  width: 180px;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  dl {
    grid-template-columns: 1fr;
  }

  .panel,
  .content-band,
  .admin-tools,
  .table-wrap {
    padding: 18px;
  }

  .admin-tools form {
    align-items: stretch;
    flex-direction: column;
  }
}
