/* =============================================================================
   Painel de Email — sistema visual
   Tokens no :root (claro) e no tema escuro; componentes abaixo.
   ============================================================================= */
:root {
  --bg: #f6f7fb;
  --side: #fbfbfe;
  --surface: #ffffff;
  --surface-2: #f3f4f9;
  --surface-3: #eceef6;
  --border: #e5e7f0;
  --border-strong: #d5d8e6;
  --text: #11142a;
  --text-2: #3a3f58;
  --muted: #6b7088;
  --accent: #5b4cf0;
  --accent-hover: #4b3ce0;
  --accent-ink: #ffffff;
  --accent-soft: #efedff;
  --accent-line: #c9c3ff;
  --ok: #0f9d58;
  --ok-soft: #e6f6ed;
  --bad: #dc3545;
  --bad-soft: #fdecee;
  --warn: #b7791f;
  --warn-soft: #fdf3e2;
  --code-bg: #0e1020;
  --code-ink: #d8dcf0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 20, 42, .04);
  --shadow: 0 1px 2px rgba(17, 20, 42, .04), 0 4px 16px -6px rgba(17, 20, 42, .08);
  --shadow-lg: 0 12px 32px -12px rgba(17, 20, 42, .25);
  --ring: 0 0 0 3px rgba(91, 76, 240, .18);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c14;
    --side: #0e0f19;
    --surface: #131522;
    --surface-2: #191b2b;
    --surface-3: #202337;
    --border: #232639;
    --border-strong: #2f3350;
    --text: #eceefa;
    --text-2: #c6c9de;
    --muted: #8f94ad;
    --accent: #8a7dff;
    --accent-hover: #9d92ff;
    --accent-ink: #0d0b24;
    --accent-soft: #1f1c40;
    --accent-line: #3e3780;
    --ok: #3fcf86;
    --ok-soft: #0f2a1d;
    --bad: #ff6b72;
    --bad-soft: #31151a;
    --warn: #f2b44d;
    --warn-soft: #2e2311;
    --code-bg: #090a12;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset;
    --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
    --ring: 0 0 0 3px rgba(138, 125, 255, .25);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------- base */
* { box-sizing: border-box; }
/* Elementos com hidden somem mesmo quando a classe define display (grid, flex) */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; }
h1 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 16px; margin: 0; letter-spacing: -.01em; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.lead { color: var(--muted); margin: 6px 0 24px; max-width: 72ch; }

/* ----------------------------------------------------------------- layout */
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.content { min-width: 0; display: flex; flex-direction: column; }
main { padding: 28px clamp(16px, 3.2vw, 40px) 72px; max-width: 1180px; width: 100%; min-width: 0; outline: none; }

/* sidebar */
.side {
  background: var(--side); border-right: 1px solid var(--border);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 6px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #7c6cff, #5b4cf0 55%, #3d2fd1);
  box-shadow: 0 6px 16px -6px rgba(91, 76, 240, .7);
}
.brand-mark svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-weight: 700; letter-spacing: -.01em; font-size: 15px; }

.srv-pick {
  display: grid; gap: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px;
  box-shadow: var(--shadow-sm);
}
.srv-pick[hidden] { display: none; }
.srv-pick select { font-size: 13.5px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 7px 9px; color: var(--text); }

nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 10px 6px; }
nav a {
  display: flex; align-items: center; gap: 10px; color: var(--text-2); text-decoration: none;
  padding: 8px 10px; border-radius: 9px; font-weight: 500; transition: background .12s, color .12s;
}
nav a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
nav a.active svg { opacity: 1; }
.side-foot { margin-top: auto; font-size: 12.5px; color: var(--muted); padding: 10px 6px 0; border-top: 1px solid var(--border); display: grid; gap: 8px; justify-items: start; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 3.2vw, 40px); min-height: 56px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumb strong { color: var(--text); font-weight: 600; }
.crumb .sep { opacity: .5; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.srv-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; }

/* page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 12px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--border); }
  nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav-group { display: none; }
  nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .topbar { position: static; }
  main { padding: 20px 16px 56px; }
}

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px;
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .spacer, .spacer { flex: 1; }
.card-sub { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }
.step-n {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
}
.step-n.done { background: var(--ok-soft); color: var(--ok); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* callouts */
.callout { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.callout.warn { background: var(--warn-soft); border-color: transparent; color: var(--text); }
.callout.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.callout.ok { background: var(--ok-soft); border-color: transparent; color: var(--text); }
.callout.info { background: var(--accent-soft); border-color: transparent; color: var(--text); }
.callout ol, .callout ul { margin: 6px 0 0; padding-left: 20px; }

/* ------------------------------------------------------------------ forms */
label.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); align-content: start; }
.field > .hint, label.field .hint { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 14px; font-weight: 400; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0;
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--ring); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
textarea { resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 320px; line-height: 1.6; background: var(--surface-2); }
textarea.servers { min-height: 140px; }
textarea.accounts { min-height: 120px; }
textarea.masked { -webkit-text-security: disc; }
input.invalid, textarea.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }

button {
  font: inherit; font-weight: 600; font-size: 13.5px; border-radius: 9px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s, transform .06s;
}
button:hover { background: var(--surface-2); }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 14px -8px var(--accent); }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { color: var(--bad); }
button.link { border: 0; background: none; box-shadow: none; padding: 4px 6px; color: var(--accent); font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
details > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 500; }
details > summary:hover { color: var(--text); }

/* ----------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px 3px 8px;
  border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid var(--border);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 20px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: none; box-shadow: none; color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: 9px; white-space: nowrap; }
.tab:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab .count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.tab.active .count { background: var(--accent-soft); color: var(--accent); }
.tab .count.ok { background: var(--ok-soft); color: var(--ok); }

/* ------------------------------------------------------------------ stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat .s { font-size: 12px; margin-top: 2px; }
.stat::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: transparent; }
.stat.ok::after { background: var(--ok); }
.stat.bad::after { background: var(--bad); }
.stat.bad .v { color: var(--bad); }
.stat.ok .v { color: var(--ok); }

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.card.empty { box-shadow: none; border-style: dashed; background: transparent; }

/* ---------------------------------------------------------------- console */
.console {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius-sm); padding: 14px 16px;
  max-height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
}
.checklist { display: grid; gap: 14px; margin: 4px 0 14px; }
.checklist h4 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 6px; font-size: 13.5px; padding: 2px 0; }
.check .ic { font-weight: 700; }
.check.ok .ic { color: var(--ok); }
.check.bad .ic { color: var(--bad); }
.check.warn .ic { color: var(--warn); }
.check .fix { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), #a78bfa); transition: width .3s; }
.spinner { width: 14px; height: 14px; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- templates */
.tpl-list { display: grid; gap: 6px; }
.tpl-item { text-align: left; display: grid; gap: 2px; font-weight: 600; justify-items: start; box-shadow: none; }
.tpl-item.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tpl-item .muted { font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.preview { width: 100%; min-height: 440px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: 12px; padding: 4px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-weight: 500; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ----------------------------------------------------------------- toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 50; max-width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 11px 15px; border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 13.5px; white-space: pre-wrap; animation: toast-in .18s ease-out; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

/* ------------------------------------------- servidores, contas, remetentes */
.srv-card .card-head { margin-bottom: 14px; }
.srv-title { display: grid; gap: 2px; }
.srv-title .mono { color: var(--muted); }
.zone-list { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
.acc-row:first-child { border-top: 0; }
.accounts-grid { align-items: start; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.section-title .icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; flex: none; }
.prereq { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.prereq > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: var(--text-2); box-shadow: var(--shadow-sm); }
.prereq strong { display: block; color: var(--text); margin-bottom: 2px; }

/* -------------------------------------------------- status do processo */
.proc-rows { display: grid; gap: 10px; }
.proc-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 10px; background: var(--surface); }
.proc-row.live { border-color: var(--accent-line); box-shadow: var(--ring); }
.proc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.proc-head .spacer { flex: 1; }
.stages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px 4px 5px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid transparent; }
.stage-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; background: var(--border-strong); color: var(--surface); flex: none; }
.stage-dot .spinner { width: 12px; height: 12px; border-width: 2px; }
.stage.ok { color: var(--ok); background: var(--ok-soft); }
.stage.ok .stage-dot { background: var(--ok); }
.stage.warn { color: var(--warn); background: var(--warn-soft); }
.stage.warn .stage-dot { background: var(--warn); }
.stage.fail { color: var(--bad); background: var(--bad-soft); }
.stage.fail .stage-dot { background: var(--bad); }
.stage.running { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.stage.running .stage-dot { background: transparent; color: var(--accent); }
.stage.skipped { opacity: .5; }
.proc-now { font-size: 13px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); overflow-wrap: anywhere; border-left: 3px solid var(--border-strong); }
.proc-now.ok { border-left-color: var(--ok); }
.proc-now.bad { border-left-color: var(--bad); }
.proc-now.warn { border-left-color: var(--warn); }
.proc-now.step { border-left-color: var(--accent); }
.feed { background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius-sm); max-height: 380px; overflow: auto; font-family: var(--mono); font-size: 12.5px; padding: 8px 0; }
.feed-row { display: grid; grid-template-columns: 72px minmax(120px, 200px) 22px 1fr; gap: 8px; padding: 3px 14px; align-items: baseline; }
.feed-row:hover { background: rgba(255, 255, 255, .04); }
.feed-time { color: #6f7690; }
.feed-srv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a99fff; }
.feed-srv .muted { color: #8a90a8; }
.feed-ic { text-align: center; }
.feed-row.ok .feed-ic { color: #4fd895; }
.feed-row.bad .feed-ic, .feed-row.bad .feed-text { color: #ff8a90; }
.feed-row.warn .feed-ic, .feed-row.warn .feed-text { color: #f2b44d; }
.feed-row.fix .feed-text { color: #a5adc4; font-style: italic; }
.feed-row.step .feed-text { color: #b8afff; font-weight: 600; }
.feed-row.info .feed-text { color: #a5adc4; }
@media (max-width: 760px) {
  .feed-row { grid-template-columns: 62px 1fr; }
  .feed-srv { grid-column: 2; }
  .feed-ic { display: none; }
  .feed-text { grid-column: 1 / -1; padding-left: 8px; }
}
.pair-grid { align-items: start; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.pair-grid > .card { margin-bottom: 0; }

/* ------------------------------------------------ histórico (painel lateral) */
.drawer-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 24, .45); backdrop-filter: blur(2px); display: flex; justify-content: flex-end; animation: fade-in .15s ease-out; }
.drawer { width: min(420px, 100vw); height: 100%; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; animation: slide-in .2s ease-out; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; }
.drawer-head > div { flex: 1; display: grid; gap: 4px; }
.version { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.version.current { border-color: var(--accent-line); background: var(--accent-soft); }
.version-head { display: flex; align-items: center; gap: 8px; }
.version-when { font-weight: 700; font-variant-numeric: tabular-nums; }
.version-reason { font-size: 13px; color: var(--text-2); }
.page-head .lead { max-width: 64ch; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: .6; } }
button.link.danger { color: var(--bad); }

/* --------------------------------------------- marca (barra superior) */
.brand-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.brand-pick select { width: auto; min-width: 200px; max-width: 320px; padding: 6px 10px; font-size: 13px; font-weight: 600; border-radius: 99px; }
.drawer.wide { width: min(760px, 100vw); }
.drawer .card { box-shadow: none; }
.brand-cell { display: grid; gap: 1px; }
th.num { text-align: right; }
td.bad-text { color: var(--bad); font-weight: 600; }
.alert-list { display: flex; flex-wrap: wrap; gap: 4px; }
.alert-item { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.alert-item.bad { background: var(--bad-soft); color: var(--bad); }
.alert-item.warn { background: var(--warn-soft); color: var(--warn); }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bulk-bar > div { display: grid; gap: 2px; }
tr.live-row td { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 380px; }
th { white-space: nowrap; }
button.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; box-shadow: 0 6px 14px -8px var(--bad); }
button.danger-solid:hover { background: color-mix(in srgb, var(--bad) 88%, #000); border-color: transparent; }
td.dns-content { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------------------------------- mascote */
.brand-logo { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 4px 10px rgba(91, 76, 240, .35)); }
.empty-state { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 56px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.empty-state img { margin-bottom: 6px; animation: float 3.2s ease-in-out infinite; }
.empty-state p { max-width: 46ch; margin: 0 0 6px; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .empty-state img { animation: none; } }

/* ------------------------------------------------------- login e usuários */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 30px 28px; display: grid; gap: 6px; text-align: center; }
.auth-card > img { justify-self: center; margin-bottom: 4px; animation: float 3.2s ease-in-out infinite; }
.auth-card h1 { font-size: 21px; }
.auth-card > p { margin: 0 0 12px; }
.auth-card form { text-align: left; }
.auth-submit { justify-content: center; width: 100%; padding: 10px 14px; }
.auth-card .row .auth-submit { width: auto; flex: 1; }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; }
.user-menu > summary::-webkit-details-marker { display: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #8a7dff, #4632d6); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; }
.menu-head { display: grid; gap: 1px; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-item { border: 0; background: none; box-shadow: none; justify-content: flex-start; padding: 8px 10px; font-weight: 500; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--bad); }
.temp-pass { font-size: 18px; font-weight: 600; letter-spacing: .04em; margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px dashed var(--border-strong); user-select: all; }
.brand-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
tr.muted-row td { opacity: .55; }
.feed-who { color: #f0b9ff; }
@media (max-width: 860px) { .user-name { display: none; } }

/* textos de estado fora de tabela */
.bad-text { color: var(--bad); }
.warn-text { color: var(--warn); }
.drawer.xwide { width: min(980px, 100vw); }
