:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #6b645c;
  --line: #e4ddd4;
  --paper: #f6f3ee;
  --card: #fffcf8;
  --accent: #9a3412;
  --ok: #166534;
  --warn: #92400e;
  --bad: #991b1b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}
header, main { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0 8px;
}
.brand { color: var(--ink); font-weight: 700; text-decoration: none; letter-spacing: -0.02em; }
nav { display: flex; gap: 16px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); }
main { padding: 12px 0 48px; }
h1 { font-size: 28px; letter-spacing: -0.03em; margin: 8px 0 16px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.flash {
  background: #fff7ed;
  border: 1px solid #fdba74;
  padding: 10px 12px;
  border-radius: 8px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.card, form.panel, .table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.card strong { display: block; font-size: 26px; letter-spacing: -0.03em; }
.card span, .muted { color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, textarea, select, button {
  font: inherit;
  color: var(--ink);
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 9px 10px;
}
textarea { min-height: 140px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button, .button {
  display: inline-block;
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 9px 14px;
  text-decoration: none;
  cursor: pointer;
}
button.secondary, .button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.warn { background: var(--accent); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; background: #eee; font-size: 12px; }
.pill.accepted { background: #dcfce7; color: var(--ok); }
.pill.deferred, .pill.submitted { background: #ffedd5; color: var(--warn); }
.pill.bounced, .pill.failed { background: #fee2e2; color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.note {
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  color: var(--muted);
  margin: 0 0 16px;
}
.login { width: min(420px, 100%); margin: 10vh auto; }
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
  header { flex-direction: column; align-items: flex-start; }
}
