/* ============================================================================= */
/* Crescer — Design System v2.1 (estrutura gov.br + identidade Vivver)          */
/* Tokens (--crescer-*) + componentes base + shell (header + menu) + login.      */
/* Valores do Padrão Digital de Governo: @govbr-ds/core 3.7.0                    */
/* (dist/core-tokens.css e os _mixins.scss de src/components, MIT/SERPRO).       */
/* v2.1 (13/11/2026, decisão do P.O.): a IDENTIDADE é da Vivver, para a app não */
/* parecer sistema do governo — cor (azul #0066A1 + verde #269922 da logo VIVER),*/
/* fonte (Inter + Montserrat), botão 6px em vez de pílula e foco sólido azul.    */
/* Medidas, espaçamento, contraste e anatomia continuam os do gov.br.            */
/* O nome do token gov.br de origem vai em comentário ao lado de cada valor.     */
/* Classes e tokens mantêm o prefixo crescer-: apps v1 migram trocando o CSS.    */
/* ============================================================================= */

:root {
  /* --- Superfícies e texto ------------------------------------------------- */
  --crescer-bg:            #F8F8F8;  /* gray-2 — canvas do shell */
  --crescer-surface:       #FFFFFF;  /* pure-0 (background) */
  --crescer-surface-2:     #F0F0F0;  /* gray-5 (background-alternative) */
  --crescer-border:        #CCCCCC;  /* gray-20 (border-color) */
  --crescer-border-strong: #888888;  /* gray-40 (border-color-alternative) — borda de campo, 3,5:1 */
  --crescer-text:          #333333;  /* gray-80 (color-light) — 12,6:1 */
  --crescer-text-soft:     #555555;  /* gray-70 — 7,5:1 */
  --crescer-text-faint:    #636363;  /* gray-60 — 6,0:1 */

  /* --- Marca / interação --------------------------------------------------- */
  --crescer-brand:        #0066A1;  /* azul da logo VIVER (interactive, primary) — 6,1:1 c/ branco */
  --crescer-brand-light:  #2887BD;  /* VIVER, mesmo matiz (h 202°) mais claro — bordas de destaque */
  --crescer-brand-dark:   #004770;  /* VIVER escuro (active) — hover/ativo, 9,8:1 c/ branco */
  --crescer-brand-darker: #002A42;  /* VIVER mais escuro (background-dark) */
  --crescer-brand-soft:   #D8ECF8;  /* VIVER claro — fundo de realce */
  --crescer-hover:        rgba(0, 102, 161, .16);  /* interactive × surface-opacity-xs */
  --crescer-pressed:      rgba(0, 102, 161, .45);  /* interactive × surface-opacity-md */
  --crescer-accent:       #269922;  /* verde da logo VIVER — só detalhe de marca; 3,7:1, nunca texto sobre branco */
  --crescer-accent-dark:  #1B6C18;  /* verde VIVER escuro — quando o verde vira texto, ou fundo de texto branco: 6,6:1 */
  --crescer-secondary:    #555555;  /* gray-70 */
  --crescer-dark:         #002A42;  /* background-dark — superfícies escuras (tooltip usa --crescer-info) */
  --crescer-on-dark:      #E0EAF0;  /* VIVER claro — texto secundário sobre --crescer-dark */
  --crescer-on-dark-soft: #C4D8E3;  /* VIVER claro — texto terciário sobre --crescer-dark */
  --crescer-switch-on:    #5CA9D6;  /* VIVER claro (on) — botão do switch ligado */
  --crescer-violet-bg:    #EDE3FF;  /* violet-vivid-10 */
  --crescer-violet-text:  #54278F;  /* violet-vivid-70 — 8,3:1 sobre o -bg */
  --crescer-ai-soft:      #EFF6FB;  /* VIVER 5% — topo da superfície de IA */
  --crescer-focus:        #0066A1;  /* azul VIVER — contorno sólido (o tracejado dourado é assinatura gov.br) */

  /* --- Semânticas: cor (fill/borda/ícone) + fundo + texto sobre o fundo ---- */
  --crescer-ok:     #168821;  --crescer-ok-bg:     #E3F5E1;  --crescer-ok-text:     #216E1F;  /* green-cool-vivid-50/5/60 */
  --crescer-warn:   #FFCD07;  --crescer-warn-bg:   #FFF5C2;  --crescer-warn-text:   #5C4809;  /* yellow-vivid-20/5/70 */
  --crescer-danger: #E52207;  --crescer-danger-bg: #FDE0DB;  --crescer-danger-text: #B50909;  /* red-vivid-50/10/60 */
  --crescer-info:   #0066A1;  --crescer-info-bg:   #D8ECF8;  --crescer-info-text:   #004770;  /* família VIVER (= brand/soft/dark) */

  /* --- Menu lateral claro (br-menu) ---------------------------------------- */
  --crescer-sb-bg:     #FFFFFF;  /* background */
  --crescer-sb-sub:    #F8F8F8;  /* gray-2 — fundo do submenu */
  --crescer-sb-hover:  var(--crescer-hover);
  --crescer-sb-active: #004770;  /* active */
  --crescer-sb-text:   #333333;
  --crescer-sb-muted:  #555555;
  --crescer-sb-accent: #0066A1;

  /* --- Forma, borda, sombra ------------------------------------------------ */
  --crescer-radius-sm:   4px;      /* surface-rounder-sm — campo, tag, card de mensagem */
  --crescer-radius:      8px;      /* surface-rounder-md */
  --crescer-radius-lg:   16px;     /* surface-rounder-lg */
  --crescer-radius-pill: 999em;    /* surface-rounder-pill — trilhas, switch, contador */
  --crescer-radius-ctl:  6px;      /* botão, upload, paginação (a pílula é assinatura gov.br) */
  --crescer-shadow-card:  0 1px 6px rgba(0, 0, 0, .16);  /* surface-shadow-sm */
  --crescer-shadow-hover: 0 3px 6px rgba(0, 0, 0, .16);  /* surface-shadow-md */
  --crescer-shadow-modal: 0 6px 6px rgba(0, 0, 0, .16);  /* surface-shadow-lg */
  --crescer-shadow-xl:    0 9px 6px rgba(0, 0, 0, .16);  /* surface-shadow-xl */

  /* --- Espaçamento (spacing-scale-*) --------------------------------------- */
  --crescer-sp-half: 4px;  --crescer-sp-1: 8px;   --crescer-sp-1h: 12px; --crescer-sp-2: 16px;
  --crescer-sp-2h: 20px;   --crescer-sp-3: 24px;  --crescer-sp-4: 32px;  --crescer-sp-5: 40px;
  --crescer-sp-6: 48px;    --crescer-sp-8: 64px;

  /* --- Tipografia (font-size-scale-*, razão 1,2 sobre 14px) ---------------- */
  /* Identidade Vivver: Inter no texto (legível em tabela e número) e Montserrat nos títulos
     (geométrica, próxima da logo VIVER). A Rawline/Raleway do gov.br saiu por ser assinatura dele. */
  --crescer-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --crescer-font-display: "Montserrat", var(--crescer-font);
  --crescer-fs-down-01: 11.662px;
  --crescer-fs-base:    14px;
  --crescer-fs-up-01:   16.8px;
  --crescer-fs-up-02:   20.16px;
  --crescer-fs-up-03:   24.192px;
  --crescer-fs-up-04:   29.036px;
  --crescer-fs-up-05:   34.832px;

  /* --- Controles (button/input medium/small/large) ------------------------- */
  --crescer-ctl-h:    40px;
  --crescer-ctl-h-sm: 32px;
  --crescer-ctl-h-lg: 48px;

  /* --- Layout --------------------------------------------------------------- */
  --crescer-sidebar-w:      264px;
  --crescer-sidebar-w-rail: 64px;
  --crescer-header-top-h:   64px;   /* logo 40px + 12px de cada lado */
  --crescer-header-bottom-h: 52px;
  --crescer-header-h: calc(var(--crescer-header-top-h) + var(--crescer-header-bottom-h) + 1px);

  /* --- Gradiente de IA (identidade Crescer, sem equivalente gov.br) + séries */
  --crescer-ai-grad: linear-gradient(90deg, #0066A1, #783CB9);  /* azul VIVER → violet-vivid-60 */
  --crescer-cat-1: #0066A1; --crescer-cat-2: #36A191; --crescer-cat-3: #C05600; --crescer-cat-4: #783CB9;
  --crescer-cat-5: #C72487; --crescer-cat-6: #168821; --crescer-cat-7: #DB4800;
  /* azul VIVER, support-01, orange-vivid-50, violet-vivid-60, support-07, green-cool-vivid-50, support-03 */
  /* Escala sequencial (heatmap, coroplético), fraco → forte: família VIVER (h 202°) */
  --crescer-seq-0: #EFF6FB; --crescer-seq-1: #D8ECF8; --crescer-seq-2: #8DC3E2; --crescer-seq-3: #2887BD; --crescer-seq-4: #004770;
}

* { box-sizing: border-box; }

body.crescer-body {
  margin: 0;
  background: var(--crescer-bg);
  color: var(--crescer-text);
  font-family: var(--crescer-font);
  font-size: var(--crescer-fs-base);
  line-height: 1.45;                      /* font-line-height-medium */
  /* Algarismo alinhado garantido mesmo se a fonte cair num fallback old-style (a Raleway do
     v2 fazia "0" virar "o"). font-feature-settings, e não font-variant-numeric: um
     `tabular-nums` num descendente SUBSTITUIRIA o lining-nums; a feature herdada se soma. */
  font-feature-settings: "lnum" 1;
  -webkit-font-smoothing: antialiased;
}
/* Controles de formulário não herdam fonte por padrão: sem isso, placeholder e data
   saem na fonte do sistema ou com algarismo old-style. Especificidade zero. */
:where(.crescer-body) :where(input, select, textarea, button) { font-family: inherit; font-feature-settings: inherit; }

/* Cor padrão de link. Envolvida em :where() para ter especificidade ZERO: qualquer
   classe do markup (um .crescer-btn, ou um utilitário do Tailwind como .text-white)
   vence sem precisar de !important. */
:where(a) { color: var(--crescer-brand); text-decoration: none; }
:where(a:hover) { color: var(--crescer-brand-dark); text-decoration: underline; }

/* Títulos na fonte de display (Montserrat). Especificidade zero: a app sobrescreve à vontade. */
:where(.crescer-header__title, .crescer-topbar__title h1, .crescer-card__head h2, .crescer-empty h3,
       .crescer-modal__head h2, .crescer-auth__brand h1, .crescer-login__tagline, .crescer-login__title,
       .crescer-prose h1, .crescer-prose h2, .crescer-prose h3) { font-family: var(--crescer-font-display); }

/* Foco Vivver: contorno sólido de 2px na cor de marca, afastado 2px (WCAG 2.4.7). */
:focus-visible { outline: 2px solid var(--crescer-focus); outline-offset: 2px; }

/* Link "pular para o conteúdo" (br-skiplink): invisível até receber foco. */
.crescer-skiplink {
  position: fixed; top: 8px; left: 8px; z-index: 4000; transform: translateY(-200%);
  padding: 12px 16px; background: var(--crescer-surface); color: var(--crescer-brand);
  font-weight: 600; box-shadow: var(--crescer-shadow-modal); transition: transform .15s ease-out;
}
.crescer-skiplink:focus { transform: none; }

/* ============================================================================= */
/* SHELL — header no topo + menu lateral + main                                  */
/* Layout v2: header full-width (.crescer-header) acima de sidebar + main.       */
/* Layout v1 (sidebar com marca + topbar dentro do main) continua funcionando.   */
/* ============================================================================= */
.crescer-shell {
  display: grid; grid-template-columns: var(--crescer-sidebar-w) 1fr; min-height: 100vh;
  transition: grid-template-columns .2s ease;
}
.crescer-shell:has(> .crescer-header) {
  grid-template-columns: var(--crescer-sidebar-w) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "header header" "menu main";
}
.crescer-shell > .crescer-header { grid-area: header; }
.crescer-shell:has(> .crescer-header) > .crescer-sidebar { grid-area: menu; top: var(--crescer-header-h); height: calc(100vh - var(--crescer-header-h)); }
.crescer-shell:has(> .crescer-header) > .crescer-main { grid-area: main; }

/* --- Header (br-header) ---------------------------------------------------- */
.crescer-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--crescer-surface); box-shadow: var(--crescer-shadow-card);
}
.crescer-header__top {
  display: flex; align-items: center; gap: var(--crescer-sp-2);
  height: var(--crescer-header-top-h); padding: 0 var(--crescer-sp-3);
}
.crescer-header__logo { display: flex; align-items: center; gap: var(--crescer-sp-2); min-width: 0; color: var(--crescer-brand); text-decoration: none; }
.crescer-header__logo:hover { text-decoration: none; }
.crescer-header__logo .crescer-logo, .crescer-header__logo img { max-height: 40px; width: auto; flex: none; }
.crescer-header__divider { width: 1px; align-self: stretch; margin: 12px 0; background: var(--crescer-border); flex: none; }
.crescer-header__sign {
  font-size: var(--crescer-fs-base); font-weight: 500; color: var(--crescer-text-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crescer-header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--crescer-sp-1); }
