:root {
  --brand-950: #043b39;
  --brand-900: #064e4b;
  --brand-800: #075f5a;
  --brand-700: #0f766e;
  --brand-600: #0d9488;
  --brand-500: #14b8a6;
  --brand-100: #ccfbf1;
  --brand-50: #f0fdfa;
  --bg: #f5f7fb;
  --text: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --card: #ffffff;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
  --shadow-hover: 0 14px 36px rgba(15, 23, 42, 0.11);
  --sidebar: 278px;

  --otimo-bg: #dbeafe;
  --otimo-fg: #1d4ed8;
  --bom-bg: #dcfce7;
  --bom-fg: #15803d;
  --suficiente-bg: #fef3c7;
  --suficiente-fg: #b45309;
  --regular-bg: #fee2e2;
  --regular-fg: #b91c1c;
  --unknown-bg: #f1f5f9;
  --unknown-fg: #64748b;
  /* DIAGNOSTICO = calculado, ainda sem classificação oficial homologada.
     Cor propositalmente distinta de --unknown-* (sem dado nenhum): índigo
     neutro, nunca a mesma leitura visual de "sem dados". */
  --diagnostico-bg: #e0e7ff;
  --diagnostico-fg: #4338ca;

  /* Escala do índice gerencial de priorização territorial (dashboard/priority.py).
     Semanticamente distinta da classificação OTIMO/BOM/SUFICIENTE/REGULAR de cada
     indicador, mas usa a mesma linguagem visual do restante do produto. */
  --prio-muitoalta-bg: #fee2e2;
  --prio-muitoalta-fg: #b91c1c;
  --prio-atencao-bg: #ffedd5;
  --prio-atencao-fg: #c2410c;
  --prio-monitoramento-bg: #fef9c3;
  --prio-monitoramento-fg: #a16207;
  --prio-estavel-bg: #dcfce7;
  --prio-estavel-fg: #15803d;
  --prio-indeterminado-bg: #f1f5f9;
  --prio-indeterminado-fg: #64748b;
  --prio-diagnostico-bg: #e0e7ff;
  --prio-diagnostico-fg: #4338ca;
}

* {
  box-sizing: border-box;
}

/* Achado real da validação em Chromium (rodada 2026-09): qualquer seletor de
   classe que declare `display` (grid/flex/block) some regra de cascata
   AUTHOR vence a regra padrão do navegador `[hidden]{display:none}`, que é
   de origem USER-AGENT — mesmo tendo especificidade maior, origem UA perde
   para origem author. Resultado: um elemento com o atributo `hidden` (ex.:
   `.chart-bar-list[hidden]` do seletor de boa prática em "Gráfico 2")
   continuava visível, empilhando TODAS as práticas ao mesmo tempo em vez de
   alternar — um bug de runtime que nenhum teste de HTML server-side pega
   (o atributo `hidden` está lá no HTML; só o navegador o ignora). Fix
   sitewide, `!important` deliberado: nenhuma regra de componente pode
   voltar a vencer isso por engano no futuro. */
[hidden] {
  display: none !important;
}

/* Mesma causa-raiz, mecanismo de ocultação diferente: conteúdo dentro de um
   <details> fechado (ex.: "Ver todas as equipes") também depende de uma
   regra padrão do navegador (`details:not([open]) > *:not(summary)`), e
   também é derrotada por qualquer `display` de componente author (ex.:
   `.chart-bar-list`). Mesmo fix explícito aqui. */
details:not([open]) > *:not(summary) {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  color: var(--brand-700);
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -70px;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  overflow-y: auto;
  padding: 0 12px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.18), transparent 32%),
    linear-gradient(180deg, var(--brand-950), var(--brand-900));
  box-shadow: 12px 0 30px rgba(2, 44, 42, 0.08);
}

