/* rpCheckDNS AUTH — versão web · tema e layout (fiel ao programa de desktop) */

:root {
  /* Theme */
  --window: #050806;
  --surface: #0B110D;
  --surface-alt: #101813;
  --hover: #15221A;
  --border: #26372C;
  --border-strong: #364A3D;
  --row-line: #1B2920;
  --text: #FFFFFF;
  --text2: #CDD8D0;
  --text3: #B8C4BB;
  --result-text: #E3EAE5;
  --green: #35E879;
  --green-hover: #4DF08A;
  --green-ink: #04130A;
  --green-sub-ink: #0A3A1D;
  --primary: #238636;
  --primary-hover: #2EA043;
  --primary-deep: #196C2E;
  --primary-sub-text: #D6F5DD;
  --amber: #F6C344;
  --red: #FF657A;
  --red-hover: #3A141B;
  --cyan: #77E1B5;
  --progress-track: #17241C;
  --mini-track: #1C2A21;
  --mini-marker: #5C7465;
  --scroll-thumb: #4A6352;

  /* Tones: fg / bg / line */
  --good-fg: #35E879; --good-bg: #0D2515; --good-line: #1F5635;
  --slow-fg: #F6C344; --slow-bg: #251E0A; --slow-line: #5A4816;
  --bad-fg: #FF657A;  --bad-bg: #290F14;  --bad-line: #662331;
  --info-fg: #77E1B5; --info-bg: #0C2220; --info-line: #1E5245;
  --neutral-fg: #CDD8D0; --neutral-bg: #101813; --neutral-line: #364A3D;

  /* Metrics (Small por padrão; o JS troca conforme a densidade) */
  --fs-xs: 13px; --fs-sm: 14px; --fs: 15px; --fs-host: 16px; --fs-h2: 20px; --fs-h1: 28px; --fs-num: 24px;
  --h-top: 44px; --h-btn: 40px; --h-input: 44px; --h-big: 60px; --h-row: 44px; --h-tab: 52px; --h-footer: 56px;
  --pad: 16px; --gap: 8px; --r: 8px; --r2: 10px; --pad-tab: 14px;
  --col-status: 88px; --col-result: 128px; --col-http: 96px; --col-dns: 72px; --col-time: 200px; --col-gap: 12px;
  --w-ms: 112px; --w-mini: 64px; --w-col: 880px; --w-st: 84px; --col-login: 112px;

  --font: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--window);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.33;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
::selection { background: rgba(53, 232, 121, .35); }

/* barras de rolagem escuras (DarkMode_Explorer) */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--surface); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--surface); }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 5px; border: 2px solid var(--surface); }

/* ------------------------------------------------------------------ */
/* Palco + janela                                                      */
/* ------------------------------------------------------------------ */
#stage {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: #000;
}
#app {
  position: relative;
  width: 100%; height: 100%;
  background: var(--window);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 0 1px #000;
}
#stage.mode-small #app,
#stage.mode-medium #app {
  max-width: 100%; max-height: 100%;
  border: 1px solid var(--border-strong);
}
#stage.mode-small #app  { width: 960px;  height: 540px; }
#stage.mode-medium #app { width: 1280px; height: 720px; }