.crescer-header__links { display: flex; align-items: center; gap: var(--crescer-sp-2); font-size: var(--crescer-fs-base); }
.crescer-header__links a { font-weight: 500; }
.crescer-header__sep { width: 1px; height: 24px; background: var(--crescer-border); margin: 0 var(--crescer-sp-1); }

.crescer-header__bottom {
  display: flex; align-items: center; gap: var(--crescer-sp-2);
  height: var(--crescer-header-bottom-h); padding: 0 var(--crescer-sp-3) var(--crescer-sp-1);
}
.crescer-header__menu-trigger { flex: none; }
.crescer-header__info { min-width: 0; flex: 1 1 auto; }
.crescer-header__title {
  margin: 0; font-size: var(--crescer-fs-up-03); font-weight: 600; line-height: 1.15; color: var(--crescer-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crescer-header__subtitle { margin: 2px 0 0; font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crescer-header__search { flex: 0 1 385px; min-width: 200px; }
.crescer-header__search .crescer-input { width: 100%; min-width: 0; background: var(--crescer-surface-2); border-color: transparent; }

/* Usuário logado no header (br-header .header-login / avatar) */
.crescer-header__user { display: flex; align-items: center; gap: var(--crescer-sp-1); padding: 4px 8px 4px 4px; border-radius: var(--crescer-radius-pill); color: var(--crescer-text); text-decoration: none; }
.crescer-header__user:hover { background: var(--crescer-hover); color: var(--crescer-text); text-decoration: none; }
.crescer-header__user-info { line-height: 1.2; text-align: left; }
.crescer-header__user-info b { display: block; font-size: var(--crescer-fs-base); font-weight: 600; }
.crescer-header__user-info span { display: block; font-size: var(--crescer-fs-down-01); color: var(--crescer-text-soft); }

/* --- Menu lateral claro (br-menu, modo push com rail) ---------------------- */
.crescer-sidebar {
  display: flex; flex-direction: column;
  background: var(--crescer-sb-bg); color: var(--crescer-sb-text);
  padding: var(--crescer-sp-1) 0 var(--crescer-sp-2);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--crescer-border);
  transition: padding .2s ease;
}
.crescer-sidebar::-webkit-scrollbar { width: 6px; }
.crescer-sidebar::-webkit-scrollbar-thumb { background: var(--crescer-border); border-radius: 3px; }
.crescer-sidebar::-webkit-scrollbar-thumb:hover { background: var(--crescer-border-strong); }

/* Marca dentro da sidebar — só no layout v1 (no v2 a marca mora no header). */
.crescer-brand {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: var(--crescer-sp-1) var(--crescer-sp-2) var(--crescer-sp-2); margin-bottom: var(--crescer-sp-1);
  border-bottom: 1px solid var(--crescer-border);
}
.crescer-brand__txt { min-width: 0; }
.crescer-brand__mark {
  width: 40px; height: 40px; border-radius: var(--crescer-radius); flex: none;
  background: var(--crescer-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.crescer-brand__name { font-weight: 700; font-size: var(--crescer-fs-up-01); color: var(--crescer-text); line-height: 1.15; }
.crescer-brand__sub  { font-size: var(--crescer-fs-down-01); color: var(--crescer-sb-muted); margin-top: 2px; }

.crescer-nav-wrap { flex: 1 1 auto; }
.crescer-nav { list-style: none; margin: 0; padding: 0; }
.crescer-nav__section { font-size: var(--crescer-fs-down-01); font-weight: 600; color: var(--crescer-sb-muted); margin: var(--crescer-sp-2) var(--crescer-sp-2) var(--crescer-sp-half); }
.crescer-nav li { margin: 0; }
/* Item (br-menu .menu-item, densidade small: 8px × 16px) */
.crescer-nav a {
  position: relative; display: flex; align-items: center; gap: var(--crescer-sp-2);
  min-height: var(--crescer-ctl-h); padding: var(--crescer-sp-1) var(--crescer-sp-2);
  color: var(--crescer-sb-text); font-weight: 400; font-size: var(--crescer-fs-base); line-height: 1.3;
  text-decoration: none; transition: background-color .1s ease, color .1s ease;
}
.crescer-nav a .ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: var(--crescer-sb-accent); flex: none; }
.crescer-nav a:hover { background: var(--crescer-sb-hover); color: var(--crescer-sb-text); text-decoration: none; }
.crescer-nav a.is-active { background: var(--crescer-sb-active); color: #fff; font-weight: 600; }
.crescer-nav a.is-active .ico { color: #fff; }

/* NAV EM ÁRVORE — seções recolhíveis (br-menu .menu-folder). Cada seção é um
   <details name="crescer-nav">: o `name` compartilhado faz o acordeão nativo
   (abrir uma fecha as outras), sem JS. Quem decide a seção aberta é o servidor (a que
   contém a página atual). 3º nível: .crescer-nav-group--sub com `name` próprio do pai. */
.crescer-nav-group { margin: 0; border-bottom: 1px solid var(--crescer-border); }
.crescer-nav-group__head {
  list-style: none; cursor: pointer; user-select: none; position: relative;
  display: flex; align-items: center; gap: var(--crescer-sp-2); min-height: var(--crescer-ctl-h-lg);
  padding: var(--crescer-sp-1) var(--crescer-sp-2);
  color: var(--crescer-sb-text); font-size: var(--crescer-fs-base); font-weight: 600;
  transition: background-color .1s ease;
}
.crescer-nav-group__head::-webkit-details-marker { display: none; }
.crescer-nav-group__head::marker { content: ""; }
.crescer-nav-group__head .ico {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: none; color: var(--crescer-sb-accent);
}
.crescer-nav-group__label { flex: 1 1 auto; min-width: 0; }
.crescer-nav-group__chev { flex: none; display: inline-flex; color: var(--crescer-sb-accent); transition: transform .2s ease; }
.crescer-nav-group[open] > .crescer-nav-group__head .crescer-nav-group__chev { transform: rotate(90deg); }
.crescer-nav-group__head:hover { background: var(--crescer-sb-hover); }
/* Foco para DENTRO: a sidebar rola e cortaria um contorno externo. */
.crescer-sidebar :is(.crescer-nav-group__head, .crescer-nav a):focus-visible { outline-offset: -2px; }

/* Seção que contém a página atual: rótulo em azul; fechada, ganha um ponto
   (forma, não só cor). Sem :has() o realce apenas não aparece. */
.crescer-nav-group:has(> .crescer-nav-group__items [aria-current="page"]) > .crescer-nav-group__head { color: var(--crescer-brand); }
.crescer-nav-group:not([open]):has(> .crescer-nav-group__items [aria-current="page"]) > .crescer-nav-group__head .ico::after {
  content: ""; position: absolute; top: -2px; right: -4px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--crescer-brand); box-shadow: 0 0 0 2px var(--crescer-sb-bg);
}

/* Filhos: fundo de submenu (gray-2) e recuo de 40px (br-menu .drop-menu). */
.crescer-nav-group__items { margin: 0; padding: 0 0 var(--crescer-sp-1); background: var(--crescer-sb-sub); }
.crescer-nav-group__items a { padding-left: var(--crescer-sp-5); }

/* 3º nível (opcional): grupo dentro de uma seção, com tipografia de item */
.crescer-nav-group--sub { border-bottom: 0; }
.crescer-nav-group--sub > .crescer-nav-group__head { min-height: var(--crescer-ctl-h); padding-left: var(--crescer-sp-5); font-weight: 400; }
.crescer-nav-group--sub > .crescer-nav-group__items a { padding-left: calc(var(--crescer-sp-5) + var(--crescer-sp-3)); }

/* Animação de altura só onde há suporte e sem redução de movimento. Nada de
   @keyframes no [open]: a seção ativa já vem aberta do servidor e piscaria a cada
   navegação do Turbo; transition não dispara na renderização inicial. */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) and selector(::details-content) {
    .crescer-nav-group { interpolate-size: allow-keywords; }
    .crescer-nav-group::details-content {
      block-size: 0; overflow: clip;
      transition: block-size .2s ease, content-visibility .2s allow-discrete;
    }
    .crescer-nav-group[open]::details-content { block-size: auto; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .crescer-nav-group__chev { transition: none; }
}

/* Botão de recolher para "rail" (layout v1; no v2 o gatilho é o botão de menu do header) */
.crescer-rail-toggle {
  margin-left: auto; flex: none; width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--crescer-brand);
  border: 0; border-radius: 50%; cursor: pointer;
  transition: background-color .1s ease;
}
.crescer-rail-toggle:hover { background: var(--crescer-hover); }
/* O ícone gira para indicar o estado. Agnóstico de biblioteca: pega o SVG do kit
   (.crescer-ico), um <svg> solto ou um <i> de icon-font (FontAwesome). */
.crescer-rail-toggle > :is(.crescer-ico, svg, i) { transition: transform .2s ease; transform: rotate(180deg); }

/* Card do operador no rodapé da sidebar (layout v1; no v2 o usuário fica no header) */
.crescer-sidebar__foot { margin-top: var(--crescer-sp-2); padding: var(--crescer-sp-1h) var(--crescer-sp-1) 0; border-top: 1px solid var(--crescer-border); }
.crescer-op-card { display: flex; align-items: center; gap: 10px; padding: var(--crescer-sp-1); border-radius: var(--crescer-radius); }
.crescer-op-card:hover { background: var(--crescer-hover); }
.crescer-op-card__avatar, .crescer-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;           /* avatar small (40px) */
  display: flex; align-items: center; justify-content: center;
  font-size: var(--crescer-fs-up-01); font-weight: 700;
  color: var(--crescer-brand-dark); background: var(--crescer-brand-soft);
}
.crescer-op-card__info { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.crescer-op-card__info b { display: block; font-size: var(--crescer-fs-base); color: var(--crescer-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crescer-op-card__info span { display: block; font-size: var(--crescer-fs-down-01); color: var(--crescer-sb-muted); text-transform: capitalize; }
.crescer-op-card__sair {
  flex: none; width: 32px; height: 32px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--crescer-brand); border: 0; border-radius: 50%;
}
.crescer-op-card__sair:hover { background: var(--crescer-danger-bg); color: var(--crescer-danger-text); }

/* Scrim (fundo escurecido) do off-canvas no mobile (br-menu .menu-scrim) */
.crescer-scrim {
  display: none; position: fixed; inset: 0; z-index: 55; border: 0; padding: 0;
  background: rgba(0, 0, 0, .45); cursor: pointer; -webkit-appearance: none; appearance: none;
}

/* --- Main / topbar (v1) / content ------------------------------------------ */
.crescer-main { display: flex; flex-direction: column; min-width: 0; }

.crescer-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--crescer-sp-2);
  padding: var(--crescer-sp-1h) var(--crescer-sp-3); background: var(--crescer-surface); box-shadow: var(--crescer-shadow-card);
  position: sticky; top: 0; z-index: 20;
}
.crescer-topbar__title h1 { margin: 0; font-size: var(--crescer-fs-up-02); font-weight: 600; }
.crescer-topbar__title p  { margin: 2px 0 0; font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); }
.crescer-topbar__right { display: flex; align-items: center; gap: var(--crescer-sp-2); }
.crescer-topbar__meta { display: flex; align-items: center; gap: 10px; font-size: var(--crescer-fs-down-01); color: var(--crescer-text-faint); }
.crescer-user-link { display: flex; align-items: center; gap: var(--crescer-sp-1h); text-decoration: none; color: inherit; border-radius: var(--crescer-radius-pill); padding: 4px 4px 4px 12px; margin: -4px; }
.crescer-user-link:hover { background: var(--crescer-hover); text-decoration: none; color: inherit; }
.crescer-user { text-align: right; line-height: 1.25; }
.crescer-user b { font-size: var(--crescer-fs-base); font-weight: 600; }
.crescer-user span { display: block; font-size: var(--crescer-fs-down-01); color: var(--crescer-text-soft); }
/* Breadcrumb (br-breadcrumb): 11,66px peso 500, separador cinza */
.crescer-breadcrumb { font-size: var(--crescer-fs-down-01); font-weight: 500; color: var(--crescer-text-soft); margin-bottom: 2px; }
.crescer-breadcrumb b { color: var(--crescer-text); font-weight: 600; }
.crescer-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crescer-ok); display: inline-block; }
.crescer-status-dot--off { background: var(--crescer-text-faint); }
#crescer-menu-toggle { display: none; }