.sidebar-heading {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-heading strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.sidebar-heading small {
  display: block;
  margin-top: 1px;
  color: #9fd9d5;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.22);
}

.brand-mark svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.sidebar-close {
  display: none;
  margin-left: auto;
}

.nav-section {
  margin: 25px 12px 8px;
  color: #8fcbc7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-home,
.nav-item,
.nav-toggle {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 10px;
  color: #d7eeee;
  background: transparent;
  text-align: left;
  transition: 160ms ease;
}

.nav-home {
  margin-top: 14px;
  font-weight: 700;
}

.nav-home__icon {
  width: 28px;
  text-align: center;
  font-size: 17px;
}

.nav-item b {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
}

.nav-item span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
}

.nav-item:hover,
.nav-home:hover,
.nav-toggle:hover,
.nav-item--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.nav-item--active {
  border-left-color: var(--item-accent, #5eead4);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-item--active b {
  color: var(--brand-950);
  background: var(--item-accent, #5eead4);
}

.nav-toggle {
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
}

.nav-submenu[hidden] {
  display: none;
}

.accent-c1 { --item-accent: #f59e0b; }
.accent-c2 { --item-accent: #22c55e; }
.accent-c3 { --item-accent: #a78bfa; }
.accent-c4 { --item-accent: #f97316; }
.accent-c5 { --item-accent: #fb7185; }
.accent-c6 { --item-accent: #facc15; }
.accent-c7 { --item-accent: #8b5cf6; }
.accent-vinculo { --item-accent: #2dd4bf; }
.accent-b { --item-accent: #60a5fa; }
.accent-default { --item-accent: var(--brand-500); }

.app-frame {
  min-width: 0;
  margin-left: var(--sidebar);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(15px);
}

.brand {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand small {
  display: block;
  color: var(--subtle);
  font-size: 11px;
}

.menu-button {
  display: none;
}

.icon-button {
  padding: 8px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.user-menu {
  margin-left: auto;
}

.user-menu details {
  position: relative;
}

.user-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 700;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-800);
  background: var(--brand-100);
  font-weight: 800;
}

.user-popover {
  position: absolute;
  top: 45px;
  right: 0;
  width: 220px;
  display: grid;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-hover);
}

.user-popover > * {
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: none;
  text-align: left;
}

.user-popover a:hover,
.user-popover button:hover {
  color: var(--brand-800);
  background: var(--brand-50);
}

.app-content {
  max-width: 1720px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 44px);
}

.page-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-header--indicator {
  padding-left: 18px;
}

.page-header--indicator::before {
  position: absolute;
  inset: 4px auto 4px 0;
  width: 5px;
  border-radius: 999px;
  background: var(--item-accent, var(--brand-600));
  content: "";
}

.page-header h1 {
  margin: 5px 0 7px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-header p,
.muted {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  color: var(--brand-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  background: #fff;
  font-weight: 750;
  cursor: pointer;
  transition: 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #94a3b8;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.btn--primary {
  border-color: var(--brand-700);
  color: #fff;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.metric-card,
.data-card,
.parameter-card,
.form-card,
.action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
}

.metric-card::after {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.18), transparent);
  content: "";
}

.metric-card--featured {
  border-color: rgba(13, 148, 136, 0.25);
  background: linear-gradient(145deg, #fff, var(--brand-50));
}

.metric-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-icon,
.indicator-code {
  min-width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 9px;
  color: var(--brand-800);
  background: var(--brand-100);
  font-size: 11px;
  font-weight: 850;
}

.metric-label {
  color: var(--subtle);
  font-weight: 700;
}

.metric-value {
  margin: 9px 0 7px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge.OTIMO,
.status--otimo { background: var(--otimo-bg); color: var(--otimo-fg); }
.status-badge.BOM,
.status--bom { background: var(--bom-bg); color: var(--bom-fg); }
.status-badge.SUFICIENTE,
.status--suficiente { background: var(--suficiente-bg); color: var(--suficiente-fg); }
.status-badge.REGULAR,
.status--regular { background: var(--regular-bg); color: var(--regular-fg); }
.status-badge.INDETERMINADO,
.status--indeterminado { background: var(--unknown-bg); color: var(--unknown-fg); }
.status-badge.DIAGNOSTICO,
.status--diagnostico { background: var(--diagnostico-bg); color: var(--diagnostico-fg); }
.status-badge.SEM_RESULTADO,
.status--sem-resultado { background: var(--unknown-bg); color: var(--unknown-fg); border: 1px dashed var(--unknown-fg); }

.filter-bar,
.history-navigation {
  margin: 16px 0;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.filters label,
.form-field {
  min-width: 185px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filters input,
.filters select,
.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text);
  background: #fff;
}

.filters input:focus,
.filters select:focus,
.form-card input:focus,
.form-card select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
  outline: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.section-heading strong {
  display: block;
  margin-top: 2px;
}

.history-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 3px;
  scrollbar-width: thin;
}

.history-tab {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.history-tab:hover {
  border-color: var(--brand-500);
  color: var(--brand-800);
}

.history-tab--active {
  border-color: var(--brand-700);
  color: #fff;
  background: var(--brand-700);
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.18);
}

.notice {
  margin: 14px 0;
  padding: 12px 15px;
  border-radius: 11px;
  color: var(--muted);
  background: var(--unknown-bg);
}

.notice--success {
  color: var(--bom-fg);
  background: var(--bom-bg);
}

.notice--methodology {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(90deg, #fff, #f8fafc);
}

.data-card,
.parameter-card,
.action-card,
.form-card {
  padding: 20px;
}

.data-card {
  margin: 18px 0;
}

.data-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.data-card h2,
.parameter-card h2,
.action-card h2,
.form-card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.015em;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 18px;
  margin: 18px 0;
}

.parameter-card--rich {
  background: linear-gradient(145deg, #fff, #fbfefd);
}

.parameter-card--rich > p {
  margin: 10px 0 12px;
  color: var(--muted);
}

.formula-box {
  margin: 14px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--brand-600);
  border-radius: 10px;
  color: var(--brand-900);
  background: var(--brand-50);
  font-size: 14px;
  font-weight: 800;
}

.range-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.range-legend--compact {
  display: flex;
  flex-wrap: wrap;
}

.range-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.range-item strong {
  font-size: 12px;
  color: var(--muted);
}

.method-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
  font-size: 12px;
  font-weight: 700;
}

.action-card {
  background: linear-gradient(145deg, var(--brand-950), var(--brand-800));
  color: #fff;
}

.action-card .eyebrow,
.action-card .muted {
  color: #b8e2df;
}

.action-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0;
}

.action-stat strong {
  font-size: 42px;
  line-height: 1;
}

.action-stat span {
  color: #d8eeee;
}

.classification-strip {
  min-height: 12px;
  display: flex;
  overflow: hidden;
  margin: 14px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.classification-strip span {
  min-width: 4px;
  height: 12px;
}

.classification-strip .OTIMO { background: var(--otimo-fg); }
.classification-strip .BOM { background: #22c55e; }
.classification-strip .SUFICIENTE { background: #f59e0b; }
.classification-strip .REGULAR { background: #ef4444; }
.classification-strip .INDETERMINADO { background: #94a3b8; }
.classification-strip .DIAGNOSTICO { background: var(--diagnostico-fg); }

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.practice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfdff;
}

.practice-number {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--brand-800);
  background: var(--brand-100);
  font-size: 10px;
  font-weight: 850;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.8fr);
  gap: 18px;
}

/* Radar e Evolução por competência lado a lado, proporção equilibrada (~55/45)
   para nenhum dos dois parecer o "principal" e o outro um apêndice. */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr);
  gap: 18px;
}

.evolution-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.evolution-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

.evolution-toolbar select {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  color: var(--text);
}

.chart-panel {
  min-height: 320px;
}

.history-chart,
.radar-chart {
  position: relative;
  min-height: 235px;
  overflow: hidden;
}

.history-chart svg,
.radar-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid-line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #64748b;
  font-size: 10px;
}

.chart-line {
  fill: none;
  stroke: var(--brand-700);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: rgba(13, 148, 136, 0.08);
}

.chart-point {
  stroke: #fff;
  stroke-width: 2;
}

.classification-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.classification-summary > div {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 2px 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fafc;
}

.classification-summary strong {
  font-size: 22px;
  line-height: 1;
}

.classification-summary small {
  grid-column: 2;
  color: var(--subtle);
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.dot.OTIMO { background: var(--otimo-fg); }
.dot.BOM { background: #22c55e; }
.dot.SUFICIENTE { background: #f59e0b; }
.dot.REGULAR { background: #ef4444; }
.dot.DIAGNOSTICO { background: var(--diagnostico-fg); }
.dot.INDETERMINADO { background: #94a3b8; }

.table-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfefd;
}

.rank-position {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: #f1f5f9;
  font-weight: 800;
}

.progress {
  height: 7px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.progress.OTIMO span { background: var(--otimo-fg); }
.progress.BOM span { background: #22c55e; }
.progress.SUFICIENTE span { background: #f59e0b; }
.progress.REGULAR span { background: #ef4444; }
.progress.INDETERMINADO span { background: #94a3b8; }
.progress.DIAGNOSTICO span { background: var(--diagnostico-fg); }

.radar-card {
  min-height: 430px;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.radar-legend {
  display: grid;
  gap: 7px;
}

.radar-legend__item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--text);
}

.radar-legend__item:hover {
  background: #f8fafc;
}

.radar-legend__item small {
  display: block;
  color: var(--subtle);
}

.radar-summary {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.radar-summary__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.radar-summary__header strong {
  font-size: 13px;
  letter-spacing: -0.01em;
}

.stacked-bar {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--unknown-bg);
}

.stacked-bar__segment {
  height: 100%;
}

.stacked-bar__segment.OTIMO { background: var(--otimo-fg); }
.stacked-bar__segment.BOM { background: #22c55e; }
.stacked-bar__segment.SUFICIENTE { background: #f59e0b; }
.stacked-bar__segment.REGULAR { background: #ef4444; }
.stacked-bar__segment.INDETERMINADO { background: #94a3b8; }
.stacked-bar__segment.DIAGNOSTICO { background: var(--diagnostico-fg); }

.stacked-bar__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.stacked-bar__counts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radar-summary__caption {
  margin: 8px 0 0;
  font-size: 12px;
}

.attention-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.attention-chips__label {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.attention-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
}

.attention-chip.status--suficiente { background: var(--suficiente-bg); color: var(--suficiente-fg); }
.attention-chip.status--regular { background: var(--regular-bg); color: var(--regular-fg); }

.indicator-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: var(--item-accent, var(--brand-500));
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.indicator-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.indicator-card {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 6px;
  border-top: 4px solid var(--item-accent, var(--brand-600));
  transition: 160ms ease;
}

.indicator-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.priority-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.priority-grid article {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.priority-grid strong {
  font-size: 26px;
}

.priority-grid__note {
  align-items: center;
  color: var(--diagnostico-fg);
  font-weight: 600;
}

.priority-grid span {
  color: var(--muted);
}

.trend-chip {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--brand-800);
  background: var(--brand-100);
  font-size: 11px;
  font-weight: 800;
}

.btn--sm {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 12px;
}

/* Popover de informação acessível — <details>/<summary>, sem JS próprio,
   funciona com teclado e toque nativamente. Reaproveitado para o disclaimer
   de priorização e para o chip "base insuficiente". */
.info-popover {
  position: relative;
}

/* Reset mínimo, sem display:flex: o <summary> do chip "Base insuficiente"
   mistura texto solto com um <span> (contador) — um contêiner flex trata
   cada nó de texto como item flex anônimo e engole os espaços ao redor do
   <span>. O ícone "?" (sem texto+span misturado) usa .info-popover--icon
   para o centramento circular, sem esse problema. */
.info-popover > summary {
  list-style: none;
  cursor: pointer;
}

.info-popover > summary::-webkit-details-marker,
.info-popover > summary::marker {
  display: none;
}

.info-popover > summary:focus-visible {
  outline: 2px solid var(--brand-700);
  outline-offset: 2px;
}

.info-popover--icon > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.info-popover__body {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-hover);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.map-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-chip--details > summary {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.priority-view .table-scroll {
  margin-bottom: 10px;
}

.priority-view-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
}

.view-tab {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 150ms ease;
}

.view-tab:hover {
  border-color: var(--brand-500);
  color: var(--brand-800);
}

.view-tab[aria-selected="true"] {
  border-color: var(--brand-700);
  color: #fff;
  background: var(--brand-700);
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.18);
}

.territory-map-wrap {
  position: relative;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.territory-map-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.territory-map-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

.territory-map-toolbar select {
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  color: var(--text);
}

.territory-map {
  height: 520px;
  background: var(--unknown-bg);
}

/* Fallback CSS de tela cheia quando a Fullscreen API não está disponível
   (ex.: alguns navegadores mobile). Com a API disponível, o próprio
   navegador já expande o elemento e este estado extra não é necessário,
   mas a classe é inofensiva de qualquer forma. */
.territory-map-wrap--fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  margin: 0;
  border-radius: 0;
  background: #fff;
}

.territory-map-wrap--fullscreen .territory-map,
.territory-map-wrap:fullscreen .territory-map {
  height: 100%;
}

.territory-map-wrap:fullscreen {
  border-radius: 0;
}

.map-control-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  background: #fff !important;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.map-control-btn:hover {
  color: var(--brand-800) !important;
  background: var(--brand-50) !important;
}

.map-control-btn[aria-pressed="true"] {
  color: #fff !important;
  background: var(--brand-700) !important;
  border-color: var(--brand-700) !important;
}

.map-legend-floating {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 400;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  color: var(--muted);
  font-size: 11px;
  box-shadow: var(--shadow);
}

.map-legend-floating span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.prio-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}

.prio-dot.muito_alta { background: var(--prio-muitoalta-fg); }
.prio-dot.atencao { background: var(--prio-atencao-fg); }
.prio-dot.monitoramento { background: var(--prio-monitoramento-fg); }
.prio-dot.estavel { background: var(--prio-estavel-fg); }
.prio-dot.indeterminado { background: var(--prio-indeterminado-fg); }
.prio-dot.sem_dado { background: var(--prio-indeterminado-fg); }
.prio-dot.diagnostico { background: var(--prio-diagnostico-fg); }

.territory-map .leaflet-control-zoom a {
  border-radius: 8px !important;
  color: var(--text) !important;
}

.territory-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.map-popup {
  display: grid;
  gap: 5px;
  min-width: 190px;
  font-size: 12px;
}

.map-popup strong {
  font-size: 13px;
}

.map-popup__list {
  margin: 2px 0;
  padding-left: 16px;
  color: var(--muted);
}

.map-popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.priority-heatmap {
  min-width: 640px;
}

.priority-heatmap th,
.priority-heatmap td {
  text-align: center;
}

.priority-heatmap th:first-child,
.priority-heatmap td:first-child {
  min-width: 160px;
  text-align: left;
}

.priority-heatmap td:last-child {
  min-width: 130px;
}

.priority-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text);
  background: var(--unknown-bg);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  transition: 120ms ease;
}

.priority-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.priority-cell.status--otimo { background: var(--otimo-bg); color: var(--otimo-fg); }
.priority-cell.status--bom { background: var(--bom-bg); color: var(--bom-fg); }
.priority-cell.status--suficiente { background: var(--suficiente-bg); color: var(--suficiente-fg); }
.priority-cell.status--regular { background: var(--regular-bg); color: var(--regular-fg); }
.priority-cell.status--indeterminado { background: var(--unknown-bg); color: var(--unknown-fg); }
.priority-cell.status--diagnostico { background: var(--diagnostico-bg); color: var(--diagnostico-fg); }

.priority-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 2px 4px;
  color: var(--subtle);
  font-size: 12px;
}

.priority-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--text);
  background: var(--unknown-bg);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.priority-badge--muito_alta { background: var(--prio-muitoalta-bg); color: var(--prio-muitoalta-fg); }
.priority-badge--atencao { background: var(--prio-atencao-bg); color: var(--prio-atencao-fg); }
.priority-badge--monitoramento { background: var(--prio-monitoramento-bg); color: var(--prio-monitoramento-fg); }
.priority-badge--estavel { background: var(--prio-estavel-bg); color: var(--prio-estavel-fg); }
.priority-badge--indeterminado { background: var(--prio-indeterminado-bg); color: var(--prio-indeterminado-fg); }
.priority-badge--sem_dado { background: var(--prio-indeterminado-bg); color: var(--prio-indeterminado-fg); }
.priority-badge--diagnostico { background: var(--prio-diagnostico-bg); color: var(--prio-diagnostico-fg); }

.priority-ranking {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.priority-ranking h3 {
  margin: 0 0 2px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

/* Faixa horizontal e compacta abaixo do mapa — só ocupa espaço quando há
   resultado; sem coluna lateral permanente reservada "para o caso de". */
.priority-ranking-strip {
  margin-top: 16px;
}

.priority-ranking-strip h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.priority-ranking-strip__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.priority-ranking-strip .priority-ranking__item {
  height: 100%;
}

.empty-state--inline {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
}

.priority-ranking__item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--prio-indeterminado-fg);
  border-radius: 12px;
  background: #f8fafc;
}

.priority-ranking__item--muito_alta { border-left-color: var(--prio-muitoalta-fg); }
.priority-ranking__item--atencao { border-left-color: var(--prio-atencao-fg); }
.priority-ranking__item--monitoramento { border-left-color: var(--prio-monitoramento-fg); }
.priority-ranking__item--estavel { border-left-color: var(--prio-estavel-fg); }
.priority-ranking__item--diagnostico { border-left-color: var(--prio-diagnostico-fg); }

.priority-ranking__rank {
  display: grid;
  place-items: center;
  height: 26px;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.priority-ranking__body {
  display: grid;
  gap: 4px;
}

.priority-ranking__body strong {
  font-size: 14px;
}

.priority-ranking__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.priority-ranking__note {
  padding-top: 4px;
  font-size: 12px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.form-card .field {
  margin-bottom: 12px;
}

.form-card label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 700;
}

.errorlist {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--regular-fg);
}

.inline-form {
  display: inline;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
}

.pagination a {
  font-weight: 750;
}

.empty-state {
  padding: 34px;
  color: var(--subtle);
  text-align: center;
}

.privacy {
  margin-top: 12px;
  color: var(--subtle);
  font-size: 11px;
}

.form-card--narrow {
  max-width: 540px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.2), transparent 35%),
    linear-gradient(135deg, var(--brand-950), var(--brand-700));
}

.login-card {
  width: min(440px, calc(100% - 32px));
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(4, 47, 46, 0.38);
}

.login-card .brand {
  display: flex;
  margin-bottom: 24px;
}

/* ---------------------------------------------------------------------
   Tela do indicador — abas (Ranking / Boas práticas / Gráficos / Radar de
   práticas / Mapa territorial). Ver templates/dashboard/indicador.html.
   ------------------------------------------------------------------- */

.page-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0 16px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--subtle);
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.page-tab:hover {
  color: var(--text);
}

.page-tab[aria-selected="true"] {
  color: var(--brand-700);
  border-bottom-color: var(--brand-600);
}

.page-panel {
  animation: page-panel-in 120ms ease;
}

@keyframes page-panel-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Faixas GERENCIAIS de cumprimento de prática — nunca a classificação
   oficial OTIMO/BOM/SUFICIENTE/REGULAR do indicador (parte 14/45). Reusa os
   mesmos tons por familiaridade visual, mas o rótulo textual é sempre
   diferente ("Muito baixo/Baixo/Intermediário/Alto cumprimento"). */
.practice-band--muito_baixo { background: var(--regular-bg); color: var(--regular-fg); }
.practice-band--baixo { background: var(--suficiente-bg); color: var(--suficiente-fg); }
.practice-band--intermediario { background: var(--bom-bg); color: var(--bom-fg); }
.practice-band--alto { background: var(--otimo-bg); color: var(--otimo-fg); }
.practice-band--sem-dado { background: var(--unknown-bg); color: var(--unknown-fg); }

.progress-track {
  height: 8px;
  margin: 8px 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--unknown-bg);
}

.progress-track--lg {
  height: 12px;
}

.progress-track__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-600);
}

.progress-track--bar {
  width: 100%;
}

.practice-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.practice-summary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: inherit;
  background: var(--card);
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.practice-summary-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.practice-summary-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-weight: 800;
}

.practice-summary-card__head span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}

.practice-summary-card__nome {
  font-weight: 700;
}

.practice-summary-card__criterio {
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.35;
}

.practice-summary-card__value {
  font-size: 20px;
  font-weight: 800;
}

.practice-matrix-scroll {
  max-height: 460px;
}

.practice-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.practice-matrix th,
.practice-matrix td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

.practice-matrix th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
}

.practice-matrix__sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: var(--card);
}

.practice-matrix th.practice-matrix__sticky-col {
  z-index: 3;
}

.practice-matrix__cell {
  font-weight: 700;
}

.practice-detail {
  scroll-margin-top: 90px;
}

.practice-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.practice-detail__metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
}

.practice-detail__metric strong {
  font-size: 30px;
}

.practice-distribution {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.practice-distribution__chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.practice-topbottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.practice-topbottom h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.practice-topbottom ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.practice-expand {
  margin-top: 12px;
}

.practice-expand summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-700);
}

.practice-radar-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}

