/* Etapa 1 — Missão de Implementação (2026-07-31). Paleta evoluída do
   dashboard estático da IAKY (agents/iaky/src/engines/dashboard/index.js) —
   único precedente visual real da plataforma antes desta missão (decisão
   registrada em docs/ETAPA1_MISSAO5_DASHBOARD_BLUEPRINT.md §6). Status
   nunca só por cor (convergência Apple HIG + IBM Carbon, Missão 2 §C):
   todo indicador de estado carrega símbolo + texto, cor é reforço, nunca
   único canal. */

:root {
  --bg: #05070d;
  --bg-glow: radial-gradient(1200px 600px at -10% -10%, #23103d 0%, transparent 60%);
  --panel: #0b1020;
  --panel-2: #10172d;
  --border: #1c2440;
  --text: #f5f7ff;
  --text-muted: #95a2c8;
  --accent: #ff2fb2;
  --accent-2: #22e7ff;
  --ok: #4dffae;
  --warn: #ffd166;
  --critical: #ff5d5d;
  --radius: 10px;
  --focus-ring: 0 0 0 3px rgba(34, 231, 255, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--bg) var(--bg-glow);
  color: var(--text);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent-2); }

button, input {
  font: inherit;
  color: var(--text);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

/* ─── Login ─────────────────────────────────────────────────────────── */

/* Achado real (2026-07-31): .login-screen/.app-shell abaixo declaram
   display:flex/grid, que em especificidade EMPATADA com a regra
   [hidden]{display:none} do user-agent, o estilo do AUTOR sempre vence —
   então o atributo `hidden` (usado por app.js pra alternar entre as 2
   telas) nunca escondia de verdade nenhuma delas, só parava de ser óbvio
   quando não havia dado real por trás. Mesmo padrão já usado em
   .section[hidden] logo abaixo, só nunca replicado aqui. */
.login-screen[hidden], .app-shell[hidden] { display: none; }

.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: min(360px, 100%);
  display: flex; flex-direction: column; gap: 12px;
}

.login-card h1 { margin: 0; font-size: 22px; }
.login-subtitle { margin: 0 0 12px; color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }

.login-card label { font-size: 13px; color: var(--text-muted); }

.login-card input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}

.login-card button {
  margin-top: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none; border-radius: 6px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

.login-error {
  color: var(--critical);
  font-size: 13px;
  margin: 0;
}

/* ─── Shell ─────────────────────────────────────────────────────────── */

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}

.brand { font-weight: 700; font-size: 18px; margin-bottom: 20px; flex-shrink: 0; }
.brand-accent { color: var(--accent); }

/* Achado real (CEO, 2026-08-01): a lista de menus cresceu (Pessoas &
   Performance e outros itens desta missão) e passou da altura da janela
   — sem rolagem própria, o rodapé inteiro (papel + botão Sair) era
   empurrado pra fora da tela, só visível diminuindo o zoom do navegador.
   .sidebar-scroll isola só a navegação como área rolável — marca (topo) e
   rodapé (papel/Sair) ficam sempre visíveis, `flex-shrink:0` neles. */
.sidebar-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  margin: 0 -6px; padding: 0 6px;
}
.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.nav-list { list-style: none; margin: 0; padding: 0; }

.nav-link {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
}

.nav-link:hover { background: var(--panel-2); color: var(--text); }
.nav-link.active { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent-2); }

.role-pill {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 8px; border-radius: 999px;
  background: var(--panel-2); color: var(--text-muted);
}

/* Achado real (CEO, 2026-08-01): "Sair" era texto sublinhado --text-muted
   sem borda/fundo no rodapé da sidebar — quase invisível, e o rodapé
   inteiro sumia quando a lista de menus crescia além da altura da janela
   (dependia de rolagem própria da sidebar, frágil conforme mais menus são
   adicionados). Corrigido definitivamente MUDANDO DE POSIÇÃO: papel+Sair
   saíram do rodapé da sidebar e foram pro cabeçalho superior
   (.header-account), que nunca depende da altura do menu — sempre visível
   nesta ou em qualquer resolução, mesmo com dezenas de itens de menu. */
.link-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.link-btn:hover { border-color: var(--critical); color: var(--critical); }

.content { padding: 28px 32px; max-width: 1400px; overflow-x: auto; min-width: 0; }

.content-header {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap;
}