.crescer-content { padding: var(--crescer-sp-3) var(--crescer-sp-5) var(--crescer-sp-6); animation: crescer-fade .18s ease; }
@keyframes crescer-fade { from { opacity: .5; } to { opacity: 1; } }
.crescer-content-actions { display: flex; justify-content: flex-end; gap: var(--crescer-sp-1); margin-bottom: var(--crescer-sp-2); }

/* ============================================================================= */
/* BOTÕES (br-button): pílula, 40px, 16,8px semibold, padding 24px               */
/* ============================================================================= */
.crescer-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--crescer-sp-1);
  height: var(--crescer-ctl-h); padding: 0 var(--crescer-sp-3); border-radius: var(--crescer-radius-ctl);
  border: 1px solid transparent; font-family: inherit; font-weight: 600; font-size: var(--crescer-fs-up-01);
  cursor: pointer; line-height: 1; white-space: nowrap; text-decoration: none;
  background: transparent; color: var(--crescer-brand);
  transition: background-color .1s ease, border-color .1s ease, color .1s ease;
}
.crescer-btn:hover { text-decoration: none; box-shadow: none; background-image: linear-gradient(var(--crescer-hover), var(--crescer-hover)); }
.crescer-btn:active { background-image: linear-gradient(var(--crescer-pressed), var(--crescer-pressed)); }
.crescer-btn:disabled, .crescer-btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
/* primary: fundo interactive (#0066A1 VIVER, 6,1:1 com branco) */
.crescer-btn--primary { background-color: var(--crescer-brand); color: #fff; }
.crescer-btn--primary:hover { background-color: var(--crescer-brand); color: #fff; background-image: linear-gradient(rgba(0,0,0,.16), rgba(0,0,0,.16)); }
/* ghost = secondary do gov.br: fundo claro com borda azul */
.crescer-btn--ghost { background-color: var(--crescer-surface); color: var(--crescer-brand); border-color: var(--crescer-brand); }
.crescer-btn--ghost:hover { color: var(--crescer-brand); }
/* tertiary do gov.br: só texto (sem borda) */
.crescer-btn--text { background-color: transparent; color: var(--crescer-brand); }
.crescer-btn--ok { background-color: var(--crescer-ok); color: #fff; }
.crescer-btn--ok:hover, .crescer-btn--danger:hover { color: #fff; background-image: linear-gradient(rgba(0,0,0,.16), rgba(0,0,0,.16)); }
.crescer-btn--danger { background-color: var(--crescer-danger); color: #fff; }
.crescer-btn--ia { background: var(--crescer-ai-grad); color: #fff; border-color: transparent; }
.crescer-btn--ia:hover { filter: brightness(1.08); color: #fff; }
.crescer-btn--sm { height: var(--crescer-ctl-h-sm); padding: 0 var(--crescer-sp-2); font-size: var(--crescer-fs-base); }
.crescer-btn--lg { height: var(--crescer-ctl-h-lg); }
.crescer-btn--block { width: 100%; }
/* Botão de ícone: circular (br-button circle) */
.crescer-btn--icon {
  padding: 0; width: var(--crescer-ctl-h); height: var(--crescer-ctl-h); border-radius: 50%;
  background-color: transparent; border: 0; color: var(--crescer-brand);
}
.crescer-btn--icon.crescer-btn--sm { width: var(--crescer-ctl-h-sm); height: var(--crescer-ctl-h-sm); }
.crescer-btn.is-loading { pointer-events: none; opacity: .85; }

/* Segmented control (estilo br-tab compacto) */
.crescer-segmented { display: inline-flex; border-bottom: 1px solid var(--crescer-border); background: transparent; }
.crescer-segmented > * {
  padding: var(--crescer-sp-1) var(--crescer-sp-2); font-size: var(--crescer-fs-base); font-weight: 500; border: 0;
  border-bottom: 4px solid transparent; margin-bottom: -1px; background: transparent;
  color: var(--crescer-text-soft); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
}
.crescer-segmented > *:hover { background: var(--crescer-hover); color: var(--crescer-text); text-decoration: none; }
.crescer-segmented > .is-active { border-bottom-color: var(--crescer-brand-dark); color: var(--crescer-brand-dark); font-weight: 600; }
.crescer-segmented > .is-active:hover { color: var(--crescer-brand-dark); }

/* Abas (br-tab): 20,16px, ativo com borda inferior de 4px em `active` */
.crescer-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--crescer-border); margin-bottom: var(--crescer-sp-3); overflow-x: auto; }
.crescer-tabs > a, .crescer-tabs > button {
  padding: var(--crescer-sp-1) var(--crescer-sp-3); font-size: var(--crescer-fs-up-01); font-weight: 500; color: var(--crescer-text-soft);
  background: transparent; border: 0; border-bottom: 4px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.crescer-tabs > :hover { background: var(--crescer-hover); color: var(--crescer-text); text-decoration: none; }
.crescer-tabs > .is-active { color: var(--crescer-brand-dark); border-bottom-color: var(--crescer-brand-dark); font-weight: 600; }

/* ============================================================================= */
/* PILLS / TAGS (br-tag): raio 4px, 500                                          */
/* --solido = br-tag cheio; o padrão é a versão suave (fundo de mensagem)       */
/* ============================================================================= */
.crescer-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--crescer-sp-1);
  border-radius: var(--crescer-radius-sm); font-size: var(--crescer-fs-down-01); font-weight: 600;
  line-height: 1; white-space: nowrap;
}
.crescer-pill--vermelho { background: var(--crescer-danger-bg); color: var(--crescer-danger-text); }
.crescer-pill--laranja  { background: var(--crescer-warn-bg);   color: var(--crescer-warn-text); }
.crescer-pill--azul     { background: var(--crescer-info-bg);   color: var(--crescer-info-text); }
.crescer-pill--verde    { background: var(--crescer-ok-bg);     color: var(--crescer-ok-text); }
.crescer-pill--cinza    { background: var(--crescer-surface-2); color: var(--crescer-text-soft); }
.crescer-pill--roxo     { background: var(--crescer-violet-bg); color: var(--crescer-violet-text); }
.crescer-pill--solido                        { background: var(--crescer-dark); color: #fff; }
.crescer-pill--solido.crescer-pill--verde    { background: var(--crescer-ok); color: #fff; }
.crescer-pill--solido.crescer-pill--vermelho { background: var(--crescer-danger); color: #fff; }
.crescer-pill--solido.crescer-pill--azul     { background: var(--crescer-info); color: #fff; }
.crescer-pill--solido.crescer-pill--laranja  { background: var(--crescer-warn); color: var(--crescer-text); }
.crescer-tag-soft { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--crescer-sp-1); border-radius: var(--crescer-radius-sm); font-size: var(--crescer-fs-down-01); font-weight: 500; color: var(--crescer-text-soft); background: var(--crescer-surface); border: 1px solid var(--crescer-border); }

/* Selo / superfície de IA (identidade Crescer, sem equivalente gov.br) */
.crescer-ai-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; font-size: var(--crescer-fs-down-01); font-weight: 700;
  color: var(--crescer-brand-dark); background: linear-gradient(90deg, var(--crescer-brand-soft), var(--crescer-violet-bg));
  border: 1px solid var(--crescer-brand-light); padding: 0 9px; border-radius: var(--crescer-radius-sm);
}
.crescer-ai-badge .crescer-ico { width: 12px; height: 12px; }
.crescer-ai-surface { position: relative; border: 1px solid var(--crescer-brand-light); background: linear-gradient(180deg, var(--crescer-ai-soft) 0, var(--crescer-surface) 64px); }
.crescer-ai-surface::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--crescer-ai-grad); }

/* ============================================================================= */
/* CARDS (br-card: sem borda, sombra sm, padding 16px) + KPI                     */
/* ============================================================================= */
.crescer-card {
  background: var(--crescer-surface); border: 0; border-radius: 0;
  box-shadow: var(--crescer-shadow-card); margin-bottom: var(--crescer-sp-3); transition: box-shadow .2s ease;
}
.crescer-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--crescer-sp-1h); padding: var(--crescer-sp-2) var(--crescer-sp-2) var(--crescer-sp-1); }
.crescer-card__head h2 { margin: 0; font-size: var(--crescer-fs-up-02); font-weight: 600; line-height: 1.2; }
.crescer-card__head p  { margin: 4px 0 0; font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); }
.crescer-card__body { padding: var(--crescer-sp-2); }
.crescer-card__body--flush { padding: 0; }
.crescer-card__foot { display: flex; justify-content: flex-end; gap: var(--crescer-sp-1); padding: var(--crescer-sp-2); border-top: 1px solid var(--crescer-border); }

.crescer-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--crescer-sp-2); margin-bottom: var(--crescer-sp-3); align-items: stretch; }
/* Bloco de KPIs em 2 colunas fixas — para quando ele divide a linha com um gráfico. */
.crescer-kpis--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width:460px){ .crescer-kpis--2 { grid-template-columns: 1fr; } }
.crescer-kpi { background: var(--crescer-surface); border: 0; padding: var(--crescer-sp-2); box-shadow: var(--crescer-shadow-card); }
.crescer-kpi__top { display: flex; align-items: center; justify-content: space-between; }
.crescer-kpi__label { font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); font-weight: 500; }
.crescer-kpi__value { font-size: var(--crescer-fs-up-04); font-weight: 600; margin: var(--crescer-sp-1) 0 2px; line-height: 1.15; }
.crescer-kpi__hint  { font-size: var(--crescer-fs-down-01); color: var(--crescer-text-faint); }
.crescer-kpi__icon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.crescer-kpi__icon--brand  { background: var(--crescer-brand-soft); color: var(--crescer-brand); }
.crescer-kpi__icon--ok     { background: var(--crescer-ok-bg); color: var(--crescer-ok-text); }
.crescer-kpi__icon--warn   { background: var(--crescer-warn-bg); color: var(--crescer-warn-text); }
.crescer-kpi__icon--danger { background: var(--crescer-danger-bg); color: var(--crescer-danger-text); }
.crescer-kpi--brand  { border-top: 4px solid var(--crescer-brand); }
.crescer-kpi--ok     { border-top: 4px solid var(--crescer-ok); }
.crescer-kpi--warn   { border-top: 4px solid var(--crescer-warn); }
.crescer-kpi--danger { border-top: 4px solid var(--crescer-danger); }