.practice-radar-detail {
  display: grid;
  gap: 10px;
}

.practice-radar-detail__item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.practice-radar-detail__head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.chart-select select {
  margin-left: 8px;
}

.chart-bar-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.chart-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr 60px;
  align-items: center;
  gap: 10px;
}

.chart-bar-row__label {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-row__value {
  font-weight: 700;
  text-align: right;
}

.chart-subheading {
  margin: 14px 0 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------
   Refinamento visual "Boas práticas" (rodada 2026-09, Parte B) — medalhas,
   quadrimestre secundário, marcador de competência parcial, matriz com
   hover/zebra, legenda e card de projeção.
   ------------------------------------------------------------------- */

.quad-secondary {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.partial-marker {
  margin-left: 2px;
  font-weight: 900;
  color: var(--suficiente-fg, #b45309);
}

.practice-topbottom__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.practice-topbottom__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.practice-topbottom__list li > a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Medalha = RECONHECIMENTO (melhores resultados); nunca reaproveitada no
   lado de "necessitam atenção" — ver .attention-badge, que é sempre um
   alerta, nunca uma medalha (parte B/2 da rodada de evolução). */
.medal-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}

.medal-badge--gold { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.medal-badge--silver { background: linear-gradient(135deg, #e2e8f0, #94a3b8); }
.medal-badge--bronze { background: linear-gradient(135deg, #fdba74, #b45309); }

.attention-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1.5px solid var(--regular-fg, #b91c1c);
  color: var(--regular-fg, #b91c1c);
  font-size: 11px;
  font-weight: 800;
}

.practice-matrix tbody tr:hover td {
  background: var(--brand-50, #f0fdfa);
}

.practice-matrix tbody tr:nth-child(even) td:not(.practice-matrix__sticky-col) {
  background-image: linear-gradient(rgba(15, 23, 42, 0.015), rgba(15, 23, 42, 0.015));
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0;
  font-size: 11.5px;
  color: var(--subtle);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot--completo { background: var(--brand-700); }
.legend-dot--parcial { background: #fff; border: 2px solid var(--brand-700); }
.legend-dot--projecao { background: #fff; border: 2px dashed #8b5cf6; }

.chart-line--projected {
  stroke: #8b5cf6;
  stroke-dasharray: 5, 5;
}

.forecast-card {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-sm);
  background: #f5f3ff;
}

.forecast-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.forecast-trend {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.forecast-card__value {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: #6d28d9;
  margin-top: 4px;
}

@media (max-width: 1240px) {
  .overview-grid,
  .analytics-grid,
  .insight-grid,
  .priority-panel-grid {
    grid-template-columns: 1fr;
  }

  .radar-layout {
    grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1fr);
  }

  .admin-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {
  .app-frame {
    margin-left: 0;
  }

  .app-sidebar {
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .sidebar-open .app-sidebar {
    transform: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: none;
    background: rgba(15, 23, 42, 0.56);
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
  }

  .menu-button,
  .brand {
    display: flex;
  }

  .sidebar-close {
    display: block;
  }

  .app-header {
    gap: 12px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .radar-layout,
  .practice-radar-layout {
    grid-template-columns: 1fr;
  }

  .radar-chart {
    min-height: 300px;
  }

  .priority-grid,
  .range-legend {
    grid-template-columns: 1fr;
  }

  .territory-map {
    height: 420px;
  }

  .practice-topbottom {
    grid-template-columns: 1fr;
  }

  .chart-bar-row {
    grid-template-columns: minmax(90px, 140px) 1fr 50px;
  }
}

@media (max-width: 760px) {
  .territory-map {
    height: 340px;
  }

  .priority-ranking-strip__items {
    grid-template-columns: 1fr;
  }

  .map-legend-floating {
    right: 6px;
    bottom: 6px;
    gap: 5px 8px;
    padding: 6px 9px;
    font-size: 10px;
  }
  .app-content {
    padding: 18px 14px 30px;
  }

  .app-header {
    padding: 0 14px;
  }

  .brand small,
  .user-label {
    display: none;
  }

  .page-header,
  .section-heading,
  .data-card__header {
    display: block;
  }

  .page-actions {
    margin-top: 14px;
  }

  .page-actions .btn {
    flex: 1 1 auto;
  }

  .metric-grid,
  .priority-grid,
  .classification-summary,
  .indicator-grid--compact,
  .admin-filter-grid {
    grid-template-columns: 1fr;
  }

  .metric-card,
  .data-card,
  .parameter-card,
  .action-card,
  .form-card {
    padding: 16px;
  }

  .filters > *,
  .filters label {
    width: 100%;
    min-width: 100%;
  }

  .history-navigation,
  .filter-bar {
    padding: 13px;
  }

  .table-scroll {
    margin-inline: 0;
  }

  .action-stat strong {
    font-size: 36px;
  }
}
/* Authorized comparison selections and keyboard-accessible ranking controls. */
.filters fieldset { max-height: 18rem; overflow-y: auto; min-width: 0; max-width: 100%; border: 1px solid #cbd5e1; }
.filters fieldset label { display: flex; flex-direction: row; align-items: center; gap: .5rem; padding: .2rem; }
.filters fieldset input[type="checkbox"] { width: auto; min-width: 1rem; }
.ranking-sort-button { color: inherit; font: inherit; background: transparent; border: 0; cursor: pointer; padding: .4rem; text-align: left; }
.ranking-sort-button:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
