/* PLI Reporta — paleta institucional PLI, mobile-first, sem framework. */
/* Poppins: fonte da marca, a mesma da sidebar do Smart Router e do HazardTrack. */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap");
:root {
  /* Paleta institucional PLI */
  --pli-verde: #3ec26e; /* verde PLI (accent) */
  --pli-verde-dark: #2fa854; /* verde PLI escuro (hover) */
  --pli-verde-soft: #e5f6ec; /* verde PLI claro (badges, seleções) */

  --pli-azul: #1c3d59; /* azul-marinho PLI */
  --pli-primary: #003b5a; /* azul profundo (topbar, fundo escuro) */
  --pli-secondary: #1c3d59; /* azul-marinho PLI */
  --pli-accent: #116593; /* azul médio PLI (links, secundário) */

  /* Tokens semânticos do app */
  --primary: var(--pli-verde);
  --primary-dark: var(--pli-verde-dark);
  --primary-soft: var(--pli-verde-soft);
  --ink: var(--pli-primary);
  --ink-soft: var(--pli-secondary);

  /* Neutros */
  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #d7dee6;
  --muted: #5a6573;

  /* Estados */
  --ok: #2aa358;
  --warn: #f39c12;
  --danger: #c0392b;

  /* Layout */
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 59, 90, 0.08);
  --tap-min: 48px;
  --page-gutter: 2.5%;
  --page-max: 1280px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

header.topbar {
  background: linear-gradient(
    135deg,
    var(--pli-primary) 0%,
    var(--pli-secondary) 100%
  );
  color: #fff;
  padding: var(--space-md) var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 4px solid var(--pli-verde);
  /* Altura padrao do ecossistema (cabecalho do Smart Router). */
  box-sizing: border-box;
  height: 70px;
  min-height: 70px;
}
/* Titulo simples da topbar (paginas sem a marca, como /acesso). */
header.topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}

/* Marca na topbar: mesma estrutura da sidebar (icone verde + nome branco;
   slogan · PLI-SP abaixo), em escala menor para caber na barra. */
header.topbar h1.topbar-brand {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: #fff;
  /* Escala da marca: nome = 1em, slogan = 0.49em (proporcao da referencia). */
  font-size: 1.15rem;
}

.topbar-brand-head {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1em;
}

.topbar-brand-head .topbar-icon {
  flex-shrink: 0;
  width: 1.08em;
  height: 1.08em;
  color: var(--pli-verde);
}

.topbar-brand-name {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.1;
  white-space: nowrap;
}

.topbar-brand-sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.49em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
header.topbar nav a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.85;
  margin-left: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  transition:
    color 0.15s ease,
    opacity 0.15s ease;
}
header.topbar nav a:hover {
  opacity: 1;
  color: var(--pli-verde);
}

main {
  width: calc(100% - (var(--page-gutter) * 2));
  max-width: min(var(--page-max), calc(100% - (var(--page-gutter) * 2)));
  margin: 0 var(--page-gutter) 0 auto;
  padding: var(--space-lg) 0;
}

body.report-page main {
  max-width: min(480px, calc(100% - (var(--page-gutter) * 2)));
  margin-left: auto;
  margin-right: auto;
}

/*
 * Rodape ancorado na base da janela: a pagina vira uma coluna flex e o <main>
 * absorve a sobra vertical. Sem isso o rodape subia para o meio da tela nas
 * etapas curtas. Escopo no report-page classico para nao afetar o layout em
 * grade do public-shell nem as telas de gestao.
 */
body.report-page:not(.public-shell-page) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.report-page:not(.public-shell-page) main {
  flex: 1 0 auto;
}

body.report-page:not(.public-shell-page) footer.footer {
  flex-shrink: 0;
  margin-top: auto;
}

footer.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) var(--page-gutter);
  margin-top: var(--space-xl);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  background: var(--surface);
}
footer.footer a {
  color: var(--pli-accent);
  text-decoration: none;
  margin: 0 8px;
  border-bottom: 1px dotted var(--border);
}
footer.footer a:hover {
  color: var(--pli-verde-dark);
  border-color: var(--pli-verde);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow);
}

.label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--ink);
}
.help {
  color: var(--muted);
  font-size: 13px;
  margin-top: var(--space-xs);
}

button,
.btn {
  font: inherit;
  min-height: var(--tap-min);
  padding: var(--space-md) 18px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(
    135deg,
    var(--pli-verde) 0%,
    var(--pli-verde-dark) 100%
  );
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
  letter-spacing: 0.02em;
  transition:
    filter 0.15s ease,
    transform 0.05s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(46, 168, 84, 0.3);
}
button:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 16px rgba(46, 168, 84, 0.38);
}
button:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}
button.secondary {
  background: var(--surface);
  color: var(--pli-primary);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
button.secondary:hover {
  background: #f0f6fb;
  border-color: var(--pli-accent);
  color: var(--pli-accent);
  filter: none;
}
button.ghost {
  background: transparent;
  color: var(--pli-primary);
  border: 1px dashed var(--pli-accent);
  box-shadow: none;
}
button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

/* ── Botões de ação nas páginas públicas ─── */
.public-page
  button:not(.branch-btn):not(.photo-toggle-btn):not(.access-toggle-pw):not(
    .maplibregl-ctrl-zoom-in
  ):not(.maplibregl-ctrl-zoom-out),
.report-page
  button:not(.branch-btn):not(.photo-toggle-btn):not(.access-toggle-pw):not(
    .maplibregl-ctrl-zoom-in
  ):not(.maplibregl-ctrl-zoom-out) {
  min-height: 52px;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 10px;
  letter-spacing: 0.03em;
  box-shadow: 0 3px 10px rgba(46, 168, 84, 0.3);
}

.public-page button.secondary:not(.branch-btn):not(.photo-toggle-btn),
.report-page button.secondary:not(.branch-btn):not(.photo-toggle-btn) {
  box-shadow: 0 2px 6px rgba(0, 59, 90, 0.1);
  border: 1.5px solid #c8d5e0;
  color: var(--pli-secondary);
  font-size: 14px;
}

.public-page button.secondary:not(.branch-btn):hover,
.report-page button.secondary:not(.branch-btn):hover {
  background: #eef4f9;
  border-color: var(--pli-accent);
}

.row {
  display: flex;
  gap: var(--space-sm);
}
.row > * {
  flex: 1;
}

/* Grade de categorias — sem emojis, marcador tipográfico discreto */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.cat-grid button {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  text-align: left;
  padding: var(--space-lg) var(--space-lg) var(--space-lg) var(--space-md);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border-left: 4px solid var(--border);
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}
.cat-grid button:hover {
  background: #f0f6fb;
  border-color: var(--pli-accent);
  border-left-color: var(--pli-accent);
  filter: none;
}
.cat-grid button.selected {
  background: var(--primary-soft);
  border-color: var(--pli-verde);
  border-left-color: var(--pli-verde);
  color: var(--pli-primary);
}
.cat-grid .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--pli-primary);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 28px;
  letter-spacing: 0;
}
.cat-grid button.selected .ico {
  background: var(--pli-verde);
  color: #fff;
}
.cat-grid .ico.ico-img {
  background: #f1f5f9;
  border-radius: 6px;
}
.cat-grid .ico.ico-img img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.cat-grid button.selected .ico.ico-img {
  background: #e8f5ee;
}
.cat-grid .ico.report-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

#photo-preview-wrap[hidden],
#preview-img[hidden],
#no-photo-notice[hidden] {
  display: none !important;
}

.preview {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  display: block;
}

#map,
#pickmap {
  width: 100%;
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
}

#pickmap .maplibregl-ctrl-group button,
#map .maplibregl-ctrl-group button {
  min-height: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  font-size: 18px;
  letter-spacing: 0;
  width: 29px;
  height: 29px;
  background: #fff;
  color: #333;
}

.submit-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
}
.submit-summary-row {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: var(--space-sm) var(--space-md);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.submit-summary-row:last-child {
  border-bottom: none;
}
.submit-summary-row-block {
  display: block;
}
.submit-summary-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.submit-summary-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.submit-summary-description {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
}
#mod-list {
  display: grid;
  gap: var(--space-md);
}

.toast {
  position: fixed;
  left: var(--page-gutter);
  right: var(--page-gutter);
  bottom: var(--space-lg);
  background: var(--pli-primary);
  color: #fff;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  font-weight: 600;
}
.toast.show {
  opacity: 1;
}
.toast.ok {
  background: var(--ok);
}
.toast.err {
  background: var(--danger);
}
.toast.warn {
  background: var(--warn);
  color: var(--pli-primary);
}

.badge {
  display: inline-block;
  padding: 2px var(--space-sm);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.ok {
  background: var(--pli-verde-soft);
  color: var(--pli-verde-dark);
}
.badge.warn {
  background: #fff1cc;
  color: #8c5a00;
}
.badge.err {
  background: #fbe0de;
  color: var(--danger);
}

.field {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.field:focus {
  outline: none;
  border-color: var(--pli-verde);
  box-shadow: 0 0 0 3px rgba(62, 194, 110, 0.18);
}
textarea.field {
  min-height: 80px;
  resize: vertical;
}

.field-counter-wrap {
  position: relative;
}

.field-counter-wrap .field-counted {
  padding-bottom: 30px;
}

.field-char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.field-char-count.is-limit {
  color: var(--danger);
}

.coord-value {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}

.sidebar-hint {
  color: var(--muted);
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

ul.signals {
  padding-left: var(--space-lg);
  margin: var(--space-xs) 0;
  font-size: 13px;
  color: var(--muted);
}
ul.signals li {
  margin: 2px 0;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
}

.queue-item img {
  max-width: 220px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.queue-item .meta {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
}
.queue-item .actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.queue-item .actions button {
  flex: 0 0 auto;
  width: auto;
  padding: var(--space-sm) var(--space-lg);
  min-height: 0;
}

code {
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  background: #eaf1f7;
  color: var(--pli-primary);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Branch selection (step 0) */
.branch-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/*
 * Cada ramo e um acordeao: o botao e o cabecalho e o painel abre logo abaixo,
 * dentro do mesmo bloco. Antes o clique trocava a tela inteira.
 */
.branch-item {
  display: flex;
  flex-direction: column;
}

.branch-item .branch-btn[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.branch-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: var(--space-lg);
}

.branch-btn-arrow {
  transition: transform 0.18s ease;
}

.branch-btn[aria-expanded="true"] .branch-btn-arrow {
  transform: rotate(90deg);
}

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

.branch-btn {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--space-xl);
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    var(--pli-primary) 0%,
    var(--pli-secondary) 100%
  );
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition:
    filter 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 3px 10px rgba(0, 59, 90, 0.25);
  position: relative;
  overflow: hidden;
}

.branch-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 59, 90, 0.35);
}

.branch-btn:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.branch-btn-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.branch-btn-arrow {
  flex-shrink: 0;
}

.branch-btn-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

/* Ícones SVG da página de reporte */
.report-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.report-icon svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}
.branch-btn-icon.report-icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--pli-verde);
}
.branch-btn-arrow.report-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: rgba(255, 255, 255, 0.5);
}

.branch-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.branch-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.queue-badge {
  font-size: 12px;
  background: var(--pli-verde-soft);
  color: var(--pli-verde-dark);
  padding: 2px var(--space-sm);
  border-radius: 4px;
  margin-right: var(--space-md);
}

