/* =====================================================================
   Net Wise — folha de estilo única (site público, portal do cliente e admin)
   Modelo clássico: faixa listrada no topo, abas amarelas, aba verde de ação,
   títulos serifados, botões verdes, caixas bege e rodapé cinza em colunas.
   Tema escuro: [data-theme="dark"] (disponível após o login).
   ===================================================================== */
:root {
  --bg: #ffffff;
  --stripe-a: #ffffff;
  --stripe-b: #f6f6f6;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #ececec;
  --border: #dedede;
  --border-strong: #c8c8c8;
  --text: #333333;
  --text-2: #444444;
  --muted: #6b6b6b;
  --link: #b00020;
  --link-hover: #7a0016;
  --green-1: #78cc2c;
  --green-2: #58b01a;
  --green-border: #4c9b15;
  --green-text: #2f7d0e;
  --nav-1: #fdeaa4;
  --nav-2: #f7cd5c;
  --nav-3: #f2bb35;
  --nav-border: #d9a520;
  --nav-text: #333333;
  --news-1: #fdf3cf;
  --news-2: #f8e3a2;
  --beige: #fdf0c8;
  --beige-border: #e5d6a6;
  --footer: #e8e8e8;
  --footer-b: #e2e2e2;
  --ok: #2e7d0f;
  --ok-bg: #e6f4d9;
  --warning: #a15c00;
  --warning-bg: #fff2cc;
  --critical: #b3261e;
  --critical-bg: #fde4e1;
  --info: #155e8a;
  --info-bg: #e3f0f8;
  --chart-1: #1f6fb2;
  --chart-2: #d97706;
  --chart-3: #c62828;
  --chart-4: #2e7d0f;
  --chart-grid: #e6e6e6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #131518;
  --stripe-a: #16191c;
  --stripe-b: #1a1d21;
  --surface: #1b1e22;
  --surface-2: #22262b;
  --surface-3: #2a2f35;
  --border: #30353c;
  --border-strong: #454c55;
  --text: #e3e5e8;
  --text-2: #c9cdd2;
  --muted: #979ea6;
  --link: #ff7a8a;
  --link-hover: #ffb0ba;
  --green-1: #6cc31f;
  --green-2: #4f9e16;
  --green-border: #3f8410;
  --green-text: #8fdc4a;
  --nav-1: #d9b04a;
  --nav-2: #bf912a;
  --nav-3: #a9791a;
  --nav-border: #7d5a10;
  --nav-text: #1b1b1b;
  --news-1: #3a3321;
  --news-2: #2f291a;
  --beige: #27231a;
  --beige-border: #4a4128;
  --footer: #181a1d;
  --footer-b: #1c1f22;
  --ok: #8fdc4a;
  --ok-bg: #1f2e14;
  --warning: #f5b642;
  --warning-bg: #3a2c10;
  --critical: #ff8a80;
  --critical-bg: #3b1715;
  --info: #7cc4f0;
  --info-bg: #13283a;
  --chart-1: #5aa9ec;
  --chart-2: #f5a524;
  --chart-3: #ff6b6b;
  --chart-4: #8fdc4a;
  --chart-grid: #2c3137;
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.55; color: var(--text);
  background: var(--bg) repeating-linear-gradient(90deg, var(--stripe-a) 0 3px, var(--stripe-b) 3px 4px) top / 100% 230px no-repeat; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--text); }