/* Detalhe (definição/valor) */
.crescer-dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 18px; }
.crescer-dl dt { color: var(--crescer-text-soft); font-weight: 600; font-size: var(--crescer-fs-base); }
.crescer-dl dd { margin: 0; font-size: var(--crescer-fs-base); }

/* Callout = br-message info */
.crescer-callout { border-left: 4px solid var(--crescer-info); background: var(--crescer-info-bg); padding: var(--crescer-sp-2); font-size: var(--crescer-fs-base); color: var(--crescer-info-text); }

/* Details genérico (expandível nativo — br-item/collapse) */
.crescer-details { background: var(--crescer-surface); border: 0; box-shadow: var(--crescer-shadow-card); margin-bottom: var(--crescer-sp-1h); overflow: hidden; }
.crescer-details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--crescer-sp-1); min-height: var(--crescer-ctl-h-lg); padding: var(--crescer-sp-1) var(--crescer-sp-2); font-weight: 600; font-size: var(--crescer-fs-up-01); color: var(--crescer-text); }
.crescer-details > summary:hover { background: var(--crescer-hover); }
.crescer-details > summary::-webkit-details-marker { display: none; }
.crescer-details > summary .crescer-chevron { margin-left: auto; color: var(--crescer-brand); transition: transform .15s; }
.crescer-details[open] > summary .crescer-chevron { transform: rotate(90deg); }
.crescer-details[open] > summary { border-bottom: 1px solid var(--crescer-border); }
.crescer-details__body { padding: var(--crescer-sp-2); }