.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.semibold { font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Ícones (Draw.Icon)                                                  */
/* ------------------------------------------------------------------ */
.ico { display: inline-block; width: 1em; height: 1em; flex: none; }
.ico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ico svg * { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.ico svg .fill { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------------ */
/* HeaderBar                                                           */
/* ------------------------------------------------------------------ */
.hbar {
  flex: none; height: var(--h-top);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 var(--pad);
  position: relative;
  user-select: none;
}
.hbar .logo {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--good-bg); border: 1px solid var(--good-line);
  display: grid; place-items: center; color: var(--green);
  margin-right: 10px; flex: none;
}
.hbar .logo .ico { width: 13px; height: 13px; }
.hbar .brand { line-height: 1; display: flex; flex-direction: column; flex: none; }
.hbar .brand .name { font-size: var(--fs-host); font-weight: 600; white-space: nowrap; line-height: 1.33; }
.hbar .brand .name b { color: var(--green); font-weight: 600; margin-left: 5px; }
.hbar .brand .by { font-size: var(--fs-xs); color: var(--text3); white-space: nowrap; margin-top: -3px; line-height: 1.33; }
.hbar .steps {
  position: absolute; left: 50%; top: 0; bottom: 1px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0; white-space: nowrap;
}
.hbar .step { display: flex; align-items: center; gap: 8px; }
.hbar .step .circle {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
  border: 2px solid var(--border-strong); color: var(--text2);
}
.hbar .step .circle .ico { width: 12px; height: 12px; color: var(--green); }
.hbar .step .label { font-size: var(--fs-sm); font-weight: 600; color: var(--text2); }
.hbar .step.active .circle { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.hbar .step.active .label { color: var(--text); }
.hbar .step.done .circle { background: var(--good-bg); border-color: var(--good-line); }
.hbar .step.pending .label { color: var(--text3); }
.hbar .step.clickable { cursor: pointer; }
.hbar .step.clickable:hover .label { color: var(--text); }
.hbar .connector { width: 48px; height: 2px; border-radius: 1px; background: var(--border-strong); margin: 0 12px; }
.hbar .connector.done { background: var(--good-line); }

/* SizeSelector */
.sizes {
  margin-left: auto; flex: none;
  display: flex; padding: 2px; border-radius: 8px;
  background: var(--window); border: 1px solid var(--border);
  height: 34px;
}
.sizes button {
  border: 0; background: transparent; color: var(--text3);
  font-size: var(--fs-xs); font-weight: 600; padding: 0 12px;
  border-radius: 6px; cursor: pointer; height: 100%;
}
.sizes button:hover { background: var(--surface-alt); color: var(--text2); }
.sizes button.selected { background: var(--hover); color: var(--text); }

/* ------------------------------------------------------------------ */
/* Botões (FlatButton / BigActionButton / FilterTab)                   */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h-btn); padding: 0 16px; border-radius: var(--r);
  font-size: var(--fs); font-weight: 600; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  background: var(--surface-alt); border-color: var(--border-strong); color: var(--text);
  user-select: none; position: relative; flex: none;
}
.btn .ico { width: .85em; height: .85em; color: var(--green); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--text); }
.btn.primary .ico { color: var(--text); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--bad-bg); border-color: var(--bad-line); color: var(--red); }
.btn.danger .ico { color: var(--red); }
.btn.danger:hover { background: var(--red-hover); }
.btn.ghost {
  background: transparent; border-color: transparent; color: var(--text2);
  height: 32px; padding: 0 12px; border-radius: 6px; font-size: var(--fs-sm);
}
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.ghost .ico { color: var(--green); }
.btn.icon-only { padding: 0 12px; }
.btn:disabled { cursor: default; opacity: .45; }
.btn:disabled:hover { background: var(--surface-alt); }
.btn.primary:disabled:hover { background: var(--primary); }
.btn:focus-visible, .bigbtn:focus-visible, .tab:focus-visible {
  outline: 2px solid rgba(255,255,255,.82); outline-offset: -2px;
}
.btn .stroke { stroke-width: 1.8px; }

/* Botões grandes das etapas */
.bigbtn {
  height: var(--h-big); border-radius: var(--r2);
  background: var(--surface-alt); border: 1px solid var(--border-strong);
  display: flex; align-items: center; padding: 0 20px; gap: 14px;
  cursor: pointer; text-align: left; color: var(--text); position: relative;
}
.bigbtn:hover { background: var(--hover); }
.bigbtn .circle {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--hover); border: 1px solid var(--border-strong);
  display: grid; place-items: center; color: var(--green);
}
.bigbtn .circle .ico { width: 14px; height: 14px; margin-left: 1px; }
.bigbtn .texts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bigbtn .title { font-size: var(--fs-host); font-weight: 600; }
.bigbtn .subtitle { font-size: var(--fs-xs); color: var(--text2); }
.bigbtn .chev { width: 18px; height: 18px; color: var(--text2); flex: none; }
.bigbtn.primary { background: var(--primary); border-color: var(--primary); }
.bigbtn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.bigbtn.primary .circle { background: var(--primary-deep); border-color: var(--primary-deep); color: var(--text); }
.bigbtn.primary .subtitle { color: var(--primary-sub-text); }
.bigbtn.primary .chev { color: var(--text); }
.bigbtn:disabled { cursor: default; opacity: .45; }
.bigbtn:disabled:hover { background: var(--surface-alt); }
.bigbtn.primary:disabled:hover { background: var(--primary); }