h2 { font-weight: normal; font-size: 21px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
img, svg { max-width: 100%; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.mono, code { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-2); padding: 1px 5px; border: 1px solid var(--border); border-radius: 3px; }
.hidden { display: none !important; }
.skip { position: absolute; left: -999px; top: 6px; background: var(--green-2); color: #fff; padding: 6px 10px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }
.only-dark { display: none; }
[data-theme="dark"] .only-dark { display: inline; }
[data-theme="dark"] .only-light { display: none; }

.wrap { max-width: 940px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1180px; }

/* ---------------------------------------------------------- topo e abas */
.s-top { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 8px 0 4px; font-size: 13px; min-height: 34px; }
.s-top .sep { color: var(--muted); }
.s-top .who { color: var(--text); font-weight: bold; }
.s-top button.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
.s-top button.linkish:hover { text-decoration: underline; }
.s-nav { position: relative; display: flex; align-items: stretch; height: 46px; border: 1px solid var(--nav-border); border-radius: 7px;
  background: linear-gradient(var(--nav-1), var(--nav-2) 55%, var(--nav-3)); box-shadow: 0 1px 2px rgba(0,0,0,.15); margin-top: 2px; }
.s-nav a { color: var(--nav-text); text-decoration: none !important; }
.s-logo { width: 86px; display: flex; align-items: center; justify-content: center; border-right: 1px solid rgba(120,80,0,.35); flex: none; }
.s-logo img { width: 34px; height: 34px; }
.s-news { position: relative; width: 150px; flex: none; margin-top: -12px; height: 70px; background: linear-gradient(var(--news-1), var(--news-2)); border: 1px solid var(--beige-border);
  box-shadow: 0 3px 6px rgba(0,0,0,.25); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; text-align: center; line-height: 1.9; z-index: 2; color: var(--text) !important; }
.s-news small { font-weight: normal; font-size: 11.5px; }
.s-item { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: bold; border-left: 1px solid rgba(255,255,255,.5); border-right: 1px solid rgba(120,80,0,.3); padding: 0 6px; text-align: center; }
.s-item:hover, .s-item.on { background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.2)); }
.s-item.on { box-shadow: inset 0 -3px 0 rgba(90,60,0,.55); }
.s-item .badge { margin: 0; }
.s-cta { width: 150px; flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff !important; font-weight: bold; font-size: 12.5px;
  background: linear-gradient(var(--green-1), var(--green-2)); border-radius: 0 6px 6px 0; margin: -1px -1px -1px 0; border: 1px solid var(--green-border); text-align: center; line-height: 1.2; }