.content-header h1 { margin: 0; font-size: 24px; text-wrap: balance; flex: 1; }

.header-account { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 6px 10px; font-size: 18px; cursor: pointer; line-height: 1;
}

/* ─── Toolbar de seção: frescor + botão manual (injetados por JS) ──── */

.section-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}

.section-updated {
  font-size: 12px; color: var(--text-muted);
}
.section-updated[data-state="error"] { color: var(--critical); }
.section-updated[data-state="live"] { color: var(--ok); }

.refresh-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.refresh-btn:hover { border-color: var(--accent-2); }

/* ─── Barra de filtros (BI) ─────────────────────────────────────────── */

.filter-bar {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.filter-bar label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--text-muted);
}
.filter-bar select {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 6px 10px; font-size: 13px;
}

/* ─── Frescor por widget (Missão 2 §C: nunca um spinner de página inteira) ─── */

.freshness-badge {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted);
}
.freshness-badge[data-state="live"] { color: var(--ok); border-color: var(--ok); }
.freshness-badge[data-state="stale"] { color: var(--warn); border-color: var(--warn); }
.freshness-badge[data-state="error"] { color: var(--critical); border-color: var(--critical); }
.freshness-badge[data-state="loading"] { color: var(--text-muted); }

/* ─── Cards e grids ─────────────────────────────────────────────────── */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.card h2 { margin: 0 0 14px; font-size: 15px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.card-subtitle { margin: -8px 0 14px; font-size: 13px; color: var(--text-muted); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.kpi-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-detail { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.widget-body { font-size: 14px; }

/* Arquétipo visual #3 — Ranking priorizado (docs/ECOS_HOME_EXECUTIVA_BLUEPRINT_01.md
   §6/§8) — 1º uso real: ranking comercial da ANA (concorrentes/planos/
   cidades/motivosChurn), dado já calculado, nunca antes com componente
   visual próprio. Reutilizável por qualquer tela futura que precise de
   "top-N por contagem" (mesmo princípio dos outros arquétipos — nunca 1
   layout novo por Onda). */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.ranking-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.ranking-card-title { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }

.ranking-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ranking-item:last-child { margin-bottom: 0; }
.ranking-item-rank { font-size: 12px; color: var(--text-muted); width: 16px; flex: 0 0 auto; }
.ranking-item-body { flex: 1 1 auto; min-width: 0; }
.ranking-item-label { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-item-bar-track { height: 6px; background: var(--panel); border-radius: 999px; margin-top: 3px; overflow: hidden; }
.ranking-item-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.ranking-item-total { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; color: var(--text); }
.ranking-empty { font-size: 13px; color: var(--text-muted); }

/* ─── Executive Intelligence Center (Épico CEO, 2026-07-31) ─────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.nav-search { display: block; margin: 4px 0 14px; }
.nav-search input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 7px 10px; font-size: 13px;
}
.nav-search input::placeholder { color: var(--text-muted); }

.nav-group { margin-bottom: 14px; }
.nav-group-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted);
  padding: 0 10px; margin-bottom: 4px;
}
.nav-group-label { width:100%; display:flex; justify-content:space-between; align-items:center; border:0; background:transparent; cursor:pointer; }
.nav-group--collapsed .nav-list { display:none; }

.content-heading { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.breadcrumb { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.section-mission { max-width:72ch; margin:2px 0 0; color:var(--text-muted); font-size:12px; line-height:1.35; }
.home-deep-dive { margin:18px 0; border:1px solid var(--border); border-radius:var(--radius); background:color-mix(in srgb,var(--panel) 88%,transparent); padding:14px; }
.home-deep-dive>summary { color:var(--accent-2); cursor:pointer; font-weight:700; }.home-deep-dive[open]>summary { margin-bottom:12px; }
.exec-hero-ignore { margin-top:8px; color:var(--ok); font-size:12px; }

/* Hero: "compreender o estado da empresa em menos de 10 segundos"
   (pesquisa externa desta missão) — primeira coisa visível na Home. */
.exec-hero {
  background: linear-gradient(120deg, rgba(255,47,178,0.12), rgba(34,231,255,0.08));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 18px;
}
.exec-hero-title { font-size: 20px; font-weight: 700; text-wrap: balance; }
.exec-hero-detail { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* Command Bar (Home CEO §7 do adendo): atalho de navegação real, reusa
   os mesmos .nav-link já existentes na sidebar — nunca uma 2ª fonte de
   seções. */
.home-command-bar { position: relative; margin-bottom: 14px; }
.home-command-bar input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); padding: 12px 16px; font-size: 14px;
}
.home-command-bar input:focus { border-color: var(--accent-2); outline: none; }
.home-command-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35); max-height: 260px; overflow-y: auto;
}
.home-command-results button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text); padding: 10px 14px; font-size: 13px; cursor: pointer;
}
.home-command-results button:hover { background: var(--panel-2); }