/* Filtros */
.tab {
  height: var(--h-tab); padding: 0 var(--pad-tab); border-radius: var(--r2);
  background: var(--surface); border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 0; cursor: pointer; color: var(--text2);
  flex: none; position: relative;
}
.tab:hover { background: var(--hover); }
.tab.selected { background: var(--surface-alt); border: 2px solid var(--green); color: var(--text); padding: 0 calc(var(--pad-tab) - 1px); }
.tab .dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; flex: none; }
.tab .caption { font-size: var(--fs); font-weight: 600; margin-right: 10px; }
.tab .count { font-size: var(--fs-num); font-weight: 600; color: var(--text); line-height: 1; }
.tab.good .dot { background: var(--good-fg); } .tab.good .count { color: var(--good-fg); }
.tab.slow .dot { background: var(--slow-fg); } .tab.slow .count { color: var(--slow-fg); }
.tab.bad .dot { background: var(--bad-fg); } .tab.bad .count { color: var(--bad-fg); }

/* ------------------------------------------------------------------ */
/* Tela 1 — Lista de URLs                                              */
/* ------------------------------------------------------------------ */
.screen { flex: 1; min-height: 0; position: relative; display: none; }
.screen.visible { display: flex; }
#inputScreen { flex-direction: column; align-items: center; padding: 20px var(--pad) var(--pad); }
#inputScreen .col {
  width: min(var(--w-col), 100%); min-width: min(300px, 100%);
  display: flex; flex-direction: column; height: 100%;
}
#inputScreen h1 { margin: 0; font-size: var(--fs-h1); font-weight: 600; line-height: 1.33; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#inputScreen .subtitle { margin: 4px 0 16px; font-size: var(--fs); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fields { display: grid; grid-template-columns: 4fr 3fr 3fr; column-gap: 12px; row-gap: 6px; margin-bottom: 16px; }
.fields label { font-size: var(--fs-sm); font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field {
  height: var(--h-input); border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border-strong);
  display: flex; align-items: center; padding: 0 14px; cursor: text; position: relative;
}
.field:focus-within { border-color: var(--green); }
.field.warning { border-color: var(--amber); }
.field.warning:focus-within { border-color: var(--green); }
.field input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  color: var(--text); font-family: inherit; font-size: var(--fs-host); padding: 0; height: 100%;
}
.field input::placeholder { color: #6E7D73; }
.field .toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.field .toggle .ico { width: 14px; height: 14px; }
.field.has-toggle input { padding-right: 44px; }
.urlshead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; gap: 16px; }
.urlshead label { font-size: var(--fs-sm); font-weight: 600; color: var(--text2); }
.urlshead .hint { font-size: var(--fs-xs); color: var(--text3); white-space: nowrap; }

.urlbox {
  flex: 1; min-height: 48px; margin-bottom: 16px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--border-strong);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.urlbox:focus-within { border-color: var(--green); }
.urlbox textarea {
  flex: 1; min-height: 0; resize: none; background: transparent; border: 0; outline: 0;
  color: var(--text); font-family: inherit; font-size: var(--fs);
  padding: 10px 3px 2px 14px; white-space: pre; overflow: auto; line-height: 1.33;
}
.urlbox textarea::placeholder { color: #6E7D73; }
.urlbox .ufoot {
  flex: none; height: 44px; background: var(--surface-alt); border-top: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 6px 0 14px; gap: 0;
}
.urlbox .badge {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-right: 8px;
  background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad-fg);
}
.urlbox .badge.good { background: var(--good-bg); border-color: var(--good-line); color: var(--good-fg); }
.urlbox .badge .ico { width: 10px; height: 10px; }
.urlbox .counter { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--text2); white-space: nowrap; overflow: hidden; }
.urlbox .counter b { color: var(--text); font-weight: 600; }
.urlbox .counter .inv { color: var(--amber); }
.urlbox .ufoot .btn + .btn { margin-left: 4px; }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: none; }

