/* Visual propositalmente simples: uma folha só, sem frameworks. */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --text: #1f2a37;
  --muted: #5d6b7a;
  --line: #d3dae2;
  --accent: #1f5f8b;
  --accent-text: #ffffff;
  --ok-bg: #e3f3e8; --ok-text: #1d5b32;
  --err-bg: #fbe6e4; --err-text: #8a2a1f;
  --warn: #9a5b00;
  --danger: #a3332a;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #161b22;
    --surface: #1f262f;
    --text: #e4e9ef;
    --muted: #9aa7b5;
    --line: #34404d;
    --accent: #5aa3d6;
    --accent-text: #0d1720;
    --ok-bg: #19352a; --ok-text: #9fdcb4;
    --err-bg: #3d2020; --err-text: #f2aba3;
    --warn: #e0a64a;
    --danger: #e8776c;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); }
.top {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  align-items: center; justify-content: space-between;
  padding: .75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.top nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: .95rem; }
.top .who { color: var(--muted); }
main {
  margin: 2rem auto; padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
}
main.narrow { max-width: 30rem; }
main.wide { max-width: 68rem; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.block + .block { border-top: 1px solid var(--line); margin-top: 2rem; }
.form { display: grid; gap: .9rem; }
.form.grid { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); align-items: end; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; color: inherit;
  padding: .55rem .65rem;
  background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px;
  width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
button {
  font: inherit; font-weight: 600;
  padding: .6rem 1rem;
  background: var(--accent); color: var(--accent-text);
  border: 0; border-radius: 6px; cursor: pointer;
}
button.small { padding: .3rem .6rem; font-size: .85rem; font-weight: 500;
  background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.danger { color: var(--danger); }
.links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.25rem; font-size: .95rem; }
.msg { padding: .7rem .9rem; border-radius: 6px; margin: 0 0 1rem; }
.msg-ok { background: var(--ok-bg); color: var(--ok-text); }
.msg-erro { background: var(--err-bg); color: var(--err-text); }
.warn { color: var(--warn); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.info { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.checks { list-style: none; padding: 0; }
.checks .ok { color: var(--ok-text); }
.checks .bad { color: var(--err-text); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tabs a { padding: .5rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
tr.off td { opacity: .55; }
.actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: flex-start; }
.actions form { margin: 0; }
details summary { cursor: pointer; font-size: .85rem; color: var(--accent); padding: .3rem 0; }
form.inline { display: flex; gap: .35rem; margin-top: .35rem; }
form.inline input { width: 10rem; padding: .3rem .5rem; }
.message { border: 1px solid var(--line); border-radius: 6px; padding: .9rem 1rem; margin-bottom: .9rem; }
.message.read { opacity: .65; }
.message header { display: flex; justify-content: space-between; gap: 1rem; }
.message .from { color: var(--muted); margin: .25rem 0 .5rem; font-size: .92rem; }
.message .body { margin: 0 0 .75rem; white-space: normal; overflow-wrap: anywhere; }
.log { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .8rem;
  font-size: .82rem; overflow-x: auto; white-space: pre-wrap; }
@media (max-width: 34rem) {
  main { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
}