.extras {
  margin-top: var(--space-md);
}
.extras summary {
  cursor: pointer;
  color: var(--pli-accent);
  font-size: 14px;
  padding: 6px 0;
}

/* Toggle de foto na manifestação */
.photo-toggle-wrap {
  margin-top: var(--space-md);
}

.photo-toggle-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: 16px var(--space-lg);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  /* Estado OFF: fundo cinza-claro, borda tracejada */
  background: #f1f5f9;
  border: 2px dashed #94a3b8;
  box-shadow: none;
  min-height: unset;
  font-size: 14px;
}

.photo-toggle-btn:hover {
  background: #e8f0f8;
  border-color: var(--pli-secondary);
  filter: none;
  box-shadow: none;
}

.photo-toggle-btn.active {
  background: linear-gradient(
    135deg,
    var(--pli-primary) 0%,
    var(--pli-secondary) 100%
  );
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 59, 90, 0.28);
}

.photo-toggle-icon {
  flex-shrink: 0;
  transition: filter 0.2s;
}

.photo-toggle-icon.report-icon svg {
  width: 1.6rem;
  height: 1.6rem;
  color: #64748b;
}

.photo-toggle-btn.active .photo-toggle-icon {
  filter: none;
}

.photo-toggle-btn.active .photo-toggle-icon.report-icon svg {
  color: #fff;
}

.photo-toggle-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.photo-toggle-title {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  transition: color 0.2s;
}

.photo-toggle-btn.active .photo-toggle-title {
  color: #ffffff;
}

.photo-toggle-desc {
  font-size: 12px;
  color: #94a3b8;
  transition: color 0.2s;
}

.photo-toggle-btn.active .photo-toggle-desc {
  color: rgba(255, 255, 255, 0.7);
}

.photo-toggle-pill {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 20px;
  flex-shrink: 0;
  transition:
    background 0.2s,
    color 0.2s;
  /* OFF */
  background: #e2e8f0;
  color: #64748b;
}

.photo-toggle-btn.active .photo-toggle-pill {
  background: var(--pli-verde);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(46, 168, 84, 0.4);
}

/* Aviso sem foto no step-3 */
.no-photo-notice {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  margin-bottom: var(--space-md);
}
.no-photo-notice .report-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted);
}

.result-ok {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}
.result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pli-verde-soft);
  color: var(--pli-verde-dark);
}
.result-icon.report-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--pli-verde-dark);
}

.login-panel {
  max-width: 420px;
  margin: 0 auto;
}
.login-error {
  color: #b3261e;
  font-size: 13px;
  margin-top: 8px;
}

/* ── Página de acesso (/acesso) — card estilo SIGMA-PLI landing ── */
body.access-page {
  background: linear-gradient(
    340deg,
    #003b5a 0%,
    #1c3d59 38%,
    rgba(28, 61, 89, 0.08) 72%,
    #ffffff 100%
  );
  min-height: 100vh;
}

body.access-page .access-main {
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-xl) 0 var(--space-2xl);
}

.access-mod-user {
  margin-right: 14px;
}

.access-login-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.access-login-card {
  width: 100%;
  background: #fff;
  border-radius: 10px;
  border-top: 4px solid var(--pli-accent);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 12px 40px rgba(0, 0, 0, 0.08);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  margin-bottom: 0;
}

/*
 * Marca do login: mesma do cabecalho das demais paginas — megafone em verde,
 * "PLI" em verde e o nome em branco. Como o card e claro, a marca ganha a
 * mesma faixa escura das sidebars, senao o branco nao teria contraste.
 */
.access-branding {
  text-align: center;
  margin: calc(var(--space-xl) * -1) calc(var(--space-xl) * -1) var(--space-xl);
  padding: var(--space-lg) var(--space-md);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(
    135deg,
    var(--pli-primary) 0%,
    var(--pli-secondary) 100%
  );
}

/* Mesma marca da sidebar: icone verde + nome branco; slogan · PLI-SP abaixo. */
.access-branding {
  /* Escala da marca: nome = 1em, slogan = 0.49em (proporcao da referencia). */
  font-size: 1.5rem;
}

.access-brand-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1em;
  color: #fff;
}

.access-app-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 1.08em;
  height: 1.08em;
  color: var(--pli-verde);
  line-height: 0;
}

.access-app-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.access-app-name {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.1;
  white-space: nowrap;
}

.access-app-subtitle {
  margin: 0.28rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.49em;
  font-weight: 500;
  line-height: 1.2;
}

/* Contexto da tela (fora do bloco da marca, que e fixo). */
.access-context {
  margin: 0 0 var(--space-lg);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--muted);
}

.access-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.access-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pli-secondary);
}

.access-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.access-input-icon {
  position: absolute;
  left: 11px;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
  display: flex;
}

.access-input-wrap input {
  width: 100%;
  min-height: 44px;
  padding: var(--space-sm) 2.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.access-input-wrap input:focus {
  border-color: var(--pli-accent);
  box-shadow: 0 0 0 3px rgba(17, 101, 147, 0.12);
}

.access-input-wrap input::placeholder {
  color: #94a3b8;
  font-size: 0.875rem;
}

.access-toggle-pw {
  position: absolute;
  right: 8px;
  width: auto;
  min-height: 0;
  padding: 4px;
  background: none;
  border: none;
  box-shadow: none;
  color: var(--muted);
  cursor: pointer;
}

.access-toggle-pw:hover {
  filter: none;
  color: var(--pli-secondary);
  box-shadow: none;
}

.access-feedback {
  display: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  font-size: 0.8125rem;
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.access-feedback:not([hidden]) {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.access-btn-submit {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--pli-secondary), var(--pli-accent));
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(28, 61, 89, 0.2);
  transition:
    background 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}

.access-btn-submit:hover {
  background: linear-gradient(135deg, var(--pli-primary), var(--pli-secondary));
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(28, 61, 89, 0.3);
  filter: none;
}

.access-forgot {
  text-align: center;
  margin-top: var(--space-md);
}

.access-forgot a {
  font-size: 0.8125rem;
  color: var(--pli-accent);
  text-decoration: none;
}

.access-forgot a:hover {
  color: var(--pli-secondary);
  text-decoration: underline;
}

.access-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.access-divider span:first-child,
.access-divider span:last-child {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.access-divider-text {
  font-size: 0.8125rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.access-btn-register {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.625rem;
  background: transparent;
  border: 2px solid var(--pli-verde);
  border-radius: 6px;
  color: var(--pli-verde-dark);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.access-btn-register:hover {
  background: var(--pli-verde);
  color: #fff;
}

.access-mod-panel {
  width: 100%;
  max-width: 720px;
}

@media (max-width: 480px) {
  .access-login-card {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
  }

  .access-app-title {
    font-size: 1.35rem;
  }
}

.map-toolbar {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-sm) var(--page-gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.map-toolbar label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}
.viewer-count {
  font-size: 13px;
  opacity: 0.85;
  margin-right: var(--space-lg);
}

/* Shell público — sidebar + área principal */
body.public-shell-page {
  --public-sidebar-w: 272px;
}

body.public-shell-page.report-page,
body.public-shell-page.access-page {
  display: grid;
  grid-template-columns: var(--public-sidebar-w) minmax(0, 1fr);
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

body.public-shell-page.report-page .public-shell-main {
  width: 100%;
  max-width: min(480px, 100%);
  margin: 0 auto;
  padding: var(--space-lg) var(--page-gutter) var(--space-2xl);
  box-sizing: border-box;
  overflow-y: auto;
}

body.public-shell-page.access-page .public-shell-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl) var(--page-gutter);
  background: linear-gradient(
    340deg,
    #003b5a 0%,
    #1c3d59 38%,
    rgba(28, 61, 89, 0.08) 72%,
    #ffffff 100%
  );
}

body.public-shell-page.access-page .access-main {
  max-width: 440px;
  width: 100%;
  margin: 0;
  padding: 0;
}

body.public-shell-page .public-sidebar-scroll {
  padding: 0;
}

body.public-shell-page .public-sidebar-block {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.public-shell-page .public-sidebar-block:last-child {
  border-bottom: none;
}

body.public-shell-page .public-sidebar-heading {
  margin: 0 0 var(--space-md);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

body.public-shell-page .public-sidebar-block .public-nav-item {
  width: 100%;
  margin: 0;
  padding: 10px var(--space-md);
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

body.public-shell-page button.public-nav-item-toggle {
  text-align: left;
}

body.public-shell-page .public-nav-item-label {
  flex: 1;
  min-width: 0;
}

body.public-shell-page .public-nav-toggle {
  font-size: 9px;
  width: 12px;
  text-align: center;
  color: #94a3b8;
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}

body.public-shell-page
  .public-sidebar-block-collapsible.collapsed
  .public-nav-toggle {
  transform: rotate(-90deg);
}

body.public-shell-page .public-sidebar-block-body {
  padding: var(--space-sm) var(--space-md) 0;
}

body.public-shell-page .public-sidebar-block-body[hidden] {
  display: none !important;
}

body.public-shell-page .pli-sidebar-toggle,
body.public-shell-page .public-nav-item-toggle {
  width: auto;
  min-height: 0;
  box-shadow: none;
  filter: none;
}

body.public-shell-page .pli-sidebar-toggle:hover,
body.public-shell-page button.public-nav-item-toggle:hover {
  filter: none;
  box-shadow: none;
}

body.public-shell-page button.public-nav-item-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body.public-shell-page .public-sidebar-foot .queue-badge {
  display: block;
  margin-bottom: 6px;
}

/* Mapa público (/mapa) — mesmo grid da gestão: sidebar + área principal full-bleed */
body.viewer-page {
  --viewer-sidebar-w: var(--public-sidebar-w, 272px);
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--viewer-sidebar-w) minmax(0, 1fr);
  background: #e8edf2;
  color: var(--ink);
  font-size: 14px;
}

body.viewer-page main.viewer-main {
  max-width: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
}

.public-sidebar {
  --sidebar-fg: #ffffff;
  --sidebar-fg-secondary: #94a3b8;
  --sidebar-fg-placeholder: #cbd5e1;
  /* Verde institucional do PLI, o mesmo do Hub e das demais telas.
     Antes era #4ade80, que destoava da marca. */
  --sidebar-green: var(--pli-verde);
  background: linear-gradient(180deg, var(--pli-primary) 0%, #002a42 100%);
  color: var(--sidebar-fg-secondary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 3px solid var(--sidebar-green);
  box-shadow: 2px 0 12px rgba(0, 59, 90, 0.15);
  overflow: hidden;
}

.public-sidebar .muted,
.public-sidebar .sidebar-hint {
  color: var(--sidebar-fg-secondary);
}

.public-sidebar input::placeholder,
.public-sidebar textarea::placeholder {
  color: var(--sidebar-fg-placeholder);
  opacity: 1;
}

.public-brand,
.gestao-brand,
.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  /* Altura padrao do ecossistema (cabecalho da sidebar do Smart Router). */
  box-sizing: border-box;
  height: 70px;
  min-height: 70px;
  padding: 0.4rem var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.public-brand,
.sidebar-brand.public-brand {
  --sidebar-brand-line: calc(14px * 1.3);
}

.gestao-brand,
.sidebar-brand.gestao-brand {
  --sidebar-brand-line: calc(15px * 1.3);
}

.sidebar-brand-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-brand-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  margin: 0 calc(-1 * var(--space-sm));
  padding: 0.15rem var(--space-sm);
  transition: background 0.15s ease;
}

.sidebar-brand-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-brand-link:focus-visible {
  outline: 2px solid var(--pli-verde);
  outline-offset: 2px;
}

/*
 * Marca (identidade fixa do ecossistema PLI):
 *   1a linha: icone em verde + nome da aplicacao em branco;
 *   2a linha: slogan · PLI-SP em branco atenuado;
 *   centralizada na largura da sidebar.
 * Proporcoes copiadas da sidebar do Smart Router (1.65rem/700 Poppins,
 * icone 1.08em, sub 0.805rem). O clamp so evita estourar em sidebar estreita.
 */
/* O container precisa ser o pai: cqw nao resolve contra o proprio elemento. */
.public-sidebar,
.gestao-sidebar {
  container-type: inline-size;
}

.sidebar-brand {
  /* Escala da marca: nome = 1em, slogan = 0.49em (proporcao da referencia).
     Acompanha a largura da sidebar para o slogan nunca cortar. */
  font-size: clamp(1.15rem, 8cqw, 1.5rem);
}

.sidebar-brand-head {
  gap: 0.45rem;
  font-size: 1em;
}

.sidebar-brand-mark {
  flex-shrink: 0;
  display: inline-flex;
  width: 1.08em;
  height: 1.08em;
  color: var(--sidebar-green, var(--pli-verde));
  line-height: 0;
}

.sidebar-brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar-brand-name {
  color: #fff;
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.1;
  white-space: nowrap;
}

.sidebar-brand-sub,
.sidebar-brand-sub.muted {
  margin: 0.28rem 0 0;
  padding: 0 0.1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.49em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-brand img,
.gestao-brand img {
  display: none;
}

.public-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  flex-shrink: 0;
}

.public-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.public-here-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pli-verde);
  border: 1px solid rgba(47, 168, 84, 0.45);
  background: rgba(47, 168, 84, 0.12);
}

.public-panel-collapsible.collapsed .public-panel-toggle {
  transform: rotate(-90deg);
}

.public-panel-collapsible {
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  margin-bottom: var(--space-md);
}

.public-panel-collapse-head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  margin: 0;
  padding: 11px var(--space-md);
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.public-panel-collapse-title {
  flex: 1;
  min-width: 0;
}

.public-panel-collapse-head .public-nav-icon {
  color: var(--pli-verde);
}

.public-panel-toggle {
  font-size: 9px;
  width: 12px;
  text-align: center;
  color: #94a3b8;
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.public-panel-collapse-head:hover {
  background: rgba(255, 255, 255, 0.05);
}

.public-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-md);
}

.public-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 11px var(--space-md);
  border-radius: 8px;
  color: var(--sidebar-fg, #fff);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

a.public-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.public-nav-item.active {
  background: rgba(62, 194, 110, 0.18);
  color: var(--sidebar-fg, #fff);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--sidebar-green, var(--pli-verde));
}

button.public-nav-item-toggle.active {
  background: rgba(62, 194, 110, 0.18);
  color: var(--sidebar-fg, #fff);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--sidebar-green, var(--pli-verde));
}

.public-sidebar-subheading {
  margin: 0 0 var(--space-sm);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.public-sidebar-block-body .api-publica-toc {
  padding-left: var(--space-xs);
}

.public-nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--sidebar-green, var(--pli-verde));
}

.public-nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.public-nav-item:hover .public-nav-icon,
.public-nav-item.active .public-nav-icon {
  color: var(--sidebar-green, var(--pli-verde));
}

.public-panel-collapse-body {
  padding: 0 var(--space-md) var(--space-md);
}

.public-panel-collapse-body[hidden] {
  display: none !important;
}

/* Cabeçalho do mapa — alinhado ao PLI Smart Router */
.pli-app-header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  /* Altura padrao do ecossistema (cabecalho do Smart Router). */
  box-sizing: border-box;
  height: 70px;
  min-height: 70px;
  padding: 0.5rem 1.25rem;
  background: #155d31;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 1px 3px rgba(0, 59, 90, 0.12);
  z-index: 50;
  position: relative;
}

.pli-app-header-left {
  display: flex;
  align-items: center;
  justify-self: start;
}

.pli-app-header-right {
  display: flex;
  align-items: center;
  justify-self: end;
}

.pli-app-header-title {
  margin: 0;
  justify-self: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
}

.pli-sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  min-height: 0;
  width: auto;
}

.pli-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pli-app-header-access {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.pli-app-header-access:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

body.viewer-page .gestao-map-panel .viewer-legend {
  z-index: 500;
}

.gestao-legend-shape,
.viewer-legend-shape {
  display: inline-block;
  flex-shrink: 0;
  border: 1.5px solid var(--pli-primary);
  background: #fff;
}

.gestao-legend-diamond,
.viewer-legend-diamond {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-radius: 1px;
}

.gestao-legend-circle,
.viewer-legend-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.gestao-marker-host {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.gestao-marker-host .gestao-marker {
  flex-shrink: 0;
}

.public-nav a:hover,
.public-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--pli-verde);
}

.public-sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--space-md) var(--space-md);
}

@supports (scrollbar-width: thin) {
  .public-sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
  }
}