/* ============================================================================= */
/* CAMPOS (br-input): 40px, borda #888 raio 4px, 16,8px medium; rótulo 14px 600   */
/* ============================================================================= */
.crescer-filters { display: flex; flex-wrap: wrap; gap: var(--crescer-sp-2); align-items: flex-end; }
.crescer-field { display: flex; flex-direction: column; gap: var(--crescer-sp-half); }
.crescer-field label { font-size: var(--crescer-fs-base); font-weight: 600; color: var(--crescer-text); }
.crescer-field input:not([type="checkbox"]):not([type="radio"]), .crescer-field select, .crescer-field textarea, .crescer-input {
  height: var(--crescer-ctl-h); padding: 0 var(--crescer-sp-2);
  border: 1px solid var(--crescer-border-strong); border-radius: var(--crescer-radius-sm);
  font-size: var(--crescer-fs-up-01); font-weight: 500; font-family: inherit;
  background: var(--crescer-surface); color: var(--crescer-text); min-width: 170px;
}
.crescer-field textarea, textarea.crescer-input { height: auto; min-height: 88px; padding: var(--crescer-sp-1) var(--crescer-sp-2); line-height: 1.45; }
.crescer-field select, select.crescer-input { padding-right: var(--crescer-sp-4); }
.crescer-field :is(input, select, textarea)::placeholder, .crescer-input::placeholder { color: var(--crescer-text-faint); font-style: italic; font-weight: 400; }
.crescer-field :is(input, select, textarea):hover, .crescer-input:hover { background-image: linear-gradient(var(--crescer-hover), var(--crescer-hover)); }
.crescer-field :is(input, select, textarea):focus, .crescer-input:focus { outline: 2px solid var(--crescer-focus); outline-offset: 2px; border-color: var(--crescer-brand); box-shadow: none; }
.crescer-field :is(input, select, textarea):disabled, .crescer-input:disabled { opacity: .45; cursor: not-allowed; }
/* Feedback (br-input .success/.danger/.warning/.info): borda de 2px na cor */
.crescer-field--danger :is(input, select, textarea), .crescer-input--danger { border: 2px solid var(--crescer-danger); }
.crescer-field--ok :is(input, select, textarea), .crescer-input--ok { border: 2px solid var(--crescer-ok); }
.crescer-field--warn :is(input, select, textarea), .crescer-input--warn { border: 2px solid var(--crescer-warn); }
.crescer-field__error { display: flex; align-items: center; gap: 6px; margin: 0; padding: 2px 6px; font-size: var(--crescer-fs-base); font-style: italic; font-weight: 500; background: var(--crescer-danger); color: #fff; width: fit-content; }
/* Upload (achado no piloto do RES): sem isto o input[type=file] herda a altura e o texto
   de 16,8px do campo e corta "Nenhum arquivo escolhido". O botão vira secundário em pílula. */
.crescer-field input[type="file"], input[type="file"].crescer-input {
  height: auto; min-height: var(--crescer-ctl-h); padding: 4px var(--crescer-sp-1) 4px 4px;
  font-size: var(--crescer-fs-base); font-weight: 400; border-style: dashed; cursor: pointer;
}
input[type="file"].crescer-input::file-selector-button, .crescer-field input[type="file"]::file-selector-button {
  margin-right: var(--crescer-sp-1); height: var(--crescer-ctl-h-sm); padding: 0 var(--crescer-sp-2);
  border: 1px solid var(--crescer-brand); border-radius: var(--crescer-radius-ctl);
  background: var(--crescer-surface); color: var(--crescer-brand); font: inherit; font-weight: 600; cursor: pointer;
}
input[type="file"].crescer-input:hover::file-selector-button, .crescer-field input[type="file"]:hover::file-selector-button { background: var(--crescer-hover); }
.crescer-input--sm, .crescer-field .crescer-input--sm { height: var(--crescer-ctl-h-sm); padding: 0 var(--crescer-sp-1); font-size: var(--crescer-fs-base); width: auto; min-width: 64px; }
.crescer-field-inline { display: flex; align-items: center; gap: 6px; }
.crescer-field-inline .crescer-input--sm { width: 70px; min-width: 0; }
.crescer-field-inline__sep { color: var(--crescer-text-faint); }

.crescer-form { max-width: 860px; }
.crescer-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--crescer-sp-3) var(--crescer-sp-2); }
.crescer-form-grid .crescer-field { min-width: 0; }
.crescer-form-grid .crescer-field input,
.crescer-form-grid .crescer-field select,
.crescer-form-grid .crescer-field textarea { width: 100%; min-width: 0; }
.crescer-field--full { grid-column: 1 / -1; }
.crescer-field__hint { font-size: var(--crescer-fs-down-01); color: var(--crescer-text-soft); margin: 2px 0 0; }
.crescer-field__hint code { background: var(--crescer-surface-2); border-radius: var(--crescer-radius-sm); padding: 0 4px; font-size: 11px; }
.crescer-form-actions { display: flex; gap: var(--crescer-sp-1h); margin-top: var(--crescer-sp-1); }
/* Checkbox/radio (br-checkbox/br-radio: 24px, borda #CCC raio 4px / círculo) */
.crescer-check { display: inline-flex; align-items: center; gap: var(--crescer-sp-1); font-size: var(--crescer-fs-base); color: var(--crescer-text); font-weight: 500; cursor: pointer; min-height: 24px; }
.crescer-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--crescer-brand-light); }

/* Switch (br-switch medium: trilho 52×30, botão 22px; on = blue-warm-vivid-40) */
.crescer-switch { display: inline-flex; align-items: center; gap: var(--crescer-sp-1h); font-size: var(--crescer-fs-base); color: var(--crescer-text); font-weight: 500; cursor: pointer; user-select: none; }
.crescer-switch__input { position: absolute; opacity: 0; width: 0; height: 0; }
.crescer-switch__track { position: relative; flex: none; width: 52px; height: 30px; border-radius: var(--crescer-radius-pill); background: var(--crescer-surface); border: 1px solid var(--crescer-border); transition: background .15s ease, border-color .15s ease; }
.crescer-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--crescer-border); transition: transform .15s ease, background .15s ease; }
.crescer-switch__input:checked + .crescer-switch__track::after { background: var(--crescer-switch-on); transform: translateX(22px); }
.crescer-switch__input:focus-visible + .crescer-switch__track { outline: 2px solid var(--crescer-focus); outline-offset: 2px; }
.crescer-switch__state { min-width: 26px; color: var(--crescer-text-soft); font-weight: 600; }
.crescer-switch__state::after { content: "Não"; }
.crescer-switch__input:checked ~ .crescer-switch__state { color: var(--crescer-brand); }
.crescer-switch__input:checked ~ .crescer-switch__state::after { content: "Sim"; }

/* Toolbar de filtros (acima das grids) — br-table .search-bar */
.crescer-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--crescer-sp-2); align-items: flex-end;
  padding: var(--crescer-sp-2); border-bottom: 1px solid var(--crescer-border); background: var(--crescer-surface);
}
.crescer-toolbar__right { margin-left: auto; display: flex; align-items: center; gap: var(--crescer-sp-1); }
.crescer-toolbar__count { font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); font-weight: 600; white-space: nowrap; }
.crescer-chips { display: flex; flex-wrap: wrap; gap: var(--crescer-sp-1); padding: var(--crescer-sp-1h) var(--crescer-sp-2) 0; }
/* Chip de filtro = br-tag interaction (removível) */
.crescer-chip-filtro {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 var(--crescer-sp-1);
  border-radius: var(--crescer-radius-sm); font-size: var(--crescer-fs-base); font-weight: 500; background: var(--crescer-dark); color: #fff;
}
.crescer-chip-filtro a { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: inherit; line-height: 1; font-weight: 700; text-decoration: none; }
.crescer-chip-filtro a:hover { background: rgba(255,255,255,.2); color: #fff; text-decoration: none; }

/* ============================================================================= */
/* TABELAS (br-table): cabeçalho background-alternative 600, densidade small     */
/* (8px). --md = densidade padrão do gov.br (16px).                              */
/* ============================================================================= */
.crescer-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.crescer-table, table.crescer-table { width: 100%; border-collapse: collapse; font-size: var(--crescer-fs-base); }
.crescer-table thead th { background: var(--crescer-surface-2); color: var(--crescer-text); font-size: var(--crescer-fs-base); padding: var(--crescer-sp-1) var(--crescer-sp-2); text-align: left; border-bottom: 1px solid var(--crescer-border); font-weight: 600; }
.crescer-table tbody td { padding: var(--crescer-sp-1) var(--crescer-sp-2); border-bottom: 1px solid var(--crescer-border); vertical-align: middle; }
.crescer-table--md thead th, .crescer-table--md tbody td { padding: var(--crescer-sp-2); }
.crescer-table tbody tr:hover { background: var(--crescer-hover); }
.crescer-num { text-align: right; font-variant-numeric: tabular-nums; }
.crescer-mono { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--crescer-text); }

/* Detalhe key/value + JSON */
.crescer-kv { width: 100%; border-collapse: collapse; font-size: var(--crescer-fs-base); }
.crescer-kv th { text-align: left; width: 230px; color: var(--crescer-text-soft); font-weight: 600; padding: var(--crescer-sp-1) var(--crescer-sp-1h) var(--crescer-sp-1) 0; vertical-align: top; border-bottom: 1px solid var(--crescer-border); }
.crescer-kv td { padding: var(--crescer-sp-1) 0; border-bottom: 1px solid var(--crescer-border); vertical-align: top; }
.crescer-json { background: var(--crescer-surface-2); border-radius: var(--crescer-radius-sm); padding: var(--crescer-sp-1h); font-size: 12px; line-height: 1.5; overflow-x: auto; margin: 0; }