.s-cta:hover { filter: brightness(1.07); }
.s-cta svg { width: 18px; height: 22px; flex: none; }
.s-crumb { font-size: 13px; margin: 34px 0 6px; }
.s-crumb span { color: var(--text); }
.s-title { font-family: var(--serif); font-weight: normal; font-size: 32px; margin: 0 0 26px 20px; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.s-title small { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.page { padding: 0 0 50px 20px; }

/* ---------------------------------------------------------- site: grade conteúdo + lateral */
.s-grid { display: grid; grid-template-columns: minmax(0, 1fr) 262px; gap: 38px; padding: 0 0 44px 20px; }
.s-main h2 { font-size: 23px; margin: 30px 0 12px; }
.s-main h2:first-child { margin-top: 0; }
.s-it { font-family: var(--serif); font-style: italic; font-weight: normal; font-size: 20px; margin: 26px 0 10px; }
.s-badge { font-family: var(--sans); font-style: normal; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: .04em; background: var(--warning-bg); color: var(--warning); padding: 2px 8px; border-radius: 10px; vertical-align: middle; }
.s-steps { margin: 10px 0; padding-left: 22px; line-height: 1.7; }
.s-steps li { margin-bottom: 8px; }
.s-steps code { display: inline-block; margin-top: 4px; word-break: break-all; }
.s-main ul, .s-main ol { padding-left: 22px; margin: 0 0 14px; }
.s-main li { margin-bottom: 7px; }
.s-lead { font-size: 15px; }
.s-mono { font-family: var(--mono); font-size: 12.5px; }
.s-side { background: var(--beige); border: 1px solid var(--beige-border); padding: 18px 20px 22px; align-self: start; }
.s-side h4 { font-size: 15px; margin: 0 0 16px; }
.s-side ul { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.s-side li { white-space: pre-wrap; }
.s-side + .s-side { margin-top: 18px; }
.s-side .s-note { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.s-btn { position: relative; display: block; max-width: 580px; border-radius: 7px; background: linear-gradient(var(--green-1), var(--green-2)); color: #fff !important;
  text-decoration: none !important; text-align: center; padding: 14px 80px 12px; margin: 10px 0 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); border: 0; }
.s-btn:hover { filter: brightness(1.07); }
.s-btn b { display: block; font-size: 21px; line-height: 1.3; }
.s-btn small { display: block; font-size: 12px; margin-top: 3px; }
.s-btn .s-arrow { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); width: 40px; height: 52px; }
.s-btn.s-btn-slim { padding: 10px 24px; }
.s-btn.s-btn-slim b { font-size: 18px; }
button.s-btn { width: 100%; font: inherit; cursor: pointer; }
.s-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 14px 0; }
.s-plan { border: 1px solid var(--beige-border); background: var(--beige); padding: 16px; display: flex; flex-direction: column; }
.s-plan.hl { border-color: var(--green-2); box-shadow: 0 0 0 1px var(--green-2); }
.s-plan h4 { margin: 0; font-size: 17px; }
.s-plan .p { font-family: var(--sans); font-weight: bold; font-size: 28px; margin: 6px 0 2px; }
.s-plan .p small { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.s-plan ul { list-style: none; padding: 0; margin: 10px 0 14px; font-size: 12.5px; }
.s-plan li { margin-bottom: 4px; padding-left: 16px; position: relative; }
.s-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--green-text); font-weight: bold; }
.s-plan li.off { color: var(--muted); }
.s-plan li.off::before { content: "–"; }
.s-plan .s-btn { margin: auto 0 0; padding: 9px 10px; }
.s-plan .s-btn b { font-size: 15px; }
.s-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 16px; }
.s-table th { text-align: left; border-bottom: 2px solid var(--border); padding: 6px 8px; }
.s-table td { border-bottom: 1px solid var(--border); padding: 6px 8px; vertical-align: top; }
.s-table .c { text-align: center; }
.s-yes { color: var(--ok); font-weight: bold; }
.s-part { color: var(--warning); font-weight: bold; cursor: help; }
.s-no { color: var(--muted); }
.s-faq details { border-bottom: 1px solid var(--border); padding: 9px 0; }
.s-faq summary { cursor: pointer; color: var(--link); }
.s-faq details p { margin: 8px 0 2px; }
.s-quote { font-family: var(--serif); font-style: italic; font-size: 17px; border-left: 4px solid var(--nav-3); padding: 4px 0 4px 14px; margin: 12px 0 16px; }
.s-flow { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); padding: 10px 12px; overflow-x: auto; }
.s-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.s-stats div { border: 1px solid var(--border); background: var(--surface); padding: 10px 12px; }
.s-stats b { display: block; font-family: var(--sans); font-size: 22px; }
.s-stats span { font-size: 12px; color: var(--muted); }
.s-seals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.s-seal { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--green-border); background: var(--beige); padding: 12px 14px; border-radius: 4px; }
.s-seal-ic { flex: none; color: var(--green-text); }
.s-seal b { display: block; font-size: 14px; margin-bottom: 2px; }
.s-seal span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .s-seals { grid-template-columns: 1fr; } }
.s-toc { columns: 2; font-size: 13.5px; }
.s-toc a { display: block; padding: 2px 0; }

/* ---------------------------------------------------------- rodapé */
.s-footer { background: var(--footer) repeating-linear-gradient(90deg, var(--footer) 0 3px, var(--footer-b) 3px 4px); border-top: 1px solid var(--border); padding: 26px 0 36px; margin-top: 30px; }
.s-footer .wrap { display: grid; grid-template-columns: 150px repeat(4, 1fr); gap: 14px; }
.s-f-icons { display: flex; gap: 10px; color: var(--muted); align-items: flex-start; }
.s-f-icons img { width: 40px; height: 40px; }
.s-footer h5 { font-size: 12.5px; margin: 0 0 4px; color: var(--text); }
.s-footer a { display: block; color: var(--text-2) !important; font-size: 12.5px; line-height: 1.55; }
.s-footer a:hover { color: var(--link) !important; }
.s-copy { grid-column: 2 / -1; font-size: 11.5px; color: var(--muted); margin-top: 16px; }

