:root {
  --bg: #f6f7f9; --card: #fff; --text: #1c2430; --muted: #667085; --line: #e4e7ec;
  --brand: #1d4ed8; --ok: #067647; --okbg: #ecfdf3; --warn: #b54708; --warnbg: #fffaeb;
  --bad: #b42318; --badbg: #fef3f2;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: #0f172a; }
.top a, .top button.link { color: #e2e8f0; text-decoration: none; margin-left: 18px; }
.brand { font-weight: 700; font-size: 18px; margin-left: 0 !important; color: #fff !important; }
nav { display: flex; align-items: center; }
main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; }
.narrow { max-width: 460px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; }
.stats .num { font-size: 26px; font-weight: 700; }
.stats span:last-child { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
label { display: block; margin-bottom: 12px; font-size: 14px; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 7px; background: #fff; }
label input { display: block; width: 100%; margin-top: 4px; }
button, .button { font: inherit; padding: 8px 14px; border: 0; border-radius: 7px; background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary { background: #e0e7ff; color: var(--brand); }
button.danger { background: var(--badbg); color: var(--bad); }
button.link { background: none; padding: 0; }
form.inline { display: inline; margin: 0; }
form.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.row input { flex: 1 1 240px; }
.flash { padding: 10px 14px; border-radius: 8px; background: var(--okbg); color: var(--ok); }
.flash.error { background: var(--badbg); color: var(--bad); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #eef2f6; color: var(--muted); }
.tag.active, .tag.verified, .tag.delivered { background: var(--okbg); color: var(--ok); }
.tag.pending, .tag.queued, .tag.submitted, .tag.deferred, .tag.provisioning { background: var(--warnbg); color: var(--warn); }
.tag.suspended, .tag.failed, .tag.bounced, .tag.complained, .tag.rejected { background: var(--badbg); color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono, .secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.secret { background: #f2f4f7; border: 1px dashed #98a2b3; border-radius: 7px; padding: 10px; font-size: 14px; user-select: all; }
.secret-list dt { font-weight: 600; margin-top: 10px; }
.secret-list dd { margin: 4px 0 0; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
summary { cursor: pointer; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