.public-sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}

.public-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.public-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.public-sidebar:hover .public-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.public-sidebar.public-sidebar-collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right-width: 0;
  padding: 0;
}

body.viewer-page.viewer-sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.public-panel {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.public-panel h3 {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e2e8f0;
}

.public-panel-hint {
  font-size: 10px;
  margin: 0 0 8px;
  line-height: 1.4;
}

.public-panel-empty {
  font-size: 11px;
  margin: 0;
  line-height: 1.45;
}

.public-layer-group {
  margin-bottom: 12px;
}

.public-layer-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.public-layer-group-check {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.public-layer-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  line-height: 0;
}

.public-layer-group-toggle:hover {
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  box-shadow: none;
}

.public-layer-group-toggle svg {
  width: 10px;
  height: 10px;
  display: block;
  transition: transform 0.15s ease;
}

.public-layer-group.collapsed .public-layer-group-toggle svg {
  transform: rotate(-90deg);
}

.public-layer-group-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--sidebar-fg, #fff);
  line-height: 1.3;
}

.public-layer-group-count,
.public-layer-cat-status {
  flex-shrink: 0;
  min-width: 4.5em;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  color: var(--sidebar-fg, #fff);
  white-space: nowrap;
}

.public-layer-group-count.is-loading,
.public-layer-cat-status.is-loading {
  color: var(--sidebar-fg-placeholder, #cbd5e1);
}

.public-layer-children {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.public-layer-children[hidden] {
  display: none !important;
}

.public-layer-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  cursor: pointer;
}

.public-layer-cat-name {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  color: var(--sidebar-fg, #fff);
}

.public-layer-cat input,
.public-layer-group-check input {
  accent-color: var(--pli-verde);
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  margin: 0;
  flex-shrink: 0;
}

.public-export-group h4 {
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.public-export-group:first-child h4 {
  margin-top: 0;
}

.public-export-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #cbd5e1;
}

.public-export-links {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.public-export-links a {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(47, 168, 84, 0.2);
  color: var(--pli-verde);
  text-decoration: none;
  border: 1px solid rgba(47, 168, 84, 0.35);
}

.public-export-links a:hover {
  background: rgba(47, 168, 84, 0.35);
}

.public-export-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.public-export-format {
  border: none;
  margin: 0;
  padding: 0;
}

.public-export-format legend {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.public-export-format-options {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.public-export-format-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  font-size: 10px;
  color: #cbd5e1;
  cursor: pointer;
}

.public-export-format label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  font-size: 11px;
  color: #cbd5e1;
  cursor: pointer;
}

.public-export-format input {
  accent-color: var(--pli-verde);
}

.public-export-global,
.public-export-group-all,
.public-export-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  cursor: pointer;
}

.public-export-global {
  font-weight: 600;
  color: var(--sidebar-fg, #fff);
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-export-group-all {
  font-weight: 600;
  color: var(--sidebar-fg, #fff);
  margin-bottom: 4px;
}

.public-export-cat-name {
  flex: 1;
  min-width: 0;
  color: var(--sidebar-fg, #fff);
  line-height: 1.35;
}

.public-export-cat-status {
  flex-shrink: 0;
  min-width: 4.5em;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  color: var(--sidebar-fg, #fff);
  white-space: nowrap;
}

.public-export-cat-status.is-loading {
  color: var(--sidebar-fg-placeholder, #cbd5e1);
}

.public-export-group-block {
  margin-top: 4px;
}

.public-export-cats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 22px;
  margin-bottom: 8px;
}

.public-export-cat input,
.public-export-global input,
.public-export-group-all input {
  accent-color: var(--pli-verde);
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.public-export-btn {
  margin-top: 4px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: var(--pli-verde);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.public-export-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.public-export-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.public-export-status {
  margin: 0;
  font-size: 10px;
  min-height: 14px;
}

.public-sidebar-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

.sidebar-credit {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
  color: #94a3b8;
  text-align: center;
}

/* Mesmo credito da sidebar, no rodape da pagina inicial. */
.footer-credit {
  margin-top: 6px;
  line-height: 1.5;
}

.gestao-sidebar-foot .sidebar-credit {
  padding-top: var(--space-xs);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.public-api-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2fa854;
  text-decoration: none;
}

.public-api-link:hover {
  text-decoration: underline;
}

/* —— Página documentação API pública (mesmo grid da gestão) —— */
body.api-publica-page .gestao-header {
  position: sticky;
  top: 0;
  z-index: 5;
}

body.api-publica-page .gestao-policy-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 1023px) {
  body.api-publica-page .public-sidebar {
    height: auto;
    min-height: unset;
  }

  body.api-publica-page .public-sidebar-scroll {
    max-height: none;
  }
}

body.api-publica-page .gestao-policy-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--pli-secondary);
}

body.api-publica-page .gestao-policy-section h3:first-of-type {
  margin-top: var(--space-md);
}

.api-publica-callout {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 var(--space-md);
}

.api-publica-base {
  margin-bottom: 0 !important;
}

.api-publica-warn {
  margin: var(--space-md) 0 0;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.5;
}

.device-cap-banner {
  margin: 0 0 var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.5;
}

.api-publica-code {
  background: #0f172a;
  color: #e2e8f0;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
  margin: var(--space-sm) 0 var(--space-md);
}

.api-publica-code code {
  white-space: pre-wrap;
  word-break: break-all;
}

.api-publica-try {
  font-weight: 600;
  color: var(--pli-accent);
  text-decoration: none;
}

.api-publica-try:hover {
  text-decoration: underline;
}

.api-publica-toc {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: 12px;
}

.api-publica-toc a {
  display: block;
  padding: 4px 0;
  color: #94a3b8;
  text-decoration: none;
}

.api-publica-toc a:hover {
  color: #fff;
}

.api-publica-table-wrap {
  overflow-x: auto;
  margin-top: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.api-publica-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.api-publica-legend-table tr.api-publica-legend-public td {
  background: #f0fdf4;
}

.api-publica-legend-yes,
.api-publica-legend-no {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
}

.api-publica-legend-yes {
  background: #dcfce7;
  color: #166534;
}

.api-publica-legend-no {
  background: #f1f5f9;
  color: #64748b;
}

.api-publica-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.api-publica-table th,
.api-publica-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.api-publica-table th {
  font-weight: 600;
  background: var(--bg);
}

.api-publica-table tr:last-child td {
  border-bottom: none;
}

.api-publica-dl {
  margin: 0 0 var(--space-md);
}

.api-publica-dl dt {
  font-weight: 600;
  margin-top: var(--space-md);
  font-size: 13px;
}

.api-publica-dl dt:first-child {
  margin-top: 0;
}

.api-publica-dl dd {
  margin: var(--space-xs) 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.api-publica-steps {
  font-size: 13px;
  line-height: 1.6;
  padding-left: 1.25rem;
  margin: 0 0 var(--space-md);
}

.api-publica-fields {
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 var(--space-md);
  padding-left: 1.25rem;
  columns: 2;
  gap: var(--space-xl);
}

@media (max-width: 720px) {
  .api-publica-fields {
    columns: 1;
  }
}

body.viewer-page .viewer-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.maplibregl-popup.viewer-map-popup,
.maplibregl-popup.map-feature-popup,
.maplibregl-popup.public-map-popup {
  z-index: 3000 !important;
  max-width: min(96vw, 100%) !important;
}

.maplibregl-popup.map-feature-popup .maplibregl-popup-content,
.maplibregl-popup.public-map-popup .maplibregl-popup-content,
.maplibregl-popup.viewer-map-popup .maplibregl-popup-content {
  position: relative;
  padding: 0;
  width: max-content;
  max-width: min(96vw, 100%);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 59, 90, 0.24);
  overflow: hidden;
}

.maplibregl-popup.map-feature-popup .maplibregl-popup-close-button,
.maplibregl-popup.viewer-map-popup .maplibregl-popup-close-button,
.maplibregl-popup.public-map-popup .maplibregl-popup-close-button {
  display: none;
}

/* Área interna — largura dinâmica conforme conteúdo */
.maplibregl-popup.map-feature-popup .gestao-map-popup-inner,
.maplibregl-popup.map-feature-popup .public-map-popup-inner,
.maplibregl-popup.viewer-map-popup .gestao-map-popup-inner,
.maplibregl-popup.public-map-popup .gestao-map-popup-inner,
.maplibregl-popup.public-map-popup .public-map-popup-inner {
  box-sizing: border-box;
  width: max-content;
  max-width: min(96vw, 100%);
  max-height: min(75vh, 580px);
  overflow-x: auto;
  overflow-y: auto;
  padding: 0;
}

.map-popup-location {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 46px;
  padding: 12px 52px 12px 16px;
  text-align: center;
}

.map-popup-location-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.map-popup-close {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.map-popup-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.map-popup-body {
  display: inline-grid;
  grid-template-columns: minmax(280px, max-content);
  padding: 14px 16px 16px;
  box-sizing: border-box;
  width: auto;
  max-width: min(96vw, 100%);
}

.map-popup-body > .gestao-map-popup-section,
.map-popup-body > .public-map-popup-status,
.map-popup-body > .gestao-map-popup-photo,
.map-popup-body > .gestao-map-popup-foot {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.maplibregl-popup.map-feature-popup .public-map-popup-status,
.maplibregl-popup.public-map-popup .public-map-popup-status {
  margin: 0 0 10px;
  padding: 10px 12px;
  padding-right: 8px;
  border-left: 4px solid var(--status-color, var(--pli-verde));
  border-radius: 0 var(--radius) var(--radius) 0;
}

.public-map-popup-status strong {
  display: block;
  font-size: 13px;
  color: var(--pli-primary);
  margin-bottom: 4px;
  padding-right: 0;
}

.public-map-popup-status p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.maplibregl-popup.map-feature-popup .gestao-map-popup-head,
.maplibregl-popup.viewer-map-popup .gestao-map-popup-head,
.maplibregl-popup.public-map-popup .gestao-map-popup-head {
  display: none;
}

.gestao-map-popup-resolve {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: var(--pli-verde);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 2.5%;
  }

  header.topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md) var(--page-gutter);
  }

  header.topbar nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    width: 100%;
  }

  header.topbar nav a {
    margin-left: 0;
    font-size: 12px;
  }

  .queue-badge,
  .viewer-count {
    margin-right: 0;
  }

  main,
  body.report-page main,
  body.access-page .access-main {
    width: calc(100% - (var(--page-gutter) * 2));
    max-width: calc(100% - (var(--page-gutter) * 2));
    margin-left: auto;
    margin-right: auto;
    padding-top: var(--space-md);
  }

  .card {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }

  .row {
    flex-direction: column;
  }

  #map,
  #pickmap {
    height: 260px;
  }

  .map-toolbar {
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--page-gutter);
  }

  body.public-shell-page.report-page,
  body.public-shell-page.access-page {
    grid-template-columns: 1fr;
  }

  body.public-shell-page.report-page .public-shell-main {
    max-width: 100%;
    padding-top: var(--space-md);
  }

  body.viewer-page {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .public-sidebar {
    height: auto;
    max-height: 42vh;
  }

  .public-sidebar-scroll {
    max-height: 28vh;
  }

  body.viewer-page main.viewer-main {
    height: auto;
    min-height: calc(100vh - 200px);
  }

  body.viewer-page #viewer-map {
    min-height: 50vh;
  }

  footer.footer {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

/* --- Console de gestão (/gestao) — layout desktop --- */
body.gestao-page {
  --gestao-sidebar-w: 272px;
  --gestao-queue-w: 420px;
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--gestao-sidebar-w) minmax(0, 1fr);
  background: #e8edf2;
  color: var(--ink);
  font-size: 14px;
}

/* Anula regras mobile-first do app público */
body.gestao-page main.gestao-main {
  max-width: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* Barra de status/sessão (nome, @username, tipo, sair) */
.adm-session-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.18rem var(--page-gutter);
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  min-height: 22px;
}
.adm-session-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.adm-session-user strong {
  color: var(--pli-azul);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
}
.adm-session-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pli-verde);
  box-shadow: 0 0 0 2px rgba(62, 194, 110, 0.18);
  flex: 0 0 auto;
}
.adm-session-username {
  color: var(--pli-verde-dark);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-session-role {
  padding: 0.04rem 0.35rem;
  border: 1px solid rgba(62, 194, 110, 0.45);
  border-radius: 999px;
  color: var(--pli-verde-dark);
  background: var(--pli-verde-soft);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}
body.gestao-page .adm-session-bar .adm-session-logout {
  display: inline;
  width: auto;
  color: var(--pli-azul);
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  font-weight: 600;
  font-size: 0.62rem;
  line-height: 1.1;
  min-height: 0;
  cursor: pointer;
  text-decoration: underline;
}
body.gestao-page .adm-session-bar .adm-session-logout:hover {
  color: var(--pli-verde-dark);
  background: none;
  border: none;
}

body.gestao-page button {
  width: auto;
  min-height: 36px;
  padding: var(--space-sm) 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.gestao-page button.secondary {
  min-height: 36px;
}

body.gestao-page select {
  font: inherit;
  font-size: 13px;
  padding: 7px var(--space-md);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  min-width: 160px;
}

body.gestao-page code {
  font-size: 12px;
  background: #f1f5f9;
  padding: 2px var(--space-sm);
  border-radius: 4px;
}

/* Sidebar fixa */
.gestao-sidebar {
  --sidebar-fg: #ffffff;
  --sidebar-fg-secondary: #94a3b8;
  --sidebar-fg-placeholder: #cbd5e1;
  /* Verde institucional do PLI, o mesmo do Hub e das demais telas.
     Antes era #4ade80, que destoava da marca. */
  --sidebar-green: var(--pli-verde);
  background: linear-gradient(180deg, var(--pli-primary) 0%, #002a42 100%);
  color: var(--sidebar-fg-secondary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 3px solid var(--sidebar-green);
  box-shadow: 2px 0 12px rgba(0, 59, 90, 0.15);
}

.gestao-sidebar .muted,
.gestao-sidebar .sidebar-hint {
  color: var(--sidebar-fg-secondary);
}

.gestao-sidebar .gestao-nav-item,
.gestao-sidebar .gestao-nav-item:visited {
  color: var(--sidebar-fg);
}

.gestao-sidebar .gestao-nav-item.active {
  color: var(--sidebar-fg);
  box-shadow: inset 3px 0 0 var(--sidebar-green);
}

.gestao-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* gestao-brand compartilha regras de .sidebar-brand acima */

.gestao-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg) var(--space-md);
  flex: 0 0 auto;
  overflow-y: visible;
}

.gestao-layer-load[hidden] {
  display: none !important;
}

.gestao-layer-load {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 var(--space-md) var(--space-md);
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.gestao-layer-load-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e2e8f0;
}

.gestao-load-overall {
  font-weight: 700;
  color: var(--pli-verde);
  font-size: 12px;
}

.gestao-layer-load-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}

.gestao-load-group h4 {
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.gestao-load-group:first-child h4 {
  margin-top: 0;
}

.gestao-load-row {
  margin-bottom: 8px;
}

.gestao-load-row-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 3px;
}

.gestao-load-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--pli-verde);
  flex-shrink: 0;
}

.gestao-load-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.gestao-load-overall-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.gestao-load-overall-hint {
  font-size: 10px;
  line-height: 1.2;
  max-width: 120px;
}

.gestao-load-hint {
  display: block;
  font-size: 10px;
  margin-top: 2px;
  line-height: 1.2;
}

.gestao-load-row--done .gestao-load-bar {
  background: linear-gradient(90deg, #2fa854, var(--pli-verde));
}

.gestao-load-row--error .gestao-load-bar {
  background: #ef4444;
}

.gestao-load-bar {
  height: 100%;
  width: 0%;
  background: #64748b;
  border-radius: 999px;
  transition: width 0.08s linear;
}

.gestao-load-row--error .gestao-load-pct {
  color: #fca5a5;
}

.gestao-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 11px var(--space-lg);
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.gestao-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.gestao-nav-item.active {
  background: rgba(62, 194, 110, 0.18);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--pli-verde);
}

.gestao-nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pli-verde);
}
.gestao-nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.gestao-nav-item:hover .gestao-nav-icon,
.gestao-nav-item.active .gestao-nav-icon {
  color: var(--pli-verde);
}

