
:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --ink: #1f2420;
  --muted: #6c716b;
  --line: #d9d0c2;
  --panel: #fffdf8;
  --accent: #315b46;
  --accent-2: #8b4a2f;
  --danger: #9a2e2e;
  --ok: #2f684e;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.topbar, .panelHead, .inline, .buttonRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar { margin-bottom: 18px; }
.eyebrow {
  margin: 0 0 3px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 4vw, 42px); }
h2 { margin-bottom: 8px; font-size: 18px; }
p { color: var(--muted); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.metric strong { display: block; font-size: 28px; }
.metric span { color: var(--muted); font-size: 13px; }

.settingsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.settingsGrid .wide { grid-column: span 3; }

.twoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, select, textarea, button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

input, select, textarea {
  background: #fff;
  color: var(--ink);
  padding: 10px;
}

button {
  cursor: pointer;
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 800;
  padding: 10px 12px;
}
button.secondary {
  width: auto;
  background: transparent;
  color: var(--accent);
}
button.small {
  width: auto;
  padding: 7px 9px;
  font-size: 12px;
}
button.warn { background: var(--accent-2); border-color: var(--accent-2); }
button.danger { background: var(--danger); border-color: var(--danger); }

.tableWrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  background: #ece6db;
}
.pill.sent, .pill.queued { background: #dcebe1; color: var(--ok); }
.pill.error { background: #f3dddd; color: var(--danger); }

.stack { display: grid; gap: 10px; }
.activity { display: grid; gap: 9px; max-height: 420px; overflow: auto; }
.event {
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  font-size: 13px;
}
.event strong { display: block; }
.notice { min-height: 20px; margin: 12px 0 0; font-weight: 700; }

@media (max-width: 850px) {
  .grid, .settingsGrid, .twoCol { grid-template-columns: 1fr; }
  .topbar, .panelHead, .inline, .buttonRow { align-items: stretch; flex-direction: column; }
  button.secondary { width: 100%; }
}