/* ============================================================================= */
/* PAGINAÇÃO (br-pagination): página 32px pílula, ativa em `active`              */
/* ============================================================================= */
.crescer-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--crescer-sp-1h); flex-wrap: wrap; padding: var(--crescer-sp-1h) var(--crescer-sp-2); border-top: 1px solid var(--crescer-border); }
.crescer-pagination__left { display: flex; align-items: center; gap: var(--crescer-sp-2); flex-wrap: wrap; }
.crescer-pagination__info { font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); }
.crescer-pagination__nav { display: flex; align-items: center; gap: var(--crescer-sp-half); }
.crescer-perpage { display: inline-flex; align-items: center; gap: var(--crescer-sp-1); margin: 0; }
.crescer-perpage label { font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); font-weight: 500; }
.crescer-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 var(--crescer-sp-1);
  border: 0; border-radius: var(--crescer-radius-ctl); background: transparent;
  color: var(--crescer-brand); font-size: var(--crescer-fs-base); font-weight: 400; text-decoration: none; cursor: pointer;
}
.crescer-page-btn:hover { background: var(--crescer-hover); color: var(--crescer-brand); text-decoration: none; }
.crescer-page-btn.is-active { background: var(--crescer-brand-dark); color: #fff; font-weight: 600; cursor: default; }
/* Extremos da paginação (primeira/última página): presentes, mas inertes. */
.crescer-page-btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.crescer-page-ellipsis { padding: 0 4px; color: var(--crescer-text-faint); }

/* ============================================================================= */
/* MEDIDOR (meter) + BARRAS                                                      */
/* ============================================================================= */
.crescer-meter { display: inline-flex; align-items: center; gap: var(--crescer-sp-1); }
.crescer-meter__track { width: 64px; height: 8px; border-radius: var(--crescer-radius-pill); background: var(--crescer-surface-2); overflow: hidden; }
.crescer-meter__fill { height: 100%; border-radius: var(--crescer-radius-pill); }
.crescer-meter__fill--alto  { background: var(--crescer-danger); }
.crescer-meter__fill--medio { background: var(--crescer-warn); }
.crescer-meter__fill--baixo { background: var(--crescer-ok); }
.crescer-bars { display: flex; flex-direction: column; gap: var(--crescer-sp-1h); }
.crescer-bar__top { display: flex; justify-content: space-between; font-size: var(--crescer-fs-base); margin-bottom: 4px; }
.crescer-bar__track { height: 8px; border-radius: var(--crescer-radius-pill); background: var(--crescer-surface-2); overflow: hidden; }
.crescer-bar__fill { height: 8px; border-radius: var(--crescer-radius-pill); background: var(--crescer-brand); }

/* ============================================================================= */
/* EMPTY STATE                                                                   */
/* ============================================================================= */
.crescer-empty { text-align: center; padding: var(--crescer-sp-6) var(--crescer-sp-2h); color: var(--crescer-text-soft); }
.crescer-empty__icon { color: var(--crescer-brand); margin-bottom: var(--crescer-sp-1); opacity: .6; font-size: 40px; }
.crescer-empty h3 { margin: 0 0 4px; color: var(--crescer-text); font-size: var(--crescer-fs-up-02); font-weight: 500; }
.crescer-empty__action { margin-top: var(--crescer-sp-2); }

/* ============================================================================= */
/* FLASH + TOAST (br-message): fundo suave, faixa da cor, título 600             */
/* ============================================================================= */
.crescer-flash { display: flex; align-items: flex-start; gap: var(--crescer-sp-1h); padding: var(--crescer-sp-2); margin-bottom: var(--crescer-sp-2); font-size: var(--crescer-fs-base); font-weight: 500; border: 0; border-left: 4px solid transparent; }
.crescer-flash--notice { background: var(--crescer-ok-bg);     color: var(--crescer-ok-text);     border-left-color: var(--crescer-ok); }
.crescer-flash--alert  { background: var(--crescer-danger-bg); color: var(--crescer-danger-text); border-left-color: var(--crescer-danger); }
.crescer-flash--info   { background: var(--crescer-info-bg);   color: var(--crescer-info-text);   border-left-color: var(--crescer-info); }
.crescer-flash--warn   { background: var(--crescer-warn-bg);   color: var(--crescer-warn-text);   border-left-color: var(--crescer-warn); }
.crescer-toast-wrap { position: fixed; top: calc(var(--crescer-header-h) + 16px); right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.crescer-toast { box-shadow: var(--crescer-shadow-hover); cursor: pointer; margin: 0; align-items: center; transition: opacity .3s ease, transform .3s ease; }
.crescer-toast > span { flex: 1 1 auto; min-width: 0; }
.crescer-toast--leaving { opacity: 0; transform: translateX(12px); }
.crescer-toast__close { flex: none; border: 0; background: transparent; color: inherit; opacity: .7; cursor: pointer; font-size: 20px; line-height: 1; width: 32px; height: 32px; border-radius: 50%; margin: -6px -6px -6px 4px; }
.crescer-toast__close:hover { opacity: 1; background: var(--crescer-hover); }
@media (prefers-reduced-motion: reduce) { .crescer-toast { transition: none; } }

/* ============================================================================= */
/* MODAL (br-modal, <dialog> nativo): larguras 300/500/640, sombra, sem raio     */
/* ============================================================================= */
.crescer-modal { border: 0; padding: 0; width: min(640px, calc(100vw - 32px)); position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; border-radius: 0; background: var(--crescer-surface); color: var(--crescer-text); box-shadow: var(--crescer-shadow-xl); }
.crescer-modal--sm { width: min(300px, calc(100vw - 32px)); }
.crescer-modal--md { width: min(500px, calc(100vw - 32px)); }
.crescer-modal::backdrop { background: rgba(0, 0, 0, .45); }
.crescer-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--crescer-sp-1h); padding: var(--crescer-sp-2) var(--crescer-sp-2) 0; }
.crescer-modal__head h2 { margin: 0; font-size: var(--crescer-fs-up-01); font-weight: 700; display: flex; align-items: center; gap: var(--crescer-sp-1); }
.crescer-modal__close { border: 0; background: transparent; color: var(--crescer-brand); font-size: 22px; line-height: 1; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; }
.crescer-modal__close:hover { background: var(--crescer-hover); }
.crescer-modal__body { padding: var(--crescer-sp-3) var(--crescer-sp-2) var(--crescer-sp-2); max-height: 70vh; overflow-y: auto; }
.crescer-modal__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--crescer-sp-1); padding: var(--crescer-sp-2); }

/* ============================================================================= */
/* POPOVER DE AÇÕES (position: fixed via Stimulus acoes)                         */
/* ============================================================================= */
.crescer-actions-pop-wrap { display: inline-block; }
.crescer-actions-pop {
  position: fixed; top: 0; left: 0; z-index: 1000; width: 328px;
  max-height: min(74vh, 580px); overflow-y: auto;
  background: var(--crescer-surface); border: 0;
  box-shadow: var(--crescer-shadow-hover); padding: var(--crescer-sp-2); text-align: left;
}
.crescer-actions-pop[hidden] { display: none; }
.crescer-actions-pop__head { display: flex; align-items: center; justify-content: space-between; gap: var(--crescer-sp-1); margin-bottom: 2px; }
.crescer-actions-pop__head > span { font-weight: 600; font-size: var(--crescer-fs-up-01); color: var(--crescer-text); }
.crescer-actions-pop__close {
  border: 0; background: transparent; color: var(--crescer-brand); font-size: 20px;
  line-height: 1; cursor: pointer; width: 32px; height: 32px; border-radius: 50%;
}
.crescer-actions-pop__close:hover { background: var(--crescer-hover); }
.crescer-actions-pop__hint { font-size: var(--crescer-fs-down-01); color: var(--crescer-text-soft); margin: 0 0 var(--crescer-sp-1h); }
.crescer-act {
  background: var(--crescer-surface-2); border: 0; border-left: 4px solid var(--crescer-border);
  padding: var(--crescer-sp-1h); margin-bottom: var(--crescer-sp-1h);
}
.crescer-act:last-child { margin-bottom: 0; }
.crescer-act__head { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: var(--crescer-fs-base); margin-bottom: 10px; }
.crescer-act__head .crescer-ico { flex: none; }
.crescer-act .crescer-field { margin-bottom: var(--crescer-sp-1); }
.crescer-act__submit { width: 100%; margin-top: 2px; justify-content: center; }

/* ============================================================================= */
/* ÍCONES + LOGO + SKELETON + LOADING (br-loading)                               */
/* ============================================================================= */
.crescer-ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.crescer-ico--lg { width: 20px; height: 20px; vertical-align: -4px; }
.crescer-ico--xl { width: 44px; height: 44px; stroke-width: 1.4; }
.crescer-btn .crescer-ico { vertical-align: middle; }
.crescer-logo { display: block; }
.crescer-brand__mark .crescer-logo, .crescer-auth__mark .crescer-logo { color: #fff; }

.crescer-skeleton { border-radius: var(--crescer-radius-sm); background: var(--crescer-surface-2); position: relative; overflow: hidden; }
.crescer-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); transform: translateX(-100%); animation: crescer-shimmer 1.3s infinite; }
@keyframes crescer-shimmer { 100% { transform: translateX(100%); } }
.crescer-skeleton--line { height: 12px; margin: 8px 0; }
/* Spinner: dentro de botão cheio usa branco; fora, o azul interactive (br-loading 24px). */
.crescer-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: crescer-spin 1.3s linear infinite; vertical-align: -3px; }
.crescer-spin--azul, .crescer-loading { border-color: var(--crescer-brand-soft); border-top-color: var(--crescer-brand); }
.crescer-loading { display: inline-block; width: 24px; height: 24px; border-width: 2px; border-style: solid; border-radius: 50%; animation: crescer-spin 1.3s linear infinite; }
@keyframes crescer-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .crescer-skeleton::after, .crescer-spin, .crescer-loading, .crescer-content { animation: none; } }