.gestao-sidebar-foot {
  margin-top: auto;
  flex-shrink: 0;
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-size: 13px;
}

.gestao-sidebar-foot .muted {
  color: #94a3b8;
  word-break: break-all;
}

.gestao-sidebar-foot button {
  width: 100%;
}

/* Área principal */
.gestao-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
}

.gestao-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xl);
  /* Altura padrao do ecossistema (cabecalho do Smart Router). */
  box-sizing: border-box;
  height: 70px;
  min-height: 70px;
  padding: 0.5rem var(--page-gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.gestao-header h1 {
  margin: 0 0 2px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pli-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.gestao-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pli-accent);
  flex-shrink: 0;
}
.gestao-header-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.gestao-header .muted {
  font-size: 13px;
  margin: 0;
}

.gestao-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-shrink: 0;
}

.gestao-toolbar label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* KPIs do painel */
.gestao-stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.gestao-stats article {
  background: var(--surface);
  padding: var(--space-lg) var(--page-gutter);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.gestao-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.gestao-stats strong {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--pli-primary);
  line-height: 1.1;
}

.gestao-stats article:first-child strong {
  color: #b45309;
}

/* Painel: fila + mapa */
.gestao-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--gestao-queue-w) minmax(0, 1fr);
}

.gestao-panel {
  background: var(--surface);
  min-height: 0;
}

.gestao-queue-panel {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: var(--space-lg) var(--page-gutter);
  display: flex;
  flex-direction: column;
}