/* ------------------------------------------------------------------ */
/* Tela 2 — Teste                                                      */
/* ------------------------------------------------------------------ */
#testScreen { flex-direction: column; padding: var(--gap) 0 0; }
#testScreen > .body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 var(--pad); gap: var(--gap); }

.testcard {
  flex: none; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--border);
  padding: 12px 16px;
}
.testcard .row1 { display: flex; align-items: center; gap: 12px; height: var(--h-btn); }
.testcard .sep { width: 1px; height: 32px; background: var(--border); flex: none; }
.testcard .name { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.testcard .name .n { font-size: var(--fs-h2); font-weight: 600; line-height: 1.33; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.testcard .name .s { font-size: var(--fs-sm); color: var(--text2); line-height: 1.33; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.testcard .repeat { font-size: var(--fs-sm); font-weight: 600; color: var(--text3); margin-right: -4px; white-space: nowrap; }
.testcard .row2 { display: flex; align-items: center; gap: 16px; margin-top: 10px; min-height: 20px; }
.testcard .bar { flex: 1; height: 12px; border-radius: 6px; background: var(--progress-track); overflow: hidden; }
.testcard .bar i { display: block; height: 100%; border-radius: 6px; background: var(--green); min-width: 12px; width: 0; transition: width .25s; }
.testcard .bar i.zero { min-width: 0; width: 0 !important; }
.testcard .bar i.amber { background: var(--amber); }
.testcard .ptext { flex: none; font-size: var(--fs); white-space: pre; }
.testcard .ptext b { font-weight: 600; color: var(--text); }
.testcard .ptext b.green { color: var(--green); }
.testcard .ptext span { color: var(--text2); }

.tabsrow { flex: none; display: flex; gap: var(--gap); align-items: stretch; height: var(--h-tab); }

.diag {
  flex: 1; min-width: 0; height: var(--h-tab); position: relative;
  border-radius: var(--r2); background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px 0 20px; gap: 12px; overflow: hidden;
}
.diag::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--info-fg); }
.diag .circle { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-fg); }
.diag .circle .ico { width: 12px; height: 12px; }
.diag .texts { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.diag .t { font-size: var(--fs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.33; }
.diag .d { font-size: var(--fs-sm); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.33; }
.diag.good::before { background: var(--good-fg); } .diag.good .circle { background: var(--good-bg); border-color: var(--good-line); color: var(--good-fg); }
.diag.slow::before { background: var(--slow-fg); } .diag.slow .circle { background: var(--slow-bg); border-color: var(--slow-line); color: var(--slow-fg); }
.diag.bad::before { background: var(--bad-fg); }   .diag.bad .circle { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-fg); }
.diag.neutral::before { background: var(--neutral-fg); } .diag.neutral .circle { background: var(--neutral-bg); border-color: var(--neutral-line); color: var(--neutral-fg); }

/* Tabela de resultados */
.table {
  flex: 1; min-height: 0; position: relative;
  border-radius: var(--r2); background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; display: flex; flex-direction: column; outline: none;
}
.table .thead {
  flex: none; height: 32px; background: var(--surface-alt); border-bottom: 1px solid var(--border);
  display: grid; align-items: center; padding: 0 24px 0 16px; column-gap: var(--col-gap);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text3); white-space: nowrap; overflow: hidden;
}
.table .thead .th { overflow: hidden; text-overflow: ellipsis; }
.table .thead .th.right { text-align: right; }
.table .tbody { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; }
.table .tbody::-webkit-scrollbar { width: 12px; }
.table .tbody::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.table .tbody::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 3px; border: 3px solid var(--surface); min-height: 28px; }
.table .tbody::-webkit-scrollbar-thumb:hover { background: var(--mini-marker); }
.table .empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs); color: var(--text2); text-align: center; padding: 0 16px; }
.table .tr {
  display: grid; align-items: center; height: var(--h-row); padding: 0 24px 0 16px; column-gap: var(--col-gap);
  border-bottom: 1px solid var(--row-line); position: relative; cursor: default;
}
.table .tr:hover { background: var(--surface-alt); }
.table .tr.best::before { content: ""; position: absolute; left: 1px; top: 0; bottom: 1px; width: 3px; background: var(--green); }
.table .td { min-width: 0; }
.pill {
  height: 26px; width: var(--w-st); border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; padding: 0 6px;
  background: var(--neutral-bg); border: 1px solid var(--neutral-line); color: var(--neutral-fg);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pill.good { background: var(--good-bg); border-color: var(--good-line); color: var(--good-fg); }
.pill.slow { background: var(--slow-bg); border-color: var(--slow-line); color: var(--slow-fg); }
.pill.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-fg); }
.pill.best { background: var(--primary); border-color: var(--primary); color: var(--text); }
.tag {
  height: 26px; max-width: 100%; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px;
  background: var(--neutral-bg); border: 1px solid var(--neutral-line); color: var(--neutral-fg);
}
.tag.good { background: var(--good-bg); border-color: var(--good-line); color: var(--good-fg); }
.tag.slow { background: var(--slow-bg); border-color: var(--slow-line); color: var(--slow-fg); }
.tag.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-fg); }
.table .host { font-size: var(--fs-host); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .tr.muted .host { color: var(--text2); }
.table .result { font-size: var(--fs); color: var(--result-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .tr.muted .result { color: var(--text2); }
.table .dns { font-size: var(--fs); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .dns.failed { color: var(--red); font-weight: 600; }
.table .surl { display: flex; align-items: center; min-width: 0; font-size: var(--fs); color: var(--text2); white-space: nowrap; }
.table .surl .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-right: 8px; }
.table .surl.good { color: var(--result-text); } .table .surl.good .dot { background: var(--good-fg); }
.table .surl.bad { color: var(--red); font-weight: 600; } .table .surl.bad .dot { background: var(--bad-fg); }
.table .surl .h { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.table .surl .p { flex: none; }
.table .surl .sfx { flex: none; font-size: var(--fs-sm); font-weight: 400; color: var(--text2); white-space: pre; }
.table .surl .sfx.amber { color: var(--amber); }
.table .time { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.table .mini { width: var(--w-mini); height: 6px; border-radius: 3px; background: var(--mini-track); position: relative; flex: none; }
.table .mini i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; min-width: 6px; }
.table .mini u { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--mini-marker); margin-left: -1px; }
.table .mini i.good { background: var(--good-fg); } .table .mini i.slow { background: var(--slow-fg); } .table .mini i.bad { background: var(--bad-fg); }
.table .ms { width: var(--w-ms); flex: none; text-align: right; white-space: nowrap; display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; }
.table .ms .n { font-size: var(--fs-num); font-weight: 600; line-height: 1; }
.table .ms .n.good { color: var(--good-fg); } .table .ms .n.slow { color: var(--slow-fg); } .table .ms .n.bad { color: var(--bad-fg); } .table .ms .n.neutral { color: var(--text2); }
.table .ms .u { font-size: var(--fs-sm); color: var(--text2); }
.table .ms .t { font-size: var(--fs-host); font-weight: 600; color: var(--red); }
.table .tr.muted .ms .t { color: var(--text2); }

/* Tooltip */
.tooltip {
  position: fixed; z-index: 50; max-width: 520px; padding: 8px 12px;
  background: var(--surface-alt); border: 1px solid var(--border-strong); color: var(--text2);
  font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-word; pointer-events: none;
  display: none;
}
.tooltip.visible { display: block; }

/* Rodapé */
.fbar {
  flex: none; height: var(--h-footer); background: var(--surface); border-top: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 var(--pad); gap: 8px; margin-top: var(--gap);
}
.fbar .status { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; }
.fbar .status .dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; flex: none; background: var(--neutral-fg); }
.fbar .status.good .dot { background: var(--good-fg); } .fbar .status.slow .dot { background: var(--slow-fg); } .fbar .status.bad .dot { background: var(--bad-fg); }
.fbar .status .pre { color: var(--text2); margin-right: 4px; white-space: pre; }
.fbar .status b { color: var(--text); font-weight: 600; white-space: pre; }
.fbar .status .rest { color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.fbar .btn { display: none; }
.fbar .btn.show { display: inline-flex; }

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */
.toast {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 40;
  min-width: 200px; max-width: calc(100% - var(--pad) * 2); min-height: 50px;
  background: var(--surface-alt); border: 1px solid var(--info-line); border-radius: var(--r2);
  display: none; align-items: center; gap: 12px; padding: 12px 20px 12px 16px; overflow: hidden;
  font-size: var(--fs); font-weight: 600; color: var(--text); cursor: default;
}
.toast.visible { display: flex; }
.toast.clickable { cursor: pointer; }
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--info-fg); }
.toast .circle { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-fg); }
.toast .circle .ico { width: 12px; height: 12px; }
.toast .msg { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.toast.good { border-color: var(--good-line); } .toast.good::before { background: var(--good-fg); } .toast.good .circle { background: var(--good-bg); border-color: var(--good-line); color: var(--good-fg); }
.toast.slow { border-color: var(--slow-line); } .toast.slow::before { background: var(--slow-fg); } .toast.slow .circle { background: var(--slow-bg); border-color: var(--slow-line); color: var(--slow-fg); }
.toast.bad { border-color: var(--bad-line); }   .toast.bad::before { background: var(--bad-fg); }   .toast.bad .circle { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-fg); }
.toast.neutral { border-color: var(--neutral-line); } .toast.neutral::before { background: var(--neutral-fg); } .toast.neutral .circle { background: var(--neutral-bg); border-color: var(--neutral-line); color: var(--neutral-fg); }