/* ============================================================================= */
/* GRIDS UTILITÁRIOS                                                             */
/* ============================================================================= */
.crescer-grid-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--crescer-sp-3); align-items: start; }
.crescer-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--crescer-sp-2); }
@media (max-width:900px){ .crescer-grid-2, .crescer-grid-3 { grid-template-columns: 1fr; } }
/* Degraus de coluna dos KPIs: 4 -> 2 -> 1, PULANDO o passo de 3 (item órfão). */
@media (max-width:1240px){ .crescer-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:460px){ .crescer-kpis { grid-template-columns: 1fr; gap: 10px; } }
@media (max-width:640px){ .crescer-kpi__value { font-size: var(--crescer-fs-up-03); } }
@media (max-width: 640px) { .crescer-form-grid { grid-template-columns: 1fr; } }

/* ============================================================================= */
/* MODO RAIL (menu recolhido) + RESPONSIVO (off-canvas ≤900px)                   */
/* ============================================================================= */
.crescer-shell--rail { --crescer-sidebar-w: var(--crescer-sidebar-w-rail); }
.crescer-shell--rail .crescer-brand { justify-content: center; padding-left: 0; padding-right: 0; }
.crescer-shell--rail .crescer-brand__txt,
.crescer-shell--rail .crescer-nav__label,
.crescer-shell--rail .crescer-nav__section,
.crescer-shell--rail .crescer-op-card__info { display: none; }
.crescer-shell--rail .crescer-rail-toggle { position: absolute; top: -4px; right: -2px; }
.crescer-shell--rail .crescer-rail-toggle > :is(.crescer-ico, svg, i) { transform: rotate(0deg); }
.crescer-shell--rail .crescer-nav a { justify-content: center; gap: 0; padding: var(--crescer-sp-1) 0; position: relative; }
/* Rail: rodapé empilha em COLUNA (avatar em cima, Sair embaixo). */
.crescer-shell--rail .crescer-op-card { flex-direction: column; justify-content: center; padding: 8px 4px; gap: 8px; }
/* Tooltip dos itens no modo rail (usa data-tip) — br-tooltip (fundo color-info, 500, sombra md) */
.crescer-shell--rail :is(.crescer-nav a, .crescer-nav-group__head)::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  padding: var(--crescer-sp-1) var(--crescer-sp-1h); font-size: var(--crescer-fs-down-01); font-weight: 500; white-space: nowrap;
  background: var(--crescer-info); color: #fff; box-shadow: var(--crescer-shadow-hover); border-radius: var(--crescer-radius-sm);
  opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 70;
}
.crescer-shell--rail :is(.crescer-nav a, .crescer-nav-group__head):is(:hover, :focus-visible)::after { opacity: 1; }

/* Rail com a árvore: o cabeçalho da seção vira ícone e abre a "bandeja" de itens
   logo abaixo (mesmo DOM, mesmo acordeão). O rótulo fica sr-only — com display:none o
   summary perderia o nome acessível (o ícone é aria-hidden). */
@media (min-width: 901px) {
  .crescer-shell--rail .crescer-nav-group__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .crescer-shell--rail .crescer-nav-group__head { justify-content: center; gap: 0; padding: var(--crescer-sp-1) 0; }
  .crescer-shell--rail .crescer-nav-group__chev { position: absolute; right: 4px; }
  .crescer-shell--rail .crescer-nav-group__chev .crescer-ico { width: 10px; height: 10px; }
  .crescer-shell--rail .crescer-nav-group__items a { padding: var(--crescer-sp-1) 0; }
  .crescer-shell--rail .crescer-nav-group--sub > .crescer-nav-group__head { padding-left: 0; }
  .crescer-shell--rail .crescer-header__sign { max-width: none; }
}

@media (max-width: 900px) {
  .crescer-shell, .crescer-shell:has(> .crescer-header) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "main"; }
  .crescer-sidebar, .crescer-shell:has(> .crescer-header) > .crescer-sidebar {
    position: fixed; top: 0; left: -100%; width: min(var(--crescer-sidebar-w), 85vw); height: 100vh; z-index: 60;
    transition: left .2s; box-shadow: var(--crescer-shadow-xl);
  }
  .crescer-shell--nav-open .crescer-sidebar,
  .crescer-shell--nav-open:has(> .crescer-header) > .crescer-sidebar { left: 0; }
  #crescer-menu-toggle { display: inline-flex; }
  .crescer-rail-toggle { display: none; }
  /* Neutraliza o rail no mobile: sempre largura cheia e textos visíveis */
  .crescer-shell--rail { --crescer-sidebar-w: 264px; }
  .crescer-shell--rail .crescer-brand__txt,
  .crescer-shell--rail .crescer-nav__label,
  .crescer-shell--rail .crescer-nav__section,
  .crescer-shell--rail .crescer-op-card__info { display: block; }
  .crescer-shell--rail .crescer-nav a { justify-content: flex-start; gap: var(--crescer-sp-2); padding: var(--crescer-sp-1) var(--crescer-sp-2); }
  .crescer-shell--rail .crescer-nav-group__items a { padding-left: var(--crescer-sp-5); }
  .crescer-shell--rail :is(.crescer-nav a, .crescer-nav-group__head)::after { display: none; }
  /* Alvo de toque confortável no off-canvas */
  .crescer-nav-group__head, .crescer-nav-group__items a { min-height: 44px; }
  .crescer-shell--rail .crescer-op-card { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px; }
  .crescer-shell--nav-open .crescer-scrim { display: block; }
  /* Header compacto (br-header mobile): logo 32px, sem divisor/assinatura, sem busca inline */
  :root { --crescer-header-top-h: 56px; --crescer-header-bottom-h: 48px; }
  .crescer-header__top, .crescer-header__bottom { padding-left: var(--crescer-sp-1h); padding-right: var(--crescer-sp-1h); }
  .crescer-header__logo .crescer-logo, .crescer-header__logo img { max-height: 32px; }
  .crescer-header__divider, .crescer-header__sign, .crescer-header__links, .crescer-header__sep, .crescer-header__user-info, .crescer-header__search { display: none; }
  .crescer-header__title { font-size: var(--crescer-fs-up-02); }
  .crescer-content { padding: var(--crescer-sp-2) var(--crescer-sp-1h) var(--crescer-sp-5); }
}

/* ============================================================================= */
/* LOGIN / AUTH (não autenticado) — br-signin: superfície branca, sem gradiente  */
/* ============================================================================= */
.crescer-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--crescer-sp-3); background: var(--crescer-bg); }
.crescer-auth__card { width: 100%; max-width: 400px; background: var(--crescer-surface); box-shadow: var(--crescer-shadow-card); padding: var(--crescer-sp-4); }
.crescer-auth__brand { text-align: center; margin-bottom: var(--crescer-sp-3); }
.crescer-auth__brand h1 { margin: var(--crescer-sp-1) 0 2px; font-size: var(--crescer-fs-up-03); font-weight: 600; color: var(--crescer-text); }
.crescer-auth__brand p { margin: 0; font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); }
.crescer-auth__mark { width: 48px; height: 48px; border-radius: var(--crescer-radius); margin: 0 auto; background: var(--crescer-brand); color: #fff; display: flex; align-items: center; justify-content: center; }

/* Login split — painel institucional (azul escuro) + formulário */
.crescer-login {
  width: 100%; max-width: 960px; min-height: 560px;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--crescer-surface); box-shadow: var(--crescer-shadow-hover); overflow: hidden;
}
.crescer-login__brand {
  position: relative; display: flex; flex-direction: column;
  padding: var(--crescer-sp-5); color: #fff; background: var(--crescer-dark); overflow: hidden;
}
/* Faixa de identidade no topo do painel (substitui os círculos de luz do v1) */
.crescer-login__brand::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--crescer-accent); }  /* verde VIVER: detalhe de marca */
.crescer-login__brand-top { position: relative; display: flex; align-items: center; gap: var(--crescer-sp-1h); }
.crescer-login__logo {
  width: 48px; height: 48px; border-radius: var(--crescer-radius); flex: none; color: #fff;
  display: flex; align-items: center; justify-content: center; background: var(--crescer-brand);
}
.crescer-login__brand-name { font-size: var(--crescer-fs-up-02); font-weight: 600; }
.crescer-login__hero { position: relative; margin: auto 0; padding: var(--crescer-sp-3) 0; }
.crescer-login__tagline { margin: 0 0 var(--crescer-sp-1h); font-size: var(--crescer-fs-up-04); line-height: 1.15; font-weight: 600; }
.crescer-login__lead { margin: 0 0 var(--crescer-sp-3); font-size: var(--crescer-fs-up-01); line-height: 1.45; color: var(--crescer-on-dark-soft); max-width: 34ch; }
.crescer-login__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--crescer-sp-2); }
.crescer-login__points li { display: flex; gap: var(--crescer-sp-1h); font-size: var(--crescer-fs-base); line-height: 1.45; color: var(--crescer-on-dark); }
.crescer-login__points li b { color: #fff; font-weight: 600; }
.crescer-login__point-ico {
  flex: none; width: 32px; height: 32px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12);
}
.crescer-login__brand-foot { position: relative; font-size: var(--crescer-fs-down-01); color: var(--crescer-on-dark-soft); }