.exec-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.exec-panel { margin-bottom: 0; }
.exec-panel ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.exec-panel--risk h2 { color: var(--critical); }
.exec-panel--opportunity h2 { color: var(--ok); }
.exec-panel--recommendation h2 { color: var(--accent-2); }

/* Síntese Executiva (Adendo "Evolução da IAKY para Inteligência
   Executiva", 2026-08-01) — Conclusão → Recomendação → Números → Gaps
   honestos, nunca um score isolado sem contexto. Reusado por qualquer
   card que adotar este contrato (expansão, fila técnica, pessoas, IA). */
.exec-synthesis {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; background: var(--panel-2);
}
.exec-synthesis-conclusion { font-size: 14px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.exec-synthesis-recommendation { font-size: 13px; color: var(--accent-2); margin-bottom: 10px; }
.exec-synthesis-numbers { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 6px; }
.exec-synthesis-gaps { font-size: 11px; color: var(--text-muted); }
.exec-synthesis-gaps summary { cursor: pointer; }

/* resource-list: correção de arquitetura (CEO, 2026-08-03) — "recursos
   críticos que não explica o que é e não tem detalhamento". Substitui a
   antiga lista crua de palavras separadas por "·" por 1 explicação em
   português simples por item (Regra dos 5 segundos: uma criança de 10
   anos precisa entender), com o valor real quando medido. */
.resource-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.resource-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; background: var(--panel);
}
.resource-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.resource-item-title { font-size: 13px; font-weight: 600; }
.resource-item-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 4px; }
.resource-item-value { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.resource-item-unmeasured { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* Heatmap real de atividade por dia/horário (auditoria obrigatória de
   visualizações avançadas, CEO 2026-08-01) — CSS grid puro, 24 colunas
   de hora + 1 de rótulo, 7 linhas de dia + 1 de cabeçalho. */
.heatmap-grid {
  display: grid; grid-template-columns: 60px repeat(24, 1fr);
  gap: 2px; margin-top: 10px; overflow-x: auto;
}
.heatmap-corner { grid-column: 1; }
.heatmap-hour-label { font-size: 9px; color: var(--text-muted); text-align: center; }
.heatmap-day-label { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; padding-right: 4px; }
.heatmap-cell { aspect-ratio: 1; border-radius: 2px; min-width: 10px; cursor: default; }

/* Funil visual (visualizações avançadas do adendo Command Center) —
   barras horizontais proporcionais, CSS puro (nunca Canvas). */
.funnel-visual { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.funnel-visual-row { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; align-items: center; gap: 10px; }
.funnel-visual-label { font-size: 12px; color: var(--text-muted); text-align: right; }
.funnel-visual-track { background: var(--panel-2); border-radius: 4px; height: 22px; overflow: hidden; }
.funnel-visual-bar {
  height: 100%; min-width: 28px; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px; font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 4px; transition: width 0.3s ease;
}

.kpi-grid--dense { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi--pendente { opacity: 0.55; }
.kpi-detail--pendente { font-style: italic; }
.kpi-grid--pendente .kpi-value { color: var(--text-muted); }

.sparkline { display: block; margin-top: 8px; color: var(--accent-2); }

/* Progressive disclosure (Nielsen Norman Group, pesquisa desta missão):
   estado de carregamento nunca é um spinner genérico — o próprio
   contorno do conteúdo final aparece primeiro, reduz percepção de
   espera. Respeita prefers-reduced-motion. */
.skeleton-group { display: flex; flex-direction: column; gap: 8px; }
.skeleton-line {
  height: 14px; border-radius: 4px;
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--border) 50%, var(--panel-2) 75%);
  background-size: 200% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line:nth-child(2) { width: 80%; }
.skeleton-line:nth-child(3) { width: 60%; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-line { animation: none; } }

/* ─── Status: símbolo + cor + texto, nunca cor sozinha ─────────────── */

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
}
.status-pill[data-tone="ok"] { color: var(--ok); border-color: var(--ok); background: rgba(77,255,174,0.08); }
.status-pill[data-tone="warn"] { color: var(--warn); border-color: var(--warn); background: rgba(255,209,102,0.08); }
.status-pill[data-tone="critical"] { color: var(--critical); border-color: var(--critical); background: rgba(255,93,93,0.08); }
.status-pill[data-tone="unknown"] { color: var(--text-muted); border-color: var(--border); }

.agent-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
}
.agent-row:last-child { border-bottom: none; }
.agent-name { font-weight: 600; }
.agent-meta { color: var(--text-muted); font-size: 12px; }

.reco-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.reco-item:last-child { border-bottom: none; }
.reco-action { font-weight: 600; margin-bottom: 2px; }
.reco-meta { color: var(--text-muted); font-size: 12px; }

.metric-field {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.metric-field:last-child { border-bottom: none; }
.metric-label { color: var(--text-muted); font-size: 13px; }
.metric-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-value-missing { color: var(--warn); font-size: 12px; font-style: italic; cursor: help; }

.action-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.action-btn:hover { border-color: var(--accent-2); }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Abas internas (Fase B do ECOS, 2026-08-02) — reorganiza um grupo
   de cards já existente sem perder nenhum, reduz "parede de cards" pra
   grupos navegáveis. Mesmo vocabulário visual de .action-btn/.nav-link,
   nunca um sistema de estilo novo. ─── */
.tabbed-container { margin-bottom: 18px; }
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab-btn {
  background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text-muted);
  padding: 10px 16px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent-2); font-weight: 600; }
