/* Camada de acabamento do FOX SOC (carregada por último).
   Mantém a identidade preta e vermelha e corrige o que deixava a central apagada:
   textos de 8 a 10 px, rótulo acima do título, bordas laterais grossas e partes do
   navegador sem o tema (seleção, rolagem, cursor). */

/* ---------- partes do navegador ---------- */
::selection { background: rgb(237 35 55 / 38%); color: var(--white); }
html { scrollbar-color: #3b3b3b #121212; scrollbar-width: thin; }
input, textarea { caret-color: var(--accent); }
a { text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
td.num, .num, .kpi-value, .nav-count, .queue-summary b, .fql-bar-value, time { font-variant-numeric: tabular-nums; }

/* ---------- cabeçalho da página: o título fala sozinho ---------- */
.page-heading #eyebrow { display: none; }
h1 { font-size: 28px; letter-spacing: -0.5px; margin-bottom: 6px; }
.page-heading p:not(.eyebrow) { font-size: var(--fs-sm); color: var(--muted); max-width: 78ch; line-height: 1.5; }

/* ---------- escala de texto: nada abaixo de 10,5 px em leitura ---------- */
.nav-label { font-size: var(--fs-xs); letter-spacing: 1.4px; }
.nav-item { font-size: var(--fs-sm); }
.breadcrumb { font-size: var(--fs-xs); }
.panel-heading { padding: 18px 20px 12px; }
.panel-heading h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.panel-heading p { font-size: var(--fs-xs); line-height: 1.45; }
.panel-heading .meta { font-size: var(--fs-xs); }
.panel-heading a, .panel-heading .text-button, .section-actions .text-button { font-size: var(--fs-xs); }
th { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--gray-300); padding: 10px 16px; }
td { font-size: var(--fs-sm); padding: 12px 16px; }
td small { font-size: var(--fs-xs); color: var(--gray-300); }
.badge { font-size: var(--fs-xs); padding: 2px 8px; }
.kpi-top { font-size: var(--fs-xs); }
.kpi-note { font-size: var(--fs-xs); color: var(--gray-300); line-height: 1.45; }
.notice { font-size: 12.5px; line-height: 1.55; }
.chip, .filter-chips { font-size: var(--fs-xs); }
.filter-chips span { font-size: var(--fs-xs); }
select, .filters input, .search input { font-size: 12.5px; }
.button { font-size: var(--fs-xs); }
.queue-summary { font-size: 12.5px; }
footer, #freshness, #live-note { font-size: var(--fs-xs); }

/* ---------- bordas laterais: 1 px, nunca faixa grossa ---------- */
.toast { border-left-width: 1px; }
.rule-card.custom { border-left-width: 1px; border-color: #6d2b39; }
.rule-logic, .insight, .service-metrics > div, .service-metrics > a, .evidence-list > div { border-left-width: 1px; }

/* ---------- Fila do analista: de onde vem cada alerta ---------- */
.queue-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: stretch;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.flow-step { padding: 14px 18px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.flow-step strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.flow-step .flow-what { font-size: 12.5px; color: #dcdcdc; }
.flow-step small { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.flow-step small a, .flow-step a { color: var(--text); text-decoration: underline; text-decoration-color: #6a6a74; }
.flow-step.is-here { background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border-radius: 0 8px 8px 0; }
.flow-arrow { position: relative; }
.flow-arrow::before { content: ""; position: absolute; top: 50%; left: 4px; right: 8px; height: 1px; background: #4a4a4a; }
.flow-arrow::after { content: ""; position: absolute; top: calc(50% - 4px); right: 6px; width: 7px; height: 7px; border-top: 1px solid #6a6a6a; border-right: 1px solid #6a6a6a; transform: rotate(45deg); }

.origin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.origin-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: #c9c9c9; font-size: 12.5px; text-decoration: none; background: var(--ink-900);
  transition: border-color .15s ease-out, background-color .15s ease-out;
}
.origin-tab b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.origin-tab:hover { border-color: #4a4a4a; background: #202020; }
.origin-tab.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--ink-900)); color: var(--text); }

.rule-kind {
  display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 4px;
  font: 600 12px var(--font); letter-spacing: 0.4px; vertical-align: 1px;
}
.rule-kind.native { color: #cfcfcf; border: 1px solid #4a4a4a; }
.rule-kind.team { color: var(--white); background: #a3172a; border: 1px solid #c81d32; }

@media (max-width: 1000px) {
  .queue-flow { grid-template-columns: 1fr; }
  .flow-arrow { height: 18px; }
  .flow-arrow::before { left: 50%; right: auto; top: 2px; bottom: 2px; width: 1px; height: auto; }
  .flow-arrow::after { top: auto; bottom: 2px; right: auto; left: calc(50% - 3px); transform: rotate(135deg); }
  .flow-step.is-here { border-radius: 0 0 8px 8px; }
}
@media (prefers-reduced-motion: reduce) { .origin-tab { transition: none; } }

/* Celular: a tabela da fila rola na horizontal dentro do painel em vez de espremer as colunas */
@media (max-width: 1000px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .queue-table { min-width: 940px; }
}

/* Linha crítica: o selo "Crítico" já diz a severidade; um leve tom vermelho no fundo basta, sem faixa lateral */
.critical-row { box-shadow: none; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.critical-row:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* ---------- Regras e correlações ---------- */
.library-sub { margin: 26px 0 4px; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); }
.library-sub b { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #262626; color: #d6d6d6; font-size: var(--fs-xs); font-weight: 600; }
.library-note { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.rule-card p { font-size: 12.5px; line-height: 1.5; }
.rule-card .mono { font-size: var(--fs-xs); }
.rule-needs { font-size: var(--fs-xs); line-height: 1.5; }
.rule-needs small { font-size: var(--fs-xs); letter-spacing: 0.4px; }
.rule-card footer, .rule-card footer a { font-size: var(--fs-xs); }
.rule-card .text-button { font-size: var(--fs-xs); }
.section-title > span { font-size: var(--fs-xs); }

/* =====================================================================
   Revisão de 07/10 (skill impeccable, crítica em dupla): o vermelho passa
   a significar alguma coisa, a fila fica rápida e nada lê abaixo de 11 px.
   ===================================================================== */

/* ---------- cor com significado ----------
   Vermelho: crítico, ação principal, foco, item atual e a marca.
   Âmbar: alto e "precisa de atenção". Neutro claro: links, IDs, ações secundárias. */

/* Severidade: selo preenchido */
.badge { border: 1px solid transparent; font-weight: 600; letter-spacing: 0.2px; }
.badge.critical { background: rgb(255 69 87 / 16%); color: var(--red-200); border-color: rgb(255 69 87 / 32%); }
.badge.high { background: rgb(243 154 76 / 14%); color: #f7b77c; border-color: rgb(243 154 76 / 28%); }
.badge.medium { background: rgb(212 188 114 / 12%); color: #e0cd92; border-color: rgb(212 188 114 / 24%); }
.badge.low, .badge.info { background: #222327; color: #b9bec6; border-color: #33353b; }
/* Estado: só contorno, nunca parece severidade */
.badge.neutral, .badge.unknown, .badge.open { background: transparent; color: #cfcfd6; border-color: #45454d; }
.badge.good { background: transparent; color: #9ed6b6; border-color: #2f5a46; }
.badge.warn { background: transparent; color: #eec58a; border-color: #6b5531; }
.badge.bad { background: transparent; color: #ff9aa5; border-color: #7a2c37; }
.badge.progress { background: transparent; color: #a9c4e0; border-color: #334a63; }

/* KPI: número branco; vermelho só com crítico de verdade, âmbar quando pede atenção */
.kpi-value, .positive .kpi-value { color: var(--text); }
.kpi.critical { background: linear-gradient(160deg, rgb(255 69 87 / 9%), var(--panel) 70%); border-top: 2px solid var(--sev-critical); }
.kpi.critical .kpi-value, .critical .kpi-value { color: #ff6273; }
.kpi.warning { border-top: 2px solid #7a5a2c; }
.kpi.warning .kpi-value, .warning .kpi-value { color: var(--attention); }
.critical .kpi-icon { color: var(--red-200); background: rgb(255 69 87 / 12%); }
.warning .kpi-icon { color: var(--attention); background: rgb(240 179 90 / 10%); }
.kpi-go { font-size: var(--fs-xs); }

/* Links e ações secundárias em neutro claro; o sublinhado aparece ao passar o mouse */
a { color: var(--link); }
.text-button { color: var(--link); }
.text-button:hover, a.text-button:hover { color: var(--white); text-decoration: underline; text-decoration-color: #7a7a84; }
.text-button.danger { color: var(--red-200); }
.notice a, .panel-heading p a, .insight a, .focus-note a, .toast a, .live-banner a {
  color: inherit; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 35%);
}
.notice a:hover, .live-banner a:hover { text-decoration-color: currentColor; }
.mono, small.mono, td small .text-button.mono, .rule-card .mono { color: var(--id); font-size: var(--fs-xs); }
td small .text-button.mono:hover { color: var(--white); }
.chip-related, .chip-fox, .chip-rule { background: transparent; color: #d0d0d6; border-color: #45454d; font-size: var(--fs-xs); }
.chip-related:hover, .chip-rule:hover { background: #222226; color: var(--white); border-color: #6a6a74; }
.overdue { color: var(--attention); font-size: var(--fs-xs); }
.row-go { color: #6f6f79; }
.queue-summary b { color: var(--text); }
.queue-summary a.has-critical b { color: #ff6273; }
.method-item h3 { color: var(--text); font-size: var(--fs-sm); }
.nav-item .nav-count { background: rgb(255 69 87 / 18%); color: #ff9aa5; font-size: var(--fs-xs); padding: 0 5px; }
.client-tab-label { font-size: var(--fs-xs); letter-spacing: 1px; }
.client-tab { font-size: var(--fs-xs); }
.pill, #mode-pill { font-size: var(--fs-xs); }
.logout { font-size: var(--fs-xs); }
.strip-label { font-size: var(--fs-xs); }
.bar-label { font-size: var(--fs-xs); }
.toast { font-size: 12.5px; }

/* Funil: barra neutra, etapa zerada sem toco */
.funnel-bar { background: #5b5b66; min-width: 0; }
a.funnel-step:first-child .funnel-bar { background: #8a8a96; }
.funnel-bar.is-empty { width: 0 !important; height: 2px; background: #3a3a42; }

/* Ação principal com contraste AA (branco sobre #d61f31 = 5,1:1) */
.button.primary { background: var(--red-600); border-color: var(--red-600); color: var(--white); }
.button.primary:hover { background: #e11d2e; border-color: #e11d2e; }

/* ---------- faixa de coleta: estado real das fontes ---------- */
.live-banner, .demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--fs-xs); line-height: 1.5; padding: 8px 30px; }
.live-banner strong, .demo-banner strong { font-size: var(--fs-xs); letter-spacing: 0.8px; margin-right: 0; }
.live-banner i { width: 7px; height: 7px; border-radius: 50%; background: #6f6f79; flex: none; }
.live-banner.ok i { background: #58c08a; }
.live-banner.attention { background: #1d1712; border-color: #3d2f1f; color: #e7cba4; }
.live-banner.attention strong { color: #f3c98b; }
.live-banner.attention i { background: var(--attention); }
/* Coleta em andamento (05/11/2026): mesmo azul do selo "Coletando"; não é alerta */
.live-banner.progress { background: #121a24; border-color: #26384d; color: #c4d6ea; }
.live-banner.progress strong { color: #a9c4e0; }
.live-banner.progress i { background: #6f9fd6; }
.live-banner a { margin-left: auto; white-space: nowrap; }

/* Pílula ao vivo é botão: vira "Novidades · atualizar" quando a tela segurou uma atualização */
button.live-pill { font: inherit; font-size: var(--fs-xs); cursor: default; }
button.live-pill.paused { cursor: pointer; }
button.live-pill.paused:hover { border-color: var(--attention); color: var(--white); }

/* ---------- pular a navegação ---------- */
.skip-link {
  position: fixed; left: 12px; top: -64px; z-index: 100;
  padding: 10px 14px; border: 0; border-radius: 6px;
  background: var(--red-600); color: var(--white); font-weight: 600; font-size: var(--fs-sm);
  transition: top 0.15s ease-out;
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; }
#content:focus { outline: none; }

/* ---------- menu em grupos ---------- */
.nav-label.nav-group { margin: 16px 13px 6px; font-size: var(--fs-xs); letter-spacing: 1px; color: #85858f; text-transform: uppercase; }
#navigation .nav-label.nav-group:first-child { margin-top: 0; }
a.nav-item { text-decoration: none; }
#navigation { gap: 2px; }
.nav-item { font-size: var(--fs-sm); padding: 9px 13px; }

/* ---------- Fila do analista ---------- */
.queue-flow.compact {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 10px 16px; margin: 0 0 12px; font-size: 12.5px; color: #c4c4cc;
}
.queue-flow.compact .flow-step { display: inline; padding: 0; background: none; border-radius: 0; }
.queue-flow.compact .flow-step strong { font-size: 12.5px; margin-right: 4px; }
.queue-flow.compact .flow-step.is-here strong { color: var(--red-200); }
.queue-flow.compact .flow-arrow { width: 18px; height: 12px; flex: none; }
.queue-flow.compact .flow-arrow::before { left: 0; right: 4px; }
.queue-flow.compact .flow-arrow::after { right: 3px; }
.queue-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin: 0 0 14px; }
.queue-head .origin-tabs { margin: 0; }
.queue-head .queue-summary { margin: 0; padding: 0; border: 0; background: none; gap: 6px 18px; font-size: var(--fs-sm); color: #b9b9c2; }
.queue-head .queue-summary b { font-size: 18px; }
.queue-summary .engine { display: inline-flex; align-items: center; gap: 6px; }

th.sel, td.sel { width: 36px; padding-right: 0; vertical-align: middle; }
/* "Atribuir a mim" ao lado do rótulo Responsável, não encostado no campo vizinho */
.workflow-grid label .assign-me { float: none; margin-left: 8px; font-size: var(--fs-xs); text-decoration: underline; text-decoration-color: #6a6a74; }
/* Login no celular mantém a marca (o painel a esconde para ganhar espaço) */
.login-box .brand { display: flex !important; }
.sel input { width: 16px; height: 16px; accent-color: var(--red-600); cursor: pointer; }
tr.is-selected, tr.is-selected:hover { background: rgb(255 69 87 / 7%); }
.bulk-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 0 20px 12px; padding: 10px 14px;
  border: 1px solid #4a2a31; border-radius: 8px; background: #1a1215;
  font-size: var(--fs-sm);
}
.bulk-bar > strong { margin-right: 6px; font-weight: 600; }
.bulk-bar > strong b { color: var(--white); font-size: 15px; }
.bulk-close { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; flex-basis: 100%; padding-top: 8px; border-top: 1px solid #3a2228; }
.bulk-close[hidden] { display: none; }
.bulk-close label { display: grid; gap: 4px; font-size: var(--fs-xs); color: #c9c9d1; }
.bulk-close label.grow { flex: 1 1 260px; }
.bulk-close input, .bulk-close select { min-height: 34px; padding: 6px 10px; border-radius: 5px; font-size: var(--fs-sm); }
.bulk-close .text-button { min-height: 34px; }
.bulk-feedback { flex-basis: 100%; margin: 0; font-size: 12.5px; color: #eec58a; }
.bulk-feedback:empty { display: none; }

/* Diálogo do alerta: resumo das evidências antes da decisão */
.evidence-summary { margin: 18px 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #17171a; }
#detail-body .evidence-summary h3 { margin: 0 0 8px; font-size: var(--fs-sm); }
.evidence-summary ul { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 6px; }
.evidence-summary li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 12.5px; color: #d6d6dd; }
.evidence-summary time { color: var(--id); font-variant-numeric: tabular-nums; }
.field-hint { margin: 8px 0 0; font-size: 12.5px; color: #eec58a; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
[aria-invalid="true"] { border-color: #ff6273 !important; box-shadow: 0 0 0 1px #ff6273; }
#workflow-feedback:not(:empty) { color: #ffb0b9; font-size: 12.5px; }
.finding-head { flex-wrap: wrap; row-gap: 6px; }
.finding-head .mono { overflow-wrap: anywhere; }

/* Explicação recolhível ("O que é esta aba") */
details.notice.explain > summary { cursor: pointer; font-weight: 600; color: #dcdce2; }
details.notice.explain[open] > summary { margin-bottom: 6px; }

/* Clientes: o atual é um estado, não um botão */
.client-card .client-meta { margin: 2px 0 10px; font-size: var(--fs-xs); color: var(--muted); }
.client-card.is-current { border-color: #4a2a31; }
.current-chip { align-self: center; }

/* ---------- piso de texto ---------- */
.kpi-top { font-size: 12.5px; }
.panel-intro, .insight, .focus-note, .status-message { font-size: 12.5px; }
.sidebar-bottom strong, .sidebar-bottom small { font-size: var(--fs-xs); }
.local-note { font-size: var(--fs-xs); letter-spacing: 0.4px; }
.brand small { font-size: var(--fs-xs); letter-spacing: 1.2px; }
.fql-tag { font-size: var(--fs-xs); }

@media (max-width: 1000px) {
  .bulk-bar { margin: 0 12px 12px; }
  .queue-head { align-items: start; }
  .live-banner, .demo-banner { padding: 8px 18px; }
}
@media (max-width: 700px) {
  .evidence-summary li { grid-template-columns: 1fr; gap: 0; }
  .queue-flow.compact .flow-arrow { display: none; }
  .queue-flow.compact .flow-step { display: block; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
/* Relacionados no diálogo: texto do botão alinhado à esquerda, inclusive quando quebra no celular */
.notice.related li .text-button { text-align: left; }
/* Excluir cliente: ação destrutiva com confirmação digitada */
.button.danger { background: #a3172a; border-color: #c81d32; color: var(--white); }
.button.danger:hover:not(:disabled) { background: #c81d32; }
.remove-box { border-color: #5a2430; background: #1a1215; }
.remove-box p { margin: 0 0 10px; font-size: var(--fs-sm); line-height: 1.55; color: #e7d3d6; }
.remove-box code { color: var(--white); }
/* Prévia do relatório: a mesma manchete e as recomendações do PDF */
.report-headline { font-size: var(--fs-md); line-height: 1.6; color: var(--text); margin: 0 0 12px; }
.report-recs-title { margin: 16px 0 8px; font-size: var(--fs-sm); }
.report-recs { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.report-recs li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; font-size: var(--fs-sm); line-height: 1.5; color: #d6d6dd; }
.prio { font-size: var(--fs-xs); letter-spacing: .3px; }
.prio-alta { color: #ff6273; }
.prio-media { color: var(--attention); }
.prio-baixa { color: var(--muted); }

/* ---------- Comando do SOC: Atenção agora ---------- */
.att-filter { margin: 0 20px 10px; }
.att-list { display: grid; }
.att-row {
  display: grid; grid-template-columns: 44px 76px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; padding: 10px 20px; border: 0; border-top: 1px solid var(--line); background: transparent;
  color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.att-row:hover { background: #1b1b20; }
.att-row .badge { justify-self: start; }
.att-type { justify-self: start; padding: 2px 7px; border-radius: 4px; font: 700 12px var(--font); letter-spacing: .5px; border: 1px solid; }
.att-type.att-ic { color: #c3b6ff; border-color: #4b3f80; }
.att-type.att-wb { color: #cfd6e0; border-color: #48505c; }
.att-type.att-fox { color: #ff9aa5; border-color: #7a2c37; }
.att-main { min-width: 0; display: grid; gap: 2px; }
.att-main strong { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-main small { font-size: var(--fs-xs); color: var(--gray-300); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-when { display: grid; justify-items: end; gap: 2px; font-size: var(--fs-xs); color: var(--gray-300); white-space: nowrap; font-variant-numeric: tabular-nums; }
.more-indicators { margin: 18px 0 0; }
.more-indicators > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; list-style: none;
}
.more-indicators > summary::-webkit-details-marker { display: none; }
.more-indicators > summary::before { content: "+"; color: var(--gray-300); font-weight: 700; width: 12px; }
.more-indicators[open] > summary::before { content: "−"; }
.more-indicators > summary strong { font-size: 13.5px; }
.more-indicators > summary span { font-size: 12.5px; color: var(--gray-300); }
.more-indicators[open] > summary { margin-bottom: 14px; }
.entity-list { display: grid; }
.entity-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 16px; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.entity-row:hover { background: #1b1b20; }
.entity-go { color: #6f6f79; }
@media (max-width: 700px) {
  /* Celular: tipo e severidade na primeira linha; título, ID e hora usam a largura toda embaixo. */
  .att-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; padding: 10px 14px; }
  .att-row .badge { grid-column: 2; justify-self: start; }
  .att-row .att-main, .att-row .att-when { grid-column: 1 / -1; }
  .att-row .att-when { display: flex; gap: 8px; justify-self: start; }
  .att-filter { margin: 0 14px 10px; }
  /* "Minha conta" (senha e MFA) continua no topo, menor, em vez de sumir. */
  .topbar .avatar { display: grid; width: 28px; height: 28px; font-size: var(--fs-xs); }
}
/* Alertas agrupados por incidente (IC primeiro) */
.group-row td { padding: 9px 16px; background: #131317; border-top: 1px solid var(--line); font-size: 12.5px; }
.group-row .text-button.mono { font-size: 12.5px; color: var(--white); }
.group-hint { margin-left: 10px; color: var(--gray-300); }
/* N1: o que fazer, pegar e começar, item IC na fila */
.notice.playbook ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.notice.playbook li { line-height: 1.5; }
.take-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; }
.take-row .muted { font-size: 12.5px; }
.rule-kind.ic { color: #c3b6ff; border: 1px solid #4b3f80; }

/* ---------- seletor de idioma (i18n.js): PT, EN e ES ---------- */
.lang-switch { display: inline-flex; flex: none; border: 1px solid var(--gray-700); border-radius: 6px; overflow: hidden; }
.lang-switch button { min-width: 30px; min-height: 26px; padding: 3px 7px; border: 0; background: transparent; color: var(--muted); font: 600 12px/1 var(--font); letter-spacing: .06em; cursor: pointer; }
.lang-switch button + button { border-left: 1px solid var(--gray-700); }
.lang-switch button:hover { color: var(--text); background: #232323; }
.lang-switch button[aria-pressed="true"] { color: var(--white); background: rgb(237 35 55 / 20%); box-shadow: inset 0 -2px 0 var(--accent); }
.lang-switch.login-lang { display: flex; width: max-content; margin: 0 0 0 auto; }
@media (max-width: 700px) {
  .topbar .lang-switch button { min-width: 24px; min-height: 24px; padding: 2px 4px; letter-spacing: 0; }
}

/* Menu escondido (☰) e tela cheia (⛶), pedido do usuário em 13/10. Na tela cheia ficam só o título, a faixa de
   coleta e o conteúdo; o dashboard mostra só os painéis (sem abas nem botões de editar). */
/* O ☰ só aparece de 1001 px para cima (computador e TV): no tablet e no celular ele estourava a largura do topo, e
   lá o menu já é estreito ou vira uma faixa. O menu escondido também só vale nessa largura: ninguém fica sem menu. */
.nav-toggle { display: none; flex: none; margin-right: 12px; }
@media (min-width: 1001px) {
  .nav-toggle { display: grid; }
  body.nav-hidden .sidebar { display: none; }
  body.nav-hidden main { margin-left: 0; }
}
body.kiosk main { margin-left: 0; }
body.kiosk .sidebar, body.kiosk .topbar, body.kiosk #client-tabs, body.kiosk .page-heading .toolbar, body.kiosk #eyebrow,
body.kiosk #page-subtitle, body.kiosk .page-wrap > footer, body.kiosk .fql-tabs, body.kiosk .fql-toolbar .button { display: none; }
.kiosk-exit { display: none; }
body.kiosk .kiosk-exit { display: inline-flex; position: fixed; top: 12px; right: 12px; z-index: 20; opacity: .6; }
body.kiosk .kiosk-exit:hover, body.kiosk .kiosk-exit:focus-visible { opacity: 1; }

/* =====================================================================
   Revisão de design: console, leitura operacional e telas estreitas.
   Tokens de severidade (tokens.css) continuam iguais a colors em app.js.
   ===================================================================== */
body { font-family: "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font-family: inherit; }
main, #content, .page-heading > div, .panel-heading > div, .toolbar,
.grid-main > *, .grid-half > *, .report-layout > *, .report-fields > *,
.fql-grid > *, .fql-card-body, .fql-line > *, .fleet-top > *, .fleet-main > * { min-width: 0; }

/* Casca: marca fixa, navegação com sua própria rolagem e topo contido. */
.sidebar { width: var(--shell-width); padding: 24px 12px 16px; overflow: hidden; }
.sidebar > .brand { flex: none; padding: 0 12px; }
.brand small { letter-spacing: .07em; white-space: nowrap; }
.workspace { flex: none; margin: 24px 6px 16px; padding: 12px; border-color: var(--line); background: #18181d; }
.workspace #company { min-width: 0; overflow-wrap: anywhere; }
.workspace-dot { background: #8e8e99; flex: none; }
#navigation { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; align-content: start; padding: 0 4px 8px; }
.nav-label.nav-group { margin: 20px 12px 7px; color: #a4a4b0; letter-spacing: .06em; }
.nav-item { min-height: 38px; padding: 8px 10px; gap: 10px; border-radius: 6px; line-height: 1.5; color: #c1c1cc; }
.nav-item > svg { flex: none; }
.nav-item > span { min-width: 0; overflow-wrap: anywhere; }
.nav-item.active { color: var(--white); background: #30171d; box-shadow: inset 2px 0 var(--accent); }
.nav-item:hover { color: var(--white); background: #222228; }
.sidebar-bottom { flex: none; margin: 8px 8px 0; padding: 14px 4px 0; }
.sidebar-bottom .integration-symbol, .sidebar-bottom .local-note { display: none; }
.sidebar-bottom strong { color: #cbccd5; font-weight: 500; }
.sidebar-bottom small { line-height: 1.5; }
main { margin-left: var(--shell-width); }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 64px; height: auto; padding: 12px 28px; gap: 16px; }
.breadcrumb { align-items: center; min-width: 0; gap: 12px; line-height: 1.5; }
.breadcrumb #crumb { overflow-wrap: anywhere; }
.nav-toggle { margin-right: 2px; }
.topbar-right { flex: none; gap: 12px; }
#clock { font-size: var(--fs-xs); }
.avatar { background: #25252c; color: #e5e5ed; border-color: #55555f; flex: none; }
.live-pill.on { background: #15221c; border-color: #385747; color: #b4dfc8; }
.live-pill.on i { background: #72c89e; animation: none; box-shadow: none; }
.client-tabs { padding: 0 28px; min-height: 44px; flex-wrap: wrap; overflow: visible; }
.client-tab { padding: 12px 16px 10px; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.client-tab-label { color: var(--muted); letter-spacing: .06em; }
.client-dot { background: #858590; }
.client-tab.selected .client-dot { background: var(--accent); }
.live-banner, .demo-banner { padding: 9px 28px; }
.page-wrap { padding: 28px 28px 20px; }
.page-heading { flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; margin-bottom: 24px; }
.page-heading > div:first-child { flex: 1 1 360px; }
.page-heading h1 { font-size: 28px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.page-heading p:not(.eyebrow) { margin-top: 8px; }
.toolbar { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Escala: a informação principal nunca herda os 11 px da folha antiga. */
.panel, .status-card, .rule-card, .client-card { border-color: var(--line); border-radius: 8px; }
.panel-heading { padding: 20px 20px 16px; flex-wrap: wrap; align-items: flex-start; }
.panel-heading h2 { font-size: var(--fs-lg); line-height: 1.4; }
.panel-heading p { margin-top: 5px; font-size: 12.5px; line-height: 1.6; }
.panel-heading .meta { color: var(--muted); line-height: 1.5; }
.panel-intro, .muted, .dialog-description, .method-item p, .status-message { font-size: var(--fs-sm); line-height: 1.65; }
.panel-intro, .empty, .insight, .focus-note { color: var(--muted); }
.grid-main, .grid-half, .fql-grid, .report-layout { gap: 20px; }
.kpi-grid { gap: 12px; align-items: stretch; }
.kpi { display: flex; flex-direction: column; padding: 18px; border-top: 1px solid var(--line); }
a.kpi-link { display: flex; }
.kpi-top { min-height: 28px; align-items: flex-start; font-size: var(--fs-sm); line-height: 1.5; }
.kpi-icon { flex: none; color: #b3b3be; }
.kpi-value { margin: 14px 0 8px; font-size: 36px; font-weight: 600; letter-spacing: -.04em; line-height: 1.15; flex-wrap: wrap; }
.kpi-note { font-size: var(--fs-xs); line-height: 1.6; }
a.kpi-link .kpi-note { padding-right: 0; }
.kpi-go { position: static; margin-top: auto; padding-top: 10px; color: #d1d1dc; opacity: 1; font-size: var(--fs-xs); }
a.kpi-link:hover { transform: none; background: #1b1b21; border-color: #73737f; }
.kpi.critical { background: #201419; border-top: 2px solid var(--sev-critical); }
.kpi.warning { background: var(--panel); border-top: 2px solid #a47838; }
.kpi.positive { border-top: 1px solid var(--line); }
.command-strip { background: #151518; border-color: var(--line); padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
.command-strip strong { color: #d4d4de; letter-spacing: .04em; }
.command-strip > div { flex-wrap: wrap; }
.command-strip .live-dot { background: #8e8e99; box-shadow: none; }
.att-type.att-fox, .origin-tag.fox, .rule-kind.team { color: #d6d6e1; background: #23232c; border: 1px solid #555560; }
.att-main strong, .att-main small, .rank-label strong, .assets-cell strong,
td.clip strong, td.clip small, .fleet-tile strong, .fql-bar-label {
  max-width: none; white-space: normal; text-overflow: clip; overflow: visible; overflow-wrap: anywhere;
}
.att-row { padding-top: 13px; padding-bottom: 13px; }
.att-main strong { font-size: var(--fs-md); line-height: 1.5; }
.att-main small { line-height: 1.5; }
.att-when { color: var(--muted); }
.entity-row { padding-top: 13px; padding-bottom: 13px; }

/* Controles, estados, foco e seleção compartilham as mesmas dimensões. */
.button, .icon-button, input:not([type=checkbox]):not([type=radio]), select { min-height: 38px; }
.button { justify-content: center; padding: 8px 14px; font-size: var(--fs-sm); line-height: 1.5; font-weight: 600; }
.button.secondary, .icon-button { background: #202026; border-color: var(--control-border); }
.button.secondary:hover, .icon-button:hover { background: #2b2b33; border-color: #82828e; }
.button.primary:hover { background: #bd1b2c; border-color: #bd1b2c; }
input:not([type=checkbox]):not([type=radio]), select, textarea { max-width: 100%; min-width: 0; border-color: var(--control-border); border-radius: 6px; font-size: var(--fs-sm); line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #a4a4b0; opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--red-600); }
input:disabled, select:disabled { opacity: .6; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
#content tr:focus-visible { outline-offset: -3px; }
.lang-switch { overflow: visible; }
.lang-switch button { min-width: 32px; min-height: 30px; border-radius: 3px; }
.filters { gap: 10px; padding-bottom: 18px; }
.filters .search { flex: 1 1 260px; min-width: 0; }
.badge, .fleet-badge { line-height: 1.5; min-height: 24px; padding: 3px 8px; }
.badge.bad { color: #eec58a; border-color: #78603e; }
.overdue, .status-card .route, .activity-line { color: var(--muted); }
.overdue { color: var(--attention); }
.origin-tab { border-radius: 6px; min-height: 36px; line-height: 1.5; }
.origin-tabs { gap: 6px; }
.view-tabs, .fql-tabs { flex-wrap: wrap; }
.view-tab, .fql-tabs button { font-size: var(--fs-sm); line-height: 1.5; }
.view-tab { padding: 10px 14px; }

/* Tabelas: linha de leitura, títulos completos e ações identificáveis. */
th, .table-wrap th { color: #b8b8c4; background: #1c1c22; border-color: var(--line); font-size: var(--fs-xs); line-height: 1.5; }
td, table.compact td { padding: 13px 14px; font-size: var(--fs-sm); line-height: 1.5; vertical-align: top; overflow-wrap: break-word; }
td strong { font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; }
td small { font-size: var(--fs-xs); line-height: 1.5; }
.table-wrap tbody tr:hover { background: #1e1e25; }
.table-wrap tbody tr.is-selected { background: #28181e; }
.alerts-table td:nth-child(3), .alerts-table td:last-child { white-space: normal; }
.group-row td { background: #1b1b22; color: #dedee7; }
.group-hint { display: inline-block; line-height: 1.6; }
.panel-bottom { flex-wrap: wrap; gap: 12px; color: var(--muted); }
.pagination button { min-width: 34px; min-height: 34px; border-color: var(--control-border); font-size: var(--fs-sm); }
.empty { padding: 40px 24px; font-size: var(--fs-sm); line-height: 1.7; }
.empty strong { font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
.empty .text-button, .empty a { text-decoration: underline; }
.loading { display: flex; align-items: center; justify-content: center; min-height: 240px; gap: 12px; padding: 32px; font-size: var(--fs-md); }
.loading .spinner { flex: none; margin: 0; }
.notice, .error-banner { padding: 14px 16px; font-size: var(--fs-sm); line-height: 1.65; overflow-wrap: anywhere; }
.notice.warning { background: #211c15; border-color: #635038; color: #e4c697; }
.error-banner { background: #29191d; border-color: #96515c; color: #ffb7c1; }

/* Diálogos: fechar permanece visível ao percorrer evidências e formulários. */
dialog { width: min(900px, calc(100% - 48px)); max-width: 960px; max-height: calc(100dvh - 64px); border-color: #565661; border-radius: 12px; background: #161619; }
.dialog-top { position: sticky; top: 0; z-index: 2; background: #19191e; padding: 20px 24px; gap: 16px; align-items: flex-start; }
.dialog-top h2 { font-size: 21px; line-height: 1.4; overflow-wrap: anywhere; }
.dialog-top .icon-button { flex: none; }
#detail-body { padding: 24px; overflow-wrap: anywhere; }
#detail-body h3 { color: #ededf3; font-size: 15px; }
.detail-grid { gap: 20px; }
.detail-grid small, .workflow-grid label, .workflow-note, .rule-form label, .client-form label, .rule-form legend { font-size: var(--fs-sm); color: #b9b9c6; }
.detail-grid strong { font-size: var(--fs-md); line-height: 1.6; }
.evidence-list time, .evidence-list strong, .evidence-list small, .activity-line p { font-size: 12.5px; line-height: 1.6; }
.evidence-list time { color: var(--muted); }
.evidence-list > div { border-color: #5d5d68; }
.rule-card { background: var(--panel); }
.rule-card.custom { border-color: var(--line); }
.prio-alta { color: var(--attention); }
.report-builder .panel-heading svg { color: #b4b4c0; }
.rule-logic, .rule-needs { background: transparent; color: #bebecb !important; border-color: #454550; }
.rule-card .tag { color: #d6d6e1; border-color: #555560; }
.rule-needs small, .rule-card footer { color: var(--muted); }
.client-card { background: #19191e; border-color: var(--line); }
.client-card.is-current { border-color: #86616b; }
.client-card p { color: var(--muted); font-size: var(--fs-sm); }

/* Relatórios: seleção de módulos neutra; vermelho fica na ação de exportar. */
.report-fields { gap: 24px; }
.report-fields label:not(.module-check), .module-check strong { font-size: var(--fs-sm); }
.module-check { padding: 13px; background: #19191e; border-color: #454550; }
.module-check:has(input:checked) { background: #222229; border-color: #747480; }
.module-check input { flex: none; width: 16px; height: 16px; }
.module-check small { font-size: var(--fs-xs); color: var(--muted); }
.report-cover { border-color: #504149; background: #191518; }
.report-cover:after { display: none; }
.report-cover p, .report-cover small, .template-button, .template-button small { color: #c5c5d0; }
.template-button { font-size: var(--fs-sm); }
.format-options { flex-wrap: wrap; }
.format-options label { min-height: 32px; gap: 8px; }

/* FQL: larguras intrínsecas, inclusive hashes CTI, não empurram a grade. */
.fql-card .panel-heading { gap: 10px; }
.fql-card .panel-heading > div:first-child { flex: 1 1 180px; }
.fql-card-actions { flex: 0 1 auto; text-align: right; }
.fql-card-actions .text-button { font-size: var(--fs-xs); }
.fql-card-body { padding: 0 20px 20px; }
.fql-number { padding: 6px 0 10px; }
.fql-number strong { font-size: 40px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.fql-number span, .fql-note { font-size: 12.5px; line-height: 1.6; }
.fql-bar-row { grid-template-columns: minmax(0, 40%) minmax(0, 1fr) auto; font-size: var(--fs-xs); padding: 5px 0; gap: 10px; }
.fql-bar-track { min-width: 0; height: 10px; background: #24242c; border-radius: 3px; }
.fql-bar { background: var(--chart); border-radius: 3px; min-width: 0; }
.fql-bar-value { min-width: 26px; }
.fql-y, .fql-x { color: #aaaab7; }
.fql-query { border-color: var(--line-soft); }
.fql-query code, .fql-table td, .fql-table th { overflow-wrap: anywhere; word-break: normal; }
.fql-table { table-layout: fixed; }
.fql-table td.clip { max-width: none; }
.fql-toolbar { gap: 10px; }
.fql-toolbar select { max-width: 100%; }
.fql-tip { max-width: min(360px, calc(100vw - 24px)); font-size: var(--fs-xs); border-color: var(--control-border); }
.fql-add-grid > *, .fql-save > * { min-width: 0; }

/* Frota e TV: informação legível também quando o mapa fica estreito. */
.fleet-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fleet-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.fleet-top .panel { padding: 20px; }
.fleet-big { font-weight: 600; }
.fleet-tile { padding: 14px; }
.fleet-badge.fleet-healthy { color: #87d5ae; }
.fleet-badge.fleet-warning { color: #f7b77c; }
.fleet-badge.fleet-unknown { color: #b6b6c3; }
.fleet-map-list { display: none; list-style: none; padding: 0; margin: 0; }
.fleet-map-list > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fleet-map-list a { display: flex; justify-content: space-between; align-items: start; gap: 12px; color: inherit; overflow-wrap: anywhere; }
.fleet-map-list a > span { min-width: 0; }
.fleet-map-list b { font-variant-numeric: tabular-nums; flex: none; }
.fleet-map-list ul { list-style: none; margin: 10px 0 0 12px; padding: 0 0 0 12px; border-left: 1px solid #50505b; }
.fleet-map-list ul li { padding: 6px 0; color: var(--muted); font-size: var(--fs-sm); }
.tv-card { border-radius: 8px; border-color: var(--line); padding: 16px; }
.tv-card h3 { text-transform: none; letter-spacing: .01em; color: #c7c7d3; font-size: var(--fs-md); line-height: 1.5; }
.tv-list li span:last-child { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.tv-rows div > :first-child { min-width: 0; overflow-wrap: anywhere; }
.fleet-map text { font-size: 15px; }
.tv .fleet-map text { font-size: var(--fs-lg); }
.tv .fleet-map:not(:has(.fleet-node.group)) text { font-size: var(--fs-xl); }
.tv .fleet-edge { stroke: #595966; }
.tv-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tv-kpis b { font-size: 32px; line-height: 1.3; }
.tv-kpis span { font-size: var(--fs-sm); line-height: 1.5; }

/* Login: mesma tipografia e controles do console; nenhum estilo depois do acabamento. */
.login-box { width: min(448px, calc(100% - 32px)); margin: clamp(24px, 10vh, 96px) auto 32px; }
.login-box .brand { margin-top: 12px; padding: 0 4px; }
.login-box .brand small { letter-spacing: .07em; }
.login-box .panel { padding: 32px; margin-top: 28px; border-top: 2px solid var(--red-600); }
.login-box h1 { font-size: 26px; margin: 0 0 12px; }
.login-box .panel-intro { padding: 0; margin-bottom: 24px; font-size: var(--fs-md); }
.login-box label { display: block; margin-bottom: 8px; font-size: var(--fs-sm); }
.login-box input { width: 100%; margin-bottom: 20px; min-height: 44px; font-size: var(--fs-lg); }
.login-box .button { width: 100%; min-height: 44px; }
.login-box[data-step=password] .step-mfa, .login-box[data-step=mfa] .step-password { display: none; }
.login-box .hint { font-size: var(--fs-sm); color: var(--muted); margin-top: 20px; line-height: 1.65; }
.login-box #code { font-size: 22px; letter-spacing: .3em; text-align: center; }
#login-status { font-size: var(--fs-sm); color: #e6c48d; margin-top: 16px; }
#login-status:empty { display: none; }
.login-footnote { font-size: var(--fs-xs); color: var(--muted); text-align: center; line-height: 1.7; padding: 0 12px; }

.mobile-cell-value { display: contents; }
.mobile-card-badges { display: none; }
@media (min-width: 701px) {
  .queue-table :is(th, td).sel { width: 40px; padding-left: 14px; padding-right: 8px; }
}
@media (min-width: 1251px) {
  .queue-table :is(th, td):last-child { width: 176px; }
}
@media (max-width: 1399px) and (min-width: 701px) {
  :root { --shell-width: 228px; }
  .topbar { flex-wrap: wrap; }
  .topbar-right { margin-left: auto; }
  .toolbar { justify-content: flex-start; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Quatro cartões em três colunas deixavam um sozinho na segunda fileira (26/10/2026). */
  .kpi-grid:has(> .kpi:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Cinco cartões: três em cima e dois embaixo, cada fileira ocupando a largura toda. */
  .kpi-grid:has(> .kpi:nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpi-grid:has(> .kpi:nth-child(5):last-child) > .kpi { grid-column: span 2; }
  .kpi-grid:has(> .kpi:nth-child(5):last-child) > .kpi:nth-child(n+4) { grid-column: span 3; }
  .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-main { grid-template-columns: minmax(0, 1fr); }
}
/* 228px quebrava "Incidentes do Vision One" e "Relatórios e exportação" em duas linhas (26/10/2026). */
@media (max-width: 1399px) and (min-width: 1101px) { :root { --shell-width: 252px; } }
/* Saúde dos endpoints: três cartões em duas colunas deixavam o terceiro sozinho com um buraco ao lado (26/10/2026). */
@media (max-width: 1399px) and (min-width: 1101px) { .fleet-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) and (min-width: 701px) { .fleet-top > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 1399px) and (min-width: 1101px) { .kpi-grid:has(> .kpi:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Tela larga com quatro cartões (Vistos sem agente sem o cartão "No inventário"): sem a quinta casa vazia (29/10/2026). */
@media (min-width: 1400px) { .kpi-grid:has(> .kpi:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .fql-layout, .report-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .fleet-main { grid-template-columns: minmax(0, 1fr); }
}
/* Só no celular a fila vira fichas; no tablet (26/10/2026) ela rola dentro do painel com os 940 px de cima. */
@media (max-width: 700px) {
  .queue-table { min-width: 0; }
}
@media (max-width: 700px) {
  /* O mesmo botão do computador abre um menu vertical. Não há faixa que rola para o lado. */
  .sidebar { display: none; position: fixed; inset: 64px 0 0; width: 100%; padding: 16px; z-index: 30; border-bottom: 0; }
  body.mobile-nav-open .sidebar { display: flex; }
  .sidebar > .brand, .sidebar-bottom { display: none; }
  #navigation { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 0; overflow-x: hidden; }
  #navigation .nav-label.nav-group { display: block; margin-top: 14px; }
  #navigation .nav-item { width: 100%; min-width: 0; min-height: 44px; white-space: normal; font-size: var(--fs-md); padding: 10px 12px; }
  main, body.nav-hidden main { margin-left: 0; }
  .topbar { min-height: 64px; padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
  .nav-toggle { display: grid; width: 38px; height: 38px; margin: 0; }
  .breadcrumb { gap: 8px; flex: none; }
  .breadcrumb > span:not(.mobile-brand) { display: none; }
  .mobile-brand { display: block; white-space: nowrap; font-size: var(--fs-xs); letter-spacing: .02em; }
  .topbar-right { flex: 1; justify-content: flex-end; gap: 7px; min-width: 0; }
  .topbar #mode-pill, .topbar #clock { display: none; }
  .topbar .logout { font-size: var(--fs-xs); max-width: 44px; line-height: 1.3; }
  .topbar .avatar { width: 30px; height: 30px; font-size: var(--fs-xs); }
  .topbar .lang-switch button { min-width: 28px; min-height: 32px; padding: 4px; }
  button.live-pill { padding: 7px; min-height: 30px; gap: 0; }
  button.live-pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  button.live-pill.paused { gap: 5px; }
  button.live-pill.paused span { position: static; width: auto; height: auto; clip-path: none; max-width: 56px; font-size: var(--fs-xs); }
  .client-tabs { padding: 0 12px; }
  .client-tab { padding: 11px 12px; font-size: var(--fs-xs); }
  .client-tab-label { display: none; }
  .live-banner, .demo-banner { padding: 10px 16px; font-size: var(--fs-xs); }
  .live-banner a { margin-left: 0; }
  .page-wrap { padding: 24px 16px; }
  .page-heading { gap: 18px; }
  .page-heading > div:first-child { flex-basis: auto; }
  .page-heading h1 { font-size: 26px; }
  .toolbar { width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .toolbar select { flex: 1 1 200px; max-width: none; width: 0; }
  .toolbar .button { white-space: normal; }
  .button, .icon-button, .pagination button { min-height: 42px; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: var(--fs-lg); min-height: 44px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-grid .kpi:last-child { grid-column: auto; }
  .kpi-grid .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi { padding: 16px 12px; }
  .kpi-top { font-size: 12.5px; }
  .kpi-icon { display: none; }
  .kpi-value { font-size: 32px; }
  .panel-heading { padding: 18px 16px 14px; }
  .panel-heading .meta { text-align: left; }
  .panel-intro, .list-body, .filters { padding-left: 16px; padding-right: 16px; }
  .filters > input, .filters > select, .filters > .search { flex: 1 1 100%; width: 100%; min-width: 0; max-width: none; }
  .filters > .button { flex: 1; }
  .grid-main, .grid-half, .fql-grid, .report-layout, .fleet-top, .fleet-main, .status-card-grid, .rules-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-main, .grid-half { gap: 0; }
  .report-layout > div { display: block; }
  .client-cards { grid-template-columns: minmax(0, 1fr); padding: 0 16px 16px; }
  .report-fields, .workflow-grid, .rf-grid, .rf-grid.even, .mode-options, .mode-options.roles { grid-template-columns: minmax(0, 1fr); }
  .date-pair { grid-template-columns: minmax(0, 1fr); }
  .report-fields { padding: 8px 16px 20px; }
  .report-cover { padding: 24px; }
  .report-cover h2 { font-size: 30px; }
  .builder-actions, .workflow-actions { flex-wrap: wrap; }
  .builder-actions .button, .workflow-actions .button { flex: 1 1 100%; white-space: normal; }
  .origin-tabs { width: 100%; }
  .origin-tab { padding: 8px 10px; flex-wrap: wrap; }
  .origin-tab b { margin-left: auto; }
  .queue-flow.compact { padding: 12px; }
  .queue-head .queue-summary { gap: 8px 16px; }
  .att-main strong { font-size: var(--fs-md); }
  .att-main small, .att-when { font-size: var(--fs-xs); }
  .att-filter { margin-left: 14px; margin-right: 14px; }
  .entity-row { grid-template-columns: 76px minmax(0, 1fr) 12px; gap: 8px; padding: 12px 14px; }
  .entity-row .att-when { flex-wrap: wrap; }
  .panel-bottom { padding: 14px 16px; }
  .group-hint { margin-left: 0; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .dialog-top { padding: 16px; gap: 10px; }
  .dialog-top h2 { font-size: 19px; }
  #detail-body { padding: 16px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .origin-tag { white-space: normal; }
  .evidence-list > div { flex-direction: column; gap: 6px; }
  .evidence-list time { white-space: normal; }
  .field-table th { width: 38%; white-space: normal; overflow-wrap: anywhere; }
  .notice.related li .text-button { overflow-wrap: anywhere; }
  .fql-card-actions { text-align: left; }
  .fql-card-body { padding: 0 16px 18px; }
  .fql-card .panel-heading > div:first-child { flex-basis: 100%; }
  .fql-toolbar select { width: 100%; min-width: 0; }
  .fql-toolbar .button { flex: 1 1 auto; white-space: normal; }
  .fql-bar-row { grid-template-columns: minmax(0, 46%) minmax(0, 1fr) auto; gap: 8px; }
  .fql-save input { min-width: 0; }
  .fql-save label { width: 100%; }
  .fql-save-actions, .fql-editor-actions { flex-wrap: wrap; }
  .fql-template-grid { grid-template-columns: minmax(0, 1fr); }
  .fql-gallery { padding: 16px; }
  .fql-gallery-item { padding-left: 0; }
  .fql-gallery-actions { flex-wrap: wrap; }
  .fleet-map-wrap { overflow: visible; }
  .fleet-map { display: none; }
  .fleet-map-list { display: block; }
  .fleet-timeline li { grid-template-columns: minmax(0, 1fr); }
  .fleet-counts { gap: 10px 12px; }
  .fleet-tile { min-width: 0; }
  .fleet-manager { grid-template-columns: 10px minmax(0, 1fr); }
  .fleet-manager-state { grid-column: 2; text-align: left; }
  .tv { padding: 16px 16px 56px; }
  .tv-head { align-items: flex-start; }
  .tv-right { width: 100%; justify-content: space-between; gap: 8px; text-align: left; }
  .tv-clock { font-size: 28px; }
  .tv-config { right: 12px; width: calc(100% - 24px); top: 140px; max-height: calc(100dvh - 200px); }
  .tv-card { padding: 16px; }
  .tv .fleet-map { display: none; }
  .tv-map { display: block; }
  .tv-config-row { flex-wrap: wrap; }
  .tv-ticker { max-width: 100%; }
  .login-box .panel { padding: 24px; }
  .login-box { margin-top: 24px; }
  .login-box .brand { display: flex; }
  footer { line-height: 1.7; }

  /* Fichas densas: cabeçalho com título/selos, seguido de rótulo e valor na mesma linha.
     Os cabeçalhos continuam na árvore acessível; cada célula também tem rótulo visual.
     Os rótulos são derivados do thead traduzido por prepareResponsiveTables (ux.js). */
  .table-wrap { overflow: visible; }
  table[data-responsive] { display: block; width: 100%; min-width: 0; table-layout: auto; }
  table[data-responsive] thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  table[data-responsive] tbody { display: grid; grid-template-columns: minmax(0, 1fr); }
  table[data-responsive] tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 0 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: start; }
  table[data-responsive] td, table[data-responsive].compact td { display: grid; grid-template-columns: minmax(0, .58fr) minmax(0, 1fr); grid-column: 1 / -1; order: 2; gap: 8px; width: auto; min-width: 0; max-width: none; padding: 4px 0; border: 0; white-space: normal; text-align: right; }
  table[data-responsive] td::before { content: attr(data-label); color: var(--muted); font: 400 12px/1.5 var(--font); text-align: left; margin: 0; }
  table[data-responsive] td > .mobile-cell-value { display: block; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-sm); line-height: 1.5; }
  table[data-responsive] td small { font-size: var(--fs-xs); line-height: 1.45; margin-top: 2px; }
  table[data-responsive] td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
  table[data-responsive] td[data-label=""]::before { display: none; }
  table[data-responsive] td[data-card-part="title"] { display: block; grid-row: 1; grid-column: 1 / -1; order: 0; padding: 0 0 7px; text-align: left; }
  table[data-responsive] tr:has(td[data-card-part="selection"]) td[data-card-part="title"] { grid-column: 1; }
  table[data-responsive] td[data-card-part="title"]::before { display: none; }
  table[data-responsive] td[data-card-part="title"] > .mobile-cell-value { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
  table[data-responsive] td[data-card-part="title"] strong { font-size: var(--fs-md); line-height: 1.45; order: 0; }
  table[data-responsive] td[data-card-part="title"] small { margin: 0; order: 2; }
  .mobile-card-badges { display: flex; flex-wrap: wrap; gap: 6px; order: 1; max-width: 100%; }
  .mobile-card-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
  .mobile-card-status small { flex-basis: 100%; }
  .mobile-card-badges .badge, .mobile-card-badges .fleet-badge { min-height: 22px; padding: 2px 7px; }
  table[data-responsive] td[data-card-part="badge"], table[data-responsive] td[data-card-part="decoration"] { display: none; }
  table[data-responsive] td[data-card-part="selection"] { display: flex; grid-row: 1; grid-column: 2; order: 1; align-items: flex-start; justify-content: flex-end; padding: 0; }
  table[data-responsive] td[data-card-part="selection"] > .mobile-cell-value { display: flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; }
  table[data-responsive] td[data-card-part="selection"]::before { display: none; }
  table[data-responsive] td[data-card-part="actions"], table[data-responsive] td[data-card-part="wide"] { display: block; text-align: left; }
  table[data-responsive] td[data-card-part="actions"] { padding-top: 8px; }
  table[data-responsive] td[data-card-part="actions"] > .mobile-cell-value { display: flex; flex-wrap: wrap; gap: 6px 12px; }
  table[data-responsive] td[data-card-part="actions"] .text-button { min-height: 36px; text-align: left; }
  /* A seleção de toda a página continua disponível por toque. */
  table[data-responsive]:has(thead .sel input) thead { position: static; display: block; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip-path: none; }
  table[data-responsive]:has(thead .sel input) thead tr { display: block; }
  table[data-responsive]:has(thead .sel input) th:not(.sel) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  table[data-responsive] th.sel { display: flex; align-items: center; gap: 10px; width: auto; padding: 14px 16px; white-space: normal; }
  table[data-responsive] th.sel::after { content: attr(data-label); }
  table[data-responsive] .sel input { flex: none; width: 18px; height: 18px; }

  table[data-responsive] td[colspan]::before { display: none; }
  table[data-responsive] tr.group-row { background: #1b1b22; }
  table[data-responsive] tr.group-row td { padding: 4px 0; }
  table[data-responsive] td[colspan] > .mobile-cell-value > .empty { padding: 24px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* =====================================================================
   Camada de elegância (16/10/2026, segunda rodada de design).
   Contenção: menos caixas competindo, bordas de um fio só, superfícies em
   camadas (fundo, painel, elevado), tipografia com poucos tamanhos e pesos,
   espaço em múltiplos de 4 px. Vermelho continua só para crítico, ação
   principal, foco, item atual e marca. Tudo aqui vem por cima do que está
   acima; os tokens de severidade não mudam.
   Escala de texto (26/10/2026: piso de 12 px, tokens --fs-* em tokens.css): 12 (rótulo, selo e apoio), 13 (corpo e tabela),
   14 (título de lista), 15 (título de painel), 26 (título da página),
   34 (número de KPI). Raios: 6 (controle), 10 (painel), 14 (diálogo).
   ===================================================================== */
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---------- casca: menu lateral e topo ---------- */
.sidebar { background: #0f0f11; border-right: 1px solid var(--line-soft); padding: 20px 12px 16px; }
.sidebar > .brand { font-size: var(--fs-xl); letter-spacing: 1.5px; padding: 0 10px; }
.brand-mark { width: 32px; height: 34px; border-radius: 8px; font-size: 30px; }
.brand small { font-size: var(--fs-xs); letter-spacing: .1em; color: var(--quiet); font-weight: 500; margin-top: 0; }
.workspace { margin: 20px 0 8px; padding: 10px 12px; border: 0; border-radius: var(--r-md); background: var(--panel); box-shadow: var(--lift); }
.workspace-icon { font-size: 18px; color: #8d8d99; }
.workspace-dot { background: #5d5d68; }
.workspace small { color: var(--quiet); }
.nav-label.nav-group { margin: 20px 12px 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; color: var(--quiet); }
#navigation { gap: 1px; }
.nav-item { position: relative; min-height: 36px; padding: 7px 12px; font-size: var(--fs-sm); font-weight: 450; color: #b0b0bb; border-radius: var(--r-sm); transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav-item > svg { opacity: .75; stroke-width: 1.5; }
.nav-item:hover { background: var(--hover); color: var(--white); }
.nav-item:hover > svg { opacity: 1; }
.nav-item.active { background: rgb(237 35 55 / 9%); color: var(--white); box-shadow: none; }
.nav-item.active > svg { opacity: 1; color: #ff5566; }
.nav-item.active::before { content: ""; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--accent); }
.nav-item .nav-count { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 999px; background: rgb(255 69 87 / 14%); color: #ff9aa5; font-size: var(--fs-xs); font-weight: 600; line-height: 18px; }
.sidebar-bottom { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.sidebar-bottom strong { color: #b4b4bf; font-weight: 500; }
.sidebar-bottom small { color: var(--quiet); }

.topbar { height: 56px; min-height: 56px; padding: 0 28px; background: rgb(13 13 15 / 84%); border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(10px); }
/* Com título longo o topo quebra em duas linhas; a altura fixa de 56px deixava a segunda por cima da faixa de clientes (26/10/2026). */
@media (max-width: 1399px) and (min-width: 701px) { .topbar { height: auto; padding: 8px 16px; gap: 8px 10px; } .topbar-right { gap: 6px; } .breadcrumb { gap: 8px; } }
.breadcrumb { font-size: 12.5px; color: #c4c4ce; }
.breadcrumb > span:first-of-type { color: var(--quiet); }
.slash { color: #45454d; }
.topbar-right { gap: 10px; }
.nav-toggle { border-color: transparent; background: transparent; width: 32px; height: 32px; min-height: 32px; font-size: var(--fs-lg); color: #9d9da8; }
.nav-toggle:hover { background: var(--hover); border-color: transparent; color: var(--white); }
.pill, #mode-pill, button.live-pill {
  display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 999px; background: transparent; color: #b6b6c1; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; line-height: 1;
}
.fleet-pill { min-height: 26px; padding: 0 10px; border-color: var(--line); background: transparent; font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; gap: 8px; line-height: 1; }
.pill.demo, #mode-pill.demo { color: #e6c28a; border-color: rgb(240 179 90 / 28%); background: rgb(240 179 90 / 5%); }
.live-pill.on { background: transparent; border-color: rgb(114 200 158 / 28%); color: #a9d8c0; }
.live-pill.on i { background: #72c89e; }
#clock { font-size: var(--fs-xs); color: var(--quiet); margin: 0 2px; }
.avatar { width: 28px; height: 28px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; background: var(--raise); border-color: var(--line-strong); color: #d4d4dc; }
.client-tabs { min-height: 40px; padding: 0 28px; border-bottom: 1px solid var(--line-soft); background: transparent; }
.client-tab { padding: 11px 14px 9px; font-size: 12.5px; color: #a8a8b3; }
.client-tab.selected { color: var(--white); }
.client-tab-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; color: var(--quiet); }
.demo-banner, .live-banner { padding: 8px 28px; font-size: var(--fs-xs); background: rgb(240 179 90 / 4%); border-bottom: 1px solid var(--line-soft); color: #cbb68f; }
.demo-banner strong { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; color: #e6c28a; }
.live-banner { background: rgb(255 255 255 / 2%); color: #b8b8c3; }
.live-banner.attention { background: rgb(240 179 90 / 5%); border-bottom-color: rgb(240 179 90 / 18%); }

/* seletor de idioma: controle segmentado, selecionado em neutro */
.lang-switch { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; gap: 1px; background: transparent; }
.lang-switch button { min-width: 28px; min-height: 22px; padding: 2px 6px; border: 0; border-radius: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--quiet); }
.lang-switch button + button { border-left: 0; }
.lang-switch button:hover { background: var(--hover); color: var(--white); }
.lang-switch button[aria-pressed="true"] { background: #2a2a31; color: var(--white); box-shadow: none; }

/* ---------- cabeçalho da página ---------- */
.page-wrap { padding: 32px 32px 24px; }
.page-heading { margin-bottom: 28px; gap: 16px 32px; align-items: flex-end; }
.page-heading h1, h1 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.page-heading p:not(.eyebrow) { margin-top: 8px; font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); max-width: 88ch; }
.toolbar { gap: 8px; }

/* ---------- controles: botão fantasma, campo com borda legível ---------- */
.button, .icon-button { border-radius: var(--r-sm); transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.button.secondary, .icon-button { background: transparent; border-color: var(--line-strong); color: var(--gray-200); }
.button.secondary:hover, .icon-button:hover { background: var(--hover); border-color: #4a4a54; color: var(--white); }
.button { font-weight: 550; letter-spacing: 0; }
.button.primary { border-color: transparent; box-shadow: 0 1px 0 rgb(255 255 255 / 14%) inset, 0 1px 2px rgb(0 0 0 / 40%); }
input:not([type=checkbox]):not([type=radio]), select, textarea { background: #0f0f12; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color: #84848f; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgb(255 69 87 / 16%); }
select { padding-right: 28px; }
@media (min-width: 701px) {
  .button, .icon-button, input:not([type=checkbox]):not([type=radio]), select { min-height: 36px; }
  .icon-button { width: 36px; }
  select { padding-top: 7px; padding-bottom: 7px; }
  .button { line-height: 1.4; }
  .toolbar .button, .toolbar select { font-size: 12.5px; }
  .toolbar select { background: transparent; border-color: var(--line-strong); color: var(--gray-200); }
  .toolbar select:hover { border-color: #4a4a54; }
}

/* ---------- painéis: uma superfície, uma borda de um fio ---------- */
.panel, .status-card, .rule-card, .client-card, .fql-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--lift); }
.panel { margin-bottom: 20px; }
.panel-heading { padding: 20px 24px 16px; }
.panel-heading h2 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; line-height: 1.4; color: #f1f1f5; }
.panel-heading p { margin-top: 4px; font-size: 12.5px; line-height: 1.55; color: var(--quiet); }
.panel-heading .meta { font-size: var(--fs-xs); color: var(--quiet); }
.panel-intro { padding-left: 24px; padding-right: 24px; }
.panel-bottom { padding: 14px 24px; border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--quiet); background: transparent; }
.panel-bottom a, .panel-bottom .text-button { font-size: var(--fs-xs); color: var(--muted); }
.panel-bottom a:hover, .panel-bottom .text-button:hover { color: var(--white); }
.grid-main, .grid-half { gap: 20px; }
.notice { background: rgb(255 255 255 / 2.5%); border: 1px solid var(--line-soft); border-radius: var(--r-md); color: #c4c4ce; }
.notice strong { color: #ececf1; }
.empty { color: var(--quiet); }
.empty strong { font-size: 15px; font-weight: 600; }

/* faixas e legendas: texto na página, sem caixa */
.command-strip { background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 0 0 12px; margin: 0 0 20px; }
.command-strip strong { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; color: #c4c4ce; }
.command-strip > div > span:last-child { font-size: 12.5px; color: var(--quiet); }
.command-strip .live-dot { background: #5d5d68; }
.queue-flow.compact { background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 0 0 12px; margin: 0 0 16px; font-size: 12.5px; color: var(--quiet); }
.queue-flow.compact .flow-step strong { color: #d8d8e0; font-weight: 600; }
.queue-flow.compact .flow-step.is-here strong { color: var(--red-200); }
.queue-flow.compact .flow-arrow::before { background: #3a3a43; }
.queue-flow.compact .flow-arrow::after { border-color: #4f4f58; }
.source-strip { background: transparent; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; padding-left: 0; padding-right: 0; }

/* ---------- KPI: rótulo quieto, número grande, tudo alinhado entre cartões ---------- */
.kpi-grid { gap: 12px; margin-bottom: 12px; }
.kpi { padding: 18px 20px 16px; border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); box-shadow: var(--lift); }
.kpi.critical { background: linear-gradient(180deg, rgb(255 69 87 / 7%), var(--panel) 72%); border-color: rgb(255 69 87 / 26%); border-top: 1px solid rgb(255 69 87 / 55%); }
.kpi.warning { border-color: var(--line); border-top: 1px solid rgb(240 179 90 / 45%); background: linear-gradient(180deg, rgb(240 179 90 / 4%), var(--panel) 72%); }
.kpi.positive { border-top: 1px solid var(--line); }
.kpi-top { min-height: 0; gap: 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.kpi-icon { width: 16px; height: 16px; background: none !important; border-radius: 0; color: #6f6f7b; }
.kpi-icon svg { width: 16px; height: 16px; }
.critical .kpi-icon { color: var(--red-200); }
.warning .kpi-icon { color: var(--attention); }
.kpi-value { margin: 12px 0 8px; font-size: 34px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; align-items: baseline; }
.kpi-value em { margin-left: 4px; font-size: var(--fs-md); font-weight: 500; font-style: normal; letter-spacing: 0; color: var(--quiet); }
.kpi-note { font-size: var(--fs-xs); line-height: 1.55; color: var(--quiet); }
.kpi-go { padding-top: 12px; font-size: var(--fs-xs); font-weight: 500; color: var(--quiet); transition: color .15s var(--ease); }
a.kpi-link { transition: border-color .15s var(--ease), background-color .15s var(--ease); }
a.kpi-link:hover { background: var(--raise); border-color: var(--line-strong); }
a.kpi-link:hover .kpi-go { color: var(--white); }
a.kpi-link.critical:hover { background: linear-gradient(180deg, rgb(255 69 87 / 10%), var(--raise) 72%); border-color: rgb(255 69 87 / 40%); }
@supports (grid-template-rows: subgrid) {
  .kpi-grid { row-gap: 0; }
  .kpi, a.kpi-link { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-content: start; margin-bottom: 12px; }
  .kpi-value { align-self: start; }
  .kpi-go { align-self: end; }
}

/* ---------- abas e filtros: controle segmentado em neutro ---------- */
.origin-tabs { gap: 4px; margin: 0 0 16px; }
.origin-tab { min-height: 32px; padding: 6px 12px; gap: 8px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.origin-tab b { font-weight: 600; color: var(--quiet); }
.origin-tab:hover { background: var(--hover); border-color: transparent; color: var(--white); }
.origin-tab:hover b { color: var(--gray-200); }
.origin-tab.is-active { background: rgb(255 255 255 / 7%); border-color: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%); }
.origin-tab.is-active b { color: var(--white); }
.att-filter { margin: 0 24px 12px; }
.view-tabs, .fql-tabs { gap: 2px; border-bottom: 1px solid var(--line-soft); margin: 24px 0 20px; }
.view-tab, .fql-tabs button { padding: 10px 14px; font-size: var(--fs-sm); font-weight: 500; color: var(--quiet); background: transparent; border-bottom: 2px solid transparent; transition: color .15s var(--ease); }
.view-tab:hover, .fql-tabs button:hover { color: var(--white); }
.view-tab.selected, .fql-tabs button.selected, .fql-tabs button.active, .fql-tabs button[aria-selected="true"] { color: var(--white); background: transparent; border-bottom-color: var(--accent); }
.filters { gap: 8px; padding: 0 24px 16px; }
.queue-head { margin: 0 0 16px; }
.queue-head .queue-summary { font-size: 12.5px; color: var(--quiet); gap: 4px 20px; }
.queue-head .queue-summary b { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; }
.chip { border-radius: var(--r-sm); }

/* ---------- selos: pequenos e firmes ---------- */
.badge, .fleet-badge { min-height: 22px; padding: 2px 8px; border-radius: 4px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .01em; line-height: 1.5; }
.fleet-badge { border-radius: 999px; }
.badge.neutral, .badge.unknown, .badge.open, .badge.good, .badge.warn, .badge.bad, .badge.progress { border-color: var(--line-strong); }
.badge.good { color: #9ed6b6; border-color: rgb(114 200 158 / 30%); }
.badge.warn, .badge.bad { color: #eec58a; border-color: rgb(240 179 90 / 30%); }
.badge.progress { color: #a9c4e0; border-color: rgb(131 175 227 / 30%); }
.rule-kind { margin-right: 6px; padding: 1px 6px; border-radius: 4px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .03em; }
.rule-kind.native { color: var(--quiet); border: 1px solid var(--line-strong); background: transparent; }
.rule-kind.team { color: #d6d6e1; background: rgb(255 255 255 / 6%); border: 1px solid var(--line-strong); }
.rule-kind.ic { color: #bfb4f0; border: 1px solid rgb(155 140 235 / 35%); background: transparent; }
.chip-related, .chip-fox, .chip-rule { border-color: var(--line-strong); color: var(--muted); border-radius: 999px; }

/* ---------- Comando do SOC: Atenção agora ---------- */
.att-list { margin-top: 0; }
.att-row { grid-template-columns: 36px 72px minmax(0, 1fr) auto; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line-soft); transition: background-color .15s var(--ease); }
.att-row:hover { background: var(--hover); }
.att-row:focus-visible { outline-offset: -2px; }
.att-type { padding: 2px 6px; border: 0; border-radius: 4px; background: rgb(255 255 255 / 6%); color: var(--muted); font: 600 12px var(--font); letter-spacing: .04em; }
.att-type.att-ic, .att-type.att-wb, .att-type.att-fox { color: var(--muted); background: rgb(255 255 255 / 6%); border: 0; }
.att-main { gap: 2px; }
.att-main strong { font-size: var(--fs-md); font-weight: 500; color: #f0f0f5; letter-spacing: -.003em; }
.att-main small { font-size: var(--fs-xs); color: var(--quiet); }
.att-when { font-size: var(--fs-xs); color: var(--quiet); gap: 1px; }
.att-when .overdue { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; }
.entity-row { grid-template-columns: 72px minmax(0, 1fr) 16px; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line-soft); transition: background-color .15s var(--ease); }
.entity-row:hover { background: var(--hover); }
.entity-go, .row-go { color: #55555f; transition: color .15s var(--ease), transform .15s var(--ease); }
.entity-row:hover .entity-go, tr:hover .row-go { color: var(--white); transform: translateX(2px); }
.more-indicators > summary { padding: 12px 4px; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; background: transparent; gap: 4px 12px; transition: color .15s var(--ease); }
.more-indicators > summary strong { font-size: var(--fs-sm); font-weight: 600; color: #d8d8e0; }
.more-indicators > summary span { font-size: 12.5px; color: var(--quiet); }
.more-indicators > summary::before { color: var(--quiet); }
.more-indicators > summary:hover strong { color: var(--white); }
.more-indicators[open] > summary { margin-bottom: 16px; }
.focus-note { padding: 14px 24px; border-top: 1px solid var(--line-soft); background: transparent; font-size: 12.5px; color: var(--quiet); }
.focus-note a, .focus-note .text-button { margin-left: 4px; }

/* distribuição por severidade e pulso das detecções */
.severity-stack > a, .severity-stack > div { padding: 12px 24px; border-top: 1px solid var(--line-soft); transition: background-color .15s var(--ease); }
.severity-stack > a:first-child, .severity-stack > div:first-child { border-top: 0; }
.severity-stack > a:hover { background: var(--hover); }
.severity-stack strong { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.chart-area { padding: 4px 24px 20px; }
.chart-legend { gap: 16px; margin: 0 0 16px 29px; font-size: var(--fs-xs); color: var(--muted); }
.chart-legend .legend-dot { margin-right: 6px; }
.gridline { background: rgb(255 255 255 / 5%); border-color: transparent; }
.gridline span, .bar-label { font-size: var(--fs-xs); color: var(--quiet); }
.bar-segment { border-radius: 0; }
.bar-stack { border-radius: 3px 3px 0 0; overflow: hidden; }
a.bar-column:hover .bar-stack { outline: 0; filter: brightness(1.18); }
a.bar-column:hover .bar-label { color: var(--white); }
.grid-main > .panel { display: flex; flex-direction: column; }
.grid-main > .panel > .chart-area, .grid-main > .panel > .chart-wrap { flex: 1; display: flex; flex-direction: column; }
.grid-main .histogram { flex: 1; min-height: 220px; height: auto; }
.grid-main .chart-area > .histogram { margin-top: 4px; }

/* ---------- tabelas: cabeçalho sem faixa, linhas de um fio ---------- */
td strong { font-weight: 500; color: #f0f0f5; }
td small { color: var(--quiet); font-size: var(--fs-xs); margin-top: 3px; }
@media (min-width: 701px) {
  th, table th, table.compact th, .table-wrap th { background: transparent; color: var(--quiet); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .01em; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  td, table td, table.compact td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
  tr:last-child td { border-bottom: 0; }
  .panel table :is(th, td):first-child, .table-wrap table :is(th, td):first-child { padding-left: 24px; }
  .panel table :is(th, td):last-child, .table-wrap table :is(th, td):last-child { padding-right: 24px; }
  .fql-table :is(th, td):first-child, .field-table :is(th, td):first-child { padding-left: 0; }
  .fql-table :is(th, td):last-child, .field-table :is(th, td):last-child { padding-right: 0; }
  .queue-table :is(th, td).sel { width: 52px; padding-left: 24px; padding-right: 0; }
}
@media (max-width: 700px) {
  th { background: transparent; color: var(--quiet); font-weight: 500; }
}
.table-wrap tbody tr { transition: background-color .12s var(--ease); }
.table-wrap tbody tr:hover { background: var(--hover); }
.table-wrap tbody tr.is-selected, tr.is-selected:hover { background: rgb(255 69 87 / 6%); }
tr[data-detail-source]:hover, tr[data-finding]:hover, tr[data-incident]:hover { background: var(--hover); }
.critical-row { background: rgb(255 69 87 / 4%); }
.critical-row:hover { background: rgb(255 69 87 / 7%); }
.group-row td { background: rgb(255 255 255 / 2.5%); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: var(--gray-200); font-size: 12.5px; }
td.num, th.num { font-variant-numeric: tabular-nums; }
.mono, td .mono { font-variant-numeric: tabular-nums; }
.pagination button { border-radius: var(--r-sm); border-color: var(--line-strong); background: transparent; }
.pagination button:hover:not(:disabled) { background: var(--hover); }
.table-wrap .mono { color: var(--id); }
.bulk-bar { margin: 0 24px 12px; border-radius: var(--r-md); border-color: rgb(255 69 87 / 24%); background: rgb(255 69 87 / 5%); }

/* ---------- diálogo: superfície elevada, seções por fio ---------- */
dialog { background: #131316; border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--float); color: var(--text); }
dialog::backdrop { background: rgb(5 5 7 / 66%); backdrop-filter: blur(3px); }
.dialog-top { padding: 20px 28px; background: rgb(19 19 22 / 92%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
.dialog-top h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; }
#detail-body { padding: 24px 28px 28px; }
#detail-body h3 { margin: 28px 0 12px; font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; color: #f1f1f5; }
#detail-body > h3:first-child { margin-top: 0; }
.detail-grid { gap: 16px 24px; }
.detail-grid small, .workflow-grid label, .workflow-note, .rule-form label, .client-form label, .rule-form legend { font-size: var(--fs-xs); font-weight: 500; color: var(--quiet); }
.detail-grid strong { font-size: var(--fs-md); font-weight: 500; color: #f0f0f5; }
#detail-body .notice, .evidence-summary, .notice.playbook { background: rgb(255 255 255 / 2.5%); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 14px 16px; }
.evidence-summary h3, .notice.playbook > strong, #detail-body .notice > strong:first-child { font-size: var(--fs-sm); }
.evidence-list > div { border: 0; border-left: 1px solid var(--line-strong); padding-left: 16px; }
.workflow-grid { gap: 16px; }
.workflow-actions { margin-top: 12px; gap: 8px; }
.close-detail, #close-detail { border-color: transparent; }
.field-table th, .field-table td { padding: 8px 0; font-size: 12.5px; background: transparent; }

/* diálogo: o texto de apoio vira citação de um fio; só "O que fazer" e as evidências ficam em caixa */
.origin-tag { padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: transparent; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; }
.origin-tag.fox, .origin-tag.vision { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.origin-line { font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); margin: 8px 0 16px; }
#detail-body .notice:not(.playbook):not(.warning):not(.related) { background: transparent; border: 0; border-left: 1px solid var(--line-strong); border-radius: 0; padding: 2px 0 2px 16px; }
#detail-body .notice.warning { border-radius: var(--r-md); }
.evidence-summary { border-radius: var(--r-md); }
details.raw summary { font-size: var(--fs-xs); color: var(--quiet); }
details.raw summary:hover { color: var(--white); }

/* ---------- caixa de seleção própria: fio, canto de 4 px, vermelho só quando marcada ---------- */
input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 1px solid #6b6b77; border-radius: 4px; background: #0f0f12 center / 12px no-repeat; vertical-align: middle; cursor: pointer; transition: background-color .12s var(--ease), border-color .12s var(--ease); }
input[type=checkbox]:hover { border-color: #9a9aa6; }
input[type=checkbox]:checked { border-color: var(--accent); background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5'/%3E%3C/svg%3E"); }
input[type=checkbox]:indeterminate { border-color: var(--accent); background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h6'/%3E%3C/svg%3E"); }
input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
.sel input, .module-check input { width: 16px; height: 16px; }

/* ---------- Dashboards (FQL): painéis calmos, número protagonista ---------- */
.fql-grid { gap: 20px; }
.fql-card .panel-heading { padding: 20px 24px 12px; }
.fql-card .panel-heading h2 { font-size: 15px; font-weight: 600; }
.fql-card-body { padding: 0 24px 16px; }
.fql-tag { padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--quiet); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; }
.fql-card-actions .text-button, .fql-card-actions a { font-size: var(--fs-xs); color: var(--quiet); }
.fql-card-actions .text-button:hover { color: var(--white); }
.fql-number { padding: 4px 0 8px; }
.fql-number strong { font-size: 44px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
.fql-number span { margin-top: 4px; font-size: 12.5px; color: var(--quiet); }
.fql-bar-row { grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto; padding: 6px 0; gap: 16px; font-size: 12.5px; }
.fql-bar-label { color: #d4d4dc; }
.fql-bar-track { height: 6px; border-radius: 999px; background: rgb(255 255 255 / 6%); }
.fql-bar { border-radius: 999px; background: #7ea5d6; }
.fql-bar-value { font-size: 12.5px; font-weight: 600; color: #ececf1; }
.fql-plot .fql-gridline, .fql-plot .fql-axis { stroke: rgb(255 255 255 / 6%); }
.fql-y, .fql-x, .fql-y span, .fql-x span { font-size: var(--fs-xs); color: var(--quiet); }
.fql-legend { gap: 16px; font-size: var(--fs-xs); color: var(--muted); }
.fql-query { border: 0; border-top: 1px solid var(--line-soft); background: transparent; }
.fql-query > summary, .panel > details.more > summary { font-size: var(--fs-xs); color: var(--quiet); padding: 10px 24px; }
.fql-query > summary:hover, .panel > details.more > summary:hover { color: var(--white); }
.fql-query code, .fql-editor textarea { font-family: Consolas, "Cascadia Mono", monospace; font-size: var(--fs-xs); color: #c4c4ce; }
.fql-toolbar { gap: 8px; margin-bottom: 16px; }
.fql-note { font-size: 12.5px; line-height: 1.6; color: var(--quiet); }
.fql-table th { font-size: var(--fs-xs); }
.fql-delta { font-size: var(--fs-xs); }
.fql-viz-switch button { border-color: var(--line-strong); background: transparent; color: var(--quiet); font-size: var(--fs-xs); }
.fql-viz-switch button.active { background: rgb(255 255 255 / 8%); color: var(--white); border-color: var(--line-strong); }
.fql-tip { background: #1b1b21; border-color: var(--line-strong); border-radius: var(--r-md); box-shadow: var(--float); }
.fql-template, .fql-gallery-group, .fql-help .panel { border-color: var(--line); border-radius: var(--r-md); }
.fql-template { background: var(--panel); }

/* ---------- Frota: estado por fio e ponto, não por moldura vermelha ---------- */
.fleet-top { gap: 20px; margin-bottom: 20px; }
.fleet-top .panel { padding: 22px 24px; }
.fleet-kicker { margin-bottom: 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; color: var(--quiet); }
.fleet-attention h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.fleet-summary h2 { font-size: var(--fs-lg); font-weight: 600; }
.fleet-big { font-size: 40px; font-weight: 600; letter-spacing: -.04em; }
.fleet-stack, .fleet-history { background: rgb(255 255 255 / 6%); }
.fleet-spark path { stroke-width: 1.75; }
.fleet-main { gap: 20px; }
.fleet-grid { gap: 12px; }
.fleet-tile { gap: 6px; min-height: 0; padding: 14px 16px; border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel2); box-shadow: inset 2px 0 0 var(--fleet); transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.fleet-tile:hover, .fleet-tile:focus-visible { background: var(--raise); border-color: var(--line-strong); }
.fleet-tile strong { font-size: var(--fs-sm); font-weight: 600; }
.fleet-reason { font-size: var(--fs-xs); color: var(--quiet); }
.fleet-alerts { background: rgb(255 69 87 / 14%); color: #ff9aa5; font-weight: 600; }
.fleet-manager { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.fleet-manager:last-child { border-bottom: 0; }
.fleet-timeline li, .fleet-list .stat-row { border-bottom: 1px solid var(--line-soft); }
.fleet-timeline li:last-child { border-bottom: 0; }
.fleet-kind { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; }
.fleet-edge { stroke: var(--gray-650); }
.fleet-ring-bg { fill: transparent; stroke: #26262c; }
.fleet-map text { font-size: var(--fs-md); fill: var(--gray-200); }
.fleet-trend-stack { border-radius: 2px 2px 0 0; }
.fleet-badge.fleet-down, .fleet-badge.fleet-warning, .fleet-badge.fleet-unknown, .fleet-badge.fleet-off, .fleet-badge.fleet-healthy { background: transparent; }

/* ---------- Regras, clientes, saúde: cartões de um fio ---------- */
.rules-grid { gap: 16px; }
.rule-card { padding: 20px 22px; }
.rule-card p { color: var(--muted); }
.rule-card h3 { font-size: var(--fs-md); font-weight: 600; letter-spacing: -.005em; }
.rule-card .mono { color: var(--quiet); }
.rule-logic, .rule-needs { border-color: var(--line-soft); background: rgb(255 255 255 / 2%); border-radius: var(--r-sm); }
/* "Telemetria necessária" virou caixa com fundo, mas herdou só a borda de cima e nenhum recuo: o texto encostava na borda (26/10/2026). */
.rule-needs { border: 1px solid var(--line-soft); padding: 10px 12px; }
.rule-card footer { border-top: 1px solid var(--line-soft); }
.status-card-grid { gap: 16px; }
.status-card { padding: 20px 22px; }
.status-card h3 { font-size: var(--fs-md); font-weight: 600; }
.status-card .route, .status-card .mono { color: var(--quiet); font-size: var(--fs-xs); }
.client-card { background: var(--panel2); }
.client-card.is-current { border-color: rgb(255 69 87 / 30%); }
.library-sub b { background: rgb(255 255 255 / 6%); color: var(--muted); }
.section-title { margin: 28px 0 16px; }
.section-title h2 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.005em; }
.section-title > span { font-size: var(--fs-xs); color: var(--quiet); letter-spacing: 0; }
.library-sub { font-size: 15px; font-weight: 600; }
.module-check { background: transparent; border-color: var(--line-strong); border-radius: var(--r-md); transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.module-check:hover { border-color: #55555f; }
.module-check:has(input:checked) { background: rgb(255 255 255 / 4%); border-color: #6a6a76; }
.report-cover { background: var(--panel); border-color: var(--line); border-radius: var(--r-md); }
.toast { background: #1b1b21; border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--float); }

/* ---------- login: uma coluna, marca no alto, cartão discreto ---------- */
.login-box .panel { border-top: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--float); position: relative; overflow: hidden; }
.login-box .panel::before { content: ""; position: absolute; left: 32px; right: 32px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(255 69 87 / 70%), transparent); }
.login-box h1 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 8px; }
.login-box .panel-intro { font-size: var(--fs-sm); color: var(--muted); }
.login-box label { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.login-box .hint, .login-footnote { color: var(--quiet); font-size: var(--fs-xs); }

/* listas de linhas (frota, saúde, ranking): respiro igual ao do painel */
.list-body { padding: 4px 24px 20px; }
.stat-row { padding: 12px 0; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.stat-row strong { font-size: var(--fs-sm); font-weight: 550; color: #ececf1; font-variant-numeric: tabular-nums; }
.fleet-quality { margin: 0; padding: 4px 24px 20px; }
.fleet-tile .fleet-badge, .fleet-tile-top .fleet-badge { justify-self: start; }
.fleet-manager-state strong { font-weight: 500; color: var(--gray-200); font-size: var(--fs-xs); }
body:has(.login-box) { background: transparent; }
body:has(.login-box)::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 60% 45% at 50% -8%, rgb(237 35 55 / 8%), transparent 70%); }

/* ---------- celular: mesma contenção, alvos de toque de 44 px ---------- */
@media (max-width: 700px) {
  .topbar { min-height: 64px; height: auto; padding: 8px 12px; background: rgb(13 13 15 / 94%); }
  .client-tabs { padding: 0 12px; }
  .demo-banner, .live-banner { padding: 10px 16px; }
  .fql-card-body { padding: 0 16px 16px; }
  .list-body, .panel-intro { padding-left: 16px; padding-right: 16px; }
  .page-wrap { padding: 24px 16px 20px; }
  .page-heading { gap: 16px; margin-bottom: 20px; }
  .page-heading h1 { font-size: var(--fs-2xl); }
  .origin-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .origin-tab { flex-wrap: nowrap; justify-content: space-between; text-align: left; min-height: 44px; border-color: var(--line); background: var(--panel); }
  .origin-tab.is-active { background: rgb(255 255 255 / 8%); border-color: var(--line-strong); }
  .att-filter { margin: 0 16px 12px; }
  .panel-heading { padding: 18px 16px 12px; }
  .panel-bottom, .focus-note { padding: 14px 16px; }
  .att-row { padding: 14px 16px; }
  .entity-row { padding: 14px 16px; }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 30px; }
  .severity-stack > a, .severity-stack > div { padding: 12px 16px; }
  .chart-area { padding: 4px 16px 16px; }
  input[type=checkbox] { width: 20px; height: 20px; border-radius: 5px; background-size: 14px; }
  .filters { padding: 0 16px 16px; }
  .bulk-bar { margin: 0 16px 12px; }
  table[data-responsive] tbody tr { padding: 14px 16px; }
  .dialog-top { padding: 16px 20px; }
  #detail-body { padding: 20px; }
}

/* ---------- Modo TV: o número é o protagonista, o cartão só o sustenta ---------- */
.tv { background: var(--bg); }
.tv-head { margin-bottom: 16px; }
.tv-brand strong { font-size: 17px; font-weight: 600; letter-spacing: .06em; }
.tv-brand small, .tv-right small { color: var(--quiet); }
.tv-status { font-size: var(--fs-sm); color: var(--quiet); }
.tv-clock { font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
.tv-right .icon-button { border-color: var(--line); }
.tv-grid { gap: 16px; }
.tv-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); box-shadow: var(--lift); }
.tv-card h3 { margin: 0 0 12px; font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.tv-big { font-weight: 600; letter-spacing: -.04em; }
.tv-kpis b { font-weight: 600; letter-spacing: -.03em; }
.tv-kpis span, .tv-note, .tv-rows small { color: var(--quiet); }
.tv-donut b { background: var(--panel); font-weight: 600; }
.tv-counts { gap: 8px 12px; }
.tv-list { gap: 10px; }
.tv-list li span:last-child { color: var(--quiet); }
.tv-rows { gap: 10px; }
.tv-waffle { gap: 3px; }
.tv-ticker { background: rgb(15 15 18 / 94%); border-top: 1px solid var(--line-soft); }
.tv-ticker-track { font-size: var(--fs-sm); }
.tv-ticker-track b { color: var(--quiet); font-weight: 600; letter-spacing: .08em; }
.tv-config { border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: #131316; box-shadow: var(--float); }
.tv-config h3 { font-size: var(--fs-md); font-weight: 600; }
.tv-config-cards label, .tv-config-row { font-size: var(--fs-sm); }
.tv-config-cards input { accent-color: var(--accent); }
@media (min-width: 1800px) {
  .tv-card h3 { font-size: var(--fs-md); }
  .tv-clock { font-size: 36px; }
}

/* ---------- ajustes da revisão: botão de opção, estados quietos, ficha da frota ---------- */
input[type=radio] { appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 1px solid #6b6b77; border-radius: 50%; background: #0f0f12; vertical-align: middle; cursor: pointer; transition: border-color .12s var(--ease); }
input[type=radio]:hover { border-color: #9a9aa6; }
input[type=radio]:checked { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 38%, #0f0f12 42%); }
input[type=radio]:disabled { opacity: .45; cursor: not-allowed; }
.badge.good { background: transparent; color: #9ed6b6; border-color: rgb(114 200 158 / 20%); }
.badge.neutral, .badge.unknown, .badge.open { color: #c4c4cd; border-color: var(--line-strong); }
.fleet-tile { box-shadow: none; border-color: color-mix(in srgb, var(--fleet) 26%, var(--line)); }
.fleet-tile:hover, .fleet-tile:focus-visible { border-color: color-mix(in srgb, var(--fleet) 55%, var(--line-strong)); }
.fleet-tile strong { font-size: var(--fs-sm); }
.fleet-tile .mono { font-size: var(--fs-xs); color: var(--quiet); }
.rank-row { gap: 12px; padding: 10px 0; font-size: var(--fs-sm); }
.rank-index { font-size: var(--fs-xs); color: #5d5d68; min-width: 18px; }
.rank-label { color: #d4d4dc; }
.rank-label strong { font-size: var(--fs-sm); font-weight: 450; }
.rank-bar { height: 4px; margin-top: 8px; background: rgb(255 255 255 / 6%); border-radius: 999px; }
.rank-bar span { background: #7ea5d6; border-radius: 999px; }
.rank-count { font: 600 13px var(--font); font-variant-numeric: tabular-nums; color: #ececf1; }

/* ---------- filtros ativos, avisos, carregando, rodapé ---------- */
.filter-chips { gap: 8px; margin: 0 0 16px; }
.filter-chips > span { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em; color: var(--quiet); }
.chip { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgb(255 255 255 / 4%); color: var(--gray-200); font-size: var(--fs-xs); transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.chip:hover { border-color: #5a5a66; background: rgb(255 255 255 / 7%); }
.chip.clear { background: transparent; border-color: var(--line); color: var(--quiet); }
.chip.clear:hover { color: var(--white); border-color: var(--line-strong); }
.error-banner { border-radius: var(--r-md); background: rgb(255 69 87 / 7%); border-color: rgb(255 69 87 / 30%); color: #ffb0b9; }
.notice.warning { background: rgb(240 179 90 / 5%); border-color: rgb(240 179 90 / 24%); color: #e4c697; }
.loading { color: var(--quiet); font-size: var(--fs-sm); }
.spinner { width: 16px; height: 16px; border: 2px solid #2c2c33; border-top-color: var(--accent); }
footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--quiet); }
footer .text-button { color: var(--muted); }
footer .text-button:hover { color: var(--white); }
.footer-dot { color: #45454d; }
tr.row-new, .row-new { animation-name: fox-new-row-soft; }
@keyframes fox-new-row-soft { 0%, 40% { background: rgb(255 69 87 / 9%); } 100% { background: transparent; } }
.toasts .toast { font-size: var(--fs-sm); }

/* conteúdo com largura de leitura em tela grande; a tela cheia usa tudo */
.page-wrap { max-width: 1680px; }
body.kiosk .page-wrap { max-width: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .spinner { animation-duration: 1.2s !important; animation-iteration-count: infinite !important; }
}

/* ---------- Mais indicadores: funil, tempos e cargas em azul neutro, sem vermelho ---------- */
.funnel { gap: 16px; padding: 8px 24px 24px; }
.funnel-step span { font-size: var(--fs-xs); color: var(--quiet); }
.funnel-step strong { margin: 6px 0 12px; font-size: 26px; font-weight: 600; letter-spacing: -.03em; color: #f0f0f5; font-variant-numeric: tabular-nums; }
.funnel-bar, a.funnel-step:first-child .funnel-bar { height: 6px; border-radius: 999px; background: #7ea5d6; }
.funnel-bar.is-empty { height: 2px; background: rgb(255 255 255 / 12%); }
.service-metrics { gap: 20px; padding: 12px 24px 28px; }
.service-metrics > div, .service-metrics > a { border-left: 1px solid var(--line); padding: 2px 0 2px 16px; transition: border-color .15s var(--ease); }
.service-metrics > a:hover { border-left-color: #6a6a76; background: transparent; }
.service-metrics span { font-size: var(--fs-xs); color: var(--quiet); }
.service-metrics strong { margin: 10px 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.service-metrics small { font-size: var(--fs-xs); line-height: 1.6; color: var(--quiet); }
.mini-bars { padding: 4px 24px 20px; }
.mini-row { margin: 14px 0; }
.mini-row > div:first-child { font-size: var(--fs-sm); color: #d4d4dc; margin-bottom: 8px; }
.mini-row strong { color: #ececf1; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-track { height: 4px; border-radius: 999px; background: rgb(255 255 255 / 6%); }
.mini-track i { border-radius: 999px; background: #7ea5d6; }

/* pesos: a fonte só tem 400, 600 e 700; 500 vira 600. Valores de ficha e títulos de lista ficam em 400. */
.detail-grid strong { font-weight: 400; font-size: var(--fs-md); }
.att-main strong { font-weight: 400; font-size: var(--fs-md); }
.fleet-window { margin: 12px 0; }
.fleet-periods { margin: 12px 0 20px; }

.fleet-grid { padding: 4px 24px 20px; }

/* login centrado na altura da janela */
body:has(.login-box) { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
body:has(.login-box) .login-box { margin: 32px auto; }
@media (max-width: 700px) {
  .origin-tabs.att-filter { width: auto; }
  .fleet-grid { padding: 4px 16px 16px; }
  body:has(.login-box) .login-box { margin: 24px auto; }
}

/* seta própria nos campos de seleção */
select:not([multiple]) {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%239a9aa6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
  padding-right: 32px;
}
select:not([multiple]):hover { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23ececf1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E"); }
select:disabled { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%236a6a76' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E"); }

/* diálogo: título e botão de fechar na mesma linha de centro */
.dialog-top { align-items: center; }
.dialog-top .icon-button { width: 32px; height: 32px; min-height: 32px; font-size: 18px; color: var(--quiet); }
.dialog-top .icon-button:hover { color: var(--white); background: var(--hover); }

/* caixas e botões de opção dentro de formulários: o v3.css os põe em "width: auto", o que os esmagaria */
:is(.rule-form, .client-form, .account-form, .workflow-grid, .report-fields, .group-grid, .format-options, .bulk-bar, .bulk-close, .filters, .tv-config-cards, .fql-add, .fql-save, .mode-options) :is(input[type=checkbox], input[type=radio]),
.rule-form .check input, .rule-form .mode input { display: inline-block; flex: none; width: 16px; height: 16px; min-width: 0; min-height: 0; padding: 0; margin: 0 6px 0 0; }
.mode { transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.mode:hover { border-color: #55555f; }
.mode.selected { border-color: rgb(255 69 87 / 45%); background: rgb(255 69 87 / 6%); }
.mode strong { font-size: var(--fs-sm); }
.mode small { font-size: var(--fs-xs); color: var(--quiet); }
.rule-form label.check input { width: 16px !important; height: 16px; }
.client-card { padding: 20px 22px; }
.client-card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.client-card p { margin: 0 0 10px; font-size: var(--fs-sm); line-height: 1.55; }

/* ------------------------------------------------------------------
   Todos os clientes (portfolio.js, 16/10/2026): tudo de todos os clientes numa tela, uma seção por cliente.
   Mesma linguagem da camada de elegância: superfície em camadas, fio de 1 px, cor só onde pede atenção.
------------------------------------------------------------------ */
.pf-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.pf-summary .pf-stat { background: var(--panel); padding: 16px 18px; }
.pf-summary .pf-stat-value { font-size: 26px; }
.pf-sections { display: flex; flex-direction: column; gap: 16px; }
.pf-section {
  padding: 20px 22px 8px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
}
.pf-section.pf-critical { border-color: color-mix(in srgb, var(--sev-critical) 40%, var(--line-soft)); }
.pf-section.pf-high { border-color: color-mix(in srgb, var(--sev-high) 28%, var(--line-soft)); }
.pf-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pf-name { flex: 1 1 260px; min-width: 0; }
.pf-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.pf-meta { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--quiet); }
.pf-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.pf-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-stat-value { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15; }
.pf-stat-label { font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.pf-stat.is-critical .pf-stat-value { color: var(--sev-critical); }
.pf-stat.is-high .pf-stat-value { color: var(--sev-high); }
.pf-section .att-list { margin: 0 -22px; }
.pf-calm, .pf-more { margin: 14px 0 12px; font-size: var(--fs-sm); }
.pf-note { margin-top: 16px; font-size: var(--fs-xs); }
@media (max-width: 1000px) {
  .pf-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .pf-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-section { padding: 16px 16px 6px; }
  .pf-section .att-list { margin: 0 -16px; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Marca TrendAI (20/10/2026, pedido do usuário: a TrendAI como dona do SOC). Logo oficial branco, fundo transparente. */
.brand-ai { display: block; min-width: 0; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.brand-word { display: block; height: 24px; width: auto; }
.brand-ai .brand-soc { margin-left: 0; font-size: var(--fs-xs); letter-spacing: .14em; font-weight: 700; }
.brand-ai small { margin-top: 6px; }
.login-box .brand-word { height: 30px; }
.tv-logo { display: block; height: 30px; width: auto; }

/* Todos os clientes, visão unificada (20/10/2026): resumo com ícone, anel de risco por cliente, evolução e prioridades. */
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 26px; }
.pf-tile { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: var(--r-lg, 14px);
  background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pf-tile:hover, .pf-tile[aria-expanded="true"] { border-color: var(--line-strong, var(--gray-650)); background: var(--raise, var(--raise)); }
.pf-tile:focus-visible { outline: 2px solid var(--focus, var(--red-400)); outline-offset: 2px; }
.pf-tile-more { margin-left: auto; color: var(--quiet); font-style: normal; font-size: var(--fs-xs); }
.pf-tile-wrap { position: relative; }
.pf-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; list-style: none; margin: 0; padding: 6px; border: 1px solid var(--line-strong, var(--gray-650));
  border-radius: 10px; background: #0f0f10; box-shadow: var(--float, 0 24px 64px -16px rgb(0 0 0 / 75%)); }
.pf-menu-head { padding: 6px 10px 8px; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--quiet); }
.pf-menu li.muted { padding: 8px 10px; font-size: var(--fs-sm); }
.pf-menu button { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text); font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer; }
.pf-menu button:hover, .pf-menu button:focus-visible { background: rgb(255 255 255 / 6%); }
.pf-menu button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pf-menu button b { font-variant-numeric: tabular-nums; }
.pf-menu button i { font-style: normal; color: var(--quiet); }
.pf-tile-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 12px; background: #1d2230; }
.pf-tile-icon svg { width: 28px; height: 28px; fill: none; stroke: #7fb0ff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pf-tile.is-critical .pf-tile-icon { background: color-mix(in srgb, var(--sev-critical) 16%, #161619); }
.pf-tile.is-critical .pf-tile-icon svg { stroke: var(--sev-critical); }
.pf-tile b { display: block; font-size: 30px; line-height: 1.05; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pf-tile span { font-size: 13.5px; color: var(--muted); }
.pf-title { margin: 0 0 14px; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.pf-risks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pf-risk { --rc: #5b6170; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 14px 10px; border: 1px solid var(--line-soft); border-radius: var(--r-lg, 14px);
  background: var(--panel); color: var(--text); text-align: center; }
.pf-risk:hover { border-color: color-mix(in srgb, var(--rc) 45%, var(--line-soft)); }
.pf-risk button { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 4px; border: 0; border-radius: 10px; background: transparent;
  color: inherit; font: inherit; cursor: pointer; }
.pf-risk button:hover { background: rgb(255 255 255 / 4%); }
.pf-risk button:focus-visible { outline: 2px solid var(--focus, var(--red-400)); outline-offset: 1px; }
.pf-risk .pf-risk-name { flex-direction: row; justify-content: space-between; text-align: left; }
.pf-risk-name > span { color: var(--quiet); font-size: 18px; }
.pf-risk-high { --rc: var(--sev-critical); }
.pf-risk-mid { --rc: var(--sev-high); }
.pf-risk-low { --rc: #2bb5a0; }
.pf-risk h3 { margin: 0; font-size: 18px; font-weight: 650; text-align: left; overflow-wrap: anywhere; }
/* Índice do cliente em número e régua (28/10/2026, "cara de fake"): o anel de 150 px com brilho e o selo em caixa alta
   pareciam painel de jogo. A régua mostra as faixas do Vision One (baixo até 30, médio de 31 a 69, alto a partir de 70). */
.pf-risk { align-items: stretch; text-align: left; }
.pf-risk .pf-risk-gauge { align-items: stretch; gap: 10px; }
.pf-score-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pf-score-num b { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pf-score-num small { margin-left: 3px; color: var(--muted); font-size: var(--fs-sm); }
.pf-meter { position: relative; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.pf-meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--rc); }
.pf-meter-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--panel); }
.pf-meter-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--quiet); }
.pf-level { display: inline-flex; align-items: center; gap: 6px; color: var(--rc); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pf-level::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.pf-risk-none .pf-level { color: var(--muted); }
.pf-risk-nums { display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.pf-risk-nums button { gap: 2px; }
.pf-risk-nums button + button { border-radius: 0 10px 10px 0; box-shadow: inset 1px 0 var(--line-soft); }
.pf-risk-nums b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.pf-risk-nums span { font-size: 12.5px; color: var(--muted); }
.pf-risk .pf-risk-trend { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; width: 100%; }
.pf-spark { width: 100%; height: 34px; }
.pf-spark polyline { fill: none; stroke: var(--rc); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pf-spark line { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.pf-spark-empty { font-size: var(--fs-xs); color: var(--quiet); text-align: left; }
.pf-delta { text-align: right; font-size: var(--fs-xs); color: var(--muted); }
.pf-delta b { display: block; font-size: var(--fs-md); color: var(--text); }
.pf-delta.up b { color: var(--sev-critical); }
.pf-delta.down b { color: #2bb5a0; }
.pf-delta small { font-size: var(--fs-xs); }
.pf-duo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }
.pf-chart { display: block; width: 100%; height: auto; }
.pf-chart .pf-grid line { stroke: var(--line-soft); stroke-width: 1; }
.pf-chart .pf-grid text { fill: var(--quiet); font-size: var(--fs-xs); text-anchor: end; }
.pf-chart .pf-grid text.pf-xtick { text-anchor: middle; }
.pf-chart .pf-grid text.pf-x-first { text-anchor: start; }
.pf-chart .pf-grid text.pf-x-last { text-anchor: end; }
.pf-chart polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
/* ponto só aparece ao passar o mouse (a área de toque é o círculo inteiro, transparente) */
.pf-chart circle { fill: transparent; stroke: none; cursor: crosshair; }
.pf-chart circle:hover { fill: var(--c); stroke: var(--panel); stroke-width: 2; }
.pf-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.pf-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pf-chart-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
/* Gráfico de linha do índice (pfTrend, 28/10/2026): o SVG estica só as linhas (2 px que não engrossam) e todo texto é HTML,
   do mesmo tamanho em qualquer largura. Nome e valor no fim de cada linha ficam numa coluna à direita. */
.pf-trend { position: relative; padding: 6px 12px 0 38px; }
.pf-trend.with-ends { padding-right: 168px; }
.pf-trend.with-ends.single { padding-right: 64px; }
.pf-plot { position: relative; height: var(--h, 240px); }
.pf-trend .pf-chart { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pf-trend .pf-chart polyline { vector-effect: non-scaling-stroke; stroke-width: 2; stroke-linecap: round; }
.pf-grid-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); pointer-events: none; }
.pf-grid-line.minor { border-top-style: dashed; opacity: .55; }
.pf-y { position: absolute; left: -38px; width: 30px; text-align: right; transform: translateY(-50%); font-size: var(--fs-xs); color: var(--quiet); font-variant-numeric: tabular-nums; }
.pf-xaxis { position: relative; height: 20px; margin-top: 8px; }
.pf-x { position: absolute; top: 0; transform: translateX(-50%); font-size: var(--fs-xs); color: var(--quiet); white-space: nowrap; }
.pf-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--c); transform: translate(-50%, -50%); }
.pf-end { position: absolute; left: calc(100% + 12px); transform: translateY(-50%); display: flex; align-items: center; gap: 6px; max-width: 152px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-end::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pf-end b { color: var(--text); font-variant-numeric: tabular-nums; }
.pf-cross { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--muted); pointer-events: none; }
.pf-tip { position: absolute; top: 6px; z-index: 3; min-width: 170px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 8px 22px rgb(0 0 0 / 35%); font-size: 12.5px; pointer-events: none; }
.pf-tip b { display: block; margin-bottom: 4px; }
.pf-tip span { display: flex; align-items: center; gap: 6px; line-height: 1.7; }
.pf-tip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pf-tip em { margin-left: auto; padding-left: 14px; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.pf-note { margin: 4px 0 0 38px; font-size: 12px; }
.pf-table summary { margin: 8px 0 0 38px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.pf-table .table-wrap { margin-top: 8px; }
@media (max-width: 700px) {
  .pf-trend.with-ends { padding-right: 12px; }
  .pf-end { display: none; }
}
.pf-prio { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pf-prio-item { border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; background: var(--panel2, #18181c); }
.pf-prio-client { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px 0; font-size: var(--fs-md); }
.pf-prio-client span { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }
.pf-prio-item .att-row { border: 0; background: transparent; grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; padding: 10px 14px; }
/* coluna estreita: o item empilha como no celular (antes o prazo e a hora saíam cortados na direita) */
.pf-prio-item .att-row .att-main, .pf-prio-item .att-row .att-when { grid-column: 1 / -1; }
.pf-prio-item .att-row .att-when { display: flex; gap: 8px; justify-self: start; }
.pf-prio-client i { width: 12px; height: 12px; border-radius: 50%; background: var(--sev-low); flex: none; }
.pf-prio-client .pf-sev-critical { background: var(--sev-critical); }
.pf-prio-client .pf-sev-high { background: var(--sev-high); }
.pf-prio-client .pf-sev-medium { background: var(--sev-medium); }
.pf-prio button { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 12px; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line-soft);
  border-radius: 10px; background: var(--panel2, #18181c); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pf-prio button:hover { border-color: var(--line); }
.pf-prio i { width: 14px; height: 14px; border-radius: 50%; background: var(--sev-low); }
.pf-prio .pf-sev-critical { background: var(--sev-critical); }
.pf-prio .pf-sev-high { background: var(--sev-high); }
.pf-prio .pf-sev-medium { background: var(--sev-medium); }
.pf-prio b { display: block; font-size: var(--fs-md); }
.pf-prio small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-prio-sev { font-size: var(--fs-xs); color: var(--muted); }
.pf-map { margin-bottom: 26px; }
@media (max-width: 1000px) { .pf-duo { grid-template-columns: 1fr; } }

/* Fila de todos os clientes (22/10/2026): chips de cliente e de severidade com contagem; coluna Cliente com a cor do cliente */
.pfq-tabs { margin-bottom: 18px; }
.pfq-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 20px 12px; }
.pfq-chips-label { font-size: var(--fs-xs); letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); min-width: 78px; }
.pfq-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--ink-900); color: #c9c9c9; font-size: 12.5px; text-decoration: none;
}
.pfq-chip b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pfq-chip i, .pfq-client i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--sev-low)); flex: none; }
.pfq-chip:hover { border-color: #4a4a4a; background: #202020; }
.pfq-chip.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--ink-900)); color: var(--text); }
.pfq-chip.is-bad { border-style: dashed; border-color: #c98500; }
.pfq-sev-critical b { color: var(--sev-critical, var(--red-400)); }
.pfq-sev-high b { color: var(--sev-high, var(--sev-high)); }
.pfq-client { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.pfq-row { cursor: pointer; }
.pfq-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 700px) { .pfq-chips { padding: 0 16px 12px; } .pfq-chips-label { width: 100%; } }

/* ---------------------------------------------------------------- UX da fila, do comando e do layout (26/10/2026) */
/* Tabelas: o nome do cliente e as colunas curtas não quebram letra a letra; ID e host longos ainda quebram. */
.table-wrap .mono { overflow-wrap: anywhere; white-space: normal; }
.table-wrap .nowrap { white-space: nowrap; overflow-wrap: normal; }

/* Cabeçalho da página: de 701 a 1000 px a coluna não ganha altura de 360 px (o vazio entre texto e botões). */
@media (max-width: 1000px) {
  .page-heading > div:first-child { flex-basis: auto; }
}
/* Avatar "DEMO" cabe no círculo em telas estreitas. */
@media (max-width: 700px) {
  .topbar .avatar { font-size: 8px; letter-spacing: 0; padding: 0; overflow: hidden; }  /* 26/10/2026: 8 px fica de propósito, "DEMO" precisa caber no círculo de 28 px (exceção ao piso de 12 px) */
}

/* Menu lateral: o cartão do cliente repetia a aba e a pílula; sem ele e sem o rodapé em telas baixas, o menu cabe.
   Quando ainda rola, o degradê no fim avisa que há mais itens. */
.workspace { display: none; }
#navigation { padding-bottom: 36px; -webkit-mask-image: linear-gradient(to bottom, var(--black) calc(100% - 30px), transparent); mask-image: linear-gradient(to bottom, var(--black) calc(100% - 30px), transparent); }
@media (max-height: 1050px) and (min-width: 701px) {
  .sidebar-bottom { display: none; }
}
.demo-banner { padding-top: 4px; padding-bottom: 4px; font-size: var(--fs-xs); }

/* Menus "⋯" e "Exportar" do cabeçalho. */
.menu-wrap { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; display: grid; padding: 6px; background: #1c1c22; border: 1px solid var(--line-strong, #3a3a44); border-radius: 8px; box-shadow: 0 12px 32px rgb(0 0 0 / 45%); }
.menu-pop[hidden] { display: none; }
.menu-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 6px; background: none; color: #e4e4ec; font-size: var(--fs-sm); cursor: pointer; text-decoration: none; white-space: nowrap; }
.menu-item:hover, .menu-item:focus-visible { background: rgb(255 255 255 / 8%); color: var(--white); }
.more-open { min-width: 40px; font-size: 18px; line-height: 1; padding-left: 12px; padding-right: 12px; }
@media (max-width: 700px) { .menu-pop { left: 0; right: auto; } .menu-wrap:last-child .menu-pop { left: auto; right: 0; } }

/* Faixa "Como funciona" recolhível. */
.flow-box { margin: 0 0 12px; }
.flow-box > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; padding: 4px 0; }
.flow-box > summary::-webkit-details-marker { display: none; }
.flow-box > summary::before { content: "▸"; font-size: var(--fs-xs); }
.flow-box[open] > summary::before { content: "▾"; }
.flow-box > summary:hover { color: var(--white); }
.flow-box > .queue-flow { margin-top: 6px; }

/* Alcance da fila: este cliente ou todos. */
.queue-scope { margin-bottom: 12px; }
.pf-queue-link { margin: 0 0 16px; }

/* Contador da Fila no menu. */
.nav-item .nav-count.has-critical { background: rgb(255 69 87 / 22%); color: #ffb3bb; }

/* Barra fixa de ações do diálogo do item. */
.action-bar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 20px -28px -28px; padding: 12px 28px; background: rgb(25 25 30 / 96%); border-top: 1px solid var(--line-strong, #3a3a44); backdrop-filter: blur(8px); }
.action-bar .bar-state { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.action-bar select { min-height: 36px; }
@media (max-width: 700px) { .action-bar { margin: 16px -16px -16px; padding: 10px 16px; } }

/* Diálogo de atalhos. */
#shortcuts { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line-strong, #3a3a44); border-radius: 12px; background: #19191e; color: #e4e4ec; overflow: auto; }
#shortcuts::backdrop { background: rgb(0 0 0 / 60%); }
.shortcuts-body { padding: 16px 24px 24px; }
.shortcuts-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; margin: 12px 0 16px; border: 1px solid var(--line-soft, #27272e); border-radius: 8px; }
.shortcuts-switch small { flex-basis: 100%; color: var(--muted); }
.shortcuts-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 28px; }
.shortcuts-body h3 { margin: 16px 0 8px; font-size: var(--fs-sm); }
.shortcuts-body table { width: 100%; border-collapse: collapse; }
.shortcuts-body th, .shortcuts-body td { padding: 5px 0; font-size: var(--fs-sm); text-align: left; font-weight: 400; vertical-align: top; }
.shortcuts-body th { width: 84px; white-space: nowrap; }
kbd { display: inline-block; min-width: 22px; padding: 1px 7px; border: 1px solid #55555f; border-bottom-width: 2px; border-radius: 5px; background: #25252c; font: 600 12px/1.5 ui-monospace, Consolas, monospace; text-align: center; }

/* Paginação com tamanho e "ir para a página". */
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pagination .page-size, .pagination .page-go { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pagination select { min-height: 34px; min-width: 68px; padding: 4px 24px 4px 10px; }
.pagination input[type=number] { width: 64px; min-height: 34px; padding: 4px 8px; text-align: center; }

/* Todos os clientes: pior cliente e limiar do risco alto. */
.pf-worst { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--line-strong, #3a3a44); border-left-width: 4px; border-radius: 8px; background: rgb(255 255 255 / 3%); }
.pf-worst > span { font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pf-worst b { font-size: var(--fs-lg); }
.pf-worst strong { font-size: var(--fs-lg); }
.pf-worst em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.pf-worst small { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.pf-worst-high { border-left-color: var(--red-400); }
.pf-worst-mid { border-left-color: var(--sev-high); }
.pf-worst-low { border-left-color: #4cb782; }
.pf-risk.is-worst { outline: 1px solid var(--sev-high); position: relative; }
.pf-risk.is-worst.pf-risk-high { outline-color: var(--red-400); }
.pf-worst-tag { position: absolute; top: 8px; right: 10px; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: #f4b57c; }

/* No tablet o "Como funciona" quebrava em linhas com a seta sobrando no começo ou no fim; vira uma etapa por linha, como no celular (26/10/2026). */
@media (max-width: 1000px) {
  .queue-flow.compact .flow-arrow { display: none; }
  .queue-flow.compact .flow-step { display: block; width: 100%; }
}

/* Relatório: no tablet as duas colunas do construtor (opções e módulos) ficavam com ~200 px e os campos de data passavam por cima dos módulos; as datas empilham quando não cabem lado a lado (26/10/2026). */
.date-pair { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.date-pair > * { min-width: 0; }
@media (max-width: 1000px) {
  .report-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* Com o cabeçalho em coluna (até 1000 px) o "align-items: flex-end" de cima empurrava título e descrição curtos para a direita (26/10/2026). */
@media (max-width: 1000px) {
  .page-heading { align-items: stretch; }
}

/* Celular: o título do painel de busca ficava a 24px da borda e o gráfico a 16px; as datas do eixo se atropelavam quando duas caíam perto (26/10/2026). */
@media (max-width: 700px) {
  .fql-card .panel-heading { padding: 18px 16px 12px; }
  .fql-x:has(> span:nth-child(6)) > span:is(:nth-child(2), :nth-child(5)) { display: none; }
  .fleet-map-list { margin: 0 16px; }
}

/* O "min-width: 0" geral zerava a coluna dos números do eixo vertical e eles saíam para a esquerda do corpo do painel (26/10/2026). */
.fql-line > .fql-y { min-width: 28px; }

/* "Busca" dos painéis: o recuo do bloco (20px) somava com o do resumo (24px) e o triângulo ficava 20px à frente do conteúdo (26/10/2026). */
.fql-query { padding: 0 0 8px; }
.fql-query code { margin: 4px 24px 0; }
@media (max-width: 700px) {
  .fql-query > summary { padding-left: 16px; padding-right: 16px; }
  .fql-query code { margin: 4px 16px 0; }
}

/* Detalhe: tabelas dentro do corpo começavam 14px à frente do título e do texto (padding da célula) (26/10/2026). */
#detail-body .table-wrap :is(th, td):first-child { padding-left: 0; }
#detail-body .table-wrap :is(th, td):last-child { padding-right: 0; }

/* Código de CVE quebrava em três linhas ("CVE-/DEMO-/0000") no tablet; o ID fica inteiro e quem cede é a coluna de ativos (26/10/2026). */
.table-wrap td.mono:has(> .row-open), .table-wrap td.mono > .row-open { white-space: nowrap; overflow-wrap: normal; }

/* Condição da regra no celular: "Tipo de evento" cabia em 120px e o texto era cortado; campo e operador ocupam a linha toda (26/10/2026). */
@media (max-width: 700px) {
  .cond-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cond-row > select { grid-column: 1 / -1; }
  .cond-row input, .cond-row .cond-novalue { grid-column: 1; }
}

/* "Mais indicadores": com 5 etapas ou 3 métricas em painel de meia largura os rótulos se sobrepunham ("Investigados"/"Escalados") e o terceiro valor saía cortado; as colunas passam a quebrar de linha (26/10/2026). */
.funnel { flex-wrap: wrap; row-gap: 20px; }
.funnel-step { flex: 1 1 84px; }
@media (min-width: 701px) {
  .service-metrics { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

/* O texto "DEMO" (12px) passava do círculo de 28px do avatar; a partir de 701px o avatar vira pílula do tamanho do texto (no celular segue o texto de 8px) (26/10/2026). */
@media (min-width: 701px) {
  .topbar .avatar { width: auto; min-width: 28px; padding: 0 10px; border-radius: 999px; }
}

/* Formato da API do Vision One na Saúde (31/10/2026): informativo, sem vermelho. */
.schema-line code, .schema-paths code, .schema-event small code { font-size: 11.5px; }
.schema-notice { border-color: #4a4a55; }
.schema-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.schema-event { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line, #2c2c32); border-radius: 8px; }
.schema-paths { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.schema-event small { color: #8f8f9a; }
.schema-demo { font-size: 10.5px; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; border: 1px solid #54545e; color: #b6b6bf; }
.schema-help { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: #b6b6bf; }
/* Histórico deste tipo (31/10/2026): selo na fila e bloco no detalhe do item. Sugestão em tom neutro; aviso de ameaça real em âmbar, nunca vermelho. */
.chip-history { display: inline-block; padding: 1px 8px; border: 1px solid var(--line-strong, #45454d); border-radius: 999px; font-size: var(--fs-xs); color: var(--muted, #b4b4bc); white-space: nowrap; cursor: help; }
.chip-history.threat { border-color: #635038; color: #e4c697; }
.history-block p { margin: 6px 0 0; }
.history-block .history-tip { font-weight: 600; }
.history-block .history-tip.threat { color: #e4c697; }
.history-block .history-recent { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.history-block .history-recent .text-button { text-align: left; }
/* Prioridade pelo risco do Vision One (31/10/2026): selo discreto na fila e bloco "Por que está nesta posição" no detalhe. */
.prio-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); font: 600 12px var(--font); white-space: nowrap; cursor: help; }
.prio-box p { margin: 6px 0; }
.prio-factors { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.prio-factors li { display: flex; gap: 10px; align-items: baseline; }
.prio-factors b { min-width: 52px; font-variant-numeric: tabular-nums; }
.prio-factors small { display: block; color: var(--muted); }
/* Avisos para o plantão (Teams e webhook) no cartão de cada cliente (31/10/2026). Sem vermelho: é configuração, não alerta. */
.notify-box { margin: 8px 0; padding-top: 8px; border-top: 1px solid rgb(255 255 255 / 8%); }
.notify-box p { margin: 4px 0; }
.notify-channel { margin: 10px 0; padding: 10px 12px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 8px; }
.notify-channel.is-off { opacity: 0.8; }
.notify-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.notify-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 8px 0; }
.notify-stats dt { font-size: 12px; opacity: 0.7; }
.notify-stats dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.notify-form, .notify-address { display: grid; gap: 10px; margin: 10px 0; }
.notify-form label, .notify-address label { display: grid; gap: 4px; }
.notify-events { display: grid; gap: 6px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 8px; padding: 8px 12px; }
.notify-box .check-line { display: flex; align-items: center; gap: 8px; }
/* Formato da API do Vision One (31/10/2026): corpo do painel com o mesmo recuo dos outros painéis, nada colado na borda. */
#schema-panel > .schema-events { padding: 0 24px; }
#schema-panel > .empty { margin: 0 24px; }
#schema-panel > .schema-help { margin: 14px 24px 22px; }
@media (max-width: 700px) {
  #schema-panel > .schema-events { padding: 0 16px; }
  #schema-panel > .empty { margin: 0 16px; }
  #schema-panel > .schema-help { margin: 12px 16px 18px; }
}
/* Detalhe orientado a responder o chamado (31/10/2026): prazo no cabeçalho, contexto do Vision One, checklist, consultas e resumo.
   Âmbar para meta vencida; vermelho só para crítico vencido. Nada colado na borda do diálogo. */
.sla-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); font: 600 12px var(--font); white-space: nowrap; }
.sla-badge.late { color: #eec58a; border-color: #6b5531; }
.sla-badge.late.critical { color: var(--ta-red-400); border-color: var(--ta-red-600); }
.steps-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); font: 600 12px var(--font); white-space: nowrap; }
.ctx-list { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 10px; }
.ctx-item { border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; }
.ctx-item p { margin: 6px 0 0; }
.ctx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ctx-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; margin: 8px 0 0; }
.ctx-facts dt { font-size: 12px; color: var(--muted); }
.ctx-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.steps-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.steps-list li label { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.steps-list li.is-done label span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.steps-list input[type="checkbox"]:disabled { cursor: not-allowed; }
.inv-window { margin: 8px 0; }
.inv-group { margin: 12px 0 0; }
.inv-group h4 { margin: 0 0 6px; font-size: 13px; }
.inv-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 4px 0; }
.inv-source { font-size: 12px; color: var(--muted); }
.inv-query { display: block; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; overflow-wrap: anywhere; white-space: pre-wrap; user-select: all; }
.inv-open { margin-top: 12px; }
.summary-tools { margin: 18px 0 8px; }
.summary-tools h3 { margin: 0 0 8px; }
.summary-tools > span { margin-left: 10px; }
.summary-panel { display: grid; gap: 10px; margin-top: 12px; }
.summary-panel label { display: grid; gap: 4px; }
.summary-text textarea { width: 100%; font: 13px/1.45 var(--mono, ui-monospace, monospace); }
.activity-line.step p { color: var(--muted); }
@media (max-width: 700px) {
  .inv-row { grid-template-columns: minmax(0, 1fr); }
  .summary-tools > span { display: block; margin: 6px 0 0; }
}
.steps-list input[type="checkbox"] { accent-color: #d6d6de; }
/* Ajuste de regras (31/10/2026): cartões por sugestão e uma linha por regra. Mesmo recuo dos outros painéis; sem vermelho (é revisão, não alerta). */
.panel > .tuning-cards, .panel > .tuning-meta, .panel > .tuning-list { padding: 0 24px; }
.panel > .tuning-list { padding-bottom: 20px; }
.tuning-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.tuning-card { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line, #2c2c32); border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.tuning-card b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tuning-card span { font-size: 12.5px; color: var(--muted, #b4b4bc); }
.tuning-card:hover { border-color: var(--line-strong, #45454d); }
.tuning-card.is-on { border-color: #e4c697; background: rgb(228 198 151 / 8%); }
.tuning-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; font-size: 12.5px; }
.tuning-list { display: grid; gap: 10px; }
.tuning-row { padding: 14px 16px; border: 1px solid var(--line, #2c2c32); border-radius: 8px; display: grid; gap: 8px; }
.tuning-row.is-dismissed { opacity: 0.7; }
.tuning-row header > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tuning-row h3 { margin: 4px 0 0; font-size: 15px; }
.tuning-row h3 small { color: var(--muted, #b4b4bc); font-weight: 400; margin-left: 6px; }
.tuning-numbers { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.tuning-numbers span { display: grid; gap: 1px; min-width: 0; }
.tuning-numbers small { color: var(--muted, #b4b4bc); font-size: 11.5px; }
.tuning-numbers b { font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.tuning-numbers em { font-style: normal; color: var(--muted, #b4b4bc); }
.tuning-advice p { margin: 2px 0; line-height: 1.5; }
.tuning-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tuning-gone { margin: 0; font-size: 12.5px; color: #e4c697; }
.tuning-ask { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.tuning-ask label { display: grid; gap: 4px; flex: 1 1 260px; }
/* Modo sombra (31/10/2026): bloco "Em observação" no cartão da regra. */
.shadow-tag { border-color: #635038; color: #e4c697; }
.rule-card.in-shadow { border-color: #635038; }
.shadow-box { margin: 10px 0 4px; padding: 10px 12px; border: 1px dashed #635038; border-radius: 8px; display: grid; gap: 8px; }
.shadow-box.is-expired { border-style: solid; }
.shadow-box p { margin: 0; }
.shadow-expired { color: #e4c697; }
.shadow-chart { display: grid; gap: 2px; }
.shadow-bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.shadow-bars i { flex: 1 1 0; min-width: 3px; min-height: 2px; background: #e4c697; border-radius: 2px 2px 0 0; opacity: 0.85; }
.shadow-axis { display: flex; justify-content: space-between; color: var(--muted, #b4b4bc); }
.shadow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.shadow-days { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
@media (max-width: 700px) {
  .panel > .tuning-cards, .panel > .tuning-meta, .panel > .tuning-list { padding: 0 16px; }
  .tuning-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Diagnóstico da instalação (31/10/2026): corpo do painel com o mesmo recuo dos outros painéis. Sem vermelho fora do FALHA. */
#diag-panel .diag-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#diag-panel > .notice, #diag-panel > .empty, #diag-panel > .diag-summary, #diag-panel > .diag-group, #diag-panel > .table-wrap, #diag-panel > .diag-foot { margin-left: 24px; margin-right: 24px; }
#diag-panel .diag-group { margin-top: 18px; margin-bottom: 8px; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
#diag-panel .diag-summary { margin-top: 4px; margin-bottom: 4px; }
#diag-panel .diag-table td { vertical-align: top; overflow-wrap: anywhere; }
#diag-panel .diag-table .diag-level { width: 1%; white-space: nowrap; }
#diag-panel .diag-table .diag-title { min-width: 180px; font-weight: 600; }
#diag-panel .diag-next { margin-top: 4px; color: var(--muted); }
#diag-panel .diag-foot { margin-top: 14px; margin-bottom: 22px; color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 700px) {
  #diag-panel > .notice, #diag-panel > .empty, #diag-panel > .diag-summary, #diag-panel > .diag-group, #diag-panel > .table-wrap, #diag-panel > .diag-foot { margin-left: 16px; margin-right: 16px; }
}
/* Diagnóstico (31/10/2026): títulos, resumo e tabelas com o recuo dos outros painéis e colunas alinhadas entre as seções. */
#diag-panel :is(h3, .diag-summary, .table-wrap, .diag-foot, .notice, .empty) { margin-left: 24px; margin-right: 24px; }
#diag-panel .diag-table { table-layout: fixed; width: 100%; }
#diag-panel .diag-table .diag-level { width: 110px; }
#diag-panel .diag-table .diag-title { width: 34%; min-width: 0; }
@media (max-width: 700px) { #diag-panel :is(h3, .diag-summary, .table-wrap, .diag-foot, .notice, .empty) { margin-left: 16px; margin-right: 16px; } }

/* Regras (31/10/2026): altura natural e achados em lista, sem tabela apertada dentro do cartão. */
.rules-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.rule-card { min-width: 0; }
.rule-card .rule-needs { margin-top: 0; }
.rule-card > div:first-child { flex-wrap: wrap; gap: 6px; }
.rule-card > div:first-child .tag { margin-left: 0; }
.shadow-box { min-width: 0; gap: 12px; }
.shadow-box p { line-height: 1.6; }
.shadow-recent { min-width: 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.shadow-recent > summary { padding: 10px 0; cursor: pointer; font-weight: 600; }
.shadow-findings { list-style: none; margin: 0; padding: 0; }
.shadow-findings > li { min-width: 0; padding: 12px 0; display: grid; gap: 8px; border-top: 1px solid var(--line-soft); }
.shadow-subject strong { display: block; overflow-wrap: anywhere; font-size: var(--fs-sm); }
.shadow-subject small { display: block; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.shadow-finding-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.shadow-finding-meta > span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.shadow-evidence > summary { color: var(--muted); cursor: pointer; }
.shadow-evidence .mono { display: block; margin-top: 4px; overflow-wrap: anywhere; white-space: normal; }
.shadow-box .shadow-help { font-size: var(--fs-xs); color: var(--muted); }
.shadow-actions .button { flex: 1 1 auto; min-width: 0; white-space: normal; }
.shadow-actions > .text-button { text-align: left; white-space: normal; }
@media (max-width: 700px) {
  .shadow-actions .button { flex-basis: 100%; }
}

/* Biblioteca de regras (31/10/2026): lista compacta; ajuste, ajuda e detalhes sob demanda. */
.rules-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.rules-tabs > button { padding: 12px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.rules-tabs > button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.rules-tabs > button:focus-visible, .rule-overview:focus-visible, .rules-support > summary:focus-visible { outline: 2px solid var(--focus, #ff4557); outline-offset: 3px; }
.rules-library-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rules-library-head h2, .rules-guide h2 { margin: 0 0 6px; font-size: 18px; }
.rules-library-head p { margin: 0; color: var(--muted); }
.rules-library-head > .button { flex-shrink: 0; }
.rules-summary { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 18px 0; color: var(--muted); }
.rules-summary b { color: var(--text); font-variant-numeric: tabular-nums; }
.rules-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.rules-filters label { display: grid; gap: 5px; color: var(--muted); font-size: var(--fs-xs); min-width: 0; }
.rules-filters .rules-search { flex: 1 1 240px; }
.rules-filters input, .rules-filters select { min-height: 40px; width: 100%; min-width: 0; }
.rules-section .rules-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.rules-section .rules-grid > .rule-card { padding: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.rule-details { min-width: 0; }
.rule-overview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 15px 8px; cursor: pointer; list-style: none; }
.rule-overview::-webkit-details-marker { display: none; }
.rule-overview:hover { background: rgb(255 255 255 / 2%); }
.rule-line-main { display: grid; min-width: 0; gap: 4px; }
.rule-line-code { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: var(--fs-xs); }
.rule-line-name { color: var(--text); font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.rule-line-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; font-size: var(--fs-xs); }
.rule-state { color: var(--muted); }
/* 160 px cabem "5 hallazgos en la prueba" (ES) numa linha; o que passar disso corta com reticências e o title mostra inteiro. */
.rule-line-result { width: 160px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rules-engine { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.rules-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); }
.rule-chevron { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin: -4px 6px 0 10px; }
.rule-details[open] > .rule-overview .rule-chevron { transform: rotate(225deg); margin-top: 4px; }
.rule-details[open] { background: var(--panel); }
.rule-detail-body { padding: 6px 20px 20px; min-width: 0; }
.rule-detail-body > p { max-width: 80ch; }
.rule-detail-body .rule-needs { max-width: 80ch; }
.rule-detail-body .shadow-box { max-width: 740px; }
.rule-detail-body .rule-actions { margin-top: 16px; }
.rules-pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: var(--fs-xs); }
.rules-pagination > div { display: flex; align-items: center; gap: 12px; }
.rules-support { margin: 14px 0; border-top: 1px solid var(--line-soft); }
.rules-support > summary { padding: 12px 0; cursor: pointer; color: var(--muted); font-size: var(--fs-sm); }
.rules-support-body { padding: 8px 0 16px; }
.rules-support-body > .text-button { margin-right: 16px; }
.rules-support-body > p { margin: 12px 0 0; max-width: 80ch; color: var(--muted); }
.rules-library-footer { display: flex; flex-wrap: wrap; gap: 10px 16px; color: var(--muted); font-size: var(--fs-xs); }
.rules-guide { max-width: 880px; }
.rules-guide > p { max-width: 76ch; color: var(--muted); line-height: 1.7; }
.rules-guide h3 { margin: 28px 0 12px; font-size: 16px; }
.rules-guide dl { margin: 20px 0; }
.rules-guide dl > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.rules-guide dt { font-weight: 600; color: var(--text); }
.rules-guide dd { margin: 0; line-height: 1.7; color: var(--muted); }
.rules-section .tuning-cards { gap: 8px; }
.rules-section .tuning-card { padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.rules-section .tuning-card b { font-size: 16px; }
.rules-section .tuning-card span { font-size: var(--fs-xs); }
.tuning-intro { padding: 0 24px; margin: 0 0 16px; line-height: 1.6; color: var(--muted); }
.tuning-details { border-top: 1px solid var(--line-soft); margin-top: 2px; }
.tuning-details > summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.tuning-detail-body { display: grid; gap: 10px; padding: 6px 0; }
@media (max-width: 1000px) {
  .rule-line-result { display: none; }
  .rules-section .tuning-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .rules-tabs { gap: 20px; margin-bottom: 20px; }
  .rules-library-head { flex-wrap: wrap; }
  .rules-filters { gap: 10px; }
  .rules-engine { margin-left: 0; }
  .rules-filters label:not(.rules-search) { flex: 1 1 130px; }
  .rule-overview { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 4px; }
  .rule-line-meta { justify-content: flex-start; }
  .rule-line-meta .rule-chevron { margin-left: auto; }
  .rule-detail-body { padding: 4px 8px 16px; }
  .rules-guide dl > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tuning-intro { padding: 0 16px; }
}

/* Minhas regras (31/10/2026): personalizadas e nativas com acesso direto e contagem por cliente. */
.rules-tabs { flex-wrap: wrap; column-gap: 16px; row-gap: 0; }
.rules-tabs .rules-tab-count { margin-left: 6px; color: var(--muted); font-size: var(--fs-xs); }

/* Teste da regra (31/10/2026): resumo legível e gráfico/evidências sob demanda. */
.rule-detail-body .shadow-box { max-width: 780px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2, #111); gap: 14px; }
.rule-detail-body .shadow-box.is-expired { border-color: #635038; }
.shadow-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.shadow-title h4 { margin: 0; color: var(--text); font-size: 15px; font-weight: 600; }
.shadow-stage { padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: var(--fs-xs); }
.shadow-stage.is-expired { color: #e4c697; border-color: #635038; }
.shadow-box .shadow-intro, .shadow-box .shadow-since { color: var(--muted); font-size: var(--fs-xs); }
.shadow-metrics { display: flex; flex-wrap: wrap; gap: 16px 30px; margin: 2px 0; }
.shadow-metrics > div { display: grid; gap: 5px; min-width: 110px; }
.shadow-metrics dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 400; }
.shadow-metrics dd { margin: 0; color: var(--text); font-size: 24px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.shadow-metrics dd small { font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.shadow-box .shadow-status { color: var(--text); font-size: var(--fs-xs); }
.shadow-box.is-expired .shadow-status { color: #e4c697; }
.shadow-result-body { display: grid; gap: 10px; padding-bottom: 10px; }
.shadow-result-body h5 { margin: 8px 0 0; font-size: var(--fs-xs); font-weight: 600; }
.shadow-result-body > p { font-size: var(--fs-xs); }
.shadow-box .shadow-actions { padding-top: 2px; }
.shadow-box .shadow-actions .button { flex: 0 1 auto; }
@media (max-width: 700px) {
  .rule-detail-body .shadow-box { padding: 14px 12px; }
  .shadow-metrics { gap: 14px 22px; }
  .shadow-metrics > div { min-width: 100px; }
  .shadow-box .shadow-actions .button { flex: 1 1 100%; }
}