.gestao-queue-panel h2 {
  margin: 0 0 var(--space-lg);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.gestao-queue {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

.gestao-queue-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  font-size: 13px;
  background: #fafbfc;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.gestao-queue-card:hover {
  border-color: var(--pli-accent);
  box-shadow: 0 2px 8px rgba(0, 59, 90, 0.08);
}

.gestao-queue-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: 6px;
}

.gestao-queue-card header strong {
  font-size: 14px;
  color: var(--pli-primary);
}

.gestao-queue-photo {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin: var(--space-md) 0;
  border: 1px solid var(--border);
}

.gestao-queue-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.gestao-queue-actions button {
  flex: 1;
}

/* Painel: mapa (dashboard) */
.gestao-map-full {
  flex: 1;
  min-height: 0;
}

.gestao-map-panel {
  position: relative;
  display: flex;
  flex-direction: column;
}

#gestao-map,
.gestao-map-panel #viewer-map {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
}

.gestao-map-panel .leaflet-pane.leaflet-popup-pane {
  z-index: 2000 !important;
}

.gestao-map-panel .leaflet-pane.leaflet-marker-pane {
  z-index: 650;
}

.gestao-map-panel .leaflet-popup.gestao-map-popup {
  z-index: 2001 !important;
  max-width: min(96vw, 100%) !important;
}

.gestao-map-panel .gestao-layers,
.gestao-map-panel .gestao-legend {
  z-index: 500;
}

.gestao-map-panel .leaflet-top.leaflet-right {
  z-index: 600;
}

.gestao-map-popup.map-feature-popup .leaflet-popup-content-wrapper,
.gestao-map-popup .leaflet-popup-content-wrapper {
  position: relative;
  padding: 0;
  width: max-content;
  max-width: min(96vw, 100%);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 59, 90, 0.24);
  overflow: hidden;
}

.gestao-map-popup.map-feature-popup a.leaflet-popup-close-button,
.gestao-map-popup a.leaflet-popup-close-button {
  display: none;
}

.gestao-map-popup .leaflet-popup-content {
  margin: 0;
  width: max-content !important;
  max-width: min(96vw, 100%);
  line-height: 1.45;
  font-size: 12px;
  color: var(--ink);
}

.gestao-map-popup .leaflet-popup-tip {
  box-shadow: 0 2px 8px rgba(0, 59, 90, 0.12);
}

.gestao-map-popup-inner,
.public-map-popup-inner {
  box-sizing: border-box;
  width: max-content;
  max-width: min(96vw, 100%);
  max-height: min(75vh, 580px);
  overflow-x: auto;
  overflow-y: auto;
  padding: 0;
  font-size: 12px;
}

.gestao-map-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.gestao-map-popup-head strong {
  display: block;
  font-size: 13px;
  color: var(--pli-primary);
}

.gestao-map-popup-cat {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.gestao-map-popup-status {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.gestao-map-popup-road {
  margin: 0 0 8px;
  padding: 8px 10px;
  background: #eef3f7;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.45;
}

.gestao-map-popup-section {
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.gestao-map-popup-section h4 {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pli-primary);
}

.gestao-map-popup-kv,
.public-map-popup-kv,
.map-popup-kv {
  margin: 0;
  padding: 8px 10px;
  background: #eef3f7;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.45;
  width: 100%;
  box-sizing: border-box;
}

.gestao-map-popup-kv-row,
.public-map-popup-kv-row,
.map-popup-kv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: baseline;
  width: 100%;
  padding: 3px 0;
  white-space: nowrap;
}

.gestao-map-popup-kv-row:not(:last-child),
.public-map-popup-kv-row:not(:last-child),
.map-popup-kv-row:not(:last-child) {
  border-bottom: 1px solid rgba(0, 59, 90, 0.08);
}

.gestao-map-popup-kv dt,
.public-map-popup-kv dt,
.map-popup-kv dt {
  margin: 0;
  font-weight: 600;
  color: var(--pli-primary);
  text-align: left;
  justify-self: start;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gestao-map-popup-kv dd,
.public-map-popup-kv dd,
.map-popup-kv dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
  justify-self: end;
  flex-shrink: 0;
}

.popup-road {
  margin: 6px 0;
}

.gestao-map-popup-meta {
  margin: 0 0 6px;
  font-size: 11px;
}

.gestao-map-popup-desc {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.gestao-map-popup-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.gestao-map-popup-metric {
  font-size: 10px;
  color: var(--muted);
}

.gestao-map-popup-metric strong {
  display: block;
  font-size: 12px;
  color: var(--pli-primary);
}

.gestao-map-popup-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.gestao-map-popup-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.gestao-map-popup-foot code {
  font-size: 9px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Controle de camadas no mapa — arrastável, recolhível */
.gestao-layers {
  position: absolute;
  top: var(--space-lg);
  left: var(--page-gutter);
  right: auto;
  z-index: 500;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  width: 232px;
  box-shadow: 0 4px 16px rgba(0, 59, 90, 0.14);
  display: flex;
  flex-direction: column;
}

.gestao-layers:not(.gestao-layers--collapsed) {
  max-height: none;
}

.gestao-layers--collapsed {
  width: auto;
  min-width: 148px;
}

.gestao-layers--collapsed .gestao-layers-body {
  display: none;
}

.gestao-layers--collapsed .gestao-float-grip {
  display: none;
}

.gestao-layers.is-dragging {
  box-shadow: 0 8px 24px rgba(0, 59, 90, 0.22);
  -webkit-user-select: none;
  user-select: none;
}

.gestao-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 8px var(--space-lg);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
  cursor: move;
  flex-shrink: 0;
}

.gestao-layers--collapsed .gestao-float-head {
  border-bottom: none;
  cursor: default;
  padding-right: var(--space-md);
}

.gestao-float-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gestao-layers-toggle {
  min-height: 26px !important;
  width: 26px !important;
  padding: 0 !important;
  line-height: 1;
  font-size: 16px !important;
  font-weight: 700;
}

.gestao-float-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pli-primary);
}

.gestao-float-grip {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -2px;
}

.gestao-layers-body {
  padding: var(--space-sm) var(--space-lg) var(--space-md);
  overflow: visible;
  flex: 0 0 auto;
}

.gestao-layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.25;
}

.gestao-layer-group {
  border: none;
  margin: 0 0 8px;
  padding: 0;
}

.gestao-layer-type {
  margin-bottom: 6px;
}

.gestao-layer-type strong {
  color: var(--pli-primary);
  font-size: 12px;
}

.gestao-layer-children {
  padding-left: 10px;
  border-left: 2px solid #e2e8f0;
  margin-left: 4px;
}

.gestao-layer-cat {
  color: var(--ink-soft);
}

.gestao-layers input[type="checkbox"] {
  accent-color: var(--pli-accent);
  width: 14px;
  height: 14px;
}

.gestao-legend {
  position: absolute;
  bottom: var(--space-lg);
  left: var(--page-gutter);
  z-index: 500;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  font-size: 12px;
  width: min(300px, calc(100% - 2 * var(--page-gutter)));
  max-height: min(340px, calc(100% - 120px));
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 59, 90, 0.14);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.gestao-legend h3 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pli-primary);
}

.gestao-legend-intro {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.45;
}

.gestao-legend-symbols {
  margin: 0 0 10px;
}

.gestao-legend-symbol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  font-size: 11px;
  line-height: 1.4;
}

.gestao-legend-symbol-row:last-child {
  margin-bottom: 0;
}

.gestao-legend-symbol-row strong {
  font-weight: 700;
  color: var(--pli-primary);
}

.gestao-legend-subtitle {
  margin: 12px 0 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.gestao-legend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}

.gestao-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.gestao-legend-row:last-child {
  padding-bottom: 0;
}

.gestao-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  opacity: 1;
  border: 1px solid rgba(0, 59, 90, 0.25);
}

.gestao-legend-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.gestao-legend-copy strong {
  font-size: 11px;
  color: var(--pli-primary);
  line-height: 1.3;
  font-weight: 600;
}

/* Zoom Leaflet — canto superior direito */
.gestao-map-panel .leaflet-top.leaflet-right {
  top: var(--space-lg);
  right: var(--page-gutter);
}

.gestao-map-panel .leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 59, 90, 0.12);
}

.gestao-map-panel .leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 18px !important;
  color: var(--pli-primary) !important;
}

.gestao-badge {
  display: inline-block;
  padding: 3px var(--space-md);
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Marcadores Leaflet */
.gestao-divicon {
  background: transparent !important;
  border: none !important;
}

.gestao-divicon .gestao-marker {
  cursor: pointer;
  pointer-events: auto;
}

.gestao-marker {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #003b5a;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: var(--pli-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.gestao-marker > .gestao-marker-inner,
.gestao-marker-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  width: 100%;
  height: 100%;
}

.gestao-marker-diamond {
  transform: rotate(45deg);
  border-radius: 4px;
  overflow: hidden;
}

.gestao-marker-diamond .gestao-marker-inner {
  transform: rotate(-45deg);
}

/* Símbolo interno pintado com cor do status (máscara, opaco) */
.gestao-marker-icon-colored {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 1;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.gestao-marker-fallback {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 1;
}

.gestao-marker-circle {
  border-radius: 50%;
}

/* Listagens (eventos / manifestações) */
.gestao-main-list {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gestao-list-queue {
  flex-shrink: 0;
  padding: var(--space-md) var(--page-gutter) var(--space-lg);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.gestao-list-queue h2 {
  margin: 0 0 var(--space-md);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gestao-queue-horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  gap: var(--space-md);
}

.gestao-queue-horizontal .gestao-queue-card {
  flex: 0 0 300px;
  max-width: 320px;
}

.gestao-view-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 0;
  padding: 0 var(--page-gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.gestao-view-tabs button {
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 12px 20px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.gestao-view-tabs button.active {
  color: var(--pli-primary);
  border-bottom-color: var(--pli-verde);
  background: #f8fafc;
}

.gestao-view-tabs button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gestao-panels {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gestao-tab-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gestao-tab-panel[hidden] {
  display: none !important;
}

#gestao-panel-lista {
  min-height: 0;
}

#gestao-panel-analise {
  min-height: 0;
}

#gestao-panel-analise > .gestao-analysis-panel {
  flex: 1;
  min-height: 0;
  margin: var(--space-md) var(--page-gutter) var(--space-xl);
}

.gestao-lista-foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--page-gutter) var(--space-md);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.gestao-lista-foot #gestao-table-meta {
  margin: 0;
  font-size: 12px;
}

.gestao-lista-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.gestao-lista-filter select {
  font: inherit;
  font-size: 13px;
  padding: 7px var(--space-md);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  min-width: 160px;
}

.gestao-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.gestao-table tbody td {
  white-space: nowrap;
  overflow: visible;
}

.gestao-table td.gestao-table-desc {
  white-space: nowrap;
}

.gestao-table td.gestao-table-status {
  white-space: nowrap;
}

.gestao-table td code {
  font-size: 12px;
  line-height: 1.25rem;
}

.gestao-table .gestao-status-text,
.gestao-table .gestao-status-link {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25rem;
  vertical-align: baseline;
}

.gestao-table button.gestao-status-link {
  box-sizing: border-box;
  display: inline;
  width: auto;
  min-height: 0;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: inherit;
  letter-spacing: normal;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  vertical-align: baseline;
}

.gestao-table button.gestao-status-link:hover {
  background: #fde68a;
}

.gestao-analysis-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--page-gutter);
}