.tab-panel .card:first-child { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; }
td { font-variant-numeric: tabular-nums; }

/* ─── Empty state honesto (mesmo padrão já usado no dashboard da IAKY,
   confirmado como boa prática pela Nielsen Norman Group — Missão 2 §C) ─── */

.empty-state {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 16px; color: var(--text-muted); font-size: 13px; text-align: center;
}

/* erro: distinto visualmente de vazio (borda de severidade, nunca só cor) */
.empty-state[data-kind="error"] {
  border-style: solid; border-color: var(--critical); color: var(--critical);
  text-align: left;
}

.not-implemented {
  color: var(--text-muted); font-size: 14px; margin: 0;
}
.not-implemented code { color: var(--accent-2); }

/* card--collapsible: mesmo <details> real já usado em .exec-synthesis-gaps
   (Expansão/Fila) — Regra dos 5 Segundos aplicada à própria Home:
   um card 100% sem fonte real (Financeiro/Marketing/Rede/RH) nunca deve
   competir visualmente com os cards de decisão executiva acima; fica
   disponível, nunca escondido/removido, só recolhido por padrão. */
.card--collapsible { cursor: default; }
.card--collapsible summary { cursor: pointer; list-style: revert; }
.card--collapsible summary h2 { display: inline; margin: 0; }
.card--collapsible[open] summary { margin-bottom: 14px; }
.not-implemented-tag {
  text-transform: none; font-weight: 400; letter-spacing: normal;
  font-size: 12px; color: var(--text-muted); margin-left: 6px;
}

.section[hidden] { display: none; }

/* ─── Responsivo: tablet ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 200px 1fr; }
  .content { padding: 20px; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* ─── Responsivo: celular — sidebar vira menu retrátil ──────────────── */
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .sidebar {
    position: fixed; inset: 0 30% 0 0; z-index: 20; height: 100vh;
    transform: translateX(-100%); transition: transform 0.18s ease-out;
    box-shadow: 2px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.sidebar-open { transform: translateX(0); }
  .content { padding: 16px; }
  .content-header h1 { font-size: 19px; }
  table { font-size: 12px; }
  .agent-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .filter-bar { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

/* ─── Responsivo: TV 4K / telão de sala de comando (Área 6) ─────────
   Pesquisa externa desta missão (mission control / operational command
   center): a distância de leitura é maior, escala tipográfica precisa
   crescer, não só a densidade de colunas. */
@media (min-width: 1920px) {
  html { font-size: 18px; }
  .exec-hero-title { font-size: 26px; }
  .kpi-value { font-size: 32px; }
  .content { max-width: 1800px; }
}
