:root { --ink:#1d2433; --muted:#667085; --line:#e4e7ec; --bg:#f5f7fa; --card:#fff; --brand:#2563eb; --brand-d:#1d4ed8; --ok:#067647; --ok-bg:#ecfdf3; --err:#b42318; --err-bg:#fef3f2; --warn-bg:#fffaeb; --warn:#93370d; --r:10px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.45rem; margin: 6px 0 14px; } h2 { font-size: 1.1rem; margin: 22px 0 10px; } .card h2 { margin-top: 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
code { font-family: ui-monospace, Consolas, monospace; background: #f2f4f7; padding: 2px 6px; border-radius: 6px; word-break: break-all; font-size: .9rem; }
code.big { font-size: 1.15rem; padding: 6px 10px; }
.copy { cursor: copy; } .copied { outline: 2px solid var(--ok); }
/* top bar + menu: sidebar on computers, Menu button on phones */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: #101828; color: #fff; height: 52px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; }
.menu-toggle { background: none; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
.side { display: none; position: fixed; z-index: 9; top: 52px; right: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.15); min-width: 200px; padding: 6px 0; }
.side.open { display: block; }
.side a, .linkbtn { display: block; padding: 10px 16px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; width: 100%; text-align: left; cursor: pointer; }
.side a[aria-current] { background: #eff4ff; color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.side form { margin: 6px 0 0; border-top: 1px solid var(--line); padding-top: 6px; }
.main { padding: 16px; max-width: 900px; margin: 0 auto; padding-bottom: 60px; }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: #101828; }
@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .side { display: block; top: 52px; left: 0; right: auto; bottom: 0; width: 220px; border-radius: 0; box-shadow: none; border: 0; border-right: 1px solid var(--line); padding-top: 12px; }
  .main { margin: 0 0 0 220px; max-width: 980px; padding: 24px 32px 60px; }
}
/* blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card.narrow { width: 100%; max-width: 380px; } .card.warn { border-color: #fecdca; background: #fffbfa; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.head h1 { margin: 6px 0; }
.crumbs { margin: 0 0 4px; font-size: .9rem; } .crumbs a { text-decoration: none; } .crumbs a::before { content: "← "; }
.msg { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; } .msg.ok { background: var(--ok-bg); color: var(--ok); } .msg.err { background: var(--err-bg); color: var(--err); } .msg.warn { background: var(--warn-bg); color: var(--warn); }
.alerts { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 10px 14px 10px 30px; margin: 0 0 14px; } .alerts li { margin: 4px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-decoration: none; color: var(--ink); }
.stat b { display: block; font-size: 1.6rem; } .stat span { color: var(--muted); font-size: .9rem; }
.rows { list-style: none; margin: 0 0 14px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.rows li + li { border-top: 1px solid var(--line); }
.rows a { display: block; padding: 12px 16px; text-decoration: none; color: var(--ink); } .rows small { display: block; color: var(--muted); }
.cards { list-style: none; margin: 0; padding: 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; background: #f2f4f7; color: var(--muted); }
.badge.on { background: var(--ok-bg); color: var(--ok); } .badge.off { background: var(--err-bg); color: var(--err); }
.tick { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: .8rem; margin-right: 4px; }
.tick.yes { background: var(--ok); } .tick.no { background: var(--err); }
.dns dl, .card dl { margin: 8px 0; } dt { font-size: .8rem; color: var(--muted); margin-top: 6px; } dd { margin: 2px 0 0; }
.kv { list-style: none; padding: 0; margin: 0; } .kv li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; } .kv li:first-child { border-top: 0; }
.logrows { list-style: none; padding: 0; margin: 0 0 14px; } .logrows li { background: #fff; border: 1px solid var(--line); border-left: 4px solid #d0d5dd; border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; }
.logrows .st-delivered { border-left-color: var(--ok); } .logrows .st-rejected, .logrows .st-bounced { border-left-color: var(--err); } .logrows .st-deferred { border-left-color: #f79009; }
.addr-line { word-break: break-all; }
/* forms */
label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 12px; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 80px; resize: vertical; } .copyarea { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; } label.check input { margin-top: 4px; }
.addr { display: flex; align-items: center; gap: 6px; } .addr input { flex: 1; min-width: 0; } .addr span { color: var(--muted); white-space: nowrap; margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-d); } .btn.wide { width: 100%; } .btn.small { min-height: 34px; padding: 4px 12px; font-size: .9rem; }
.btn.light { background: #fff; color: var(--brand); } .btn.danger { background: #fff; color: var(--err); border-color: #fda29b; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .row form { margin: 0; }
details summary { cursor: pointer; color: var(--brand); margin: 6px 0; }
.qr { display: block; width: 220px; height: 220px; margin: 8px 0; }
.guide ol li { margin: 8px 0; }
:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }
@media print { .top, .noprint, .crumbs, .side { display: none !important; } body { background: #fff; } .main { padding: 0 !important; margin: 0 !important; } .card { border: 0; } }