.gestao-analysis-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: var(--space-xl);
  text-align: center;
}

.gestao-analysis-empty p {
  margin: 0;
  max-width: 28rem;
  line-height: 1.5;
}

.gestao-analysis-loading {
  margin: 0;
  padding: var(--space-xl) 0;
}

.gestao-analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.gestao-analysis-header h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--pli-primary);
}

.gestao-analysis-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

.gestao-analysis-photo-col {
  position: sticky;
  top: 0;
}

.gestao-analysis-photo-col h3 {
  margin: 0 0 var(--space-sm);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pli-primary);
}

.gestao-analysis-photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: min(52vh, 520px);
  padding: var(--space-sm);
  background: #f1f5f9;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gestao-analysis-photo-frame.is-loaded {
  border-style: solid;
  background: #0f172a;
}

.gestao-analysis-photo-frame.is-empty {
  border-style: dashed;
  background: #f8fafc;
}

.gestao-analysis-photo-frame.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.gestao-analysis-photo-frame.is-loading .gestao-analysis-photo {
  opacity: 0;
}

.gestao-analysis-photo-status {
  margin: 0;
  font-size: 13px;
  text-align: center;
}

.gestao-analysis-photo-frame.is-loaded .gestao-analysis-photo-status,
.gestao-analysis-photo-frame.is-empty .gestao-analysis-photo-status {
  display: none;
}

.gestao-analysis-photo-empty {
  margin: 0;
  padding: var(--space-lg);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.gestao-analysis-photo {
  display: block;
  width: 100%;
  max-height: min(50vh, 500px);
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
}

.gestao-analysis-photo-link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--pli-accent);
  text-decoration: none;
}

.gestao-analysis-photo-link:hover {
  text-decoration: underline;
}

.gestao-analysis-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 13px;
  margin: 0;
}

.gestao-analysis-dl dt {
  font-weight: 600;
  color: var(--ink-soft);
}

.gestao-analysis-dl dd {
  margin: 0;
}

.gestao-analysis-desc {
  margin-top: var(--space-md);
  font-size: 13px;
  line-height: 1.5;
}

.gestao-analysis-side h3 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pli-primary);
}

.gestao-analysis-kv {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
}

.gestao-analysis-kv td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.gestao-audit-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 12px;
}

.gestao-analysis-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.gestao-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-md) var(--page-gutter);
}

.gestao-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gestao-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.gestao-table th {
  background: var(--pli-primary);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 11px var(--space-lg);
  text-align: left;
  border-bottom: 2px solid var(--pli-verde);
}

.gestao-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.25rem;
}

.gestao-table tbody tr:hover td {
  background: #f0f6fb;
}

.gestao-table tbody tr:last-child td {
  border-bottom: none;
}

/* Página do aprovador automático */
.gestao-main-policy {
  overflow-y: auto;
  padding-bottom: var(--space-2xl);
}

.gestao-main-policy .gestao-header {
  position: sticky;
  top: 0;
  z-index: 5;
}

.gestao-policy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  width: 100%;
  max-width: none;
  padding: var(--space-xl) var(--page-gutter) var(--space-xl);
}

.gestao-policy-section {
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gestao-policy-section.gestao-policy-full {
  grid-column: 1 / -1;
}

.gestao-policy-section h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pli-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Numeração de seção */
.policy-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.policy-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--pli-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.policy-section-desc {
  margin: 0.25rem 0 1rem;
  font-size: 13px;
  line-height: 1.5;
}

/* Grid de colunas de decisão (Seção 1) */
.policy-decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.policy-decision-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.policy-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.policy-decision-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Flags de revisão obrigatória */
.policy-flags-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-xl);
}

.policy-flag-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.policy-flag-item:hover {
  background: var(--primary-soft);
}

.policy-flag-item input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.flag-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flag-text strong {
  font-size: 13px;
}
.flag-text small {
  font-size: 11px;
}

/* Colunas da tabela de sinais */
.col-signal {
  width: 200px;
}
.col-signal-desc {
  min-width: 280px;
}
.col-highway-id {
  width: 160px;
}
.col-highway-label {
  min-width: 220px;
}

/* Barra de peso */
.weight-bar-wrap {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  min-width: 40px;
  max-width: 80px;
  overflow: hidden;
}

.weight-bar {
  height: 100%;
  background: var(--pli-primary);
  border-radius: 3px;
  transition: width 0.15s;
}

/* ── Critérios de pontuação dos sinais de veracidade ─────────────────── */
.signal-criteria {
  margin-top: var(--space-sm);
}
.sc-toggle {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--pli-accent);
  letter-spacing: 0.01em;
  -webkit-user-select: none;
  user-select: none;
  list-style: none;
}
.sc-toggle::-webkit-details-marker {
  display: none;
}
.sc-toggle::before {
  content: "▶ ";
  font-size: 10px;
  opacity: 0.7;
}
details[open] .sc-toggle::before {
  content: "▼ ";
}
.sc-list {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sc-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  font-size: 12px;
  line-height: 1.4;
}
.sc-score {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-weight: 700;
  min-width: 64px;
  text-align: right;
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}
.sc-high {
  background: #d1fae5;
  color: #065f46;
}
.sc-mid {
  background: #fef3c7;
  color: #92400e;
}
.sc-low {
  background: #fee2e2;
  color: #991b1b;
}
.sc-zero {
  background: #f1f5f9;
  color: var(--muted);
}
.sc-cond {
  color: var(--muted);
}

/* Abas do aprovador — alinhadas ao .gestao-policy-grid (sem gutter próprio) */
.policy-type-tabs {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 2px solid var(--border);
  grid-column: 1 / -1;
}

.policy-type-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: var(--space-md) var(--space-lg);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.policy-type-tab:hover {
  color: var(--ink);
}

.policy-type-tab.active {
  color: var(--pli-primary);
  border-bottom-color: var(--pli-primary);
}

.policy-type-panel[hidden] {
  display: none !important;
}

.policy-type-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.thresh-cell input[type="range"] {
  flex: 1 1 120px;
  min-width: 100px;
  accent-color: var(--pli-primary);
}

.gestao-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.gestao-preset {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.gestao-preset:hover {
  border-color: var(--pli-accent);
}

.gestao-preset.active {
  border-color: var(--pli-primary);
  background: var(--primary-soft);
}

.gestao-preset strong {
  font-size: 14px;
  color: var(--pli-primary);
}

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

.gestao-slider-block {
  margin-bottom: 1.5rem;
}

.gestao-slider-block:last-child {
  margin-bottom: 0;
}

.gestao-slider-block h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.gestao-slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin: var(--space-md) 0;
}

.gestao-slider-block input[type="range"] {
  flex: 1;
  max-width: none;
  margin: 0;
  accent-color: var(--pli-verde);
}

.gestao-slider-value {
  flex-shrink: 0;
  min-width: 48px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--pli-primary);
  text-align: right;
}

.gestao-considera {
  margin: var(--space-md) 0 0;
  padding-left: 1.25rem;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.gestao-checkboxes {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg) 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-xl);
  background: #fafbfc;
}