.crescer-login__form-wrap { display: flex; align-items: center; justify-content: center; padding: var(--crescer-sp-5); }
.crescer-login__card { width: 100%; max-width: 360px; }
.crescer-login__card-mark { display: none; margin-bottom: var(--crescer-sp-2); }
.crescer-login__title { margin: 0 0 4px; font-size: var(--crescer-fs-up-03); font-weight: 600; color: var(--crescer-text); }
.crescer-login__subtitle { margin: 0 0 var(--crescer-sp-3); font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); }
.crescer-login__field { margin-bottom: var(--crescer-sp-2); }
.crescer-login__field label { margin-bottom: 2px; }
.crescer-login__remember { display: inline-flex; align-items: center; gap: var(--crescer-sp-1); font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); margin-bottom: var(--crescer-sp-3); cursor: pointer; }
.crescer-login__submit { width: 100%; }
.crescer-login__sso { margin-top: var(--crescer-sp-3); }
.crescer-login__divider { position: relative; text-align: center; margin-bottom: var(--crescer-sp-2); }
.crescer-login__divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--crescer-border); }
.crescer-login__divider span { position: relative; background: var(--crescer-surface); padding: 0 var(--crescer-sp-1h); font-size: var(--crescer-fs-base); color: var(--crescer-text-soft); }
.crescer-login__sso-form { display: flex; gap: var(--crescer-sp-1); }

@media (max-width: 820px) {
  .crescer-login { grid-template-columns: 1fr; max-width: 440px; min-height: 0; }
  .crescer-login__brand { padding: var(--crescer-sp-3); }
  .crescer-login__hero { margin: var(--crescer-sp-2h) 0 4px; padding: 0; }
  .crescer-login__tagline { font-size: var(--crescer-fs-up-03); }
  .crescer-login__lead { margin-bottom: var(--crescer-sp-2h); }
  .crescer-login__brand-foot { display: none; }
  .crescer-login__form-wrap { padding: var(--crescer-sp-4) var(--crescer-sp-3); }
  .crescer-login__card { max-width: none; }
}
@media (max-width: 480px) {
  .crescer-login__points { display: none; }
  .crescer-login__hero { margin: var(--crescer-sp-2) 0 2px; }
}

/* =========================================================================
   Componentes acrescentados a partir do NeoGestor (#15576, 1b). Só acréscimo:
   RES e Gateway não mudam até usarem as classes. Equivalente MUI em assets/mui/.
   ========================================================================= */

/* --- Collapse / acordeão (br-item + data-toggle): cabeçalho 56px, padding 8×16 --- */
.crescer-collapse { border-top: 1px solid var(--crescer-border); }
.crescer-collapse:last-child { border-bottom: 1px solid var(--crescer-border); }
.crescer-collapse > summary {
  list-style: none; display: flex; align-items: center; gap: var(--crescer-sp-1h);
  min-height: 56px; padding: var(--crescer-sp-1) var(--crescer-sp-2); cursor: pointer;
  font-weight: 600; color: var(--crescer-text);
}
.crescer-collapse > summary::-webkit-details-marker { display: none; }
.crescer-collapse > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px; flex: none;
  border-right: 2px solid var(--crescer-brand); border-bottom: 2px solid var(--crescer-brand);
  transform: rotate(45deg); transition: transform .15s ease;
}
.crescer-collapse[open] > summary::after { transform: rotate(-135deg); }
.crescer-collapse > summary:hover { background: var(--crescer-hover); }
.crescer-collapse__body { padding: var(--crescer-sp-1) var(--crescer-sp-2) var(--crescer-sp-2); }

/* --- Lista suspensa (br-list em dropdown): menu do usuário, ações ----------- */
.crescer-list {
  min-width: 200px; padding: 0; margin: 0; list-style: none;
  background: var(--crescer-surface); box-shadow: var(--crescer-shadow-hover); border-radius: var(--crescer-radius-sm);
}
.crescer-list__header { padding: var(--crescer-sp-1) var(--crescer-sp-2); font-weight: 700; border-bottom: 1px solid var(--crescer-border); }
.crescer-list__item {
  display: flex; align-items: center; gap: var(--crescer-sp-1h); width: 100%;
  min-height: 48px; padding: var(--crescer-sp-1) var(--crescer-sp-2);
  border: 0; background: none; font: inherit; color: var(--crescer-text); text-align: left; cursor: pointer;
}
.crescer-list__item:hover { background: var(--crescer-hover); }
.crescer-list__item[aria-current="true"], .crescer-list__item.is-selected { background: var(--crescer-brand-soft); font-weight: 600; }
.crescer-list__item--perigo { color: var(--crescer-danger-text); }
.crescer-list__divider { height: 1px; background: var(--crescer-border); margin: 0; border: 0; }

/* --- Tooltip (br-tooltip): fundo info, 11,66px/500, máx. 240px, padding 16px ---- */
.crescer-tooltip {
  max-width: 240px; padding: var(--crescer-sp-2); border-radius: var(--crescer-radius-sm);
  background: var(--crescer-info); color: #fff; box-shadow: var(--crescer-shadow-hover);
  font-size: var(--crescer-fs-down-01); font-weight: 500; line-height: 1.45;
}

/* --- Contador de notificação (contador do br-avatar / br-notification) ------- */
.crescer-counter-host { position: relative; display: inline-flex; }
.crescer-counter {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--crescer-radius-pill); background: var(--crescer-danger); color: #fff;
  font-size: var(--crescer-fs-down-01); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
  box-shadow: 0 0 0 2px var(--crescer-surface);
}

/* --- Selo de tendência (composição sobre br-tag): ↑ ↓ → com % ------------------ */
.crescer-trend {
  display: inline-flex; align-items: center; gap: 2px; padding: 0 var(--crescer-sp-1); min-height: 24px;
  border-radius: var(--crescer-radius-sm); font-size: var(--crescer-fs-down-01); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.crescer-trend--sobe   { background: var(--crescer-ok-bg);     color: var(--crescer-ok-text); }
.crescer-trend--desce  { background: var(--crescer-danger-bg); color: var(--crescer-danger-text); }
.crescer-trend--estavel { background: var(--crescer-surface-2); color: var(--crescer-text-soft); }

/* --- Barra com metas (meter + marcadores de meta) ------------------------------ */
.crescer-goalbar { position: relative; padding-top: 18px; }
.crescer-goalbar__track { position: relative; height: 12px; border-radius: var(--crescer-radius-pill); background: var(--crescer-surface-2); }
.crescer-goalbar__fill { height: 100%; border-radius: var(--crescer-radius-pill); background: var(--crescer-brand); }
.crescer-goalbar__meta { position: absolute; top: 12px; bottom: -4px; width: 2px; background: var(--crescer-text); transform: translateX(-1px); }
.crescer-goalbar__meta-label {
  position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap;
  font-size: var(--crescer-fs-down-01); font-weight: 600; color: var(--crescer-text-soft);
}

/* --- Gauge / score circular (sem equivalente gov.br; retingido com tokens) ---- */
.crescer-gauge {
  --val: 0; --cor: var(--crescer-brand); --tam: 96px;
  position: relative; width: var(--tam); height: var(--tam); border-radius: 50%;
  background: conic-gradient(var(--cor) calc(var(--val) * 3.6deg), var(--crescer-surface-2) 0);
  display: inline-flex; align-items: center; justify-content: center;
}
.crescer-gauge::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--crescer-surface); }
.crescer-gauge__valor { position: relative; font-size: var(--crescer-fs-up-03); font-weight: 700; color: var(--crescer-text); font-variant-numeric: tabular-nums; }
.crescer-gauge--ok { --cor: var(--crescer-ok); } .crescer-gauge--warn { --cor: var(--crescer-warn); } .crescer-gauge--danger { --cor: var(--crescer-danger); }

/* --- Heatmap (escala sequencial azul, 5 passos) ------------------------------- */
.crescer-heat-0 { background: var(--crescer-seq-0); color: var(--crescer-text); }
.crescer-heat-1 { background: var(--crescer-seq-1); color: var(--crescer-text); }
.crescer-heat-2 { background: var(--crescer-seq-2); color: var(--crescer-text); }
.crescer-heat-3 { background: var(--crescer-seq-3); color: #fff; }
.crescer-heat-4 { background: var(--crescer-seq-4); color: #fff; }

/* --- Prosa (Markdown da IA, textos longos): tipografia gov.br ----------------- */
.crescer-prose { font-size: var(--crescer-fs-base); line-height: 1.6; color: var(--crescer-text); }
.crescer-prose :where(h1, h2, h3, h4) { margin: 1.2em 0 .4em; line-height: 1.25; font-weight: 600; }
.crescer-prose :where(h1) { font-size: var(--crescer-fs-up-03); } .crescer-prose :where(h2) { font-size: var(--crescer-fs-up-02); }
.crescer-prose :where(h3) { font-size: var(--crescer-fs-up-01); } .crescer-prose :where(h4) { font-size: var(--crescer-fs-base); }
.crescer-prose :where(p, ul, ol, table, pre, blockquote) { margin: 0 0 .8em; }
.crescer-prose :where(ul, ol) { padding-left: 1.4em; }
.crescer-prose :where(code) { padding: 1px 4px; border-radius: var(--crescer-radius-sm); background: var(--crescer-surface-2); font-size: .92em; }
.crescer-prose :where(pre) { padding: var(--crescer-sp-1h); background: var(--crescer-surface-2); overflow-x: auto; }
.crescer-prose :where(blockquote) { padding-left: var(--crescer-sp-1h); border-left: 4px solid var(--crescer-brand); color: var(--crescer-text-soft); }
.crescer-prose :where(table) { border-collapse: collapse; width: 100%; }
.crescer-prose :where(th, td) { padding: var(--crescer-sp-1); border-bottom: 1px solid var(--crescer-border); text-align: left; }
.crescer-prose :where(th) { background: var(--crescer-surface-2); font-weight: 600; }
.crescer-prose :where(a) { color: var(--crescer-brand); }