/* ------------------------------------------------------------------ */
/* Diálogos (ConfirmDialog / SummaryForm)                              */
/* ------------------------------------------------------------------ */
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); z-index: 60; display: none; align-items: center; justify-content: center; }
.overlay.visible { display: flex; }
.confirm {
  width: 480px; max-width: calc(100% - 32px); background: var(--surface); border: 1px solid var(--border-strong);
  position: relative; padding: 24px; padding-top: 27px;
}
.confirm::before { content: ""; position: absolute; left: 1px; right: 1px; top: 1px; height: 3px; background: var(--good-fg); }
.confirm.danger::before { background: var(--bad-fg); }
.confirm .top { display: flex; gap: 16px; align-items: flex-start; }
.confirm .circle { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--good-bg); border: 1px solid var(--good-line); color: var(--good-fg); }
.confirm.danger .circle { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-fg); }
.confirm .circle .ico { width: 16px; height: 16px; }
.confirm .texts { flex: 1; min-width: 0; }
.confirm .title { font-size: var(--fs-h2); font-weight: 600; line-height: 1.33; }
.confirm .msg { font-size: var(--fs); color: var(--text2); margin-top: 6px; line-height: 1.33; }
.confirm .buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

.dialog {
  width: 680px; height: 600px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); min-width: min(520px, 100%); min-height: min(440px, 100%);
  background: var(--window); border: 1px solid var(--border-strong); box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column; resize: both; overflow: hidden;
}
.dialog .caption {
  flex: none; height: 32px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 12px; font-size: 12px; color: var(--text2); gap: 8px;
}
.dialog .caption img { width: 16px; height: 16px; }
.dialog .caption .x { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; color: var(--text2); border-radius: 4px; }
.dialog .caption .x:hover { background: var(--red-hover); color: var(--red); }
.dialog .caption .x .ico { width: 12px; height: 12px; }
.dialog .inner { flex: 1; min-height: 0; padding: 20px; display: flex; flex-direction: column; }
.dialog .dtitle { font-size: var(--fs-h2); font-weight: 600; line-height: 1.33; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog .dsub { font-size: var(--fs-sm); color: var(--text2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog .box {
  flex: 1; min-height: 80px; margin: 14px 0; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border-strong);
  display: flex; overflow: hidden;
}
.dialog .box:focus-within { border-color: var(--green); }
.dialog .box textarea {
  flex: 1; resize: none; background: transparent; border: 0; outline: 0; color: var(--text);
  font-family: inherit; font-size: var(--fs); padding: 10px 3px 4px 14px; white-space: pre-wrap; line-height: 1.33;
}
.dialog .drow { display: flex; align-items: center; gap: 8px; flex: none; }
.dialog .feedback { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 4px; }
.dialog .feedback.green { color: var(--green); }
.dialog .feedback.red { color: var(--red); }

/* impressão do relatório (usada só pela janela do PDF) */
@media print { body { overflow: visible; } }