.gestao-checkboxes legend {
  font-weight: 700;
  font-size: 13px;
  padding: 0 6px;
  color: var(--pli-primary);
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.gestao-checkboxes label {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.gestao-sim-box {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: #f0f6fb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.gestao-sim-stats {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.gestao-sim-stats li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-md);
}

/* ── Aprovador: grid de padrões globais ──────────────────────────── */
.policy-global-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.policy-global-block {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.policy-global-block.policy-global-check {
  justify-content: center;
}

.policy-global-block.policy-global-check label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.policy-global-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.policy-num-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.policy-num-wrap input[type="number"],
.policy-num-input {
  width: 70px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pli-primary);
  background: var(--surface);
  text-align: center;
}

.policy-num-wrap input[type="number"]:focus,
.policy-num-input:focus {
  outline: 2px solid var(--pli-primary);
  outline-offset: 1px;
}

.policy-num-unit {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ── Aprovador: tabela de parâmetros por categoria ───────────────── */
.policy-table-wrap {
  overflow-x: auto;
  margin-top: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.policy-table thead th {
  background: #f1f5f9;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.policy-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.policy-table tbody tr:last-child {
  border-bottom: none;
}

.policy-table tbody tr:hover {
  background: #f8fafc;
}

.policy-table td {
  padding: 8px 14px;
  vertical-align: middle;
}

.col-cat {
  min-width: 160px;
}
.col-sev {
  width: 100px;
}
.col-ttl {
  width: 100px;
}
.col-thresh {
  width: 130px;
}
.col-rev {
  width: 110px;
  text-align: center;
}

.policy-cat-label {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.policy-cat-id {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
  margin-top: 1px;
}

/* Badges de categoria */
.cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}

.badge-blocking {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-outro {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* Barra de severidade */
.sev-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sev-bar-wrap {
  flex: 1;
  max-width: 40px;
}

.sev-bar {
  height: 6px;
  background: var(--pli-primary);
  border-radius: 3px;
  opacity: 0.7;
}

.sev-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  min-width: 24px;
}

/* Célula TTL */
.ttl-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.ttl-human {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-style: italic;
}

/* Célula de threshold */
.thresh-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Inputs inline na tabela */
.policy-table .policy-num-input {
  width: 60px;
  padding: 4px 6px;
  font-size: 13px;
}

/* Input usando padrão global — tom levemente cinza */
.policy-num-input.is-global {
  color: var(--muted);
  border-color: #e2e8f0;
  background: #f8fafc;
}

/* Badge "G" = usando padrão global */
.global-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 1px 4px;
  cursor: default;
  flex-shrink: 0;
}

/* Toggle switch */
.policy-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.policy-toggle input[type="checkbox"] {
  display: none;
}

.toggle-track {
  width: 36px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-track::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.policy-toggle input:checked + .toggle-track {
  background: var(--pli-primary);
}

.policy-toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

/* ── Aprovador: simulação ────────────────────────────────────────── */
.policy-sim-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.sim-stat {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: var(--space-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-stat strong {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.sim-stat span {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.sim-stat small {
  font-size: 11px;
}

.sim-publish {
  background: #dcfce7;
  border-color: #86efac;
}

.sim-publish strong {
  color: #15803d;
}

.sim-queue {
  background: #fef3c7;
  border-color: #fde68a;
}

.sim-queue strong {
  color: #92400e;
}

.sim-discard {
  background: #fee2e2;
  border-color: #fca5a5;
}

.sim-discard strong {
  color: #991b1b;
}

.gestao-feedback {
  margin: var(--space-md) var(--page-gutter) 0;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}

.gestao-feedback.ok {
  background: var(--primary-soft);
  color: var(--pli-verde-dark);
  border: 1px solid var(--pli-verde);
}

.gestao-feedback.err {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.gestao-error {
  color: var(--danger);
}

/* Glossário (Funcionalidades do sistema) */
.gestao-gloss-sub {
  margin: 1.5rem 0 0.75rem;
  font-size: 14px;
  font-weight: 700;
  color: var(--pli-primary);
}

.gestao-gloss-sub2 {
  margin: 0.75rem 0 0.5rem;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.gestao-gloss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.gestao-gloss-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
}

.gestao-gloss-card strong {
  display: block;
  font-size: 14px;
  color: var(--pli-primary);
}

.gestao-gloss-card .muted {
  font-size: 12px;
}

.gestao-gloss-status {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.gestao-gloss-status-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.gestao-gloss-status-row strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.gestao-gloss-status-row .muted {
  font-size: 12px;
}

.gestao-gloss-status-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.gestao-gloss-status-id {
  font-size: 11px;
  color: var(--muted);
}

.gestao-vis-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.gestao-vis-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-alt, #f1f5f9);
  color: var(--muted);
  white-space: nowrap;
}

.gestao-vis-badge.on {
  border-color: #15803d;
  color: #15803d;
  background: #f0fdf4;
}

.gestao-gloss-border {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 4px solid #64748b;
  background: #fff;
}

.gestao-empty {
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Aviso em telas pequenas — módulo pensado para desktop */
.gestao-mobile-warn {
  display: none;
}

@media (max-width: 1023px) {
  body.gestao-page {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .gestao-mobile-warn {
    display: block;
    background: #fff7ed;
    border-bottom: 2px solid var(--warn);
    color: #9a3412;
    padding: var(--space-md) var(--space-lg);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
  }

  .gestao-sidebar {
    height: auto;
    min-height: unset;
  }

  .gestao-main {
    height: auto;
    min-height: calc(100vh - 200px);
  }

  .gestao-split {
    grid-template-columns: 1fr;
    min-height: 480px;
  }

  .gestao-analysis-grid {
    grid-template-columns: 1fr;
  }

  .gestao-analysis-photo-col {
    position: static;
  }

  .gestao-analysis-photo-frame {
    min-height: 220px;
    max-height: 360px;
  }

  .gestao-layers {
    width: 180px;
    max-height: 240px;
  }

  .gestao-queue-panel {
    max-height: 360px;
  }

  #gestao-map {
    min-height: 400px;
  }

  .gestao-policy-grid {
    grid-template-columns: 1fr;
  }

  .gestao-presets {
    grid-template-columns: 1fr;
  }

  .gestao-checkboxes {
    grid-template-columns: 1fr;
  }

  .gestao-sim-stats {
    grid-template-columns: 1fr;
  }

  .policy-sim-stats {
    grid-template-columns: 1fr;
  }

  .policy-global-grid {
    grid-template-columns: 1fr;
  }

  .policy-table-wrap {
    font-size: 12px;
  }

  .policy-decision-row,
  .policy-decision-grid,
  .policy-flags-grid {
    grid-template-columns: 1fr;
  }

  .policy-type-tabs {
    flex-wrap: wrap;
  }
}

/* Sidebar unificada dos sistemas irmãos: menu Reporta + moldura Smart Router */
body.gestao-page {
  --gestao-sidebar-w: 240px;
}
.gestao-sidebar {
  background: linear-gradient(180deg, var(--pli-primary) 0%, #002a42 100%);
  border-right: 3px solid var(--sidebar-green);
}
.gestao-sidebar .gestao-brand {
  min-height: 132px;
  padding: 2rem 1.5rem 1.5rem;
  gap: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--pli-primary) 0%, #002a42 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.gestao-sidebar .sidebar-brand-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.gestao-sidebar .sidebar-brand-mark,
.gestao-sidebar .sidebar-brand-sub {
  display: none;
}
.gestao-sidebar .sidebar-brand-titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.gestao-sidebar .sidebar-brand-pli {
  color: var(--sidebar-green);
  font-family: Poppins, Inter, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}
.gestao-sidebar .sidebar-brand-reporta {
  color: rgba(255, 255, 255, 0.65);
  font-family: Poppins, Inter, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.2;
  text-transform: uppercase;
}
.gestao-sidebar-foot {
  padding: 1.25rem 0.75rem 1.5rem;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.gestao-link-back,
.gestao-link-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 0;
  padding: 0.5rem 0.875rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gestao-link-back { color: rgba(255, 255, 255, 0.55); }
.gestao-link-back:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
body.gestao-page .gestao-link-logout { color: rgba(255, 100, 100, 0.75); }
body.gestao-page .gestao-link-logout:hover { color: #ff8080; background: rgba(255, 100, 100, 0.08); }
.gestao-link-back svg,
.gestao-link-logout svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* Pagina de acesso: mesma estrutura das demais apps do ecossistema —
   "Voltar ao mapa" no fim do card e rodape fixo na base. */
.access-back {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.8125rem;
}

.access-back a {
  color: var(--muted);
  text-decoration: none;
}

.access-back a:hover {
  color: var(--pli-accent);
  text-decoration: underline;
}

body.access-page {
  display: flex;
  flex-direction: column;
}

body.access-page .access-main {
  width: 100%;
  flex: 1 0 auto;
}

body.access-page footer.footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* ============================================================================
   PAGINA DE ACESSO — skin padrao do ecossistema PLI (identico nas 3 apps).
   Hierarquia tipografica em Inter, com tokens e classes reutilizaveis:
     titulo principal 24/700 · titulo de secao 20/600 · subsecao 16/600
     rotulos e botoes 14/500 · texto comum 14/400 · texto auxiliar 12/400
   Regra: nenhum filho e maior nem mais pesado que o elemento acima dele;
   botoes e alertas se destacam por cor, fundo e borda, nao por tipografia.
   Medidas em px para nao depender do font-size raiz de cada app.
   ============================================================================ */
body.access-page {
  --t-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-title-size: 24px;      --t-title-weight: 700;
  --t-section-size: 20px;    --t-section-weight: 600;
  --t-subsection-size: 16px; --t-subsection-weight: 600;
  --t-label-size: 14px;      --t-label-weight: 500;
  --t-body-size: 14px;       --t-body-weight: 400;
  --t-aux-size: 12px;        --t-aux-weight: 400;
  --t-ink: #0f172a; --t-ink-2: #1c3d59; --t-muted: #64748b; --t-faint: #94a3b8;
  --t-accent: #116593; --t-green: #3ec26e; --t-green-dark: #2fa854; --t-line: #d7dee6;
  font-family: var(--t-font);
  color: var(--t-ink);
}
body.access-page input,
body.access-page button,
body.access-page a { font-family: var(--t-font); }

/* Classes reutilizaveis (os elementos abaixo sao mapeados a elas). */
body.access-page .t-title,
body.access-page .access-app-name { font-family: var(--t-font); font-size: var(--t-title-size); font-weight: var(--t-title-weight); line-height: 1.2; letter-spacing: -0.3px; }
body.access-page .t-section,
body.access-page header.topbar h1 { font-size: var(--t-section-size); font-weight: var(--t-section-weight); line-height: 1.2; }
body.access-page .t-subsection { font-size: var(--t-subsection-size); font-weight: var(--t-subsection-weight); line-height: 1.3; }
body.access-page .t-label,
body.access-page header.topbar nav a,
body.access-page .access-field-label,
body.access-page .access-btn-submit,
body.access-page .access-btn-register { font-size: var(--t-label-size); font-weight: var(--t-label-weight); line-height: 1.3; }
body.access-page .t-body,
body.access-page .access-context,
body.access-page .access-input-wrap input,
body.access-page .access-feedback { font-size: var(--t-body-size); font-weight: var(--t-body-weight); line-height: 1.5; }
body.access-page .t-aux,
body.access-page .access-app-subtitle,
body.access-page .access-forgot a,
body.access-page .access-back a,
body.access-page .access-divider-text,
body.access-page footer.footer { font-size: var(--t-aux-size); font-weight: var(--t-aux-weight); line-height: 1.4; }

/* Topbar: secao da pagina (20/600) > links de navegacao (14/500). */
body.access-page header.topbar { box-sizing: border-box; height: 70px; min-height: 70px; padding: 8px 24px; gap: 16px; }
body.access-page header.topbar h1 { margin: 0; color: #fff; text-transform: uppercase; letter-spacing: 0.02em; }
body.access-page header.topbar nav { gap: 16px; text-transform: uppercase; letter-spacing: 0.02em; }
body.access-page header.topbar nav a { color: rgba(255, 255, 255, 0.88); }
body.access-page header.topbar nav a:hover,
body.access-page header.topbar nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Card: a marca (24/700) e o titulo principal; tudo abaixo e menor ou mais leve. */
body.access-page .access-main { width: 100%; max-width: 440px; margin: 0 auto; padding: 24px 16px 32px; }
body.access-page .access-login-card { padding: 24px 24px 16px; border-radius: 10px; border-top: 4px solid var(--t-accent); }
body.access-page .access-branding { margin: -24px -24px 24px; padding: 20px 16px; border-radius: 6px 6px 0 0; }
body.access-page .access-brand-head { gap: 8px; }
body.access-page .access-app-icon { width: 26px; height: 26px; }
body.access-page .access-app-name { color: #fff; }
body.access-page .access-app-subtitle { margin-top: 4px; color: rgba(255, 255, 255, 0.72); }
body.access-page .access-context { margin: 0 0 16px; color: var(--t-muted); }
body.access-page .access-field { margin-bottom: 16px; gap: 4px; }
body.access-page .access-field-label { color: var(--t-ink-2); }
body.access-page .access-input-wrap input { min-height: 44px; padding: 8px 36px; color: var(--t-ink); border: 1px solid var(--t-line); border-radius: 6px; }
body.access-page .access-input-wrap input::placeholder { color: var(--t-faint); font-weight: var(--t-body-weight); }
body.access-page .access-feedback { border-radius: 6px; }
body.access-page .access-btn-submit { min-height: 44px; padding: 12px; border: none; border-radius: 6px; color: #fff; background: linear-gradient(135deg, #1c3d59, var(--t-accent)); }
body.access-page .access-forgot { margin-top: 16px; }
body.access-page .access-forgot a { color: var(--t-accent); }
body.access-page .access-divider { margin: 20px 0; }
body.access-page .access-divider-text { color: var(--t-muted); text-transform: uppercase; letter-spacing: 0.06em; }
body.access-page .access-btn-register { min-height: 44px; padding: 10px; border: 2px solid var(--t-green); border-radius: 6px; color: var(--t-green-dark); background: transparent; }
body.access-page .access-btn-register:hover { background: var(--t-green); color: #fff; }
body.access-page .access-back { margin-top: 16px; }
body.access-page .access-back a { color: var(--t-muted); }
body.access-page footer.footer { padding: 16px 24px; color: var(--t-muted); background: #fff; border-top: 1px solid var(--t-line); }

/* Gestao: a marca da sidebar tambem fica na altura padrao (70px); uma regra
   antiga de .gestao-brand mais abaixo no arquivo sobrepunha padding/altura. */
.gestao-sidebar .gestao-brand,
.gestao-sidebar .sidebar-brand {
  box-sizing: border-box;
  height: 70px;
  min-height: 70px;
  padding: 0.4rem 24px;
  justify-content: center;
}

/* Gestao: a marca da sidebar e a mesma das demais telas — icone e slogan
   visiveis. Uma regra antiga (.gestao-sidebar .sidebar-brand-mark/-sub) os
   escondia quando a marca era "PLI" sobre "Reporta". */
.gestao-sidebar .sidebar-brand-mark { display: inline-flex; }
.gestao-sidebar .sidebar-brand-sub { display: block; }

/* ============================================================================
   GESTAO — estrutura fixa das paginas restritas
   ============================================================================ */
/* Cabecalho e barra de sessao grudados e fixos no topo, fora do scroll. */
.gestao-main > .gestao-header { position: sticky; top: 0; z-index: 30; }
.gestao-main > .adm-session-bar { position: sticky; top: 70px; z-index: 29; margin: 0; }

/* As abas que ficavam no conteudo viraram sub-itens do menu lateral. */
.gestao-view-tabs,
.policy-type-tabs { display: none !important; }

.gestao-nav-item.has-children::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.6;
  transition: transform 0.15s ease;
}
.gestao-nav-item.has-children[aria-expanded="true"]::after { transform: rotate(45deg); }

.gestao-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px;
  padding-left: calc(var(--space-lg) + 22px + var(--space-md));
}
.gestao-nav-subitem {
  display: block;
  padding: 7px var(--space-md);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.gestao-nav-subitem:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.gestao-nav-subitem.active {
  background: rgba(62, 194, 110, 0.14);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--pli-verde);
}

/* A marca da gestao segue a identidade fixa: icone e nome na MESMA linha.
   Uma regra antiga (.gestao-sidebar .sidebar-brand-head) empilhava em coluna. */
.gestao-sidebar .sidebar-brand-head {
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.45rem;
}

/* ============================================================================
   SIDEBAR DA AREA RESTRITA — mesmo visual da sidebar de gestao do Smart Router
   (referencia): gradiente navy, borda verde a direita, itens de 14px com barra
   verde quando ativos, sub-itens de 11px. Medidas em px (raiz 14px do SR).
   ============================================================================ */
.gestao-sidebar {
  --sidebar-green: #4ade80;
  background: linear-gradient(180deg, #003b5a 0%, #1c3d59 100%);
  border-right: 3px solid var(--sidebar-green);
  box-shadow: 2px 0 12px rgba(0, 59, 90, 0.15);
}
.gestao-sidebar .gestao-brand,
.gestao-sidebar .sidebar-brand {
  padding: 7px 15px;
  border-bottom: 3px solid #3ec26e;
  background: linear-gradient(135deg, #003b5a 0%, #1c3d59 100%);
}
.gestao-sidebar .gestao-nav { flex: 1; padding: 17px 10px; display: flex; flex-direction: column; gap: 4px; }
.gestao-sidebar .gestao-nav-item {
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.gestao-sidebar .gestao-nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.gestao-sidebar .gestao-nav-item.active { background: rgba(62, 194, 110, 0.18); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--sidebar-green); }
.gestao-sidebar .gestao-nav-icon,
.gestao-sidebar .gestao-nav-icon svg { width: 16px; height: 16px; }
.gestao-sidebar .gestao-nav-icon { color: var(--sidebar-green); }
.gestao-sidebar .gestao-nav-item.has-children::after {
  width: 6px; height: 6px; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0.55; margin-top: -3px;
}
.gestao-sidebar .gestao-nav-item.has-children[aria-expanded="true"]::after { transform: rotate(225deg); margin-top: 3px; }
.gestao-sidebar .gestao-nav-sub {
  gap: 2px;
  padding: 4px 0 5px 9px;
  margin: 0 0 2px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.gestao-sidebar .gestao-nav-subitem {
  padding: 6px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11.2px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: none;
}
.gestao-sidebar .gestao-nav-subitem:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.gestao-sidebar .gestao-nav-subitem.active { background: rgba(62, 194, 110, 0.14); color: #fff; box-shadow: inset 3px 0 0 var(--sidebar-green); }
.gestao-sidebar .gestao-sidebar-foot { padding: 17px 10px 21px; border-top: 1px solid rgba(255, 255, 255, 0.07); gap: 7px; }
.gestao-sidebar .gestao-sidebar-foot .sidebar-credit { margin: 0; font-size: 10px; line-height: 1.5; color: rgba(255, 255, 255, 0.55); border: 0; padding: 0; }

/* ============================================================================
   BARRA DE SESSAO — padrao unico do ecossistema (identico nas 3 apps).
   Altura, fonte e cores da barra do HazardTrack; "Sair" no estilo do painel
   de gestao do Reporta (texto sublinhado, sem borda). Medidas em px.
   ============================================================================ */
body .adm-session-bar.adm-session-bar {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 19px;
  background: #f1f5f9;
  color: #003b5a;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.6px;
  line-height: 1.2;
  box-shadow: none;
}
body .adm-session-bar .adm-session-user { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; font-size: 13.6px; }
body .adm-session-bar .adm-session-user strong { font-size: 13.6px; font-weight: 700; color: #003b5a; overflow: hidden; text-overflow: ellipsis; }
body .adm-session-bar .adm-session-status { width: 8px; height: 8px; border-radius: 50%; background: #3ec26e; box-shadow: 0 0 0 2px rgba(62, 194, 110, 0.18); flex: 0 0 auto; }
body .adm-session-bar .adm-session-username { color: #475569; font-weight: 500; font-size: 13.6px; }
body .adm-session-bar .adm-session-role { padding: 1px 8px; border: 1px solid rgba(62, 194, 110, 0.45); border-radius: 999px; color: #2fa854; background: #e5f6ec; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; flex: 0 0 auto; }
body .adm-session-bar .adm-session-form { margin: 0; }
body .adm-session-bar .adm-session-logout.adm-session-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #1c3d59;
  font: inherit;
  font-size: 13.6px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
body .adm-session-bar .adm-session-logout.adm-session-logout svg { width: 14px; height: 14px; }
body .adm-session-bar .adm-session-logout.adm-session-logout:hover { color: #2fa854; background: none; border: none; }

/* ============================================================================
   MARCA NAS SIDEBARS — layout em grade: icone a esquerda ocupando a altura das
   duas linhas; nome e complemento em coluna, alinhados a esquerda e comecando
   no mesmo ponto (referencia: logo do SICARD). O cabecalho da marca vira
   display: contents para que icone, nome e complemento entrem na mesma grade.
   ============================================================================ */

.public-sidebar .sidebar-brand,
.gestao-sidebar .sidebar-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.45em;
  row-gap: 0.1em;
  align-items: center;
  align-content: center;
  justify-content: start;
  text-align: left;
}
.sidebar-brand .sidebar-brand-link,
.sidebar-brand .sidebar-brand-head { display: contents; }
.sidebar-brand .sidebar-brand-mark { grid-column: 1; grid-row: 1 / span 2; width: 1.8em; height: 1.8em; align-self: center; }
.sidebar-brand .sidebar-brand-name { grid-column: 2; grid-row: 1; align-self: end; }
.sidebar-brand .sidebar-brand-sub { grid-column: 2; grid-row: 2; align-self: start; margin: 0; padding: 0; text-align: left; }

/* Ajuste fino: icone 1.6em e gap menor para o slogan caber na sidebar de 240px. */
.public-sidebar .sidebar-brand, .gestao-sidebar .sidebar-brand { column-gap: 0.35em; padding-left: 12px; padding-right: 12px; }
.sidebar-brand .sidebar-brand-mark { width: 1.6em; height: 1.6em; }

/* Icone com a altura exata das duas linhas (nome + complemento). */
.sidebar-brand .sidebar-brand-mark { width: auto; height: 100%; aspect-ratio: 1 / 1; align-self: stretch; }
.sidebar-brand .sidebar-brand-mark svg { width: 100%; height: 100%; }

/* Icone = altura das duas linhas: 1.1em (nome) + 0.1em (gap) + 0.59em (complemento). */
.sidebar-brand .sidebar-brand-mark { width: 1.79em; height: 1.79em; aspect-ratio: auto; align-self: center; }

/* Login: topbar so com a navegacao (sem titulo), alinhada a direita e um pouco menor. */
body.access-page header.topbar { justify-content: flex-end; }
body.access-page header.topbar nav a { font-size: 13px; font-weight: 500; }

/* Barra de sessao: fonte de 12px, sempre abaixo do titulo (>=18px) e do complemento (13px) do cabecalho. */
body .adm-session-bar.adm-session-bar { font-size: 12px; }
body .adm-session-bar .adm-session-user,
body .adm-session-bar .adm-session-user strong,
body .adm-session-bar .adm-session-username,
body .adm-session-bar .adm-session-logout.adm-session-logout { font-size: 12px; }
body .adm-session-bar .adm-session-role { font-size: 10px; }

/* ============================================================================
   TIPOGRAFIA DAS SIDEBARS RESTRITAS — padrao unico das 3 apps (Inter, px):
   item 14/500 #fff · sub-item 12/500 rgba(255,255,255,.78) · grupo 10/700
   maiusculo rgba(255,255,255,.45) · credito 10/400 rgba(255,255,255,.55).
   ============================================================================ */
.gestao-sidebar { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
.gestao-sidebar .gestao-nav-item { font-family: inherit; font-size: 14px; font-weight: 500; color: #fff; line-height: 1.3; }
.gestao-sidebar .gestao-nav-item.active { color: #fff; font-weight: 600; }
.gestao-sidebar .gestao-nav-subitem { font-family: inherit; font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.78); line-height: 1.35; }
.gestao-sidebar .gestao-nav-subitem.active { color: #fff; font-weight: 600; }
.gestao-sidebar .gestao-nav-group-label { font-family: inherit; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.gestao-sidebar .sidebar-credit { font-family: inherit; font-size: 10px; font-weight: 400; line-height: 1.5; color: rgba(255, 255, 255, 0.55); }

/* Topbar do login: mesma fonte dos menus do cabecalho da home do PLI Reporta
   (fonte do sistema, 13px, 600, maiusculas, espacamento 0.04em). */
body.access-page header.topbar nav a { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* ============================================================================
   HOME (Reportar) DENTRO DO SHELL PUBLICO — mesma sidebar do mapa e da API.
   Coluna da direita: cabecalho do app + conteudo rolavel + rodape.
   ============================================================================ */
body.public-shell-page.report-page .report-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
}
body.public-shell-page.report-page .public-shell-main {
  flex: 1 1 auto;
  min-height: 0;
}
body.public-shell-page.report-page footer.footer {
  flex-shrink: 0;
  margin-top: 0;
}
body.public-shell-page.report-page .pli-app-header-left { min-width: 2rem; }
body.public-shell-page.report-page .pli-app-header .queue-badge { position: static; }
body.public-shell-page.report-page .pli-app-header .queue-badge:not([hidden]) { display: inline-block; }

/* Celular: sidebar vira uma faixa no topo com o menu em linha; o conteudo
   rola na pagina. */
@media (max-width: 768px) {
  body.public-shell-page.report-page { grid-template-columns: 1fr; }
  body.public-shell-page.report-page .public-sidebar { height: auto; position: static; overflow: visible; }
  body.public-shell-page.report-page .public-sidebar .public-sidebar-scroll { display: flex; overflow: visible; }
  body.public-shell-page.report-page .public-sidebar .public-sidebar-block { flex: 1 1 0; border-bottom: none; padding: 6px; }
  body.public-shell-page.report-page .public-sidebar .public-nav-item { justify-content: center; padding: 8px 4px; font-size: 12px; }
  body.public-shell-page.report-page .public-sidebar-foot { display: none; }
  body.public-shell-page.report-page .report-shell { height: auto; min-height: calc(100vh - 118px); }
  body.public-shell-page.report-page .public-shell-main { overflow: visible; }
}

/* Celular: cabecalho do app compacto — titulo menor e "Acesso Restrito" em uma linha. */
@media (max-width: 768px) {
  body.public-shell-page.report-page .pli-app-header { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  body.public-shell-page.report-page .pli-app-header-title { font-size: 1rem; white-space: nowrap; }
  body.public-shell-page.report-page .pli-app-header-access { white-space: nowrap; font-size: 11px; padding: 6px 8px; }
}