/* ---------------------------------------------------------- botões e formulários */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 14px; border-radius: 5px; border: 1px solid var(--border-strong);
  font: inherit; font-weight: bold; font-size: 13px; cursor: pointer; text-decoration: none !important; white-space: nowrap; background: linear-gradient(var(--surface), var(--surface-2)); color: var(--text); }
.btn:hover { filter: brightness(.97); }
[data-theme="dark"] .btn:hover { filter: brightness(1.15); }
.btn-primary { background: linear-gradient(var(--green-1), var(--green-2)); border-color: var(--green-border); color: #fff !important; }
.btn-ghost { background: linear-gradient(var(--surface), var(--surface-2)); color: var(--text) !important; }
.btn-danger { background: var(--surface); border-color: var(--critical); color: var(--critical) !important; }
.btn-sm { min-height: 28px; padding: 3px 10px; font-size: 12px; }
.btn-lg { min-height: 44px; padding: 10px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; border-radius: 5px; }
.icon-btn:hover { border-color: var(--border); background: var(--surface-2); }

.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: bold; font-size: 12.5px; margin-bottom: 5px; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]), select, textarea {
  width: 100%; min-height: 36px; padding: 7px 10px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-2) 22%, transparent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=file] { font: inherit; font-size: 13px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--green-2); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.inline-form { display: inline; }

/* ---------------------------------------------------------- avisos */
.flash { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 12px; margin: 10px 0; font-size: 13.5px; border: 1px solid; }
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash-error { background: var(--critical-bg); color: var(--critical); border-color: color-mix(in srgb, var(--critical) 35%, transparent); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.flash-info { background: var(--beige); color: var(--text); border-color: var(--beige-border); }
.flash-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid var(--beige-border); background: var(--beige); }
.banner > div { flex: 1; }
.banner-warning { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.banner-critical { background: var(--critical-bg); border-color: color-mix(in srgb, var(--critical) 35%, transparent); }
.banner-ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.banner .ic { color: var(--warning); }
.banner-ok .ic { color: var(--ok); }
.banner-critical .ic { color: var(--critical); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 3px; font-size: 11.5px; font-weight: bold; white-space: nowrap; border: 1px solid transparent; }
.pill-ok, .pill-success { background: var(--ok-bg); color: var(--ok); }
.pill-warning { background: var(--warning-bg); color: var(--warning); }
.pill-critical { background: var(--critical-bg); color: var(--critical); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-muted { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sdot-ok { background: #43a012; box-shadow: 0 0 0 3px rgba(67,160,18,.2); }
.sdot-warning { background: #f0a500; box-shadow: 0 0 0 3px rgba(240,165,0,.2); }
.sdot-critical { background: #d32f2f; box-shadow: 0 0 0 3px rgba(211,47,47,.2); }
.sdot-muted { background: var(--border-strong); }
.sdot-pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d32f2f; color: #fff; font-size: 11px; font-weight: bold; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }

/* ---------------------------------------------------------- painéis */
.card { background: var(--surface); border: 1px solid var(--border); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card > h2:first-child, .card-head h2 { font-size: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-flat { box-shadow: none; background: var(--surface-2); }
.card.beige { background: var(--beige); border-color: var(--beige-border); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.section-title:first-child { margin-top: 0; }
.cols { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }

.kpi { background: var(--surface); border: 1px solid var(--border); padding: 12px 14px; }
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-family: var(--sans); font-size: 24px; font-weight: bold; margin-top: 2px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-sub { font-size: 12px; color: var(--muted); }

.net-card { display: flex; flex-direction: column; gap: 12px; }
.net-card-head { display: flex; align-items: center; gap: 10px; }
.net-card-head h3 { margin: 0; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-weight: normal; }
.net-score { display: flex; align-items: center; gap: 16px; }
.net-score-band { font-weight: bold; font-size: 15px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin: 0; }
.metrics div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; border-bottom: 1px dotted var(--border-strong); padding: 4px 0; }
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; font-weight: bold; font-variant-numeric: tabular-nums; text-align: right; }
.lv-ok { color: var(--ok); }
.lv-warning { color: var(--warning); }
.lv-critical { color: var(--critical); }
.lv-muted { color: var(--muted); }
.net-card-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.net-alert { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: bold; color: var(--warning); }
.net-alert.ok { color: var(--ok); }

.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-ok .ring-fg { stroke: #43a012; }
.ring-warning .ring-fg { stroke: #f0a500; }
.ring-critical .ring-fg { stroke: #d32f2f; }
.ring-muted .ring-fg { stroke: var(--border-strong); }
.ring-txt { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 30%; }
.ring-txt b { font-family: var(--sans); font-weight: bold; font-size: 25px; }
.ring-txt small { color: var(--muted); font-size: 11px; }

.comp { display: grid; grid-template-columns: 140px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; }
.bar { height: 8px; background: var(--surface-3); overflow: hidden; border-radius: 2px; }
.bar > span { display: block; height: 100%; background: var(--green-2); transition: width .6s ease; }
.bar.lv-warning > span { background: #f0a500; }
.bar.lv-critical > span { background: #d32f2f; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: bold; color: var(--text-2); padding: 7px 10px; border-bottom: 2px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 67px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { display: grid; grid-template-columns: 56px 24px 1fr; gap: 0 8px; align-items: start; padding: 6px 0; position: relative; }
.tl-time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); text-align: right; font-family: var(--mono); }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; margin: 3px auto 0; border: 3px solid var(--surface); z-index: 1; }
.tl-ok .tl-dot { background: #43a012; }
.tl-warning .tl-dot { background: #f0a500; }
.tl-critical .tl-dot { background: #d32f2f; }
.tl-body { font-size: 13.5px; }
.tl-body button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-align: left; }
.tl-body button:hover { text-decoration: underline; }
.tl-meta { font-size: 12px; color: var(--muted); }
.tl-day { font-size: 12px; font-weight: bold; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 0 4px 80px; list-style: none; }

.chart { position: relative; width: 100%; height: 220px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .1; }
.chart .band { fill: #d32f2f; opacity: .07; }
.chart .cursor { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.chart .dotlive { fill: var(--chart-1); }
.chart-tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; padding: 6px 9px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; z-index: 5; font-family: var(--mono); }
.chart-tip.on { opacity: 1; }
.chart-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 13px; border: 1px dashed var(--border-strong); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 5px; }

.tabs { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--border-strong); border-radius: 5px; overflow: hidden; background: var(--surface); }
.tab { border: 0; border-right: 1px solid var(--border); background: linear-gradient(var(--surface), var(--surface-2)); padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: bold; color: var(--text-2) !important; cursor: pointer; text-decoration: none !important; }
.tab:last-child { border-right: 0; }
.tab.active, .tab[aria-selected="true"] { background: linear-gradient(var(--nav-1), var(--nav-2)); color: var(--nav-text) !important; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.hours .h { height: 32px; background: var(--surface-2); }
.hours-labels { display: grid; grid-template-columns: repeat(8, 1fr); font-size: 11px; color: var(--muted); margin-top: 4px; font-family: var(--mono); }
.uptime { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 34px; }
.uptime span { background: var(--surface-3); }
.uptime .u-ok { background: #43a012; }
.uptime .u-warning { background: #f0a500; }
.uptime .u-critical { background: #d32f2f; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: bold; font-size: 13px; }
.checklist .st { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.st-ok { background: var(--ok-bg); color: var(--ok); }
.st-warning, .st-critical { background: var(--warning-bg); color: var(--warning); }
.st-critical { background: var(--critical-bg); color: var(--critical); }
.st-na { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.checklist .d { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: normal; font-family: var(--mono); }
pre.code { background: var(--surface-2); border: 1px solid var(--border); padding: 10px; font-size: 12px; overflow-x: auto; max-height: 300px; font-family: var(--mono); }
.diag-sub { font-size: 13px; margin: 16px 0 6px; }
.table-compact { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-compact td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.table-compact td.num { font-family: var(--mono); white-space: nowrap; }
/* Emblema de latência fora da checklist (tabelas de destino e rota). */
td .st { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: bold; font-family: var(--mono); }

/* Cadeia de gargalo: Wi-Fi → Roteador → Provedor → DNS */
.chain { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; }
.chain-seg { flex: 1 1 0; min-width: 92px; border: 1px solid var(--border); border-top: 3px solid var(--border); padding: 8px 6px; text-align: center; background: var(--surface-2); }
.chain-seg b { display: block; font-size: 13px; margin: 4px 0 2px; }
.chain-ic { color: var(--muted); }
.chain-d { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.chain-ok { border-top-color: var(--ok); }
.chain-ok .chain-ic { color: var(--ok); }
.chain-warning { border-top-color: var(--warning); }
.chain-warning .chain-ic { color: var(--warning); }
.chain-critical { border-top-color: var(--critical); }
.chain-critical .chain-ic { color: var(--critical); }
.chain-na { opacity: .6; }
.chain-arrow { align-self: center; color: var(--muted); font-weight: bold; }
@media (max-width: 560px) { .chain-arrow { display: none; } .chain-seg { min-width: 44%; } }

/* Mapa de canais Wi-Fi */
.chan-map { display: flex; align-items: flex-end; gap: 4px; height: 64px; padding-top: 6px; overflow-x: auto; }
.chan { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 20px; }
.chan-bar { width: 16px; background: var(--muted); border-radius: 2px 2px 0 0; opacity: .5; }
.chan-mine { background: var(--green-2); opacity: 1; }
.chan-n { font-size: 10px; color: var(--muted); font-family: var(--mono); }
.chan-mine-n { color: var(--green-text); font-weight: bold; }

/* SLA */
.sla-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sla-big { display: block; font-size: 1.9rem; font-weight: bold; font-family: var(--mono); line-height: 1.1; }
.sla-target { text-align: right; }
.sla-target b { font-size: 1.1rem; display: block; }
.bar-track { height: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px 0 0 6px; }
.bar-ok { background: var(--ok); }
.bar-warning { background: var(--warning); }
.bar-critical { background: var(--critical); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); background: var(--beige); border: 1px solid var(--beige-border); }
.empty .ic { color: var(--green-text); margin-bottom: 6px; }
.empty h2 { color: var(--text); font-family: var(--serif); }
.empty p { max-width: 540px; margin: 0 auto 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; min-height: 16px; }
@keyframes sk { to { background-position: -200% 0; } }

.cmp-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.cmp-row.head { font-size: 12px; color: var(--muted); font-weight: bold; }
.delta { font-weight: bold; font-size: 13px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--critical); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 340px)); gap: 16px; }
.plan { background: var(--beige); border: 1px solid var(--beige-border); padding: 20px; display: flex; flex-direction: column; position: relative; }
.plan.highlight { border-color: var(--green-2); box-shadow: 0 0 0 1px var(--green-2); }
.plan.current { border-color: var(--green-2); }
.plan-flag { position: absolute; top: -10px; left: 16px; background: var(--green-2); color: #fff; font-size: 11px; font-weight: bold; padding: 2px 8px; }
.plan h3 { font-size: 19px; font-family: var(--serif); font-weight: normal; margin: 0 0 2px; }
.plan .price { font-family: var(--sans); font-weight: bold; font-size: 30px; margin: 10px 0 2px; }
.plan .price small { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 5px; font-size: 13px; }
.plan li { display: flex; gap: 7px; align-items: flex-start; }
.plan li .ic { color: var(--green-text); margin-top: 2px; }
.plan li.off { color: var(--muted); }
.plan li.off .ic { color: var(--border-strong); }
.plan form, .plan > .btn { margin-top: auto; }

.report-frame { background: #fff; border: 1px solid var(--border); padding: 28px; color: #0f172a; }
[data-theme="dark"] .report-frame { background: var(--surface); color: var(--text); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 0; font-size: 13px; color: var(--muted); }
dialog.modal { border: 1px solid var(--border-strong); padding: 0; width: min(600px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 16px 50px rgba(0,0,0,.35); }
dialog.modal::backdrop { background: rgba(0,0,0,.45); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(var(--nav-1), var(--nav-2)); color: var(--nav-text); }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: bold; color: var(--nav-text); }
.modal-head .icon-btn { color: var(--nav-text); }
.modal-body { padding: 18px; max-height: 72vh; overflow-y: auto; }
.code-box { font-family: var(--mono); font-size: 30px; font-weight: bold; letter-spacing: .2em; text-align: center; padding: 16px; background: var(--beige); border: 1px dashed var(--beige-border); user-select: all; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; background: linear-gradient(var(--green-1), var(--green-2)); color: #fff; font-weight: bold; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* site: cartões de navegação entre páginas */
.s-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
.s-card { display: block; border: 1px solid var(--border); background: var(--surface); padding: 14px 16px; text-decoration: none !important; color: var(--text) !important; }
.s-card:hover { border-color: var(--nav-border); background: var(--beige); }
.s-card h3 { font-family: var(--serif); font-weight: normal; font-size: 18px; color: var(--link); margin: 0 0 4px; }
.s-card p { margin: 0; font-size: 13px; color: var(--text-2); }
.s-card .more { display: inline-block; margin-top: 6px; font-size: 12.5px; color: var(--link); }
.s-pager { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); margin-top: 26px; padding-top: 12px; font-size: 13.5px; }
.s-dl { display: flex; align-items: center; gap: 14px; border: 1px solid var(--beige-border); background: var(--beige); padding: 12px 14px; margin: 12px 0; }
.s-dl .ic { color: var(--link); }
.s-dl div { flex: 1; }
.status-row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); padding: 9px 0; }
@media (max-width: 860px) { .s-cards { grid-template-columns: 1fr; } }

/* anúncios */
.ad-box { margin: 16px 0; padding: 8px 10px 10px; border: 1px dashed var(--border-strong); background: var(--surface); min-height: 60px; }
.ad-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.ad-label a { text-transform: none; letter-spacing: 0; }

/* ao vivo */
.live-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.live-num { background: var(--surface); border: 1px solid var(--border); padding: 10px 12px; }
.live-num span { display: block; font-size: 11.5px; color: var(--muted); }
.live-num b { display: block; font-family: var(--mono); font-size: 26px; font-weight: normal; line-height: 1.25; font-variant-numeric: tabular-nums; transition: color .3s; }
.live-num small { font-size: 11.5px; color: var(--muted); }
.live-state { display: inline-flex; align-items: center; gap: 8px; font-weight: bold; }
.live-log { font-family: var(--mono); font-size: 12px; max-height: 180px; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--border); padding: 8px 10px; }
.live-log div { white-space: nowrap; }

/* ---------------------------------------------------------- responsivo */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .s-nav { height: auto; flex-wrap: wrap; }
  .s-logo { width: 58px; }
  .s-news { width: auto; height: auto; margin: 0; flex: 1; box-shadow: none; line-height: 1.4; padding: 8px; border: 0; background: rgba(255,255,255,.3); }
  .s-item { flex: 1 1 33%; padding: 10px 4px; border-top: 1px solid rgba(120,80,0,.25); }
  .s-cta { width: 100%; border-radius: 0 0 6px 6px; padding: 10px; margin: 0; }
  .s-grid { grid-template-columns: 1fr; padding-left: 0; }
  .page { padding-left: 0; }
  .s-title { margin-left: 0; font-size: 26px; }
  .s-btn { padding: 14px 70px 12px 16px; }
  .s-btn b { font-size: 18px; }
  .s-stats { grid-template-columns: 1fr 1fr; }
  .s-toc { columns: 1; }
  .s-footer .wrap { grid-template-columns: 1fr 1fr; }
  .s-f-icons, .s-copy { grid-column: 1 / -1; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cols-4 { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr 1fr; }
  .comp { grid-template-columns: 110px 1fr 34px; }
  .cmp-row { grid-template-columns: 1fr 1fr 1fr; }
  .cmp-row > :nth-child(4) { grid-column: 1 / -1; }
  .report-frame { padding: 14px; }
  .banner { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .s-top, .s-nav, .s-crumb, .s-footer, .no-print, .banner { display: none !important; }
  body { background: #fff; }
  .report-frame { border: 0; padding: 0; }
}
