/* ═══════════════════════════════════════════════════════════════
   DRA. MARCELA GOUVEIA — Design System CSS v4
   Paleta: #1C1008 · #C9A96E · #F7F3EF
   Fonte: DM Sans (corpo/UI) + Cormorant Garamond (display/serif)
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. TOKENS ───────────────────────────────────────────────── */
:root {
  /* Cores — sobrescritas pelo banco */
  --gold:          #C9A96E;
  --gold-dark:     #A07840;
  --gold-light:    #F0E6D0;
  --gold-bright:   #D4AF37;
  --brown:         #1C1008;
  --brown-mid:     #2A1A08;
  --brown-warm:    #3D2510;
  --cream:         #F7F3EF;
  --cream-dark:    #EDE5D8;

  /* Aliases dinâmicos (sobrescritos inline via PHP) */
  --color-primary:       var(--gold);
  --color-primary-dark:  var(--gold-dark);
  --color-primary-light: var(--gold-light);
  --color-secondary:     var(--gold-bright);
  --color-bg-dark:       var(--brown);
  --color-bg-medium:     var(--brown-mid);
  --color-bg-cream:      var(--cream);
  --color-surface:       var(--cream);
  --color-text:          var(--brown);
  --color-text-on-dark:  #F7F3EF;
  --color-border:        #D6C9B2;
  --color-border-dark:   rgba(201,169,110,.22);
  --color-muted:         #6E5A42;  /* ≥ 4.5:1 sobre #FFF e sobre #F7F3EF (WCAG AA) */
  --color-text-soft:     #4A3A28;  /* ≥ 7:1 sobre fundos claros (WCAG AAA)  */
  --text-soft:           var(--color-text-soft); /* alias compat */
  --text-muted:          var(--color-muted);     /* alias compat */

  /* Semânticas */
  --color-success: #4A7C5A;
  --color-danger:  #9B3A3A;
  --color-warning: #C9A96E;
  --color-info:    #4A6B8A;

  /* Tipografia */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Espaçamento */
  /*
   * ⚠️ ESTA ESCALA É PARA SER USADA. Medido em 28/07: os tokens de espaço e de
   * raio tinham **16 usos em 7.749 linhas** — existiam como intenção, não como
   * prática, e todo o resto era rem chumbado. O resultado, medido no navegador
   * em 6 páginas: 19 valores distintos de `gap`, 7 de padding de seção e 4 de
   * raio de card. É essa dispersão que se lê como "o site está torto" sem
   * ninguém conseguir apontar onde.
   *
   * Regra que não descreve o código só serve para ser violada em silêncio —
   * é o que o CLAUDE.md §4.1 já registra sobre o "JS Vanilla". Ao escrever
   * espaçamento novo, use um degrau daqui; precisando de um valor que não
   * existe, o degrau é que está errado.
   */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3.5rem;
  --space-3xl: 5.5rem;

  /* Bordas */
  --radius-sm:   0.25rem;
  --radius-md:   0.375rem;
  --radius-lg:   0.625rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm:   0 1px 3px rgba(28,16,8,.18);
  --shadow-md:   0 4px 16px rgba(28,16,8,.22);
  --shadow-lg:   0 12px 32px rgba(28,16,8,.28);
  --shadow-xl:   0 24px 48px rgba(28,16,8,.32);
  --shadow-gold: 0 6px 24px rgba(201,169,110,.35);

  /* Transições */
  --t-fast: 150ms ease;
  --t-base: 280ms ease;
  --t-slow: 480ms ease;

  /* Layout */
  --nav-h:           4.5rem;
  --sidebar-w:       270px;
  --content-max:     80rem;
  --content-narrow:  48rem;

  /* ── Tints canonicais (use em vez de rgba inline) ─────────── */
  --alpha-gold-04:   rgba(201,169,110,.04);
  --alpha-gold-08:   rgba(201,169,110,.08);
  --alpha-gold-10:   rgba(201,169,110,.10);
  --alpha-gold-12:   rgba(201,169,110,.12);
  --alpha-gold-15:   rgba(201,169,110,.15);
  --alpha-gold-20:   rgba(201,169,110,.20);
  --alpha-gold-25:   rgba(201,169,110,.25);
  --alpha-gold-35:   rgba(201,169,110,.35);
  --alpha-brown-06:  rgba(28,16,8,.06);
  --alpha-brown-08:  rgba(28,16,8,.08);
  --alpha-brown-10:  rgba(28,16,8,.10);

  /* ── Z-index scale ────────────────────────────────────────── */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  500;
  --z-modal:    1000;
  --z-toast:    2000;
  --z-tooltip:  3000;
  --z-skip:     10000;

  /* ── Shadow focus ─────────────────────────────────────────── */
  --shadow-focus: 0 0 0 3px var(--alpha-gold-25);

  /* ── Border presets ───────────────────────────────────────── */
  --border-thin:  1px solid var(--color-border);
  --border-soft:  1px solid var(--alpha-brown-08);
  --border-gold:  1px solid var(--alpha-gold-25);

  /* ── 1b. SUPERFÍCIE (camada semântica — só o site público) ────
     Estes tokens dizem PAPEL, não cor: "o fundo da página", "o texto
     sobre ele". Os de cima (--gold, --brown, --cream) dizem COR e não
     mudam nunca — `--brown: #F7F3EF` seria mentira.

     Por que a camada precisou existir: o design system tinha UMA escala
     de texto para DUAS superfícies opostas. --color-muted (#6E5A42) e
     --color-text-soft (#4A3A28) são calibrados para fundo claro (dizem
     isso nos próprios comentários), mas o site público inteiro roda
     sobre --brown. Sobre escuro reprovam em contraste — a sidebar do
     admin dava 1,71:1. A saída adotada foi não usar token sobre fundo
     escuro e escrever rgba() literal: é essa a origem das 664 cores
     chumbadas espalhadas pelo arquivo.

     Valores abaixo = tema ESCURO, que é o site como sempre foi. O tema
     claro os sobrescreve em [data-theme="light"] logo adiante.

     ATENÇÃO — escopo: o admin NÃO usa estes tokens e nunca marca
     data-theme no <html>. O modo claro é do site público apenas; o
     admin já é claro. */

  /* Escala de superfície (base → mais elevada). Os nomes das classes
     .section-dark/.section-medium/.section-warm nas views são legado:
     hoje significam degrau 1, 2 e 3 da escala, não "escuro" literal. */
  --surface-1:  var(--cream);       /* fundo da página */
  --surface-2:  #FFFFFF;            /* seção alternada */
  --surface-3:  var(--cream-dark);  /* seção de destaque */
  --surface-card: #FFFFFF;          /* card sobre a superfície */

  /* Texto sobre a superfície. Contrastes medidos sobre --cream #F7F3EF:
     on-surface 15,8:1 · muted 7:1 · soft 4,5:1 (todos ≥ AA).
     --color-text-soft e --color-muted já existiam calibrados para fundo claro
     — é literalmente para isto que foram feitos. */
  --on-surface:        #1C1008;
  --on-surface-muted:  var(--color-text-soft);  /* #4A3A28 */
  --on-surface-soft:   var(--color-muted);      /* #6E5A42 */
  --on-surface-faint:  rgba(28,16,8,.45);       /* decorativo — não use em texto que precise ser lido */

  /* Ouro em dois papéis, porque ele tem dois problemas diferentes:
     --accent-text  precisa ser LIDO, e --gold sobre creme dá ~2:1;
                    #6B4A18 é o substituto que o CLAUDE.md prescreve.
     --accent-line  só decora (borda, filete, ponto), mas a WCAG pede 3:1 para
                    componente de UI e foco — e --gold sobre creme dá ~1,9:1.
                    --gold-dark dá ~3,1:1 e ainda lê como ouro. */
  --accent-text:  #6B4A18;
  --accent-line:  var(--gold-dark);

  /*
   * A cor do texto SOBRE a marca preenchida (botão primário, skip-link, chip
   * ativo). NÃO pode ser `--brown`: aquilo é a cor de FUNDO da página no tema
   * escuro, e sobre uma marca clara ela funciona por coincidência — sobre uma
   * marca azul média dá 3,19:1, medido na demo em 28/07 no botão que converte.
   *
   * O valor real vem do `PaletteService`, derivado da marca de cada clínica
   * (preto ou branco, o que contrastar mais). Este aqui é só o fallback para
   * as telas que não passam pelo layout público.
   */
  --on-accent:    #111111;

  /*
   * O PREENCHIMENTO da marca. Igual a `--gold` na maioria das marcas; só se
   * afasta quando nem preto nem branco alcançam 4,5:1 sobre ela (acontece com
   * verdes e azuis médios). O que cede é o fundo, nunca a legibilidade.
   */
  --accent-fill:  var(--gold);

  --hairline:     rgba(28,16,8,.14);
  --hairline-2:   rgba(28,16,8,.08);

  /* Chrome e superfícies especiais. Separadas da escala porque não são
     degraus dela: a nav é translúcida, o rodapé é o ponto mais fundo da
     página, e o hero interno é uma faixa de marca. */
  --surface-nav:    rgba(247,243,239,.97);
  --surface-footer: var(--cream-dark);  /* o "mais fundo" da página, agora no claro */
  --surface-hero:   var(--cream-dark);  /* heros internos (page/prof/blog) — sólidos, não foto */
  --surface-input:  #FFFFFF;
}

/* ── 1b-2. Texto sobre FOTOGRAFIA ─────────────────────────────────
   Incondicional, e não dentro de um tema: o hero da home e o selo sobre a foto
   da seção "sobre" ficam por cima de imagem escura, então o texto é claro nos
   DOIS temas. No tema escuro estes valores coincidem com os de :root, o que
   torna a regra inócua lá — e é justamente por coincidirem que ela pode ser
   incondicional em vez de duplicada por tema.

   Modo claro não é inverter tudo: é inverter as superfícies DO TEMA, e uma
   fotografia não é uma delas. */
.hero,
.about-image {
  --on-surface:        #F7F3EF;
  --on-surface-muted:  rgba(247,243,239,.70);
  /* .62 e não .55: a .55 dá 4,49:1 sobre `--surface-3` — reprova AA por um
     centésimo, e o texto que ela pinta é o papel do depoente e o rótulo de
     indicador. Um centésimo é o suficiente para o defeito existir. */
  --on-surface-soft:   rgba(247,243,239,.62);
  --on-surface-faint:  rgba(247,243,239,.40);
  --accent-text:       var(--gold);
  --accent-line:       var(--gold);
}

/* ── 1c. TEMA ESCURO (site público) ───────────────────────────────
   O CLARO é o padrão (:root, §1b) e o ESCURO é a exceção explícita.
   A ordem importa e não é estética: sem JS, sem localStorage e sem
   preferência de sistema, vale o :root — então o padrão do CSS TEM de ser o
   mesmo padrão que o produto promete. Com o escuro no :root, quem tivesse o JS
   bloqueado receberia escuro enquanto todo o resto do site abre claro.

   Só redefine a camada semântica. Nenhuma regra de componente muda: quem
   consome --surface-* / --on-surface-* vira sozinho.

   O <html data-theme="dark"> é escrito pelo script anti-flash em
   layouts/public.php, antes da primeira pintura. A @media prefers-color-scheme
   não é usada aqui de propósito — ela viveria em paralelo ao data-theme e as
   duas brigariam; o script lê a preferência do sistema e a converte em
   data-theme, deixando UMA fonte de verdade. */
:root[data-theme="dark"] {
  --surface-1:  var(--brown);       /* #1C1008 */
  --surface-2:  var(--brown-mid);   /* #2A1A08 */
  --surface-3:  var(--brown-warm);  /* #3D2510 */
  --surface-card: rgba(247,243,239,.04);

  /* Contrastes sobre --brown: on-surface 15,8:1 · muted 8,58:1 · soft 5,7:1.
     Os valores vêm do CLAUDE.md, que os mediu quando a sidebar do admin
     reprovou em 1,71:1 por usar token de fundo claro sobre fundo escuro. */
  --on-surface:        #F7F3EF;
  --on-surface-muted:  rgba(247,243,239,.70);
  /* .62 e não .55: a .55 dá 4,49:1 sobre `--surface-3` — reprova AA por um
     centésimo, e o texto que ela pinta é o papel do depoente e o rótulo de
     indicador. Um centésimo é o suficiente para o defeito existir. */
  --on-surface-soft:   rgba(247,243,239,.62);
  --on-surface-faint:  rgba(247,243,239,.40);

  /* Sobre fundo escuro o ouro não tem problema de contraste: volta a ser ouro
     nos dois papéis. */
  --accent-text:  var(--gold);
  --accent-line:  var(--gold);

  --hairline:     rgba(201,169,110,.22);
  --hairline-2:   rgba(247,243,239,.12);

  /* ── Painel no escuro ────────────────────────────────────────────────
     Clareados para o fundo escuro: #9B3A3A sobre --brown reprova tão feio
     quanto ouro sobre creme. */
  --admin-border:      rgba(247,243,239,.12);
  --admin-border-soft: rgba(247,243,239,.07);
  --admin-bg-row:      var(--brown-mid);
  --admin-danger:      #E07070;
  --admin-success:     #7FB894;
  --admin-info:        #8FBEDC;
  --admin-warning:     #E0A060;

  --surface-nav:    rgba(28,16,8,.97);
  --surface-footer: #0F0804;        /* mais fundo que --brown, de propósito */
  --surface-hero:   var(--brown);
  --surface-input:  rgba(255,255,255,.04);
}


/* ── 2. RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── <dialog> centralizado ───────────────────────────────────────────────────
   O reset acima zera `margin` em TUDO — e é `margin:auto` que o navegador usa
   para centralizar um <dialog> aberto. Com o reset, todo modal do projeto nasce
   grudado no canto superior esquerdo, e quem escrevesse o próximo repetiria o
   bug sem saber por quê.

   Fica na regra do ELEMENTO, não numa classe: vale para qualquer <dialog>, hoje
   e depois. `max-height` + `overflow` porque modal alto em tela baixa
   (notebook, celular deitado) vaza para fora e o botão de salvar some. */
dialog[open] {
  margin: auto;
  max-height: calc(100dvh - 2rem);
  max-width:  calc(100vw - 2rem);
  overflow-y: auto;
}
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* A raiz do tema. `body` (admin) segue clara e alheia a isto — ver §1b. */
body.public-body {
  background: var(--surface-1);
  color: var(--on-surface);
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--brown); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

/* ── 3. TIPOGRAFIA ───────────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

.text-display {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: .04em;
  line-height: 1.05;
}
.text-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.2;
}
.text-subhead {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 300;
  line-height: 1.4;
}
.text-body  { font-size: 1rem; line-height: 1.7; }
.text-small { font-size: .875rem; line-height: 1.65; }
.text-xs    { font-size: .75rem; line-height: 1.5; }
.text-label {
  font-family: var(--font-body);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.text-gradient {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── 4. UTILITÁRIOS DE COR ───────────────────────────────────── */
/* Legado nos nomes: hoje são os degraus 1, 2 e 3 da escala de superfície,
   não "escuro" literal — no tema claro viram creme, branco e creme-escuro. */
.bg-dark    { background: var(--surface-1) !important; }
.bg-medium  { background: var(--surface-2) !important; }
.bg-warm    { background: var(--surface-3) !important; }
.bg-cream   { background: var(--cream) !important; }
.bg-gold    { background: var(--gold) !important; }
.text-gold  { color: var(--gold) !important; }
.text-muted { color: var(--color-muted) !important; }
.text-soft  { color: var(--color-text-soft) !important; }
.text-dark  { color: var(--brown) !important; }
.text-on-dark { color: var(--color-text-on-dark) !important; }

/* Seções */
.section-dark   { background: var(--surface-1); }
.section-medium { background: var(--surface-2); }
.section-warm   { background: var(--surface-3); }
/*
 * ⚠️ Estas duas eram as ÚNICAS seções que não seguiam o tema.
 *
 * `--cream` e `--cream-dark` dizem COR, não papel: valem claro nos DOIS temas
 * (§12: `--brown: #F7F3EF` seria mentira). Suas irmãs logo acima já usavam a
 * escala de superfície. O resultado, medido em 28/07 no tema escuro: uma seção
 * creme com o texto claro por cima — `.service-card__price` a **2,03:1**,
 * `.prof-team-card__reg` a 3,62:1. E `.section-light` é a classe de seção mais
 * usada do site: 11 arquivos de view.
 *
 * `--surface-1` vale EXATAMENTE `var(--cream)` no tema claro e `--surface-3`
 * vale `var(--cream-dark)` — então o site claro não muda um pixel. O que muda é
 * o escuro, que passa a ter fundo escuro.
 */
.section-light  { background: var(--cream); }
.section-cream  { background: var(--cream-dark); }

/*
 * ⚠️ `.section-light` e `.section-cream` são FAIXAS CLARAS DELIBERADAS — claras
 * nos dois temas, como a sidebar do painel e a fotografia do hero (§12: "modo
 * claro não é inverter tudo, é inverter as superfícies DO TEMA, e uma
 * fotografia não é uma delas").
 *
 * O defeito não era o fundo: era o CONTEÚDO. O texto dentro delas usava
 * `--on-surface-*`, que inverte com o tema — e no escuro virava texto claro
 * sobre creme. Medido em 28/07: `.service-card__price` a **2,03:1**,
 * `.prof-team-card__reg` a 3,62:1, e a seção é usada em 11 views.
 *
 * A correção é ESCOPAR os tokens, exatamente como `.hero, .about-image` já faz
 * — e não trocar o fundo. Trocar o fundo foi a primeira tentativa e regrediu o
 * escuro de 11 para 20 reprovações, porque há regras (`.section-light
 * .section-title__eyebrow`) com a cor escura chumbada, que só fazem sentido
 * sobre creme.
 *
 * Aqui dentro, portanto, os tokens valem SEMPRE os valores calibrados para
 * fundo claro, nos dois temas.
 */
.section-light,
.section-cream {
  --on-surface:        #1C1008;
  --on-surface-muted:  var(--color-text-soft);   /* #4A3A28 — AAA sobre creme */
  --on-surface-soft:   var(--color-muted);       /* #6E5A42 — AA  sobre creme */
  --on-surface-faint:  rgba(28,16,8,.45);
  --accent-text:       #6B4A18;                  /* o ouro que se LÊ sobre claro */
  --accent-line:       var(--gold-dark);
  --surface-card:      #FFFFFF;
  --surface-raised:    #FFFFFF;
  --surface-input:     #FFFFFF;
  /* As superfícies ANINHADAS também ficam claras. Sem isto, um bloco que use
     `--surface-hero` (o hero do profissional) continuaria seguindo o tema e
     ficaria ESCURO dentro da faixa clara — com o texto já escopado para claro
     por cima. Medido: 1,71:1 no bio do profissional. Faixa clara é clara
     inteira, ou não é faixa. */
  --surface-1:         var(--cream);
  --surface-2:         #FFFFFF;
  --surface-3:         var(--cream-dark);
  --surface-hero:      var(--cream-dark);
  --hairline:          rgba(28,16,8,.14);
  --hairline-2:        rgba(28,16,8,.08);
  --admin-border:      rgba(28,16,8,.09);
}

/* ── 5. LAYOUT ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

.section    { padding-block: var(--space-3xl); }
.section-md { padding-block: var(--space-2xl); }
.section-sm { padding-block: var(--space-xl); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-lg);
}
.grid-auto-sm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* ── 6. NAV ──────────────────────────────────────────────────── */
.nav-public {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--surface-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-dark);
  transition: box-shadow var(--t-base);
}
.nav-public.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.5); }

.nav-public__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
  gap: 1rem;
  min-width: 0;
}

/* Logo */
.nav-public__logo { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; min-width: 0; }
.nav-public__logo-img { height: 2.75rem; width: auto; object-fit: contain; max-width: 160px; }
.nav-public__logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-public__logo-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--accent-text);
}
.nav-public__logo-tagline {
  font-size: .55rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  /* `--on-surface-soft`, não `--color-muted`: a segunda é calibrada para
     fundo CLARO e o nav segue o tema — dava 2,84:1 no escuro. */
  color: var(--on-surface-soft);
}

/* Links desktop */
.nav-public__links {
  display: flex;
  align-items: center;
  gap: clamp(.875rem, 2vw, 1.75rem);
}

.nav-public__link {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  transition: color var(--t-fast);
  position: relative;
  padding-bottom: 3px;
  white-space: nowrap;
}
.nav-public__link::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--t-base);
}
.nav-public__link:hover,
.nav-public__link.active { color: var(--accent-text); }
.nav-public__link:hover::after,
.nav-public__link.active::after { width: 100%; }

/* Submenus (desktop) */
.nav-public__item { position: relative; display: flex; align-items: center; }

.nav-public__link--parent {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav-public__caret {
  font-size: .5rem;
  transition: transform var(--t-base);
}
.nav-public__item.open .nav-public__caret { transform: rotate(180deg); }

.nav-public__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(.5rem);
  min-width: 13.5rem;
  padding: .5rem;
  /*
   * ⚠️ `--surface-nav` — o MESMO token do header, e é isso que o cliente pediu:
   * "o menu que abre deve acompanhar a cor do header".
   *
   * Estava `rgba(28,16,8,.99)` chumbado: marrom quase opaco nos DOIS temas,
   * enquanto `.nav-public__dropdown-link` usa `--on-surface-muted`, que
   * INVERTE. No tema claro o painel abria escuro com letra escura dentro.
   *
   * É a terceira ocorrência da mesma armadilha nesta varredura — `.nav-mobile`
   * e `.ai-widget__panel` foram as outras: superfície de COR fixa com texto de
   * token que muda. O header já resolvia certo; o dropdown ficou para trás.
   *
   * `.99` virou opaco de propósito: é um painel que flutua sobre o conteúdo, e
   * o §12 exige alpha >= .9 em tudo que flutua — senão a página aparece por
   * baixo. O `backdrop-filter` continua, para a borda ficar suave.
   */
  background: var(--surface-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  gap: .125rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
  z-index: 1001;
}
/* Ponte invisível: evita que o menu feche no vão entre o item e o dropdown */
.nav-public__dropdown::before {
  content: '';
  position: absolute;
  top: -.75rem; left: 0; right: 0;
  height: .75rem;
}
.nav-public__item:hover .nav-public__dropdown,
.nav-public__item:focus-within .nav-public__dropdown,
.nav-public__item.open .nav-public__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-public__dropdown-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .625rem .75rem;
  border-radius: .375rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-public__dropdown-link:hover,
.nav-public__dropdown-link.active {
  background: rgba(201,169,110,.12);
  color: var(--accent-text);
}
.nav-public__dropdown-link i { width: 1rem; text-align: center; font-size: .7rem; }

.nav-public__tag {
  margin-left: auto;
  padding: .1rem .4rem;
  border-radius: 1rem;
  background: rgba(201,169,110,.18);
  color: var(--accent-text);
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .1em;
}

/* CTA nav */
.nav-public__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  border: 1px solid var(--gold);
  color: var(--accent-text);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all var(--t-base);
  flex-shrink: 0;
}
.nav-public__cta:hover { background: var(--gold); color: var(--brown); }

/* Ações direita (CTA + burger) */
.nav-public__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Burger */
.nav-public__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  color: var(--accent-text);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Mobile nav */
/*
 * ⚠️ `--surface-nav`, NUNCA `--brown`.
 *
 * Estava `background: var(--brown)` — e `--brown` diz **cor**, não papel: vale
 * `#1C1008` nos DOIS temas (o §12 registra isso: `--brown: #F7F3EF` seria
 * mentira). O texto ao lado usa `--on-surface-muted`, que INVERTE com o tema.
 *
 * Resultado no tema claro: texto `#4A3A28` sobre fundo `#1C1008` — **1,71:1**,
 * medido em 28/07. O menu abria e ficava praticamente ilegível, e só no
 * celular, que é onde menos gente confere. Com `--surface-nav` o fundo
 * acompanha o tema e a mesma medição dá **9,87:1**.
 *
 * É exatamente a armadilha que o §12 descreve — usar token de COR onde o papel
 * é SUPERFÍCIE — e a razão de a camada `--surface-*` existir.
 */
.nav-mobile {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--surface-nav);
  border-bottom: 1px solid var(--color-border-dark);
  padding: 1.25rem clamp(1rem,5vw,2.5rem) 1.5rem;
  z-index: 999;
  display: none;
  flex-direction: column;
  gap: .25rem;
}
.nav-mobile.open { display: flex; }

.nav-mobile__link {
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  padding: .75rem 0;
  border-bottom: 1px solid var(--color-border-dark);
  transition: color var(--t-fast);
}
.nav-mobile__link:last-of-type { border-bottom: none; }
.nav-mobile__link:hover,
.nav-mobile__link.active { color: var(--accent-text); }

/* Grupos no mobile: <details> nativo — acessível e sem JS */
.nav-mobile__group { border-bottom: 1px solid var(--color-border-dark); }

.nav-mobile__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 0;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  cursor: pointer;
  list-style: none;
  transition: color var(--t-fast);
}
.nav-mobile__summary::-webkit-details-marker { display: none; }
.nav-mobile__summary:hover,
.nav-mobile__group[open] .nav-mobile__summary { color: var(--accent-text); }
.nav-mobile__summary i { font-size: .625rem; transition: transform var(--t-base); }
.nav-mobile__group[open] .nav-mobile__summary i { transform: rotate(180deg); }

.nav-mobile__sublink {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 0 .625rem 1rem;
  border-left: 1px solid var(--color-border-dark);
  margin-left: .25rem;
  font-size: .875rem;
  letter-spacing: .04em;
  color: var(--on-surface-soft);
  transition: color var(--t-fast);
}
.nav-mobile__sublink:last-child { padding-bottom: .875rem; }
.nav-mobile__sublink:hover,
.nav-mobile__sublink.active { color: var(--accent-text); }

@media (max-width: 960px) {
  .nav-public__links { display: none; }
  .nav-public__toggle { display: flex; }
}
/* Oculta o CTA antes que ele comalha o burger — breakpoint generoso */
@media (max-width: 640px) {
  .nav-public__cta { display: none; }
}

/* ── 7. BOTÕES ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 2rem;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all var(--t-base);
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}

.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-line);
}
.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-text);
  border-color: var(--accent-line);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--on-accent);
  transform: translateY(-1px);
}

.btn-outline-light {
  background: transparent;
  color: var(--on-surface);
  border-color: var(--on-surface-faint);
}
.btn-outline-light:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
  border-color: var(--color-border);
}
.btn-ghost:hover { background: var(--cream); color: var(--brown); }

.btn-danger  { background: var(--color-danger);  color: #fff; border-color: var(--color-danger); }
.btn-success { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.btn-danger:hover,
.btn-success:hover { opacity: .85; transform: translateY(-1px); }

.btn-sm { padding: .5rem 1.25rem; font-size: .75rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: .875rem; }
.btn-xl { padding: 1.125rem 3rem; font-size: .875rem; }
.btn-icon { padding: .625rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── 8. HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
  background: var(--brown);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: .55;          /* visível mas não ofuscante */
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(28,16,8,.92) 0%,
    rgba(28,16,8,.78) 55%,
    rgba(28,16,8,.45) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--space-2xl);
}
.hero__inner {
  /* Largura ditada pela linha mais longa do título no tamanho máximo (92px),
     medido no navegador: "Marcela Gouveia" = 654px e "Estética Avançada" =
     714px. Com os 600px originais ambas quebravam. Como é max-width, telas
     menores seguem se ajustando pelo clamp do título. */
  max-width: 740px;
  text-align: left;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 1.25rem;
}
.hero__eyebrow::before, .hero__eyebrow::after {
  content: '';
  display: block;
  width: 1.75rem;
  height: 1px;
  background: var(--gold);
  opacity: .6;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.75rem);
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--on-surface);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.hero__title-accent { color: var(--accent-text); display: block; }

.hero__subtitle {
  font-size: clamp(.9375rem, 2vw, 1.0625rem);
  color: var(--on-surface-muted);
  line-height: 1.8;
  max-width: 500px;
  margin-bottom: 2rem;
  font-weight: 300;
  letter-spacing: .01em;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201,169,110,.2);
  flex-wrap: wrap;
  gap: 0;
}

.hero__stat {
  padding-right: 2rem;
  margin-right: 2rem;
  border-right: 1px solid rgba(201,169,110,.2);
}
.hero__stat:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.hero__stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 300;
  color: var(--accent-text);
  line-height: 1;
}
.hero__stat-label {
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-surface-faint);
  margin-top: .25rem;
}

@media (max-width: 600px) {
  .hero__stats { gap: 1.5rem; }
  .hero__stat { border-right: none; padding-right: 0; margin-right: 0; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

/* ── Hero stats (novo — responsivo) ─────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201,169,110,.2);
}

.hero-stat { text-align: left; }

.hero-stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4.5vw, 2.5rem);
  font-weight: 300;
  color: var(--accent-text);
  line-height: 1;
}

.hero-stat__unit {
  font-size: 1.375rem;
}

.hero-stat__label {
  font-size: .625rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  /* `soft`, não `faint`: o degrau `faint` reprova AA DE PROPÓSITO (o comentário
     dele diz "decorativo — não use em texto que precise ser lido"), e aqui é
     rótulo de indicador, que é texto. Medido em 28/07: 3,56:1. */
  color: var(--on-surface-soft);
  margin-top: .3rem;
  line-height: 1.4;
}

.hero-stat__divider {
  width: 1px;
  height: 2.5rem;
  background: rgba(201,169,110,.2);
  margin: 0 clamp(1rem, 3vw, 2rem);
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: .75rem;
  }
  .hero-stat__divider { display: none; }
  .hero-stat { text-align: center; }
  .hero-stat__num { font-size: 1.625rem; }
  .hero-stat__label { font-size: .575rem; letter-spacing: .1em; }
}

/* ── 8b. HERO SCROLL INDICATOR ───────────────────────────────── */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
  color: var(--on-surface-faint);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--t-fast);
  z-index: 2;
}
.hero__scroll:hover { color: var(--gold, #C9A96E); }
.hero__scroll-icon {
  width: 1.5rem;
  height: 2.25rem;
  border: 1.5px solid currentColor;
  border-radius: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: .35rem;
}
.hero__scroll-dot {
  width: .3rem;
  height: .3rem;
  background: currentColor;
  border-radius: 50%;
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
  0%   { transform: translateY(0);   opacity: 1; }
  60%  { transform: translateY(.7rem); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}
@media (max-width: 480px) { .hero__scroll { display: none; } }

/* ── 9. SEÇÃO TÍTULOS ────────────────────────────────────────── */
.section-title {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-title__eyebrow {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .875rem;
}
/* Em fundo claro o --gold cai para ~2:1. Bronze escuro mantém o acento
   dourado e passa em AA (≥6:1). Seções escuras seguem com --gold. */
.section-light .section-title__eyebrow,
.section-cream .section-title__eyebrow { color: #6B4A18; }

.section-title__heading {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 3.25rem);
  font-weight: 300;
  letter-spacing: .03em;
  line-height: 1.15;
  margin-bottom: .75rem;
}
.section-dark  .section-title__heading,
.section-medium .section-title__heading,
.section-warm  .section-title__heading { color: var(--on-surface); }
.section-light .section-title__heading,
.section-cream .section-title__heading { color: var(--brown); }

.section-title__ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  margin-bottom: .875rem;
}
.section-title__ornament::before,
.section-title__ornament::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--gold);
  opacity: .6;
}
.section-title__diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}
.section-title__line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.section-title__sub {
  font-size: clamp(.875rem, 1.5vw, 1rem);
  max-width: 540px;
  margin-inline: auto;
  line-height: 1.8;
  font-weight: 300;
}
.section-dark  .section-title__sub,
.section-medium .section-title__sub,
.section-warm  .section-title__sub { color: var(--on-surface-soft); }
/* .section-cream faltava aqui: sem a regra o subtítulo herdava texto claro e
   ficava ilegível sobre o bege (1.13:1). O __heading acima já tratava os dois. */
.section-light .section-title__sub,
.section-cream .section-title__sub { color: var(--color-text-soft); }

/* ── 10. CARDS ───────────────────────────────────────────────── */
/* Card escuro (padrão público) */
.card {
  background: var(--surface-card);
  border: 1px solid var(--color-border-dark);
  overflow: hidden;
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: rgba(201,169,110,.45);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.card__image {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  opacity: .88;
  transition: opacity var(--t-base), transform var(--t-slow);
}
.card:hover .card__image { opacity: 1; transform: scale(1.03); }

/* Fallback quando o post não tem imagem: mesma geometria de .card__image
   (aspect-ratio, não altura fixa) para os cards ficarem alinhados. Visual
   equivalente ao .blog-card__image-placeholder usado na página do blog. */
.card__image-placeholder {
  width: 100%;
  aspect-ratio: 3/2;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Rótulo do PLACEHOLDER de antes/depois (§9: os pares fabricados saíram do
     ar e sobrou este marcador). 30% de ouro dá 1,05:1 — e mesmo sendo
     provisório, é texto na tela. */
  color: var(--accent-line);
  font-size: 2.5rem;
}

.card__body { padding: 1.25rem 1.5rem; flex: 1; }

.card__label {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .5rem;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--on-surface);
  margin-bottom: .5rem;
  letter-spacing: .02em;
  line-height: 1.3;
}
.card__text {
  font-size: .875rem;
  color: var(--on-surface-soft);
  line-height: 1.7;
}

.card__footer {
  padding: .875rem 1.5rem;
  border-top: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Card claro (admin) */
.card-light {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-base);
}
.card-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-light .card__title { color: var(--brown); }
.card-light .card__text  { color: var(--color-text-soft); }

/* ── 11. PROFISSIONAIS ───────────────────────────────────────── */
.professional-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border: 1px solid var(--color-border-dark);
  /* `--surface-card`, não um marrom translúcido: este card foi desenhado para
     o tema ESCURO (40-45% de marrom sobre fundo escuro). No tema claro ele vira
     cinza turvo, e o texto escuro por cima dá 2,12:1 — medido em 28/07. */
  background: var(--surface-card);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}
.professional-card::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--t-base);
}
.professional-card:hover::after { width: 60%; }
.professional-card:hover {
  border-color: rgba(201,169,110,.45);
  background: rgba(42,26,8,.8);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.professional-card__avatar {
  width: 7rem; height: 7rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 2px solid var(--color-border-dark);
  transition: border-color var(--t-base);
}
.professional-card:hover .professional-card__avatar { border-color: var(--accent-line); }

.professional-card__avatar-placeholder {
  width: 7rem; height: 7rem;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,169,110,.1);
  color: var(--accent-text);
  font-size: 2.5rem;
  border: 1px solid var(--color-border-dark);
}

.professional-card__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--on-surface);
  margin-bottom: .2rem;
  letter-spacing: .03em;
}
.professional-card__specialty {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .875rem;
}
.professional-card__bio {
  font-size: .875rem;
  color: var(--on-surface-soft);
  line-height: 1.7;
}

/* ── 12. FORMULÁRIOS ─────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  margin-bottom: 1rem;
}

.form-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  /* `--on-surface-soft` e não `--color-muted`: este rótulo aparece em card que
     SEGUE o tema (o do login unificado, entre outros), e `--color-muted` é
     calibrado para fundo claro — dava 2,61:1 sobre o card escuro. As faixas
     claras (`.section-light`) escopam o token de volta ao valor claro, então
     o formulário sobre creme não muda. */
  color: var(--on-surface-soft);
}

/* O popup de <select> é desenhado pelo SO e herda a cor do controle: sem esta
   regra, as opções ficam com texto claro sobre fundo claro (ilegíveis). */
.form-control option {
  background: var(--surface-1);
  color: var(--on-surface);
}

.form-control {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--surface-input);
  border: 1px solid rgba(201,169,110,.2);
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--on-surface);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 2px rgba(201,169,110,.15);
}
.form-control::placeholder { color: var(--on-surface-faint); }
.form-control:disabled { opacity: .5; cursor: not-allowed; }

.form-control-light {
  background: #fff;
  border: 1.5px solid var(--color-border);
  color: var(--brown);
  border-radius: var(--radius-md);
}
.form-control-light:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(201,169,110,.12); }
.form-control-light::placeholder { color: var(--color-muted); }

textarea.form-control,
textarea.form-control-light { resize: vertical; min-height: 120px; }

select.form-control,
select.form-control-light {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C9A96E' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
}

.form-error { font-size: .8rem; color: #E07070; margin-top: .25rem; }
.form-hint  { font-size: .8rem; color: var(--color-muted); margin-top: .25rem; }

/* ── 13. BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .75rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-primary   { background: rgba(201,169,110,.12); color: var(--accent-text);   border-color: rgba(201,169,110,.28); }
.badge-success   { background: rgba(74,124,90,.12);   color: #6AAD80; border-color: rgba(74,124,90,.28); }
.badge-warning   { background: rgba(201,169,110,.12); color: #D4AF37; border-color: rgba(201,169,110,.28); }
.badge-danger    { background: rgba(155,58,58,.12);   color: #E07070; border-color: rgba(155,58,58,.28); }
.badge-info      { background: rgba(74,107,138,.12);  color: #7AABCC; border-color: rgba(74,107,138,.28); }
.badge-muted     { background: rgba(138,117,96,.1);   color: var(--on-surface-soft); border-color: rgba(138,117,96,.2); }
.badge-pending   { background: rgba(201,169,110,.1);  color: var(--accent-text); border-color: rgba(201,169,110,.22); }
.badge-confirmed { background: rgba(74,124,90,.1);    color: #6AAD80; border-color: rgba(74,124,90,.22); }
.badge-canceled  { background: rgba(155,58,58,.1);    color: #E07070; border-color: rgba(155,58,58,.22); }
.badge-completed { background: rgba(74,107,138,.1);   color: #7AABCC; border-color: rgba(74,107,138,.22); }

/* ── 14. TABELAS ─────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
}
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: .875rem 1rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  background: var(--cream);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.table td {
  padding: .875rem 1rem;
  font-size: .9rem;
  color: var(--brown);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(201,169,110,.04); }
.table-actions { display: flex; gap: .375rem; align-items: center; }

/* ── 15. ALERTAS ─────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: .875rem 1.25rem;
  border-left: 3px solid;
  margin-bottom: 1.25rem;
  font-size: .9rem;
}
/* As cores de texto eram calibradas para fundo ESCURO — de quando o admin só
   existia escuro. Sobre claro, `#7AABCC` dá 2.16:1 e `#6AAD80` 2.4:1. Cada
   alert agora tem um par por tema; o fundo translúcido serve aos dois. */
.alert-success { background: rgba(74,124,90,.1);  border-color: #4A7C5A; color: #2F5D3F; }
.alert-danger  { background: rgba(155,58,58,.1);  border-color: #9B3A3A; color: #8A2F2F; }
.alert-warning { background: rgba(201,169,110,.1);border-color: var(--accent-line); color: var(--accent-text); }
.alert-info    { background: rgba(74,107,138,.1); border-color: #4A6B8A; color: #2F5470; }

:root[data-theme="dark"] .alert-success { color: #6AAD80; }
:root[data-theme="dark"] .alert-danger  { color: #E07070; }
:root[data-theme="dark"] .alert-info    { color: #7AABCC; }

/* ── 16. FAQ ─────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--color-border-dark); }
.faq-item:last-child { border-bottom: none; }

.faq-item__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 400;
  color: var(--on-surface);
  background: transparent;
  letter-spacing: .02em;
  transition: color var(--t-fast);
}
.faq-item__question:hover,
.faq-item.open .faq-item__question { color: var(--accent-text); }

.faq-item__icon {
  color: var(--accent-text);
  flex-shrink: 0;
  font-size: .875rem;
  opacity: .7;
  transition: transform var(--t-base);
}
.faq-item.open .faq-item__icon { transform: rotate(180deg); opacity: 1; }

.faq-item__answer {
  display: none;
  padding: 0 0 1.25rem;
  font-size: .9375rem;
  color: var(--on-surface-soft);
  line-height: 1.85;
}
.faq-item.open .faq-item__answer { display: block; }

/* FAQ claro */
.faq-light .faq-item { border-color: var(--color-border); }
.faq-light .faq-item__question { color: var(--brown); }
.faq-light .faq-item__question:hover,
.faq-light .faq-item.open .faq-item__question { color: var(--accent-text); }
.faq-light .faq-item__answer { color: var(--color-text-soft); }

/* ── 17. REVIEWS ─────────────────────────────────────────────── */
.review-card {
  border: 1px solid var(--color-border-dark);
  padding: var(--space-xl);
  /* Idem `.professional-card`: translúcido escuro sobre faixa clara virava
     cinza, com o papel do depoente a 2,20:1. */
  background: var(--surface-card);
  transition: all var(--t-base);
  position: relative;
}
.review-card::before {
  content: '\201C';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--accent-text);
  opacity: .15;
  line-height: 1;
}
.review-card:hover { border-color: rgba(201,169,110,.4); background: rgba(42,26,8,.7); }

.review-stars { display: flex; gap: 3px; color: var(--accent-text); margin-bottom: 1rem; font-size: .875rem; }
.review-stars .empty { color: rgba(201,169,110,.18); }

.review-text {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--on-surface-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}
.review-author { display: flex; align-items: center; gap: .875rem; }
.review-author__name  { font-size: .875rem; font-weight: 600; color: var(--on-surface); }
.review-author__role  { font-size: .75rem; color: var(--on-surface-soft); letter-spacing: .04em; }

/* ── 18. AGENDAMENTO STEPS ───────────────────────────────────── */
.booking-steps { display: flex; align-items: center; margin-bottom: 2.5rem; overflow-x: auto; }
.booking-step  { display: flex; flex-direction: column; align-items: center; gap: .375rem; min-width: 80px; }
.booking-step__num {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--color-border-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 600;
  color: var(--color-muted);
  background: transparent;
  transition: all var(--t-base);
}
.booking-step.active .booking-step__num { border-color: var(--accent-line); color: var(--accent-text); background: rgba(201,169,110,.1); }
.booking-step.done   .booking-step__num { border-color: var(--color-success); color: #fff; background: var(--color-success); }
.booking-step__label { font-size: .7rem; color: var(--color-muted); font-weight: 500; letter-spacing: .05em; }
.booking-step.active .booking-step__label { color: var(--accent-text); }
.booking-step-line { flex: 1; height: 1px; background: var(--color-border-dark); min-width: 2rem; margin-bottom: 1.25rem; }

/* ── 19. ABOUT GRID ──────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image { display: block; } /* foto visível no mobile */
  .about-image__main { aspect-ratio: 4/3; max-height: 420px; }
  .about-image__frame { display: none; }
  .about-image__badge { right: 0; bottom: 0; }
}

.about-image { position: relative; }
.about-image__main { width: 100%; object-fit: cover; aspect-ratio: 3/4; }
.about-image__frame {
  position: absolute;
  top: -1rem; left: -1rem; right: 1rem; bottom: 1rem;
  border: 1px solid var(--color-border-dark);
  z-index: -1;
}
.about-image__badge {
  position: absolute;
  bottom: 1.5rem; right: -1.5rem;
  background: var(--brown);
  border: 1px solid var(--color-border-dark);
  padding: 1rem 1.5rem;
  min-width: 150px;
}
@media (max-width: 900px) {
  .about-image__badge { right: 0; }
}
.about-image__badge-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--accent-text);
  line-height: 1;
}
.about-image__badge-label {
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-surface-soft);
}

.about-credentials { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.about-credential {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-dark);
}
.about-credential:last-child { border-bottom: none; }
.about-credential__icon { color: var(--accent-text); font-size: .875rem; margin-top: .1rem; flex-shrink: 0; }
.about-credential__text { font-size: .875rem; color: var(--on-surface-muted); line-height: 1.65; }

/* ── 20. ADMIN LAYOUT ────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  background: var(--cream);
}

.admin-topbar {
  grid-column: 1/-1;
  height: var(--nav-h);
  background: var(--surface-topbar)  /* fixa: precisa ser OPACA (ver .topbar) */;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding-inline: 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

.admin-sidebar {
  background: var(--brown);
  border-right: 1px solid rgba(201,169,110,.12);
  overflow-y: auto;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  padding: 1rem 0;
  transition: transform var(--t-base);
}

.admin-main { padding: 1.5rem; overflow-x: hidden; }

.admin-nav-group { margin-bottom: 1.25rem; }
.admin-nav-group__label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(201,169,110,.35);
  padding: 0 1rem .375rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .6rem 1rem;
  font-size: .8375rem;
  font-weight: 400;
  color: rgba(247,243,239,.48);
  transition: all var(--t-fast);
  border-left: 2px solid transparent;
  position: relative;
}
.admin-nav-link:hover { background: rgba(201,169,110,.06); color: var(--gold); }
.admin-nav-link.active {
  background: rgba(201,169,110,.08);
  color: var(--gold);
  border-left-color: var(--gold);
  font-weight: 500;
}
.admin-nav-link__icon { width: 1rem; text-align: center; flex-shrink: 0; font-size: .875rem; }
.admin-nav-link__badge {
  margin-left: auto;
  font-size: .65rem;
  font-weight: 700;
  background: var(--color-danger);
  color: #fff;
  padding: .1rem .5rem;
  border-radius: var(--radius-full);
}

/* Stat cards admin */
.stat-card {
  /* `background:#fff` foi REMOVIDO em 17/07/2026 (§9, #36). Era código morto:
     a definição de .stat-card em ~L2856 vence por ordem e já usa
     `var(--surface-card)`. Mas era uma armadilha — qualquer reordenação ou split
     ressuscitava "cartão branco no tema escuro", o bug que o §8.8 diz ter
     resolvido. Sem a linha, não há o que ressuscitar. O background sai só da
     definição temática, uma fonte só. */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all var(--t-base);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card__icon {
  width: 3rem; height: 3rem;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; flex-shrink: 0;
  background: var(--gold-light);
  color: var(--accent-text);
}
.stat-card__label { font-size: .8rem; color: var(--color-text-soft); margin-bottom: .25rem; }
/* `--brown` diz COR, não papel: é #1C1008 nos dois temas (§12). Com o cartão
   seguindo o tema, o número ficava preto sobre marrom — 1.09:1, invisível. */
.stat-card__value { font-size: 1.75rem; font-weight: 700; color: var(--on-surface); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card__change { font-size: .8rem; color: var(--color-success); margin-top: .25rem; }
.stat-card__change.down { color: var(--color-danger); }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.page-header__title { font-size: 1.375rem; font-weight: 700; color: var(--on-surface); }
.page-header__sub   { font-size: .875rem; color: var(--on-surface-soft); margin-top: .2rem; }

/* ── 21. MOBILE ADMIN ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    top: var(--nav-h); left: 0; bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 199;
  }
  .admin-sidebar-overlay.open { display: block; }
}
@media (max-width: 640px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  .admin-main  { padding: 1rem; }
}

/* ── 22. ÁREA DO PACIENTE ────────────────────────────────────── */
.patient-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
@media (max-width: 768px) { .patient-layout { grid-template-columns: 1fr; } }
.patient-sidebar {
  background: var(--brown);
  border-right: 1px solid rgba(201,169,110,.12);
  padding: 2rem 1rem;
}

/* ── 23. FOOTER ──────────────────────────────────────────────── */
.footer-public {
  background: var(--surface-footer);
  border-top: 1px solid rgba(201,169,110,.12);
  padding-block: var(--space-3xl) var(--space-xl);
}

.footer-public__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 960px) { .footer-public__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-public__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* `width: auto` pelo mesmo motivo do `.google-badge`: o `img_dims()` declara
   a largura real no atributo, e sem isto o logo é esticado até o contêiner. */
.footer-public__logo { height: 2.5rem; width: auto; margin-bottom: 1.25rem; }
.footer-public__desc { font-size: .875rem; color: var(--on-surface-soft); line-height: 1.8; margin-bottom: 1.25rem; }
.footer-public__heading {
  font-size: .6rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 1rem;
}
.footer-public__links { display: flex; flex-direction: column; gap: .5rem; }
.footer-public__links--contact { gap: .875rem; }
.footer-public__link { font-size: .875rem; color: var(--on-surface-soft); transition: color var(--t-fast); }
.footer-public__link:hover { color: var(--accent-text); }

.footer-public__social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-public__social-link {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201,169,110,.22);
  color: var(--on-surface-soft);
  font-size: .875rem;
  transition: all var(--t-base);
}
.footer-public__social-link:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
  background: rgba(201,169,110,.08);
}

.footer-public__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201,169,110,.1);
  flex-wrap: wrap;
  gap: .75rem;
}
@media (max-width: 560px) {
  .footer-public__bottom { flex-direction: column; align-items: flex-start; }
}
/* `soft` e não `faint`: é o texto de copyright e dos links legais — tem de
   ser lido. Reprovava AA nos dois temas (§12, "Aberto", item 2). */
.footer-public__copy { font-size: .8rem; color: var(--on-surface-soft); }

/* ── 24. WHATSAPP FLOAT ──────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem; right: 1.75rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: .625rem;
  background: linear-gradient(135deg, #C9A96E, #A07840);
  color: #1C1008;
  border-radius: var(--radius-full);
  padding: .875rem;
  box-shadow: 0 4px 20px rgba(201,169,110,.4);
  transition: all var(--t-base);
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(201,169,110,.55); }
.whatsapp-float__icon { font-size: 1.5rem; line-height: 1; }
.whatsapp-float__text {
  font-size: .875rem; font-weight: 600; white-space: nowrap;
  max-width: 0; overflow: hidden;
  transition: max-width var(--t-slow);
}
.whatsapp-float:hover .whatsapp-float__text { max-width: 140px; }
@media (max-width: 480px) {
  .whatsapp-float { bottom: 1.25rem; right: 1.25rem; }
  .whatsapp-float__text { display: none; }
}

/* ── 25. RESULTADOS ANTES/DEPOIS ─────────────────────────────── */
.result-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; position: relative; overflow: hidden; }
.result-pair__label {
  position: absolute; bottom: .625rem;
  font-size: .6rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  background: rgba(28,16,8,.85);
  color: var(--accent-text);
  padding: .2rem .6rem;
  z-index: 1;
}
.result-pair__label--before { left: .625rem; }
.result-pair__label--after  { right: .625rem; }

/* ── 26. UTILITÁRIOS ─────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aspect-video  { aspect-ratio: 16/9; }
.aspect-square { aspect-ratio: 1; }
.aspect-4-3    { aspect-ratio: 4/3; }
.aspect-3-4    { aspect-ratio: 3/4; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm   { display: flex; align-items: center; gap: .5rem; }
.flex-gap-md   { display: flex; align-items: center; gap: 1rem; }
.divider       { border: none; border-top: 1px solid var(--color-border); margin-block: 1.5rem; }
.divider-dark  { border: none; border-top: 1px solid var(--color-border-dark); margin-block: 1.5rem; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(201,169,110,.05) 25%, rgba(201,169,110,.12) 50%, rgba(201,169,110,.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Animações */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(1.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-in-up { animation: fadeInUp .6s ease both; }
.animate-fade-in    { animation: fadeIn .5s ease both; }
.delay-100 { animation-delay: .1s; }
.delay-200 { animation-delay: .2s; }
.delay-300 { animation-delay: .3s; }
.delay-400 { animation-delay: .4s; }
.delay-500 { animation-delay: .5s; }

/* Print */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ── 27. CARD VARIANTES ──────────────────────────────────────── */
/* Card claro — para seções com fundo creme/branco */
.card--light {
  background: #fff;
  border: 1px solid rgba(28,16,8,.1);
}
.card--light:hover {
  border-color: var(--accent-line);
  box-shadow: 0 8px 32px rgba(28,16,8,.12);
}
.card--light .card__title  { color: var(--brown); }
.card--light .card__text   { color: var(--color-text-soft); }
.card--light .card__label  { color: var(--accent-text); }
.card--light .card__footer { border-color: rgba(28,16,8,.08); }

/* ── 28–29. PAGE HERO / SECTION HELPERS → see PUBLIC PAGES block below ── */

/* ── 29. SECTION HELPERS ─────────────────────────────────────── */
.section-title { /* reuse como shorthand */ }

/* Classe de bloco de título centrado — shorthand */
.block-title {
  text-align: center;
  margin-bottom: 3rem;
}
.block-title__eyebrow {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-text);
  display: block;
  margin-bottom: .75rem;
}
.block-title__heading {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4.5vw, 3rem);
  font-weight: 300;
  letter-spacing: .03em;
  line-height: 1.15;
  margin-bottom: .625rem;
}
/* cor automática pelo contexto */
.section-dark .block-title__heading,
.section-medium .block-title__heading { color: var(--on-surface); }
.section-light .block-title__heading,
.section-cream .block-title__heading  { color: var(--brown); }

.block-title__sub {
  font-size: clamp(.875rem, 1.5vw, 1rem);
  line-height: 1.8;
  max-width: 42rem;
  margin-inline: auto;
}
.section-dark .block-title__sub,
.section-medium .block-title__sub { color: var(--on-surface-soft); }
.section-light .block-title__sub,
.section-cream .block-title__sub  { color: var(--color-text-soft); }

/* ── 30. CONTACT INFO ITEM ───────────────────────────────────── */
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(28,16,8,.08);
}
.contact-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.contact-item--dark {
  border-color: var(--color-border-dark);
}

.contact-item__icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: rgba(201,169,110,.1);
  border: 1px solid rgba(201,169,110,.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent-text);
  font-size: .875rem;
}
.contact-item__label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: .25rem;
}
.contact-item__value {
  font-size: .9375rem;
  color: var(--brown);
  line-height: 1.6;
}
.contact-item__value a { color: inherit; transition: color var(--t-fast); }
.contact-item__value a:hover { color: var(--accent-text); }

/* Dark variant */
.contact-item--dark .contact-item__label { color: var(--on-surface-faint); }
.contact-item--dark .contact-item__value { color: var(--on-surface); }
.contact-item--dark .contact-item__value a:hover { color: var(--accent-text); }

/* ── 31. FORMULÁRIO DE GRID ──────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── 32. SHARE BUTTONS ───────────────────────────────────────── */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.125rem;
  font-size: .8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.share-btn:hover { opacity: .88; transform: translateY(-1px); }
.share-btn--whatsapp { background: linear-gradient(135deg, #C9A96E, #A07840); color: #1C1008; }
.share-btn--facebook  { background: #1877F2; color: #fff; }

/* ── 34. ARTICLE BODY ────────────────────────────────────────── */
.article-body {
  color: rgba(28,16,8,.8);
  line-height: 1.9;
  font-size: 1.0625rem;
}
.article-body p    { margin-bottom: 1.25em; }
.article-body h2   { font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; color: var(--brown); margin: 2em 0 .75em; }
.article-body h3   { font-family: var(--font-display); font-size: 1.375rem; font-weight: 400; color: var(--brown); margin: 1.5em 0 .5em; }
.article-body ul   { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25em; }
.article-body ol   { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1.25em; }
.article-body li   { margin-bottom: .4em; }
.article-body strong { font-weight: 600; color: var(--brown); }
.article-body em   { font-style: italic; }
.article-body a    { color: var(--accent-text); text-decoration: underline; }
.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  margin: 1.5em 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-text-soft);
}

/* ── 35. SIDEBAR STICKY ──────────────────────────────────────── */
.sidebar-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

/* ── 36. INFO BOX ────────────────────────────────────────────── */
.info-box {
  background: var(--brown);
  border: 1px solid var(--color-border-dark);
  padding: 2rem;
}
.info-box--light {
  background: #fff;
  border: 1px solid rgba(28,16,8,.1);
}
.info-box__heading {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--on-surface);
  margin-bottom: 1.5rem;
}
.info-box--light .info-box__heading { color: var(--brown); }

.info-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border-dark);
}
.info-row:last-child { border-bottom: none; }
.info-row--light { border-color: rgba(28,16,8,.08); }
.info-row__icon {
  width: 2.75rem; height: 2.75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--color-border-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent-text);
  font-size: .9375rem;
}
.info-row__icon--light {
  background: rgba(201,169,110,.08);
  border-color: rgba(201,169,110,.2);
}
.info-row__label {
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-surface-faint);
  margin-bottom: .2rem;
}
.info-row__label--light { color: var(--color-muted); }
.info-row__value {
  font-size: .9375rem;
  color: var(--on-surface);
}
.info-row__value--light { color: var(--brown); }

/* ── 37. BLOG CARD ───────────────────────────────────────────── */
.blog-card {
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--t-base);
}
.blog-card:hover {
  border-color: var(--accent-line);
  box-shadow: 0 8px 32px rgba(28,16,8,.1);
  transform: translateY(-3px);
}
.blog-card__image { width: 100%; height: 13rem; object-fit: cover; transition: transform var(--t-slow); }
.blog-card:hover .blog-card__image { transform: scale(1.04); }
.blog-card__image-wrap { height: 13rem; overflow: hidden; display: block; }
.blog-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card__meta { font-size: .75rem; color: var(--color-muted); margin-bottom: .875rem; }
.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--brown);
  line-height: 1.35;
  margin-bottom: .75rem;
  transition: color var(--t-fast);
}
.blog-card:hover .blog-card__title { color: var(--accent-text); }
.blog-card__excerpt { font-size: .875rem; color: var(--color-text-soft); line-height: 1.7; flex: 1; margin-bottom: 1.25rem; }
.blog-card__footer {
  padding-top: .875rem;
  border-top: 1px solid rgba(28,16,8,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.blog-card__read-more {
  font-size: .8125rem;
  color: var(--accent-text);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: gap var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}
.blog-card:hover .blog-card__read-more { gap: .625rem; }
.blog-card__image-placeholder {
  height: 13rem;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Rótulo do PLACEHOLDER de antes/depois (§9: os pares fabricados saíram do
     ar e sobrou este marcador). 30% de ouro dá 1,05:1 — e mesmo sendo
     provisório, é texto na tela. */
  color: var(--accent-line);
  font-size: 2.5rem;
}

/* Badge de categoria sobre a imagem do card */
.blog-card__image-wrap { position: relative; }
.blog-card__badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--gold);
  color: var(--on-accent);
  font-size: .625rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  z-index: 1;
}

/* Wrapper do corpo do blog com padding (substitui .section.section-light inline) */
.blog-body {
  background: var(--cream);
  padding-block: 2.5rem 4rem;
}

/* ── 37b. BLOG — layout, sidebar, post ──────────────────────── */

/* ── Grid principal: content + sidebar ── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 21rem;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar  { order: -1; }          /* sidebar acima no mobile */
}

.blog-main { min-width: 0; }

/* ── Busca no hero da listagem ── */
.blog-search-form { margin-top: 1.75rem; max-width: 36rem; margin-inline: auto; }
.blog-search-wrap {
  display: flex;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(247,243,239,.2);
  border-radius: .375rem;
  overflow: hidden;
}
.blog-search-input {
  flex: 1;
  padding: .75rem 1.125rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--on-surface);
  font-size: .9375rem;
  font-family: var(--font-body);
}
.blog-search-input::placeholder { color: var(--on-surface-faint); }
.blog-search-input--sm {
  color: var(--color-text);
  background: #fff;
}
.blog-search-input--sm::placeholder { color: var(--color-muted); }
.blog-search-btn {
  padding: .75rem 1.125rem;
  background: var(--gold);
  border: none;
  cursor: pointer;
  color: var(--on-accent);
  font-size: .9375rem;
  transition: background var(--t-fast);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.blog-search-btn:hover { background: var(--gold-dark); }
.blog-search-btn--sm { background: var(--brown); padding: .625rem 1rem; }
.blog-search-btn--sm:hover { background: var(--gold-dark); }

/* ── Barra de filtro ativo ── */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
  padding: .75rem 1rem;
  background: rgba(201,169,110,.06);
  border: 1px solid rgba(201,169,110,.18);
}
.blog-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--gold);
  color: var(--on-accent);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .25rem .625rem;
  border-radius: .25rem;
}
.blog-filter-tag__remove {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 1.125rem;
  line-height: 1;
}
.blog-filter-tag__remove:hover { color: #fff; }
.blog-filter-count { font-size: .8125rem; color: var(--color-muted); margin-left: auto; }
.blog-filter-clear { font-size: .8125rem; color: var(--accent-text); text-decoration: underline; margin-left: .5rem; }

/* Categoria badge nos cards */
.blog-card__cat-link {
  display: inline-block;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: rgba(201,169,110,.12);
  padding: .175rem .5rem;
  border-radius: .25rem;
  text-decoration: none;
  transition: background var(--t-fast);
}
.blog-card__cat-link:hover { background: rgba(201,169,110,.25); }

/* ── Empty state ── */
.blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 5rem 0;
  color: var(--color-muted);
  text-align: center;
}
.blog-empty i { font-size: 3rem; opacity: .25; color: var(--accent-text); }

/* ── Paginação ── */
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin-top: 2.5rem; }
.pagination__num { min-width: 2.5rem; justify-content: center; }

/* ── Sidebar ── */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 5.5rem;
}
@media (max-width: 1100px) {
  .blog-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .blog-sidebar .blog-sidebar__widget { flex: 1 1 18rem; }
}
@media (max-width: 640px) {
  .blog-sidebar { flex-direction: column; }
  .blog-sidebar .blog-sidebar__widget { flex: 1 1 100%; }
}

.blog-sidebar__widget {
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.08);
  padding: 1.375rem;
}

.blog-sidebar__title {
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 1rem;
  padding-bottom: .625rem;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.blog-sidebar__title i { color: var(--gold); }

/* ── Sidebar: busca ── */
.blog-sidebar__search .blog-search-wrap {
  border-color: rgba(28,16,8,.15);
  background: #faf9f7;
  border-radius: .25rem;
}

/* ── Categorias lista ── */
.blog-cat-list { list-style: none; margin: 0; padding: 0; }
.blog-cat-list li { border-bottom: 1px solid rgba(28,16,8,.05); }
.blog-cat-list li:last-child { border-bottom: none; }
.blog-cat-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .25rem;
  text-decoration: none;
  color: var(--color-text-soft);
  font-size: .875rem;
  transition: color var(--t-fast);
}
.blog-cat-list__item:hover { color: var(--accent-text); }
.blog-cat-list__item--active { color: var(--accent-text); font-weight: 700; }
.blog-cat-list__count {
  font-size: .6875rem;
  font-weight: 700;
  background: rgba(28,16,8,.07);
  color: var(--color-muted);
  padding: .125rem .5rem;
  border-radius: 2rem;
  min-width: 1.5rem;
  text-align: center;
}
.blog-cat-list__item--active .blog-cat-list__count {
  background: var(--gold);
  color: var(--on-accent);
}

/* ── Posts recentes ── */
.blog-recent-list { list-style: none; margin: 0; padding: 0; }
.blog-recent-item { border-bottom: 1px solid rgba(28,16,8,.05); }
.blog-recent-item:last-child { border-bottom: none; }
.blog-recent-item__link {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .625rem 0;
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.blog-recent-item__link:hover { opacity: .75; }
.blog-recent-item__thumb {
  width: 3.75rem;
  height: 3.75rem;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface-2);
}
.blog-recent-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-recent-item__thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(201,169,110,.3); font-size: 1.125rem;
}
.blog-recent-item__info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.blog-recent-item__title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-recent-item__date { font-size: .6875rem; color: var(--color-muted); }

/* ── CTA sidebar ── */
.blog-sidebar__cta {
  background: linear-gradient(160deg, var(--brown) 0%, #3a1e0a 100%);
  border-color: transparent;
  text-align: center;
}
.blog-sidebar__cta-lead {
  font-size: .875rem;
  color: var(--on-surface-muted);
  margin-bottom: 1.125rem;
  line-height: 1.55;
}

/* ── Breadcrumb ── */
.blog-breadcrumb {
  background: #f5f1ec;
  border-bottom: 1px solid rgba(28,16,8,.07);
  padding: .625rem 0;
}
.blog-breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  font-size: .8125rem;
  color: var(--color-muted);
  overflow: hidden;
}
.blog-breadcrumb__list li { display: flex; align-items: center; white-space: nowrap; }
.blog-breadcrumb__list li + li::before {
  content: '\203A'; /* › */
  margin: 0 .4rem;
  opacity: .4;
  font-size: 1rem;
}
.blog-breadcrumb__list a { color: var(--accent-text); text-decoration: none; }
.blog-breadcrumb__list a:hover { text-decoration: underline; }
.blog-breadcrumb__current {
  color: var(--color-muted);
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Post hero ── */
.blog-post-hero {
  background: linear-gradient(150deg, var(--brown) 0%, #251208 100%);
  padding: 3rem 0 2.75rem;
}
.blog-post-hero__inner { max-width: 100%; }
.blog-post-hero__cat { margin-bottom: .875rem; display: inline-block; }
.blog-post-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.625rem);
  font-weight: 400;
  color: var(--on-surface);
  line-height: 1.22;
  margin-bottom: 1rem;
}
.blog-post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  font-size: .8125rem;
  color: var(--on-surface-soft);
  margin-bottom: 1rem;
}
.blog-post-hero__meta i { color: var(--accent-text); margin-right: .3rem; }
.blog-post-hero__excerpt {
  font-size: 1rem;
  color: var(--on-surface-muted);
  line-height: 1.65;
  max-width: 44rem;
  margin-top: .75rem;
}

/* ── Imagem de capa do post ── */
.blog-post-cover {
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid rgba(28,16,8,.08);
}
/* exibe a imagem na proporção EXATA em que foi salva/recortada no post (sem re-cortar) */
.blog-post-cover__img { width: 100%; height: auto; object-fit: contain; display: block; }

/* ── Corpo do artigo ── */
.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: #4a3a2e;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--brown);
  margin: 2.25rem 0 .875rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(201,169,110,.22);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 500;
  color: var(--brown);
  margin: 1.75rem 0 .625rem;
}
.article-body p { margin-bottom: 1.125rem; }
.article-body ul,
.article-body ol { padding-left: 1.375rem; margin-bottom: 1.125rem; }
.article-body li { margin-bottom: .4rem; }
.article-body strong { font-weight: 600; color: var(--brown); }
.article-body em { font-style: italic; }
.article-body a { color: var(--accent-text); text-decoration: underline; }
.article-body a:hover { color: var(--brown); }
.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: .875rem 1.25rem;
  margin: 1.75rem 0;
  background: rgba(201,169,110,.05);
  font-style: italic;
  color: var(--color-text-soft);
}
/* Imagens inseridas no corpo do artigo */
.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.75rem auto;
  border-radius: .25rem;
  border: 1px solid rgba(28,16,8,.08);
}
/* Legenda de imagem (TinyMCE figura/figcaption) */
.article-body figure {
  margin: 1.75rem 0;
  text-align: center;
}
.article-body figure img { margin: 0 auto .625rem; }
.article-body figcaption {
  font-size: .8125rem;
  color: var(--color-muted);
  font-style: italic;
}
/* Vídeo embed responsivo */
.article-body iframe,
.article-body video {
  max-width: 100%;
  display: block;
  margin: 1.75rem auto;
  border-radius: .25rem;
}
/* Tabelas */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: .9375rem;
}
.article-body th,
.article-body td {
  padding: .625rem .875rem;
  border: 1px solid rgba(28,16,8,.1);
  text-align: left;
}
.article-body th {
  background: rgba(201,169,110,.1);
  font-weight: 700;
  color: var(--brown);
}
.article-body tr:nth-child(even) td { background: rgba(28,16,8,.02); }
/* Código inline */
.article-body code {
  font-family: monospace;
  font-size: .875em;
  background: rgba(28,16,8,.06);
  padding: .125rem .375rem;
  border-radius: var(--radius-sm);
  color: var(--brown);
}

/* ── Compartilhar ── */
.blog-post-share {
  display: flex;
  align-items: center;
  gap: .875rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(28,16,8,.08);
}
.blog-post-share__label {
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.blog-post-share__btns { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── CTA após artigo ── */
.blog-post-cta { margin-top: 2.5rem; text-align: center; }
.blog-post-cta__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--on-surface);
  margin-bottom: .625rem;
}
.blog-post-cta__sub { color: var(--on-surface-soft); margin-bottom: 1.5rem; font-size: .9375rem; }

/* ── 38. SERVICE CARD ────────────────────────────────────────── */
.service-card {
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--t-base);
}
.service-card:hover {
  border-color: var(--accent-line);
  box-shadow: 0 8px 32px rgba(28,16,8,.1);
  transform: translateY(-3px);
}
.service-card__image-wrap { height: 14rem; overflow: hidden; flex-shrink: 0; }
.service-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.service-card:hover .service-card__image { transform: scale(1.05); }
.service-card__image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--brown), var(--brown-mid));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text); font-size: 2.5rem; opacity: .6;
}
.service-card__body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.service-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--brown);
  margin-bottom: .75rem;
  line-height: 1.3;
}
.service-card__desc { font-size: .875rem; color: var(--color-text-soft); line-height: 1.7; flex: 1; margin-bottom: 1.25rem; }
.service-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .875rem 0;
  border-top: 1px solid rgba(28,16,8,.07);
  border-bottom: 1px solid rgba(28,16,8,.07);
  margin-bottom: 1.25rem;
}
.service-card__meta-label {
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: .2rem;
}
.service-card__duration { font-size: .9375rem; color: var(--brown); }
.service-card__price    { font-size: 1.125rem; font-weight: 500; color: var(--accent-text); }

/* ── 39. PROFISSIONAL PROFILE (mini link-page) ───────────────── */
.prof-profile-page { background: #F7F3EF; min-height: 60vh; padding: 3rem 0 5rem; }
.prof-profile-card {
  max-width: 52rem;
  margin: 0 auto;
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.09);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 20rem 1fr;
  box-shadow: 0 8px 32px rgba(28,16,8,.07);
}
.prof-profile__photo-col {
  position: relative;
  background: var(--surface-1);
  min-height: 28rem;
}
.prof-profile__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.prof-profile__placeholder {
  width: 100%;
  height: 100%;
  min-height: 28rem;
  background: linear-gradient(160deg, #2a1a0a 0%, #1C1008 100%);
  display: flex; align-items: center; justify-content: center;
}
.prof-profile__placeholder-initial {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 300;
  color: rgba(201,169,110,.3);
}
.prof-profile__body {
  padding: 2.5rem 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.prof-profile__specialty {
  font-size: .625rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold, #C9A96E);
  margin-bottom: .75rem;
  display: inline-flex; align-items: center;
  border: 1px solid rgba(201,169,110,.35);
  padding: .35rem .75rem; border-radius: 2rem; width: fit-content;
}
.prof-profile__name {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 400;
  color: var(--brown, #1C1008);
  line-height: 1.15;
  margin-bottom: .5rem;
}
.prof-profile__reg { font-size: .8125rem; color: var(--color-muted); letter-spacing: .06em; margin-bottom: 1.25rem; }
.prof-profile__divider { width: 3rem; height: 2px; background: linear-gradient(90deg, var(--gold,#C9A96E), transparent); margin-bottom: 1.5rem; }
.prof-profile__bio { color: var(--color-text-soft); line-height: 1.85; font-size: .9375rem; margin-bottom: 1.75rem; }
.prof-profile__services-heading {
  font-size: .6rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--color-muted); margin-bottom: .75rem;
}
.prof-profile__services { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; margin-bottom: 1.75rem; }
.prof-profile__service {
  padding: .75rem .875rem;
  border: 1px solid rgba(28,16,8,.1);
  border-radius: .375rem;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.prof-profile__service:hover { border-color: var(--accent-line); background: rgba(201,169,110,.04); }
.prof-profile__service-name { font-size: .875rem; color: var(--brown); margin-bottom: .15rem; font-weight: 500; }
.prof-profile__service-desc { font-size: .75rem; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-profile__cta { margin-top: auto; padding-top: 1.5rem; }

@media (max-width: 768px) {
  .prof-profile-card { grid-template-columns: 1fr; }
  .prof-profile__photo-col { min-height: 22rem; max-height: 26rem; }
  .prof-profile__photo { height: 100%; max-height: 26rem; }
  .prof-profile__body { padding: 1.75rem; }
  .prof-profile__services { grid-template-columns: 1fr; }
  .prof-profile-page { padding: 1.5rem 0 4rem; }
}

/* ── 40. PROF CARD GRID ──────────────────────────────────────── */
.prof-card {
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.08);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: all var(--t-base);
}
.prof-card:hover { border-color: var(--accent-line); box-shadow: 0 8px 32px rgba(28,16,8,.1); transform: translateY(-3px); }
.prof-card__photo-wrap { height: 16rem; overflow: hidden; flex-shrink: 0; position: relative; }
.prof-card__photo { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform var(--t-slow); }
.prof-card:hover .prof-card__photo { transform: scale(1.04); }
.prof-card__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--brown), var(--brown-mid));
  display: flex; align-items: center; justify-content: center;
}
.prof-card__placeholder-initial {
  width: 5rem; height: 5rem;
  border-radius: 50%;
  background: rgba(201,169,110,.12);
  border: 1px solid rgba(201,169,110,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem; color: var(--accent-text); font-weight: 300;
}
.prof-card__body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.prof-card__name  { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; color: var(--brown); margin-bottom: .5rem; }
.prof-card__reg   { font-size: .75rem; color: var(--color-muted); letter-spacing: .05em; margin-bottom: 1rem; }
.prof-card__bio   { font-size: .875rem; color: var(--color-text-soft); line-height: 1.7; margin-bottom: 1.25rem; flex: 1; }
.prof-card__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: auto; }

/* ── 41. FORM CARD ───────────────────────────────────────────── */
.form-card {
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.1);
  /* Era 2.5rem — o único card com esse valor em todo o projeto. `--space-xl`
     alinha ao `.review-card` e ao `.professional-card`. */
  padding: var(--space-xl);
}
@media (max-width: 640px) { .form-card { padding: var(--space-lg); } }

/* Form control claro dentro de seção creme */
.section-light .form-control,
.section-cream .form-control,
.form-card .form-control {
  background: var(--surface-input);
  border: 1.5px solid rgba(28,16,8,.15);
  color: var(--brown);
}
.section-light .form-control:focus,
.section-cream .form-control:focus,
.form-card .form-control:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(201,169,110,.12);
}
.section-light .form-control::placeholder,
.section-cream .form-control::placeholder,
.form-card .form-control::placeholder { color: var(--color-muted); }
/* `.section-light` e `.section-cream` são claras nos DOIS temas (usam tokens
   de COR), então `--color-muted` — calibrado para fundo claro — está certo ali.
   `.form-card` NÃO: ele segue o tema (medido, fundo rgb(37,25,17) no escuro), e
   o mesmo token dava 2,61:1 no rótulo do formulário de login. */
.section-light .form-label,
.section-cream .form-label { color: var(--color-muted); }
.form-card .form-label { color: var(--on-surface-muted); }

/* ── 42. BACK LINK ───────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  letter-spacing: .05em;
  color: var(--on-surface-soft);
  text-decoration: none;
  transition: color var(--t-fast);
  margin-bottom: 1.75rem;
}
.back-link:hover { color: var(--accent-text); }
.back-link--dark {
  color: rgba(28,16,8,.45);
}
.back-link--dark:hover { color: var(--accent-text); }

/* ── 43. SUCCESS / ERROR STATES ──────────────────────────────── */
.state-success,
.state-error {
  padding: .875rem 1.25rem;
  border-left: 3px solid;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.state-success { background: rgba(74,124,90,.06); border-color: #4A7C5A; color: #3A6A48; }
.state-error   { background: rgba(155,58,58,.06); border-color: #9B3A3A; color: #8B2A2A; }

/* Gold states (for light sections) */
.state-success--gold { background: rgba(201,169,110,.08); border-color: var(--accent-line); color: var(--accent-text); }

/* ── 44. PAGE NAV (breadcrumb area) ──────────────────────────── */
.page-nav {
  background: var(--brown);
  border-bottom: 1px solid var(--color-border-dark);
  padding: 1.5rem 0;
}

/* ── 45. CTA BAND ────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════
   46. ADMIN COMPONENTS — Design System
   Estas classes são compartilhadas pelo painel admin e públicas.
   Mantê-las aqui evita duplicação com o <style> inline do layout.
   ══════════════════════════════════════════════════════════════ */

/* Tokens do admin */
:root {
  /* Estes três VIRAM com o tema; raio e transição não têm tema. Antes eram só
     claros — por isso a tabela mantinha cabeçalho creme no escuro. */
  --admin-border:      rgba(28,16,8,.09);
  --admin-border-soft: rgba(28,16,8,.06);
  --admin-bg-row:      #FAF7F3;

  /* Semânticas do painel. Os valores do CLARO são calibrados para serem LIDOS
     sobre o fundo translúcido do badge, que é onde aparecem — o valor "puro" da
     cor (#4A7C5A) reprova ali em 3.81:1. */
  --admin-danger:  #9B3A3A;
  --admin-success: #3A6A4A;
  --admin-info:    #3A5A7A;
  --admin-warning: #9A4E10;
  --admin-radius:      .5rem;
  --admin-t:           200ms ease;
}

/* Card */
.a-card {
  background: var(--surface-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  overflow: hidden;
}
.a-card__header {
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--admin-border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  min-width: 0;
}
.a-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--on-surface);
}
.a-card__body { padding: 1.5rem; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  /* `#fff` chumbado deixava o cartão BRANCO no tema escuro — e qualquer texto
     com token de tema por cima dele sumia (a nota do KPI dava 1.06:1). O
     `.a-card` já usava o token; este ficou para trás. */
  background: var(--surface-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.125rem 1.25rem;
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: block;  /* override: não usar flex — icon/value/label em bloco vertical */
  gap: 0;          /* remove gap do flex anterior */
  align-items: unset;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.stat-card__icon {
  width: 2.25rem; height: 2.25rem;
  border-radius: .375rem;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
  font-size: 1rem;
  margin-bottom: .75rem;
  flex-shrink: 0;
}
.stat-card__value {
  font-size: 1.625rem;
  font-weight: 600;
  /* idem — ver a nota na outra definição de .stat-card__value */
  color: var(--on-surface);
  line-height: 1.1;
  margin-bottom: .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.stat-card__label {
  font-size: .75rem;
  /* Era `#8A7560`: 4.38:1 sobre branco — reprova AA (pede 4.5:1) por pouco, e
     não acompanhava o tema. Medido em 17/07. */
  color: var(--on-surface-soft);
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow: visible;
  display: block;
}

/* Table */
.a-table-wrap { overflow-x: auto; }
.a-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.a-table th {
  text-align: left;
  padding: .75rem 1rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-surface-soft);
  background: var(--admin-bg-row);
  border-bottom: 1px solid var(--admin-border-soft);
  white-space: nowrap;
}
.a-table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--admin-border-soft);
  color: var(--on-surface);
  vertical-align: middle;
}
.a-table tr:last-child td { border-bottom: none; }
.a-table tbody tr:hover td { background: var(--admin-bg-row); }

/* Badge variants (admin + public) */
.badge--gold   { background: rgba(201,169,110,.15); color: var(--accent-text); }
.badge--green  { background: rgba(74,124,90,.12);   color: var(--admin-success); }
.badge--red    { background: rgba(155,58,58,.12);   color: var(--admin-danger); }
.badge--blue   { background: rgba(74,107,138,.12);  color: var(--admin-info); }
.badge--gray   { background: rgba(28,16,8,.07);     color: var(--on-surface-muted); }
.badge--orange { background: rgba(180,100,30,.12);  color: var(--admin-warning); }
.badge--yellow { background: rgba(210,160,20,.12);  color: #907000; }

/* Form controls (admin) */
.f-group { margin-bottom: 1.25rem; }
.f-label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--on-surface-muted);
  margin-bottom: .4rem;
}
.f-label .req { color: var(--accent-text); margin-left: .2rem; }
.f-control {
  width: 100%;
  padding: .625rem .875rem;
  background: var(--surface-card);
  border: 1px solid var(--admin-border);
  border-radius: .375rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--on-surface);
  outline: none;
  transition: border-color var(--admin-t), box-shadow var(--admin-t);
}
.f-control:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
}
.f-control::placeholder { color: var(--on-surface-faint); }
textarea.f-control { resize: vertical; min-height: 7rem; }
select.f-control { cursor: pointer; }
input[type="file"].f-control { padding: .375rem .875rem; cursor: pointer; }
.f-hint  { display: block; font-size: .8rem; color: var(--on-surface-soft); margin-top: .35rem; }
.f-error { display: block; font-size: .8rem; color: #9B3A3A; margin-top: .35rem; }

/* Grid utilities */
/* ── Container de formulário ────────────────────────────────────────────────
   Os cards de formulário tinham `max-width` chumbado no `style=` de cada tela:
   36 arquivos, com 9 valores diferentes (32, 40, 42, 44, 48, 52, 56rem) para a
   mesma coisa. Num monitor de 1920 isso deixava ~900px de vazio à direita.

   Aqui vira UM valor. E é `max-width`, não `width`: campo de texto ocupando
   1500px é pior de ler que um estreito — quem divide o espaço é o `.g2`/`.g3`
   dentro do card, que põe os campos curtos lado a lado. Container largo +
   campos em grade usa a tela; container largo + campo único esticado só
   desperdiça de outro jeito. */
.a-card--form { max-width: min(68rem, 100%); }

/*
 * ── Card que carrega o próprio padding ──────────────────────────────────────
 *
 * `.a-card` é só o CONTÊINER: borda, fundo e `overflow:hidden`, SEM padding. O
 * padding mora em `.a-card__body`, e o título em `.a-card__header` — é a
 * composição que as telas antigas usam.
 *
 * As 11 telas dos módulos de segmento (28/07) puseram o conteúdo direto no
 * contêiner e renderizaram com padding ZERO, com o texto encostando na borda.
 * Foi o que o cliente reportou em `/admin/occupational`, `/admin/inpatient` e
 * `/admin/inpatient/beds`.
 *
 * ⚠️ **O `classes-existem.sh` não pega isto**, e é uma limitação que vale
 * anotar: todas as classes existiam. O modo de falha é outro — classes certas,
 * COMPOSIÇÃO errada. Ferramenta que confere vocabulário não confere gramática.
 *
 * Este modificador resolve sem cirurgia no HTML de 12 arquivos: uma palavra por
 * card, e o card passa a se comportar como quem lê o nome espera. A composição
 * `__header` + `__body` continua sendo a certa para card com cabeçalho
 * separado por linha.
 */
.a-card--padded { padding: var(--space-lg); }
.a-card--padded > .a-card__title {
  display: block;
  margin-bottom: var(--space-md);
}

/* ── Ordenar arrastando ─────────────────────────────────────────────────────
   A alça é o único ponto por onde o Sortable pega a linha (`handle`): a linha
   inteira arrastável impediria selecionar texto e clicar nos botões dela. */
.a-table .drag-handle {
  color: var(--on-surface-faint);
  cursor: grab;
  text-align: center;
  width: 2.5rem;
  user-select: none;
}
.a-table .drag-handle:active { cursor: grabbing; }
.a-table .drag-handle:hover  { color: var(--accent-text); }

/* A linha fantasma que segue o cursor. */
.row-dragging {
  opacity: .45;
  background: var(--admin-bg-row) !important;
}

/* Enquanto salva, a lista não aceita outro arrasto — dois pedidos concorrentes
   escreveriam ordens diferentes na mesma tabela. */
[data-sortable][aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ── Modal de agendamento e combobox de paciente ────────────────────────────
   `<dialog>` nativo: foco preso, Esc fecha, sem biblioteca. Tudo em token —
   este modal vive no painel, que agora tem tema. */
.apt-modal {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--surface-raised);
  color: var(--on-surface);
  padding: 0;
  width: min(38rem, calc(100vw - 2rem));
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
}
.apt-modal::backdrop { background: rgba(28,16,8,.55); }
.apt-modal__form { padding: 1.5rem; }
.apt-modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: .25rem;
}
.apt-modal__title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 400;
  color: var(--on-surface); letter-spacing: .02em;
}
.apt-modal__x {
  background: none; border: 0; cursor: pointer; padding: .25rem;
  color: var(--on-surface-soft); font-size: 1rem;
}
.apt-modal__x:hover { color: var(--on-surface); }
.apt-modal__quando {
  font-size: .8125rem; color: var(--accent-text);
  margin-bottom: 1.25rem; text-transform: capitalize;
}
.apt-modal__pe {
  display: flex; justify-content: flex-end; gap: .625rem;
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--admin-border-soft);
}

.combo { position: relative; }
.combo__lista {
  position: absolute; top: calc(100% + .25rem); left: 0; right: 0; z-index: 10;
  max-height: 14rem; overflow-y: auto; margin: 0; padding: .25rem; list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.combo__item {
  padding: .5rem .625rem; border-radius: .25rem; cursor: pointer;
  font-size: .875rem; color: var(--on-surface);
}
.combo__item:hover, .combo__item:focus {
  background: var(--alpha-gold-08); outline: none;
}
.combo__vazio {
  padding: .625rem; font-size: .8125rem; color: var(--on-surface-soft); text-align: center;
}

.g2 { display: grid; grid-template-columns: 1fr 1fr;           gap: 1.25rem; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr;       gap: 1.25rem; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr);    gap: 1.25rem; }
/* Editor layout: coluna principal larga + coluna lateral estreita */
.g-editor { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; }

/* Notification dropdown */
.notif-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + .5rem);
  width: 22rem;
  background: var(--surface-raised);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(28,16,8,.18);
  z-index: 200;
  overflow: hidden;
}
.notif-dropdown.is-open { display: block; }
.notif-dropdown__head {
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--admin-border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.notif-dropdown__title { font-size: .875rem; font-weight: 600; color: var(--on-surface); }
.notif-dropdown__mark-all {
  font-size: .75rem; color: var(--accent-text);
  background: none; border: none; cursor: pointer; font-family: var(--font-body);
}
.notif-dropdown__mark-all:hover { text-decoration: underline; }
.notif-list { max-height: 22rem; overflow-y: auto; }
.notif-item {
  display: flex; gap: .875rem;
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--admin-border-soft);
  cursor: pointer; transition: background var(--admin-t);
}
.notif-item:hover       { background: var(--admin-bg-row); }
.notif-item--unread     { background: rgba(201,169,110,.05); }
.notif-item__icon {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text); font-size: .75rem;
  flex-shrink: 0; margin-top: .1rem;
}
.notif-item__title  { font-size: .8125rem; font-weight: 500; color: var(--on-surface); margin-bottom: .2rem; }
.notif-item__msg    { font-size: .75rem; color: var(--on-surface-soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.notif-item__time   { font-size: .6875rem; color: var(--on-surface-faint); margin-top: .3rem; }
.notif-dropdown__foot { padding: .75rem 1.125rem; border-top: 1px solid var(--admin-border-soft); text-align: center; }
.notif-dropdown__foot a { font-size: .8125rem; color: var(--accent-text); text-decoration: none; }
.notif-dropdown__foot a:hover { text-decoration: underline; }

/* .page-header definido na seção 20 (admin) — não redeclarar aqui */

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

/* Admin responsive */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr 1fr; }
  .a-table th, .a-table td { padding: .75rem .875rem; }
}
@media (max-width: 1024px) {
  .g-editor { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page-header { align-items: flex-start; gap: .75rem; }
  .a-card__header { flex-direction: column; align-items: flex-start; }
  .a-table th, .a-table td { padding: .625rem .75rem; font-size: .8125rem; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   FIM DO DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.cta-band {
  background: var(--surface-hero);
  border-top: 1px solid var(--color-border-dark);
  /* Era `5rem 0` — um oitavo degrau só desta faixa. `--space-3xl` é o mesmo
     ritmo das demais seções, e o olho lê a página como uma coisa só. */
  padding-block: var(--space-3xl);
  text-align: center;
}
.cta-band__heading {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 300;
  color: var(--on-surface);
  margin-bottom: 1rem;
}
.cta-band__sub { font-size: 1.0625rem; color: var(--on-surface-soft); margin-bottom: 2.5rem; line-height: 1.7; }
.cta-band__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN VISUAL FIXES — truncation, overflow, responsive polish
   ═══════════════════════════════════════════════════════════════ */

/* Currency values: slightly smaller font */
.stat-card__value--currency {
  font-size: 1.25rem;
}

/* Card title: truncate if too long */
.a-card__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

/* stat-grid layout: definido em linha ~1943 */

/* Table columns: prevent action buttons from forcing row expansion */
.a-table td, .a-table th {
  max-width: 18rem;
}
.a-table td:last-child,
.a-table th:last-child {
  max-width: none;
  white-space: nowrap;
}

/* Long text cells (name, email) - add ellipsis when cramped */
.a-table td.cell-truncate {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* g3 grids: collapse intermediate breakpoint */
@media (max-width: 1100px) {
  .g3 { grid-template-columns: 1fr 1fr; }
}

/* Page header: don't clip action buttons on small screens */
.page-header {
  flex-wrap: wrap;
  row-gap: .75rem;
}

/* Flash messages: don't shrink icon */
.flash i { flex-shrink: 0; }

/* Ensure a-card__header title doesn't push action btn out of view */
.a-card__header {
  min-width: 0;
}
.a-card__header .btn {
  flex-shrink: 0;
}

/* Badge: prevent wrapping mid-word */
.badge {
  white-space: nowrap;
}

/* f-control: ensure inputs don't overflow their container on mobile */
.f-control {
  max-width: 100%;
  min-width: 0;
}

/* Topbar title: ellipsis on very small screens */
@media (max-width: 420px) {
  .topbar__title {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* ──────────────────────────────────────────────
   Overrides de contraste (WCAG AA)
   Sobrescreve valores hard-coded de #8A7560 em views,
   garantindo contraste mínimo em fundos claros.
   ────────────────────────────────────────────── */
[style*="#8A7560"] { color: #6E5A42 !important; }
[style*="#5C4A35"] { color: #4A3A28 !important; }

/* Acessibilidade: foco visível global para links e botões */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible {
    outline: 3px solid #C9A96E;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* ══════════════════════════════════════════════════════════
   DESIGN SYSTEM — Phase 3 additions
   Regra: somente adições. Nenhuma classe existente alterada.
   ══════════════════════════════════════════════════════════ */

/* ── Layout utilities ───────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-end     { display: flex; align-items: center; justify-content: flex-end; }
.items-start  { align-items: flex-start; }
.gap-xs       { gap: .375rem; }
.gap-sm       { gap: .5rem; }
.gap-md       { gap: .75rem; }
.gap-lg       { gap: 1rem; }
.gap-xl       { gap: 1.5rem; }
.grow         { flex: 1 1 0; min-width: 0; }

/* ── Spacing utilities ──────────────────────────────────── */
.mb-0  { margin-bottom: 0; }
.mb-xs { margin-bottom: .5rem; }
.mb-sm { margin-bottom: .75rem; }
.mb-md { margin-bottom: 1.25rem; }
.mb-lg { margin-bottom: 1.75rem; }
.mt-sm { margin-top: .75rem; }
.mt-md { margin-top: 1.25rem; }
.mt-lg { margin-top: 1.75rem; }

/* ── Text utilities ─────────────────────────────────────── */
.text-sm    { font-size: .875rem; }
.text-xs    { font-size: .8125rem; }
.text-muted { color: #8A7560; }
.text-brown { color: var(--brown, #1C1008); }
.text-gold  { color: var(--gold-dark, #A07840); }
.text-green { color: #3A6A4A; }
.text-red   { color: #9B3A3A; }
.fw-500     { font-weight: 500; }
.fw-600     { font-weight: 600; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Divider ────────────────────────────────────────────── */
.a-divider {
  border: none;
  border-top: 1px solid rgba(28,16,8,.07);
  margin: 1.25rem 0;
}

/* ── Table action cell (replaces inline style="display:flex;gap:.5rem") */
.a-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ── Empty state (table/list with no records) ───────────── */
.a-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 3rem 1.5rem;
  color: #8A7560;
  text-align: center;
}
.a-empty__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(201,169,110,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark, #A07840);
  font-size: 1.25rem;
}
.a-empty__title {
  font-size: .9375rem;
  font-weight: 600;
  color: #5C4A35;
  margin: 0;
}
.a-empty__desc {
  font-size: .875rem;
  color: #8A7560;
  margin: 0;
  max-width: 28rem;
}

/* ── Checkbox / Radio styled ─────────────────────────────── */
.f-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  user-select: none;
}
.f-check input[type="checkbox"],
.f-check input[type="radio"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--gold, #C9A96E);
  cursor: pointer;
  flex-shrink: 0;
}
.f-check__label {
  font-size: .9375rem;
  color: var(--brown, #1C1008);
  line-height: 1.4;
}
.f-check__hint {
  display: block;
  font-size: .8rem;
  color: #8A7560;
  margin-top: .15rem;
}

/* ── Inline form (search bar pattern) ───────────────────── */
.f-inline {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.f-inline .f-control {
  flex: 1 1 14rem;
  max-width: 24rem;
}

/* ── a-card__body padding reduction on small screens ────── */
@media (max-width: 480px) {
  .a-card__body { padding: 1rem; }
  .a-card__header { padding: .875rem 1rem; }
}

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: .875rem;
  font-weight: 500;
  max-width: 22rem;
  box-shadow: 0 4px 16px rgba(28,16,8,.18);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translateY(.5rem);
  transition: opacity 220ms ease, transform 220ms ease;
  will-change: opacity, transform;
}
.toast--in  { opacity: 1; transform: translateY(0); }
.toast--out { opacity: 0; transform: translateY(.5rem); }

.toast i { flex-shrink: 0; font-size: 1rem; }

.toast--success {
  background: rgba(74,124,90,.12);
  border: 1px solid rgba(74,124,90,.3);
  color: #2E5A3A;
}
.toast--error {
  background: rgba(155,58,58,.1);
  border: 1px solid rgba(155,58,58,.3);
  color: #7A2828;
}
.toast--info {
  background: rgba(74,107,138,.1);
  border: 1px solid rgba(74,107,138,.3);
  color: #2A4A6A;
}

@media (max-width: 480px) {
  #toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast { max-width: none; }
}

/* ══════════════════════════════════════════════════════════
   CONFIRM DIALOG
   ══════════════════════════════════════════════════════════ */
#confirm-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(90vw, 26rem);
  box-shadow: 0 8px 32px rgba(28,16,8,.22);
  background: #fff;
}
#confirm-dialog::backdrop {
  background: rgba(28,16,8,.45);
  backdrop-filter: blur(2px);
}
.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
}
.cd-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(155,58,58,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9B3A3A;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.cd-msg {
  font-size: .9375rem;
  color: #3D2510;
  line-height: 1.5;
  margin: 0;
}
.cd-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  width: 100%;
}
.cd-actions .btn { flex: 1; justify-content: center; }

/* ── Form validation error state ───────────────────────────── */
.f-control--error {
  border-color: #C05050 !important;
  box-shadow: 0 0 0 3px rgba(155,58,58,.12) !important;
}
.f-error {
  display: block;
  font-size: .8rem;
  color: #9B3A3A;
  margin-top: .35rem;
  min-height: 1rem;
}
.char-counter {
  display: block;
  font-size: .75rem;
  color: #8A7560;
  margin-top: .25rem;
  text-align: right;
}

/* ══════════════════════════════════════════════════════════
   PUBLIC PAGES — Components extracted from views
   ══════════════════════════════════════════════════════════ */

/* ── btn-ghost (paginação, links discretos) ───────────────── */
.btn-ghost {
  background: transparent;
  color: var(--color-muted, #6E5A42);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: rgba(28,16,8,.06);
  color: var(--brown, #1C1008);
}

/* ── Paginação ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--admin-border-soft);
}

/* ── page-hero (hero compacto de páginas internas) ────────── */
.page-hero {
  background: var(--surface-hero);
  border-bottom: 1px solid rgba(201,169,110,.2);
  /* Faixa de topo das páginas internas: um degrau abaixo do ritmo das seções,
     de propósito — o hero anuncia, não separa. Pela escala, com nome. */
  padding: var(--space-2xl) 0;
  text-align: center;
}
.page-hero__eyebrow {
  display: inline-block;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .875rem;
}
.page-hero__eyebrow::before { content: '—  '; }
.page-hero__eyebrow::after  { content: '  —'; }
.page-hero__title {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 300;
  color: var(--on-surface);
  letter-spacing: .03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.page-hero__sub {
  font-size: .9375rem;
  color: var(--on-surface-soft);
  max-width: 38rem;
  margin-inline: auto;
  line-height: 1.7;
}
@media (max-width: 600px) {
  .page-hero { padding: 3rem 0 2.5rem; }
}

/* ── section-light ────────────────────────────────────────── */
/* REMOVIDA em 28/07: `.section-light` estava definida duas vezes, e esta
   segunda — com o creme CHUMBADO — vencia por ordem e desfazia a versão
   tokenizada 3.300 linhas acima. Era o item 1 da lista "Aberto" do §12. */

/* ── Serviços: abas e controles (services.php) ────────────── */
.svc-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .375rem;
  margin: 0 0 2rem;
  border-bottom: 2px solid #E5D5BC;
  padding: 0;
}
.svc-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  font-size: .9375rem;
  font-weight: 600;
  color: #5C4A35;
  background: transparent;
  text-decoration: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--t-fast, 150ms ease), background var(--t-fast, 150ms ease), border-color var(--t-fast, 150ms ease);
}
.svc-tab:hover,
.svc-tab:focus-visible { color: var(--brown, #1C1008); background: rgba(201,169,110,.08); outline: none; }
.svc-tab:focus-visible { box-shadow: 0 0 0 3px rgba(201,169,110,.35); border-radius: .25rem .25rem 0 0; }
/* `--accent-text` e não `#A07840`: o ouro médio dá 3,62:1 sobre creme e
   reprova AA — e esta é a aba ATIVA, ou seja, a informação de "onde você
   está". O filete embaixo pode continuar sendo `--gold`: ele só decora. */
.svc-tab[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent-line); }

.svc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.svc-controls__group { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.svc-controls__label {
  font-size: .8125rem;
  color: #5C4A35;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.svc-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8125rem;
  font-weight: 500;
  padding: .45rem .9rem;
  border-radius: 2rem;
  border: 1px solid var(--gold, #C9A96E);
  color: #5C4A35;
  background: #fff;
  text-decoration: none;
  transition: all var(--t-fast, 150ms ease);
  cursor: pointer;
}
.svc-btn:hover,
.svc-btn:focus-visible { color: var(--brown, #1C1008); border-color: #A07840; background: #FAF4E9; outline: none; }
.svc-btn:focus-visible { box-shadow: 0 0 0 3px rgba(201,169,110,.35); }
/* `#A07840` com texto branco dá 4,0:1 — reprova AA por pouco, e este é o
   botão que diz qual ordenação está ATIVA. `--accent-text` (#6B4A18 no claro)
   leva o branco a 8,2:1 e continua lendo como ouro escuro. */
.svc-btn[aria-pressed="true"] { background: var(--accent-text); color: #fff; border-color: var(--accent-text); }

.svc-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold, #C9A96E);
  color: #5C4A35;
  background: #fff;
  text-decoration: none;
  transition: all var(--t-fast, 150ms ease);
}
.svc-iconbtn:hover,
.svc-iconbtn:focus-visible { color: var(--brown, #1C1008); border-color: #A07840; background: #FAF4E9; outline: none; }
.svc-iconbtn:focus-visible { box-shadow: 0 0 0 3px rgba(201,169,110,.35); }
.svc-iconbtn[aria-pressed="true"] { background: #A07840; color: #fff; border-color: #A07840; }

/* ── Serviços: modo lista (services.php) ──────────────────── */
.svc-list-item {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201,169,110,.12);
  padding: 1rem;
  transition: box-shadow var(--t-fast, 150ms ease), border-color var(--t-fast, 150ms ease);
}
.svc-list-item:hover {
  border-color: rgba(201,169,110,.35);
  box-shadow: 0 4px 16px rgba(201,169,110,.1);
}
.svc-list-item__img {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: cover;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}
.svc-list-item__body { flex: 1; min-width: 0; }
.svc-list-item__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown, #1C1008);
  margin-bottom: .25rem;
}
.svc-list-item__desc {
  font-size: .875rem;
  color: #8A7560;
  margin-bottom: .625rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.svc-list-item__link {
  font-size: .8125rem;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}
.svc-list-item__link:hover { text-decoration: underline; }
.svc-list-item__meta {
  text-align: right;
  flex-shrink: 0;
  font-size: .8125rem;
  color: #8A7560;
}
.svc-list-item__duration { font-weight: 500; color: var(--brown, #1C1008); }
@media (max-width: 480px) {
  .svc-list-item { flex-wrap: wrap; }
  .svc-list-item__img { width: 100%; height: 10rem; border-radius: var(--radius-lg); }
  .svc-list-item__meta { width: 100%; text-align: left; }
}

/* ── Home: aba público-alvo (home.php) ────────────────────── */
.home-aud-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 auto 2rem;
  padding: .375rem;
  background: rgba(247,243,239,.08);
  border: 1px solid rgba(201,169,110,.35);
  border-radius: 2.5rem;
  max-width: 22rem;
}
.home-aud-tab {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.25rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--on-surface);
  background: transparent;
  border: none;
  border-radius: 2rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-fast, 150ms ease);
}
.home-aud-tab:hover { background: rgba(201,169,110,.18); color: #fff; }
.home-aud-tab:focus-visible { outline: 3px solid #C9A96E; outline-offset: 2px; }
.home-aud-tab[aria-pressed="true"] { background: var(--accent-fill, #C9A96E); color: var(--on-accent, #111); }
[data-aud-panel][hidden] { display: none !important; }

/* ── Agendamento (appointment.php) ────────────────────────── */
.section-hero-mini {
  background: var(--surface-1);
  border-bottom: 1px solid rgba(201,169,110,.2);
}
.appt-card {
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.1);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  box-shadow: 0 2px 24px rgba(28,16,8,.06);
}
.appt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.appt-field { display: flex; flex-direction: column; gap: .4rem; }
.appt-label {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5C4A35;
}
.appt-req { color: #A07840; margin-left: .15rem; }
.appt-input {
  width: 100%;
  padding: .75rem 1rem;
  background: #FAFAF8;
  border: 1.5px solid #D6C9B2;
  border-radius: var(--radius-lg);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: .9375rem;
  color: var(--brown, #1C1008);
  outline: none;
  transition: border-color var(--t-fast, 150ms ease), box-shadow var(--t-fast, 150ms ease), background var(--t-fast, 150ms ease);
  appearance: auto;
}
.appt-input::placeholder { color: #B8A898; }
.appt-input:focus { background: #fff; border-color: var(--gold, #C9A96E); box-shadow: 0 0 0 3px rgba(201,169,110,.15); }
.appt-input:hover:not(:focus) { border-color: #B8A898; }
select.appt-input { cursor: pointer; }
textarea.appt-input { resize: vertical; }
.appt-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  width: 100%;
  padding: .9375rem 2rem;
  background: var(--gold, #C9A96E);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-fast, 150ms ease), box-shadow var(--t-fast, 150ms ease), transform var(--t-fast, 150ms ease);
}
.appt-submit:hover { background: #A07840; color: #fff; box-shadow: 0 4px 16px rgba(201,169,110,.35); transform: translateY(-1px); }
.appt-submit:active { transform: translateY(0); }
.appt-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.appt-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.appt-info-card {
  text-align: center;
  padding: 1.5rem 1.25rem;
  background: var(--surface-1);
  border: 1px solid rgba(201,169,110,.2);
  border-radius: var(--radius-lg);
}
.appt-info-icon { display: block; color: var(--gold, #C9A96E); font-size: 1.5rem; margin-bottom: .75rem; }
.appt-info-title { color: var(--gold, #C9A96E); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: .25rem; }
.appt-info-desc { color: var(--on-surface-soft); font-size: .8125rem; line-height: 1.5; }

@media (max-width: 640px) {
  .appt-card { padding: 1.5rem 1.25rem; }
  .appt-grid { grid-template-columns: 1fr; gap: 1rem; }
  .appt-info-grid { grid-template-columns: 1fr; }
}

/* ── Profissionais destaque e equipe (professionals.php) ───── */
.prof-hero {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 4rem;
  align-items: start;
  background: var(--surface-hero);
  border: 1px solid rgba(201,169,110,.15);
  border-radius: var(--radius-xl);
  padding: 3rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.prof-hero__photo-wrap { position: relative; }
.prof-hero__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  /* Era `.875rem` — o único card arredondado entre 112 de canto vivo (medido
     em 6 páginas). `--radius-lg` é o degrau da escala mais próximo, e agora o
     valor tem nome. */
  border-radius: var(--radius-lg);
  display: block;
  border: 2px solid rgba(201,169,110,.2);
}
.prof-hero__photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: rgba(201,169,110,.08);
  border-radius: .875rem;
  border: 2px solid rgba(201,169,110,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 6rem;
  font-weight: 300;
  color: rgba(201,169,110,.3);
}
.prof-hero__badge {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--gold, #C9A96E);
  color: var(--on-accent);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 2rem;
  white-space: nowrap;
}
.prof-hero__specialty {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .75rem;
}
.prof-hero__name {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 300;
  color: var(--on-surface);
  line-height: 1.1;
  margin-bottom: .4rem;
}
.prof-hero__reg { font-size: .8125rem; color: var(--accent-text); letter-spacing: .08em; }
.prof-hero__divider { width: 3rem; height: 2px; background: linear-gradient(90deg, var(--gold, #C9A96E), transparent); margin: 1.5rem 0; }
.prof-hero__bio { font-size: .9375rem; color: var(--on-surface-muted); line-height: 1.85; margin-bottom: 1.75rem; }
.prof-hero__creds {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(201,169,110,.05);
  border: 1px solid rgba(201,169,110,.1);
  border-radius: .625rem;
}
.prof-hero__cred { display: flex; align-items: flex-start; gap: .75rem; font-size: .8125rem; color: var(--on-surface-soft); line-height: 1.5; }
.prof-hero__cred i { color: var(--gold, #C9A96E); font-size: .75rem; margin-top: .15rem; flex-shrink: 0; width: 1rem; text-align: center; }
.prof-hero__actions { display: flex; gap: .875rem; flex-wrap: wrap; }

.prof-team-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0 2.5rem;
}
.prof-team-divider::before,
.prof-team-divider::after { content: ''; flex: 1; height: 1px; background: rgba(28,16,8,.12); }
.prof-team-divider span {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-surface-soft);
  white-space: nowrap;
}

.prof-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}
.prof-team-card {
  background: var(--surface-card);
  border: 1px solid rgba(28,16,8,.08);
  /* Era `.875rem` — valor que só existia aqui, entre 112 cards de canto vivo.
     `--radius-lg` é o degrau da escala, e agora o número tem nome. */
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t-base, 280ms ease), box-shadow var(--t-base, 280ms ease);
  display: flex;
  flex-direction: column;
}
.prof-team-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(28,16,8,.1); }
.prof-team-card__photo-wrap { width: 100%; overflow: hidden; background: #1C1008; }
.prof-team-card__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform var(--t-slow, 480ms ease);
}
.prof-team-card:hover .prof-team-card__photo { transform: scale(1.04); }
.prof-team-card__placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 4rem;
  font-weight: 300;
  color: var(--accent-line);
}
.prof-team-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.prof-team-card__specialty {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  /* `--accent-text` e não `#A07840`: o ouro médio dá 4,0:1 sobre branco e
     3,62:1 sobre creme — reprova AA nos dois. O token resolve para o ouro que
     se LÊ em cada tema. */
  color: var(--accent-text);
  margin-bottom: .5rem;
}
.prof-team-card__name {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--brown, #1C1008);
  margin-bottom: .2rem;
  line-height: 1.2;
}
.prof-team-card__reg { font-size: .75rem; color: var(--accent-text); letter-spacing: .06em; margin-bottom: .75rem; }
.prof-team-card__bio { font-size: .8125rem; color: var(--on-surface-muted); line-height: 1.7; margin-bottom: 1.25rem; flex: 1; }
.prof-team-card__actions { display: flex; gap: .625rem; margin-top: auto; padding-top: 1rem; }

@media (max-width: 900px) {
  .prof-hero { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; }
  .prof-hero__photo,
  .prof-hero__photo-placeholder { aspect-ratio: 1/1; max-height: 360px; }
}
@media (max-width: 480px) {
  .prof-team-grid { grid-template-columns: 1fr; }
}

/* ── Home: resultados (tabs + grid before/after) ────────────── */
.res-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.res-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.125rem;
  border: 1px solid rgba(201,169,110,.25);
  border-radius: 2rem;
  background: transparent;
  color: var(--on-surface-soft);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background var(--t-fast, 150ms ease), color var(--t-fast, 150ms ease), border-color var(--t-fast, 150ms ease);
  white-space: nowrap;
}
.res-tab:hover { border-color: rgba(201,169,110,.5); color: var(--on-surface); }
/* A aba ATIVA diz "onde você está" — texto, não decoração. `--gold` sobre o
   próprio véu de ouro a 15% dá 2,01:1; `--accent-text` é o ouro que se LÊ.
   A borda pode continuar em `--accent-line`: ela só decora. */
.res-tab--active { background: rgba(201,169,110,.15); border-color: var(--accent-line); color: var(--accent-text); }
.res-panel { display: none; }
.res-panel--active { display: block; }
.res-panel__desc {
  text-align: center;
  color: var(--on-surface-soft);
  font-size: .9375rem;
  margin-bottom: 2rem;
  max-width: 36rem;
  margin-inline: auto;
}
.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 2rem;
}
.res-pair-placeholder {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .375rem;
  border-radius: .625rem;
  overflow: hidden;
  border: 1px dashed rgba(201,169,110,.25);
}
.res-pair-placeholder__half {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  aspect-ratio: 3/4;
  background: rgba(28,16,8,.4);
  /* 30% de ouro dá 1,05:1. É placeholder, mas é texto na tela. */
  color: var(--on-surface);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.res-pair-placeholder__half i { font-size: 1.75rem; opacity: .4; }
.res-pair-placeholder__half--before { border-right: 1px dashed rgba(201,169,110,.15); }
.res-pair__caption {
  grid-column: 1/-1;
  text-align: center;
  padding: .5rem;
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  /* Scrim sobre FOTOGRAFIA: o fundo é escuro de propósito nos dois temas, então
     o texto é claro nos dois — a mesma regra incondicional do `.hero` (§12,
     1b-2). Com `--on-surface-soft` ele invertia no claro e dava 1,35:1. */
  color: rgba(247,243,239,.95);
  background: rgba(28,16,8,.78);   /* .6 dava 3,69:1 sobre foto clara */
}
.res-pair__badge {
  position: absolute;
  top: .625rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(201,169,110,.15);
  border: 1px solid rgba(201,169,110,.3);
  color: var(--accent-text);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .75rem;
  border-radius: 2rem;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .res-tabs { gap: .375rem; }
  .res-tab { font-size: .75rem; padding: .4rem .875rem; }
  .res-tab span { display: none; }
  .res-tab i { font-size: 1rem; }
  .res-grid { grid-template-columns: 1fr; }
}

/* ── Home: ebook section responsive ─────────────────────────── */
@media (max-width: 560px) {
  #ebook .container > div { grid-template-columns: 1fr !important; justify-items: center; text-align: center; }
  #ebook .container > div > div:last-child > div { justify-content: center; }
}

/* ── AI Widget: botões de ação do header ────────────────────── */
.ai-widget__action-btn {
  background: rgba(201,169,110,.1);
  border: 1px solid rgba(201,169,110,.2);
  border-radius: .375rem;
  color: var(--accent-text);
  cursor: pointer;
  font-size: .75rem;
  padding: .3rem .5rem;
  transition: background var(--t-fast, 150ms ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.ai-widget__action-btn:hover { background: rgba(201,169,110,.2); }

/* ── Footer: hover link P8W (sem inline event) ─────────────── */
.footer-dev-link {
  color: rgba(201,169,110,.55);
  text-decoration: none;
  transition: color var(--t-fast, 150ms ease);
}
.footer-dev-link:hover { color: var(--gold, #C9A96E); }

/* ── Social links (profissionais — gerados via PHP helper) ─── */
.prof-socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  margin: 1rem 0 0;
}
.prof-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(201,169,110,.45);
  color: var(--accent-text);
  background: rgba(201,169,110,.08);
  text-decoration: none;
  transition: background var(--t-fast, 150ms ease), color var(--t-fast, 150ms ease);
}
.prof-social-link:hover { background: var(--gold, #C9A96E); color: var(--brown, #1C1008); }
.prof-social-link--sm { width: 2rem; height: 2rem; }

/* ── FAQ / Knowledge Base (faq.php) ─────────────────────────── */
.kb-hero {
  background: var(--surface-1);
  padding: 4rem 1.5rem 3rem;
  border-bottom: 1px solid rgba(201,169,110,.15);
}
.kb-search-wrap { position: relative; max-width: 34rem; margin: 0 auto; }
.kb-search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: rgba(201,169,110,.5); font-size: .9375rem; pointer-events: none; }
.kb-search {
  width: 100%;
  padding: .875rem 2.75rem .875rem 2.75rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(201,169,110,.25);
  border-radius: 2rem;
  color: var(--on-surface);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: .9375rem;
  outline: none;
  transition: border-color var(--t-fast, 150ms ease), background var(--t-fast, 150ms ease), box-shadow var(--t-fast, 150ms ease);
}
.kb-search::placeholder { color: var(--on-surface-faint); }
.kb-search:focus { border-color: var(--gold, #C9A96E); background: rgba(255,255,255,.09); box-shadow: 0 0 0 3px rgba(201,169,110,.12); }
.kb-search-clear { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--on-surface-faint); cursor: pointer; padding: .25rem; font-size: .875rem; transition: color var(--t-fast, 150ms ease); }
.kb-search-clear:hover { color: var(--gold, #C9A96E); }
.kb-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; align-items: start; }
.kb-nav { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: .25rem; }
.kb-nav__title { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(201,169,110,.5); margin-bottom: .5rem; padding: 0 .75rem; }
.kb-nav__item {
  display: flex;
  align-items: center;
  gap: .625rem;
  width: 100%;
  padding: .5rem .75rem;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  color: var(--on-surface-soft);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t-fast, 150ms ease), color var(--t-fast, 150ms ease);
  text-align: left;
}
.kb-nav__item:hover { background: rgba(201,169,110,.08); color: var(--on-surface); }
.kb-nav__item--active { background: rgba(201,169,110,.15); color: var(--gold, #C9A96E); }
.kb-nav__item i { width: 1rem; text-align: center; font-size: .875rem; flex-shrink: 0; }
.kb-nav__count { margin-left: auto; font-size: .6875rem; font-style: normal; background: rgba(201,169,110,.12); color: rgba(201,169,110,.6); border-radius: 1rem; padding: .1rem .45rem; font-weight: 600; }
.kb-nav__divider { height: 1px; background: rgba(201,169,110,.1); margin: .5rem 0; }
.kb-nav__cta { margin-top: 1.5rem; padding: 1.25rem 1rem; border: 1px solid rgba(201,169,110,.15); border-radius: .625rem; text-align: center; background: rgba(201,169,110,.04); }
.kb-panel { display: none; }
.kb-panel--active { display: block; }
.kb-panel__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid rgba(201,169,110,.12); }
.kb-panel__icon { width: 3rem; height: 3rem; border-radius: .625rem; border: 1px solid; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.kb-panel__title { font-family: var(--font-display, 'Cormorant Garamond', serif); font-size: 1.5rem; font-weight: 400; color: var(--on-surface); margin: 0; }
.kb-panel__count { font-size: .75rem; color: var(--on-surface-faint); margin: 0; letter-spacing: .04em; }
.kb-accordion { display: flex; flex-direction: column; gap: .5rem; }
.kb-item { border: 1px solid rgba(201,169,110,.12); border-radius: .625rem; overflow: hidden; transition: border-color var(--t-fast, 150ms ease); }
.kb-item:hover { border-color: rgba(201,169,110,.25); }
.kb-item.kb-item--open { border-color: rgba(201,169,110,.35); }
.kb-item__q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,.03);
  border: none;
  color: var(--on-surface);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast, 150ms ease);
}
.kb-item__q:hover { background: rgba(201,169,110,.07); }
.kb-item--open .kb-item__q { background: rgba(201,169,110,.08); color: var(--gold, #C9A96E); }
.kb-item__num { flex-shrink: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: rgba(201,169,110,.12); color: rgba(201,169,110,.7); font-size: .6875rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: .1rem; }
.kb-item__text { flex: 1; }
.kb-item__chevron { flex-shrink: 0; color: rgba(201,169,110,.5); font-size: .75rem; margin-top: .35rem; transition: transform var(--t-base, 280ms ease); }
.kb-item--open .kb-item__chevron { transform: rotate(180deg); color: var(--gold, #C9A96E); }
.kb-item__a { padding: 1rem 1.25rem 1.25rem calc(1.25rem + 1.5rem + .875rem); color: var(--on-surface-muted); font-size: .9rem; line-height: 1.75; border-top: 1px solid rgba(201,169,110,.08); background: rgba(201,169,110,.04); }
mark { background: rgba(201,169,110,.3); color: var(--on-surface); border-radius: .125rem; padding: 0 .1rem; }
@media (max-width: 768px) {
  .kb-layout { grid-template-columns: 1fr; }
  .kb-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: .375rem; }
  .kb-nav__title,
  .kb-nav__cta,
  .kb-nav__divider,
  .kb-nav__count { display: none; }
  .kb-nav__item { flex: 0 0 auto; padding: .375rem .75rem; border-radius: 2rem; border: 1px solid rgba(201,169,110,.2); font-size: .75rem; }
  .kb-nav__item--active { border-color: var(--gold, #C9A96E); }
  .kb-item__a { padding-left: 1.25rem; }
}

/* ── Service: sidebar responsiva (service.php) ───────────────── */
@media (max-width: 900px) {
  .service-sidebar-grid { grid-template-columns: 1fr !important; }
  .sidebar-sticky { position: static !important; }
}

/* ── Patient login: voltar ao site ─────────────────────────── */
.back-to-site-link {
  font-size: .8125rem;
  color: var(--on-surface-soft);
  text-decoration: none;
  transition: color var(--t-fast, 150ms ease);
}
.back-to-site-link:hover { color: var(--color-primary, #C9A96E); }

/* ── Ebook checkout: link de compra card ───────────────────── */
.ebook-buy-link {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1.125rem;
  background: #fff;
  border: 1px solid rgba(28,16,8,.09);
  border-radius: .625rem;
  text-decoration: none;
  color: var(--brown, #1C1008);
  font-size: .875rem;
  transition: border-color var(--t-fast, 150ms ease), box-shadow var(--t-fast, 150ms ease);
}
.ebook-buy-link:hover {
  border-color: rgba(201,169,110,.5);
  box-shadow: 0 4px 16px rgba(201,169,110,.12);
}
@media (max-width: 680px) {
  .ebook-layout { grid-template-columns: 1fr !important; gap: 2rem !important; }
}

/* ── Contato: grid responsivo (contact.php) ───────────────── */
@media (max-width: 768px) {
  .contact-grid-asymmetric { grid-template-columns: 1fr !important; }
}

/* ── Skip link ──────────────────────────────────────────────── */
/* skip-link: ver definição canônica abaixo (seção acessibilidade) */

/* ═══════════════════════════════════════════════════════════════
   DS — DESIGN SYSTEM COMPONENTS (v5)
   Componentes novos com prefixo .ds- para evitar conflitos.
   Use estes em vez de criar variantes ad-hoc.
   ═══════════════════════════════════════════════════════════════ */

/* ── DS Empty State ──────────────────────────────────────────
   Mensagem padronizada quando uma lista/tabela está vazia.

   <div class="ds-empty">
     <div class="ds-empty__icon"><i class="fas fa-inbox"></i></div>
     <h3 class="ds-empty__title">Nenhum registro</h3>
     <p class="ds-empty__msg">Cadastre o primeiro item para começar.</p>
     <a href="..." class="btn btn-primary ds-empty__cta">
       <i class="fas fa-plus"></i> Novo registro
     </a>
   </div>
─────────────────────────────────────────────────────────────── */
.ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--on-surface-soft);
}
.ds-empty--inset { padding: 2.5rem 1.5rem; }
.ds-empty--compact { padding: 1.75rem 1rem; }
.ds-empty__icon {
  width: 4rem; height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--alpha-gold-08);
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.ds-empty--compact .ds-empty__icon {
  width: 2.5rem; height: 2.5rem;
  font-size: 1rem;
  margin-bottom: .5rem;
}
.ds-empty__title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: .375rem;
  letter-spacing: -0.005em;
}
.ds-empty__msg {
  font-size: .875rem;
  color: var(--on-surface-soft);
  max-width: 28rem;
  line-height: 1.5;
  margin: 0 auto;
}
.ds-empty__cta { margin-top: 1.25rem; }

/* Variant on dark surface (paciente / public) */
.ds-empty--on-dark { color: var(--alpha-cream-55); }
.ds-empty--on-dark .ds-empty__icon {
  background: var(--alpha-gold-12);
  color: var(--gold);
}
.ds-empty--on-dark .ds-empty__title { color: var(--cream); }
.ds-empty--on-dark .ds-empty__msg   { color: var(--alpha-cream-55); }


/* ── DS KPI Card ─────────────────────────────────────────────
   Card de métrica com ícone, valor grande e label.

   <div class="ds-kpi ds-kpi--primary">
     <div class="ds-kpi__icon"><i class="fas fa-dollar-sign"></i></div>
     <div class="ds-kpi__body">
       <div class="ds-kpi__value">R$ 12.430,00</div>
       <div class="ds-kpi__label">Receita no Período</div>
       <div class="ds-kpi__trend ds-kpi__trend--up">
         <i class="fas fa-arrow-up"></i> 12,4%
       </div>
     </div>
   </div>
─────────────────────────────────────────────────────────────── */
.ds-kpi {
  background: var(--surface-card);
  border: 1px solid var(--admin-border, var(--alpha-brown-08));
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.375rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.ds-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.ds-kpi::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gold);
  opacity: .85;
}
.ds-kpi--success::before { background: var(--color-success); }
.ds-kpi--info::before    { background: var(--color-info); }
.ds-kpi--danger::before  { background: var(--color-danger); }
.ds-kpi--warning::before { background: var(--gold-bright); }

.ds-kpi__icon {
  width: 2.75rem; height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--alpha-gold-12);
  color: var(--gold-dark);
  font-size: 1.125rem;
  flex-shrink: 0;
}
.ds-kpi--success .ds-kpi__icon { background: rgba(74,124,90,.12); color: var(--color-success); }
.ds-kpi--info    .ds-kpi__icon { background: rgba(74,107,138,.12); color: var(--color-info); }
.ds-kpi--danger  .ds-kpi__icon { background: rgba(155,58,58,.12);  color: var(--color-danger); }
.ds-kpi--warning .ds-kpi__icon { background: rgba(212,175,55,.14); color: #997300; }

.ds-kpi__body {
  flex: 1;
  min-width: 0;
}
.ds-kpi__value {
  font-family: var(--font-body);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: .25rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ds-kpi__label {
  font-size: .75rem;
  color: var(--on-surface-soft);
  letter-spacing: .03em;
  line-height: 1.35;
}
.ds-kpi__trend {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: .5rem;
  padding: .125rem .5rem;
  font-size: .6875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--alpha-brown-06);
  color: var(--on-surface-soft);
}
.ds-kpi__trend--up   { background: rgba(74,124,90,.12);  color: var(--admin-success); }
.ds-kpi__trend--down { background: rgba(155,58,58,.12);  color: var(--color-danger); }
.ds-kpi__trend i { font-size: .625rem; }

/* Grid de KPIs — auto responsivo */
.ds-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1rem;
}
@media (max-width: 480px) {
  .ds-kpi { padding: 1rem; gap: .75rem; }
  .ds-kpi__icon { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
  .ds-kpi__value { font-size: 1.375rem; }
}


/* ── DS Filter Bar ───────────────────────────────────────────
   Barra de filtros com chips + datepickers + botão filtrar.

   <div class="ds-filterbar">
     <div class="ds-filterbar__chips">
       <button class="ds-chip ds-chip--active">Todos</button>
       <button class="ds-chip">Pendente</button>
       ...
     </div>
     <div class="ds-filterbar__divider"></div>
     <div class="ds-filterbar__fields">
       <input type="date" class="f-control f-control--inline">
       <input type="date" class="f-control f-control--inline">
       <button class="btn btn-primary btn-sm">Filtrar</button>
     </div>
   </div>
─────────────────────────────────────────────────────────────── */
.ds-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface-card);
  border: 1px solid var(--admin-border, var(--alpha-brown-08));
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}
.ds-filterbar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  align-items: center;
}
.ds-filterbar__divider {
  width: 1px;
  height: 1.75rem;
  background: var(--alpha-brown-10);
  margin: 0 .25rem;
}
.ds-filterbar__fields {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .ds-filterbar { flex-direction: column; align-items: stretch; }
  .ds-filterbar__divider { display: none; }
  .ds-filterbar__fields { justify-content: flex-start; }
}

/* Chip filter */
.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .4rem .85rem;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--on-surface-soft);
  background: transparent;
  border: 1px solid var(--alpha-brown-08);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.ds-chip:hover {
  background: var(--alpha-gold-08);
  color: var(--on-surface);
  border-color: var(--alpha-gold-25);
}
.ds-chip--active {
  background: var(--gold);
  /* marrom, não --on-surface: o ouro é claro NOS DOIS temas e não inverte —
     mesmo caso da fotografia (§1b-2). Com --on-surface dava 2.03:1 no escuro. */
  color: var(--on-accent);
  border-color: var(--gold);
  font-weight: 600;
}
.ds-chip--active:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.ds-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .375rem;
  font-size: .625rem;
  font-weight: 700;
  background: var(--alpha-brown-10);
  color: inherit;
  border-radius: var(--radius-full);
}
.ds-chip--active .ds-chip__count { background: rgba(28,16,8,.18); }

/* Inline form control (within filterbar) */
.f-control--inline {
  width: auto;
  padding: .45rem .75rem;
  font-size: .8125rem;
}

/* Separador textual ("até") dentro da filterbar */
.ds-filterbar__sep {
  font-size: .8125rem;
  color: var(--on-surface-soft);
  padding: 0 .15rem;
}


/* ── DS Chart Card ───────────────────────────────────────────
   Wrapper para gráficos com header consistente.

   <div class="ds-chart">
     <div class="ds-chart__head">
       <h3 class="ds-chart__title">Receita Mensal</h3>
       <div class="ds-chart__actions">
         <button class="btn btn-outline btn-sm"><i class="fas fa-download"></i> CSV</button>
       </div>
     </div>
     <div class="ds-chart__body">
       <canvas id="chart-revenue"></canvas>
     </div>
   </div>
─────────────────────────────────────────────────────────────── */
.ds-chart {
  background: var(--surface-card);
  border: 1px solid var(--admin-border, var(--alpha-brown-08));
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ds-chart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border-soft, var(--alpha-brown-06));
  flex-wrap: wrap;
  min-height: 3.5rem;
}
.ds-chart__title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--on-surface);
  margin: 0;
}
.ds-chart__sub {
  font-size: .75rem;
  color: var(--on-surface-soft);
  margin-top: .15rem;
}
.ds-chart__actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.ds-chart__body {
  padding: 1.25rem;
  position: relative;
  min-height: 12rem;
}
.ds-chart__body--flush { padding: 0; }

/* Empty state inside chart body */
.ds-chart__body .ds-empty { padding: 2rem 1rem; }


/* ── DS Section Header ───────────────────────────────────────
   Título de seção com subtítulo (usado dentro de .a-card__body
   ou em qualquer agrupamento dentro de páginas admin).

   <div class="ds-section-head">
     <div>
       <h2 class="ds-section-head__title">Configurações</h2>
       <p class="ds-section-head__sub">Ajustes gerais da clínica</p>
     </div>
     <div class="ds-section-head__actions">...</div>
   </div>
─────────────────────────────────────────────────────────────── */
.ds-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--alpha-brown-06);
}
.ds-section-head__title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--brown);
  letter-spacing: -0.005em;
}
.ds-section-head__sub {
  font-size: .8125rem;
  color: var(--color-muted);
  margin-top: .15rem;
}
.ds-section-head__actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}


/* ── DS Stack (vertical rhythm helper) ───────────────────────
   Aplica gap consistente entre filhos diretos.
   Use em containers que agrupam cards/seções.
─────────────────────────────────────────────────────────────── */
.ds-stack       > * + * { margin-top: 1rem; }
.ds-stack-sm    > * + * { margin-top: .5rem; }
.ds-stack-lg    > * + * { margin-top: 1.5rem; }
.ds-stack-xl    > * + * { margin-top: 2rem; }


/* ── DS Cluster (horizontal grouping) ────────────────────────
   Itens lado a lado com gap consistente, com wrap.
─────────────────────────────────────────────────────────────── */
.ds-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.ds-cluster--lg { gap: 1rem; }
.ds-cluster--between { justify-content: space-between; }
.ds-cluster--end { justify-content: flex-end; }


/* ═══════════════════════════════════════════════════════════════
   PÁGINA: ADMIN REPORTS
   Componentes específicos da página de relatórios.
   ═══════════════════════════════════════════════════════════════ */

/* Grid 2:1 (chart principal + side card) */
.rpt-grid-2-1 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
@media (max-width: 1024px) {
  .rpt-grid-2-1 { grid-template-columns: 1fr; }
}

/* Lista vertical com itens label+valor (receita por serviço, profissionais) */
.rpt-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rpt-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--alpha-brown-06);
  min-width: 0;
}
.rpt-list__item:last-child { border-bottom: none; }
.rpt-list__main {
  min-width: 0;
  flex: 1;
}
.rpt-list__title {
  font-size: .875rem;
  font-weight: 500;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .15rem;
}
.rpt-list__title--single { margin-bottom: 0; }
.rpt-list__sub {
  font-size: .75rem;
  color: var(--on-surface-soft);
}
.rpt-list__value {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--on-surface);
  white-space: nowrap;
}
.rpt-list__value--success { color: #16A34A; }
.rpt-list__meta {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}
.rpt-list__pill {
  font-size: .75rem;
  font-weight: 500;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  background: var(--alpha-brown-06);
  color: var(--on-surface-soft);
  white-space: nowrap;
}
.rpt-list__pill--success {
  background: rgba(74,124,90,.12);
  color: var(--admin-success);
}

/* Lista de progress bars (status, leads) */
.rpt-progress-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.rpt-progress {
  display: block;
}
.rpt-progress__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
}
.rpt-progress__label {
  font-size: .8125rem;
  color: var(--on-surface);
  font-weight: 500;
}
.rpt-progress__value {
  font-size: .8125rem;
  color: var(--on-surface-soft);
  white-space: nowrap;
}
.rpt-progress__track {
  height: .375rem;
  background: var(--alpha-brown-06);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.rpt-progress__bar {
  height: 100%;
  background: var(--gold);
  border-radius: var(--radius-full);
  transition: width .4s ease;
}

/* Tabela específica de relatório: alinhamento e cores numéricas */
.rpt-th-num   { text-align: right; }
.rpt-th-share { width: 12rem; }
.rpt-td-name  { font-weight: 500; color: var(--on-surface); }
.rpt-td-num   { text-align: right; white-space: nowrap; }
.rpt-td-num--success { color: #16A34A; font-weight: 500; }

/* Share bar (participação % na tabela) */
.rpt-share {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.rpt-share__track {
  flex: 1;
  height: .375rem;
  background: var(--alpha-brown-06);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.rpt-share__bar {
  height: 100%;
  background: var(--gold-dark);
  border-radius: var(--radius-full);
}
.rpt-share__pct {
  font-size: .75rem;
  color: var(--on-surface-soft);
  white-space: nowrap;
  min-width: 2.5rem;
  text-align: right;
}

/* Funil CRM stats (3 colunas no topo) */
.rpt-funnel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--alpha-brown-06);
}
.rpt-funnel-stat { text-align: center; min-width: 0; }
.rpt-funnel-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.1;
  margin-bottom: .25rem;
}
.rpt-funnel-stat__value--success { color: #16A34A; }
.rpt-funnel-stat__value--gold    { color: var(--accent-text); }
.rpt-funnel-stat__label {
  font-size: .6875rem;
  color: var(--on-surface-soft);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Bloco de "taxa de conclusão" com número grande */
.rpt-completion {
  text-align: center;
  padding: 2rem 1.5rem !important;
}
.rpt-completion__value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--on-surface);
  line-height: 1;
  margin-bottom: .5rem;
}
.rpt-completion__label {
  color: var(--on-surface-soft);
  font-size: .875rem;
}


/* ═══════════════════════════════════════════════════════════════
   UTILITIES — TABLE CELLS
   Padroniza apresentação de células em todas as tabelas admin.
   Substitui os inline styles repetidos.
   ═══════════════════════════════════════════════════════════════ */

/* Nome principal (linha 1 de uma célula composta) */
.cell-name {
  display: block;
  font-weight: 500;
  color: var(--on-surface);
}

/* Texto secundário discreto (email abaixo do nome, hora abaixo da data) */
.cell-sub {
  display: block;
  font-size: .8125rem;
  color: var(--on-surface-soft);
  margin-top: .15rem;
}

/* Data ou número proeminente em célula */
.cell-date {
  display: block;
  font-weight: 500;
  color: var(--on-surface);
}

/* Texto secundário em linha (badges, status text) */
.cell-muted {
  font-size: .8125rem;
  color: var(--on-surface);
}

/* Não quebrar (datas, valores, telefones) */
.cell-nowrap { white-space: nowrap; }

/* Alinhamento numérico */
.cell-num    { text-align: right; white-space: nowrap; }
.cell-num--success { color: #16A34A; font-weight: 500; }
.cell-num--danger  { color: var(--color-danger); font-weight: 500; }

/* Link em célula (sem decoração, herda cor do brown) */
.cell-link {
  color: var(--on-surface);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t-fast);
}
.cell-link:hover { color: var(--accent-text); }

/* Célula que hospeda um empty state em tabela */
.a-table__empty-cell {
  text-align: center !important;
  padding: 0 !important;
  background: var(--admin-bg-row);
}
.a-table__empty-cell .ds-empty {
  background: transparent;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN BODY — overrides contextuais
   Sobrepõe os componentes globais com as variantes menores/com
   border-radius que o admin usa. Evita redeclaração no layout.
   ═══════════════════════════════════════════════════════════════ */

/* Fundo e cor base do admin */
/* ── O PAINEL ENTRA NO TEMA (16/07/2026) ─────────────────────────────────────
   Até aqui o admin era clara e alheio à camada semântica: `background:#F4F0EB`
   chumbado, e 633 cores literais espalhadas por 56 arquivos (contra ~100
   tokens). O site público já tinha a camada `--surface-*`/`--on-surface-*`
   (§1b/§1c) e o admin nunca a consumiu — daí `body.public-body` existir e
   `body.admin-body` não.

   Agora consome. Nenhuma regra de componente precisa saber de tema: quem usa
   --surface-* / --on-surface-* vira sozinho quando o <html> ganha data-theme.

   **A sidebar não faz parte da inversão.** Ela é escura no claro **de propósito**
   — é a superfície de marca, o mesmo caso da fotografia no §1b-2: modo claro não
   é inverter tudo, é inverter as superfícies DO TEMA, e a sidebar não é uma
   delas. Por isso ela tem token próprio, igual nos dois temas, e ganha um filete
   à direita: no escuro o fundo da página também é --brown, e sem o filete a
   sidebar se dissolveria na página. */
.admin-body {
  background: var(--surface-1);
  color: var(--on-surface);
}

:root {
  /* Superfícies de marca do painel: escuras no claro DE PROPÓSITO, e iguais nos
     dois temas — não invertem, como a fotografia do §1b-2. O topbar precisa ser
     OPACO: ele é fixo, e o conteúdo rola por baixo. */
  --surface-sidebar: var(--brown);
  --surface-topbar:  #FFFFFF;

  /* Superfície que FLUTUA: modal, dropdown, combobox, tooltip.
     NÃO use --surface-card nelas. `--surface-card` é card *sobre* uma
     superfície — no escuro vale rgba(247,243,239,.04), e o resultado só é
     sólido porque há algo opaco atrás. Um modal não tem nada atrás: você
     enxerga a página através dele, com o texto por cima do texto. */
  --surface-raised:  #FFFFFF;
}

:root[data-theme="dark"] {
  --surface-topbar:  var(--brown-mid);
  --surface-raised:  var(--brown-mid);
}

/* Botões no contexto admin — menores, com border-radius */
.admin-body .btn {
  padding: .5625rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.admin-body .btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-fill);
}
.admin-body .btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  box-shadow: 0 4px 12px rgba(201,169,110,.3);
  transform: none;
}
.admin-body .btn-outline {
  background: transparent;
  color: var(--on-surface);
  border-color: var(--admin-border);
}
.admin-body .btn-outline:hover {
  background: var(--admin-bg-row);
  border-color: var(--admin-border);
  transform: none;
}
.admin-body .btn-danger {
  background: rgba(155,58,58,.1);
  color: var(--admin-danger);
  border-color: rgba(155,58,58,.25);
}
.admin-body .btn-danger:hover {
  background: rgba(155,58,58,.2);
  transform: none;
  opacity: 1;
}
.admin-body .btn-sm   { padding: .375rem .875rem; font-size: .8125rem; }
.admin-body .btn-lg   { padding: .75rem 1.5rem; font-size: 1rem; }
.admin-body .btn-icon { padding: .5rem; width: 2.125rem; height: 2.125rem; justify-content: center; }

/* Badge no admin — pill com border-radius full */
.admin-body .badge {
  border-radius: var(--radius-full);
  padding: .2rem .625rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: none;
}

/* Flash messages — contexto admin */
.flash {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}
.flash--success {
  background: rgba(74,124,90,.12);
  border-color: rgba(74,124,90,.3);
  color: var(--admin-success);
}
.flash--error {
  background: rgba(155,58,58,.1);
  border-color: rgba(155,58,58,.25);
  color: var(--admin-danger);
}
.flash--info {
  background: rgba(74,107,138,.1);
  border-color: rgba(74,107,138,.25);
  color: var(--admin-info);
}

/* ═══════════════════════════════════════════════════════════════
   PÁGINAS DE ERRO (404, 500, 403)
   ═══════════════════════════════════════════════════════════════ */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-dark);
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}

.error-page__inner {
  max-width: 32rem;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 9rem);
  font-weight: 300;
  line-height: 1;
  color: var(--accent-text);
  opacity: .3;
  margin-bottom: var(--space-md);
  user-select: none;
}

.error-page__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 400;
  color: var(--on-surface);
  margin-bottom: var(--space-md);
  letter-spacing: .02em;
}

.error-page__desc {
  color: var(--on-surface-soft);
  font-size: clamp(.9375rem, 2vw, 1.0625rem);
  line-height: 1.75;
  margin-bottom: var(--space-2xl);
}

.error-page__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   ACESSIBILIDADE — SKIP LINK
   ═══════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -9999px;
  left: var(--space-md);
  z-index: var(--z-skip);
  background: var(--gold);
  color: var(--on-accent);
  padding: .625rem 1.25rem;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--t-fast);
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--brown);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   ACESSIBILIDADE — FOCO VISÍVEL GLOBAL
   Garante foco visível em todos os elementos interativos (WCAG 2.4.11)
   ═══════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Remove o outline padrão apenas quando não é teclado */
:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════
   ACESSIBILIDADE — FOOTER ITENS DE CONTATO
   Substitui os inline styles dos itens de contato do footer.
   ═══════════════════════════════════════════════════════════════ */
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: .625rem;
}

.footer-contact-item--top {
  align-items: flex-start;
}

.footer-contact-item__icon {
  color: var(--accent-text);
  font-size: .75rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.footer-contact-item--top .footer-contact-item__icon {
  margin-top: .2rem;
}

.footer-contact-item__text {
  font-size: .875rem;
  color: var(--on-surface-soft);
}

/* ═══════════════════════════════════════════════════════════════
   PERFORMANCE — PREFERS-REDUCED-MOTION
   Respeita a preferência do sistema operacional (WCAG 2.3.3)
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .hero__scroll-dot { animation: none; }
  .skeleton { animation: none; background: rgba(201,169,110,.08); }
  .animate-fade-in-up,
  .animate-fade-in { animation: none; opacity: 1 !important; }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX — estilos migrados do JS inline para CSS
   Permite override e garante consistência.
   ═══════════════════════════════════════════════════════════════ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(28,16,8,.97);
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-overlay__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}
.lightbox-overlay__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--on-surface-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--t-fast);
  padding: .5rem;
  line-height: 1;
}
.lightbox-overlay__close:hover,
.lightbox-overlay__close:focus-visible {
  color: var(--accent-text);
}

/* ═══════════════════════════════════════════════════════════════
   FAQ — TRANSIÇÃO SUAVE NA RESPOSTA (acessibilidade + UX)
   ═══════════════════════════════════════════════════════════════ */
.faq-item__answer {
  /* sobrescreve display:none original com grid trick para transição */
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-base);
  overflow: hidden;
  padding: 0;
  /* reset do padding original que estava sempre presente */
}
.faq-item__answer-inner {
  overflow: hidden;
  padding-bottom: 0;
  transition: padding-bottom var(--t-base);
}
.faq-item.open .faq-item__answer {
  grid-template-rows: 1fr;
}
.faq-item.open .faq-item__answer-inner {
  padding-bottom: 1.25rem;
}

/* Mantém compatibilidade com FAQs que não têm .faq-item__answer-inner */
.faq-item__answer > p,
.faq-item__answer > div {
  min-height: 0;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITÁRIOS EXTRAS
   ═══════════════════════════════════════════════════════════════ */

/* Visually hidden mas acessível a leitores de tela */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus trap helper — esconde conteúdo fora de modais */
[aria-hidden="true"] { pointer-events: none; }

/* dev-link no footer */
.footer-dev-link {
  color: var(--on-surface-soft);
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-dev-link:hover { color: var(--accent-text); }

/* ==========================================================================
   UTILITY CLASSES — padrões recorrentes extraídos das views
   Prefixo .u- para utilities globais (admin + public + patient)
   ========================================================================== */

/* ── Flex layouts ─────────────────────────────────────────────────────────── */
.u-flex          { display: flex; }
.u-flex-col      { display: flex; flex-direction: column; }
.u-flex-center   { display: flex; align-items: center; }
.u-flex-between  { display: flex; align-items: center; justify-content: space-between; }
.u-flex-end      { display: flex; justify-content: flex-end; }
.u-flex-wrap     { flex-wrap: wrap; }
.u-flex-1        { flex: 1; min-width: 0; }
.u-items-start   { align-items: flex-start; }

/* ── Gap ─────────────────────────────────────────────────────────────────── */
.u-gap-xs  { gap: .375rem; }
.u-gap-sm  { gap: .5rem; }
.u-gap-md  { gap: .75rem; }
.u-gap-lg  { gap: 1rem; }
.u-gap-xl  { gap: 1.25rem; }
.u-gap-2xl { gap: 1.5rem; }

/* ── Max-width presets (formulários e cards) ─────────────────────────────── */
.u-mw-sm  { max-width: 40rem; }
.u-mw-md  { max-width: 42rem; }
.u-mw-lg  { max-width: 48rem; }
.u-mw-xl  { max-width: 52rem; }
.u-mw-2xl { max-width: 56rem; }

/* ── Margin bottom ───────────────────────────────────────────────────────── */
.u-mb-0  { margin-bottom: 0; }
.u-mb-xs { margin-bottom: .375rem; }
.u-mb-sm { margin-bottom: .5rem; }
.u-mb-md { margin-bottom: 1rem; }
.u-mb-lg { margin-bottom: 1.5rem; }

/* ── Tipografia ──────────────────────────────────────────────────────────── */
.u-text-xs    { font-size: .75rem; }
.u-text-sm    { font-size: .8125rem; }
.u-text-base  { font-size: .875rem; }
.u-text-label {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.u-text-muted  { color: var(--text-muted, #8A7560); }
.u-text-soft   { color: var(--text-soft,  #B8A898); }
.u-text-gold   { color: var(--gold, #C9A96E); }
.u-text-dark   { color: var(--brown, #1C1008); }
.u-font-medium { font-weight: 500; }
.u-font-semi   { font-weight: 600; }

/* ── Dividers ────────────────────────────────────────────────────────────── */
.u-divider-top    { border-top:    1px solid rgba(28,16,8,.07); }
.u-divider-bottom { border-bottom: 1px solid rgba(28,16,8,.07); }
.u-divider-top-pt { border-top: 1px solid rgba(28,16,8,.07); padding-top: 1rem; margin-top: 1rem; }

/* ── Ícone-círculo (avatares, status indicators) ─────────────────────────── */
.u-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.u-icon-circle--gold { background: rgba(201,169,110,.12); color: var(--gold, #C9A96E); }
.u-icon-circle--sm   { width: 1.75rem; height: 1.75rem; }

/* ── Form helpers ────────────────────────────────────────────────────────── */
.u-resize-v  { resize: vertical; }
.u-resize-n  { resize: none; }
.u-w-auto    { width: auto; }
.u-w-full    { width: 100%; }
.u-min-w-select { min-width: 10rem; }
.u-min-w-input  { min-width: 14rem; }

/* ── Tabelas simples (admin) ─────────────────────────────────────────────── */
.u-table {
  width: 100%;
  border-collapse: collapse;
}
.u-table th,
.u-table td {
  padding: .625rem .5rem;
  text-align: left;
}
.u-table th {
  font-size: .8125rem;
  color: var(--text-muted, #8A7560);
  font-weight: 500;
  border-bottom: 1px solid rgba(28,16,8,.08);
}
.u-table td { border-bottom: 1px solid rgba(28,16,8,.05); }
.u-table tr:last-child td { border-bottom: none; }

/* ── Background tints ────────────────────────────────────────────────────── */
.u-bg-gold-tint   { background: rgba(201,169,110,.06); }
.u-bg-cream       { background: #F7F3EF; }
.u-bg-cream-deep  { background: #EDE8E2; }

/* ── Object-fit ──────────────────────────────────────────────────────────── */
.u-object-cover   { object-fit: cover; }
.u-object-contain { object-fit: contain; }

/* ── Positioning helpers ─────────────────────────────────────────────────── */
.u-relative { position: relative; }
.u-absolute { position: absolute; }
.u-inset-0  { inset: 0; }

/* ── Overflow ────────────────────────────────────────────────────────────── */
.u-overflow-hidden { overflow: hidden; }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Admin / Chart ────────────────────────────────────────────────────────── */
/* Área de gráfico com altura fixa e position:relative para Canvas */
.ds-chart__body--h18 { height: 18rem; position: relative; }

/* KPI grid com margin inferior padrão */
.ds-kpi-grid--mb-md { margin-bottom: 1.25rem; }
.ds-kpi-grid--mb-lg { margin-bottom: 1.5rem; }

/* Section grid com margin inferior */
.rpt-grid-2-1--mb { margin-bottom: 1.5rem; }

/* ── Stat grid (CRM e outras listas) ─────────────────────────────────────── */
.stat-grid--mb { margin-bottom: 1.5rem; }

/* ── Detalhes / key-value table (appointments show, prescriptions etc.) ───── */
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table td { padding: .625rem .5rem; vertical-align: top; }
.kv-table .kv-table__key {
  color: var(--on-surface-soft);
  font-size: .8125rem;
  font-weight: 500;
  white-space: nowrap;
  width: 7rem;
}
.kv-table .kv-table__val { color: var(--on-surface); font-size: .9375rem; }
.kv-table .kv-table__notes {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border-soft);
}
.kv-table__notes-label {
  font-size: .8125rem;
  color: var(--on-surface-soft);
  font-weight: 500;
  margin-bottom: .5rem;
}
.kv-table__notes-text { font-size: .9375rem; color: var(--on-surface); line-height: 1.6; }

/* ── CRM / Activity feed ─────────────────────────────────────────────────── */
.crm-activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(28,16,8,.06);
}
.crm-activity-item:last-child { border-bottom: none; }
.crm-activity-item__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(201,169,110,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #A07840;
  font-size: .8125rem;
}
.crm-activity-item__body { flex: 1; min-width: 0; }
.crm-activity-item__title { font-weight: 500; color: #1C1008; margin-bottom: .2rem; }
.crm-activity-item__meta  { font-size: .75rem; color: #B8A898; }

/* ── CRM / info-grid cells (key-value pairs em cards) ────────────────────── */
.crm-info__key {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8A7560;
  margin-bottom: .25rem;
}
.crm-info__val { font-weight: 500; color: #1C1008; }

/* ── CRM / table cell helpers ────────────────────────────────────────────── */
.cell-primary { font-weight: 500; color: var(--on-surface); }
.cell-email   { display: block; font-size: .875rem;  color: var(--on-surface); }
.cell-phone   { display: block; font-size: .8125rem; color: var(--on-surface-soft); }
.cell-source  { font-size: .8125rem; color: var(--on-surface-soft); }
.cell-ts      { font-size: .8125rem; color: var(--on-surface-soft); white-space: nowrap; }

/* ── Patient item cells ───────────────────────────────────────────────────── */
.pat-item__main  { flex: 1; min-width: 0; }
.pat-item__title { font-weight: 500; color: #1C1008; margin-bottom: .2rem; }
.pat-item__meta  { font-size: .8125rem; color: #8A7560; }
.pat-item__icon  { margin-right: .375rem; }

/* ── Form: full-width submit com margin-top ──────────────────────────────── */
.btn-submit-full { width: 100%; margin-top: .875rem; }
.btn-full        { width: 100%; }

/* ── a-card padding override (filter bar) ────────────────────────────────── */
.a-card__body--pad-sm { padding: 1rem 1.5rem; }

/* ── Filter bar inline form ──────────────────────────────────────────────── */
.filter-form {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-form__search { flex: 1; min-width: 14rem; }
.filter-form__select { width: auto; min-width: 10rem; }

/* ── Appointments index: count badge inline ───────────────────────────────── */
.page-sub-count { margin-left: .5rem; }

/* ── Prescription document (show) ────────────────────────────────────────── */
.rx-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(201,169,110,.2);
  margin-bottom: 1.5rem;
}
.rx-doc-header__right { text-align: right; }
.rx-doc-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #8A7560;
  margin-bottom: .25rem;
}
.rx-doc-label--sm {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #B8A898;
  margin-bottom: .2rem;
}
.rx-doc-value--lg   { font-size: 1.25rem; font-weight: 500; color: #1C1008; }
.rx-doc-value--md   { font-size: 1.125rem; color: #3D2510; }
.rx-doc-value--sm   { font-size: .8125rem; color: #B8A898; margin-top: .25rem; }
.rx-doc-value       { font-weight: 500; color: #1C1008; }
.rx-doc-value--sub  { font-size: .875rem; color: #8A7560; margin-top: .2rem; }
.rx-doc-text        { color: #3D2510; line-height: 1.75; }
.rx-doc-section     { margin-bottom: 1.5rem; }

.rx-person-box {
  background: rgba(201,169,110,.06);
  border: 1px solid rgba(201,169,110,.2);
  border-radius: .625rem;
  padding: 1rem 1.25rem;
}

.rx-med-box {
  background: rgba(201,169,110,.04);
  border: 1px solid rgba(201,169,110,.15);
  border-radius: var(--radius-lg);
  padding: .875rem 1.25rem;
}
.rx-med-list { display: flex; flex-direction: column; gap: .625rem; }

/* ── Patients index: filter bar ─────────────────────────────────────────── */
.patient-search { max-width: 24rem; }

/* ── Notification feed ───────────────────────────────────────────────────── */
.notif-item {
  display: flex;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--admin-border-soft);
}
.notif-item--unread { background: rgba(201,169,110,.04); }
.notif-item__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(201,169,110,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .1rem;
  color: var(--accent-text);
  font-size: .875rem;
}
.notif-item--unread .notif-item__icon { background: rgba(201,169,110,.2); }
.notif-item__body  { flex: 1; min-width: 0; }
.notif-item__head  { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.notif-item__title { font-size: .9375rem; font-weight: 500; color: var(--on-surface); margin-bottom: .25rem; }
.notif-item__msg   { font-size: .875rem; color: var(--on-surface-muted); line-height: 1.55; }
.notif-item__ts    { font-size: .75rem; color: var(--on-surface-faint); margin-top: .375rem; }
.notif-item__ts i  { margin-right: .25rem; }
.notif-item__actions { display: flex; align-items: center; gap: .625rem; flex-shrink: 0; }

/* ── Ticket thread ───────────────────────────────────────────────────────── */
.ticket-msg {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(28,16,8,.06);
}
.ticket-msg--admin { background: rgba(201,169,110,.05); }
.ticket-msg__head  { display: flex; justify-content: space-between; margin-bottom: .375rem; }
.ticket-msg__sender-admin  { font-size: .8125rem; font-weight: 600; color: #A07840; }
.ticket-msg__sender-client { font-size: .8125rem; font-weight: 600; color: #3D2510; }
.ticket-msg__ts    { font-size: .75rem; color: #B8A898; }
.ticket-msg__text  { font-size: .875rem; color: #3D2510; line-height: 1.7; }

/* Ticket details dl */
.ticket-dl { display: flex; flex-direction: column; gap: .875rem; }
.ticket-dl dt {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8A7560;
  margin-bottom: .25rem;
}
.ticket-dl dd       { font-weight: 500; color: #1C1008; }
.ticket-dl dd.small { font-size: .875rem; color: #3D2510; font-weight: 400; }

/* Reply form */
.ticket-reply-actions {
  margin-top: .875rem;
  display: flex;
  justify-content: flex-end;
}

/* Ticket card messages box */
.ticket-msgs-body { padding: 0; max-height: 28rem; overflow-y: auto; }

/* ── Medical records (prontuário) ────────────────────────────────────────── */
.record-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}
.record-summary__key {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8A7560;
  margin-bottom: .25rem;
}
.record-summary__val      { font-weight: 500; color: #1C1008; }
.record-summary__val--sub { color: #3D2510; }

.record-empty { padding: 3.5rem; text-align: center; color: #8A7560; }
.record-empty__icon  { font-size: 2.5rem; opacity: .25; display: block; margin-bottom: 1rem; }
.record-empty__msg   { margin-bottom: 1.25rem; }

.record-card { margin-bottom: 1rem; }
.record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(201,169,110,.15);
  flex-wrap: wrap;
}
.record-header__left    { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.record-header__icon    {
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-lg);
  background: rgba(201,169,110,.1);
  display: flex; align-items: center; justify-content: center;
  color: #A07840; flex-shrink: 0;
}
.record-header__date    { font-weight: 600; color: #1C1008; font-size: .9375rem; }
.record-header__meta    { font-size: .8125rem; color: #8A7560; margin-top: .1rem; }
.record-header__actions { display: flex; gap: .375rem; }

.record-fields {
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 1.25rem;
}
.record-field__label {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em;
  color: #8A7560; font-weight: 600; margin-bottom: .375rem;
}
.record-field__text { font-size: .9rem; color: #3D2510; line-height: 1.6; white-space: pre-wrap; }

/* ── Logs ────────────────────────────────────────────────────────────────── */
.logs-nav        { display: flex; gap: .5rem; }
.log-filter-form { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.log-filter-field { display: flex; flex-direction: column; gap: .375rem; }
.log-filter-field .f-label   { margin: 0; }
.log-filter-field .f-control { width: auto; }
.log-filter-select { min-width: 9rem; }
.cell-log-id   { font-size: .8125rem; color: var(--on-surface-soft); }
.cell-log-msg  { font-size: .8125rem; color: var(--on-surface); max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-log-file { font-size: .75rem;   color: var(--on-surface-soft); max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-log-ts   { font-size: .8125rem; color: var(--on-surface-soft); white-space: nowrap; }

.pagination-bar {
  display: flex; justify-content: center; gap: .5rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--admin-border-soft);
}

/* ── Public Home ─────────────────────────────────────────────────────────── */
.res-pair__img-wrap { position: relative; }
.res-pair__img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.res-pair__caption-row { grid-column: 1/-1; text-align: center; margin-top: .5rem; font-size: .8125rem; color: var(--on-surface-muted); letter-spacing: .06em; }
.section-title__heading--dark { color: var(--on-surface); }
.card-link { font-family: var(--font-body); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--color-primary, #C9A96E); display: flex; align-items: center; gap: .5rem; white-space: nowrap; transition: gap .2s ease; }
.card-link i { font-size: .75rem; }
.card-link:hover { gap: .75rem; }
.card-footer-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-price-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-surface-soft); }
.review-author__avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cta-block { max-width: 600px; margin: 0 auto; text-align: center; }
.cta-block__actions { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.faq-list--centered { max-width: 720px; margin: 0 auto; }
.section-cta-center { text-align: center; margin-top: 2.5rem; }

/* ── Public Home — About section ─────────────────────────────────────────── */
.about-body-text { font-family: var(--font-body); font-size: 1rem; color: var(--on-surface-muted); line-height: 1.85; margin-bottom: 1.5rem; font-weight: 300; }
.about-quote { font-family: var(--font-display); font-size: 1.125rem; color: var(--accent-text); font-style: italic; margin-bottom: 2rem; }
.section-title__line--left { justify-content: flex-start; }
.section-title__line-bar { width: 3rem; height: 1px; background: var(--color-primary); }
.u-mt-xl { margin-top: 2rem; }
.u-mb-md { margin-bottom: 1.25rem; }
.u-mb-lg { margin-bottom: 1.5rem; }
.section-title__eyebrow--center { justify-content: center; display: inline-flex; margin-bottom: 1.5rem; }
.cta-body-text { font-family: var(--font-body); color: var(--on-surface-muted); line-height: 1.8; margin-bottom: 2.5rem; font-size: 1rem; }

/* ── Card icon placeholder (fallback when no image) ─────────────────────── */
.card__icon-placeholder { height: 12rem; background: var(--color-bg-warm); display: flex; align-items: center; justify-content: center; }
.card__icon-placeholder i { font-size: 3rem; color: rgba(201,169,110,.3); }

/* ── Review author icon avatar ───────────────────────────────────────────── */
.review-author__avatar-icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(201,169,110,.15); border: 1px solid var(--color-border-dark); display: flex; align-items: center; justify-content: center; color: var(--accent-text); font-size: 1rem; flex-shrink: 0; }

/* ── Google badge ────────────────────────────────────────────────────────── */
/*
 * ⚠️ `width: auto` NÃO é redundante — é a correção de um layout quebrado.
 *
 * O arquivo é 5727×991 px, e desde que o `img_dims()` passou a declarar as
 * dimensões no HTML (para eliminar o CLS), o `<img>` carrega `width="5727"`.
 * Com o CSS fixando só a ALTURA, o navegador usa a largura do atributo, o
 * `img { max-width: 100% }` genérico a corta na largura do contêiner, e a
 * altura continua presa em 4rem: medido em 28/07, o selo renderizava
 * **1200×64** onde deveria ser 370×64 — esticado 3,2× na horizontal.
 *
 * `width: auto` devolve a largura ao cálculo pela proporção. A regra genérica
 * da linha 281 já faz isso para toda imagem; quem a desfaz é justamente a
 * classe que fixa a altura — então toda classe que fixe UMA dimensão precisa
 * declarar a outra como `auto`.
 */
.google-badge { height: 4rem; width: auto; margin: 0 auto; display: block; }

/* ── Ebook section ───────────────────────────────────────────────────────── */
.ebook-section { padding-top: 4rem; padding-bottom: 4rem; }
.ebook-grid { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center; max-width: 56rem; margin: 0 auto; }
.ebook-cover-wrap { flex-shrink: 0; }
.ebook-cover { width: 180px; border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(0,0,0,.35); border: 1px solid rgba(201,169,110,.2); display: block; }
.ebook-cover-placeholder { width: 180px; height: 252px; background: rgba(201,169,110,.08); border-radius: var(--radius-lg); border: 1px solid rgba(201,169,110,.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ebook-cover-placeholder__icon { font-size: 3rem; color: rgba(201,169,110,.3); }
.ebook-badge { font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: .75rem; }
.ebook-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.625rem, 4vw, 2.5rem); font-weight: 300; color: var(--on-surface); line-height: 1.15; margin-bottom: 1rem; }
.ebook-desc { font-size: .9375rem; color: var(--on-surface-soft); line-height: 1.8; margin-bottom: 1.5rem; max-width: 36rem; }
.ebook-footer { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.ebook-price { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 300; color: var(--accent-text); letter-spacing: .04em; }
@media (max-width: 600px) { .ebook-grid { grid-template-columns: 1fr; } .ebook-cover, .ebook-cover-placeholder { margin: 0 auto; } }

/* ── 30. LGPD — barra de cookies ─────────────────────────────── */
.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  background: var(--surface-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border-dark);
  box-shadow: 0 -8px 32px rgba(0,0,0,.35);
  transform: translateY(100%);
  transition: transform var(--t-base);
}
.cookie-bar.is-open { transform: translateY(0); }

.cookie-bar__in {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 1.25rem clamp(1rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.cookie-bar__body { flex: 1; min-width: 0; }

.cookie-bar__title {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .375rem;
}
.cookie-bar__text {
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--on-surface-muted);   /* 8.6:1 sobre o marrom */
  margin: 0;
}
.cookie-bar__link {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.cookie-bar__link:hover { color: var(--gold-light); }

.cookie-bar__actions {
  display: flex;
  gap: .625rem;
  flex-shrink: 0;
}
.cookie-bar__btn {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .625rem 1.5rem;
  border-radius: 2rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-base);
}
/* Recusar tem o mesmo destaque de Aceitar: a LGPD exige que recusar não seja
   mais difícil do que aceitar. */
.cookie-bar__btn--ghost {
  background: transparent;
  border: 1px solid rgba(201,169,110,.5);
  color: var(--on-surface);
}
.cookie-bar__btn--ghost:hover { border-color: var(--accent-line); color: var(--accent-text); }
.cookie-bar__btn--solid {
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--on-accent);
}
.cookie-bar__btn--solid:hover { background: var(--gold-light); border-color: var(--gold-light); }

@media (max-width: 760px) {
  .cookie-bar__in { flex-direction: column; align-items: stretch; gap: 1rem; }
  .cookie-bar__actions { justify-content: stretch; }
  .cookie-bar__btn { flex: 1; text-align: center; }
}

/* ── 31. ALTERNADOR DE TEMA (site público) ───────────────────── */

/* Nasce com `hidden` no HTML e só aparece quando o JS assume — um botão que
   não alterna é pior que botão nenhum. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.theme-toggle[hidden] { display: none; }

.theme-toggle:hover {
  color: var(--accent-text);
  border-color: var(--accent-line);
  background: var(--alpha-gold-08);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.theme-toggle__icon { font-size: .8125rem; line-height: 1; }

/* A troca de ícone é instantânea; animá-la só atrasaria a resposta ao clique.
   O respeito a prefers-reduced-motion já vem do bloco global no fim do arquivo. */

@media (max-width: 48rem) {
  /* No mobile o CTA some para dar espaço ao burger; o alternador fica —
     é barato em espaço e é a única forma de chegar ao tema por lá. */
  .theme-toggle { width: 2rem; height: 2rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   §32 · Insights (/admin/insights)                              17/07/2026
   ──────────────────────────────────────────────────────────────────────────
   Tudo aqui usa os tokens de superfície (§12): a tela existe nos dois temas.
   Um `rgba(28,16,8,.6)` literal funcionaria no claro e sumiria no escuro —
   é exatamente como a seção "sobre" da home ficou invisível na 1ª tentativa.
   ══════════════════════════════════════════════════════════════════════════ */

/* Ressalva embaixo do número. Pequena de propósito: qualifica o valor, não
   compete com ele. */
.ins-nota {
  margin-top: .5rem;
  font-size: .72rem;
  line-height: 1.45;
  color: var(--on-surface-soft);
}

.ins-h2 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--on-surface);
}

.ins-sub {
  margin: 0 0 1.15rem;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--on-surface-soft);
}
.ins-sub code {
  padding: .1em .35em;
  border-radius: 4px;
  background: var(--admin-bg-row);
  font-size: .95em;
}

.ins-vazio {
  margin: 0;
  padding: 1.5rem 0;
  text-align: center;
  font-size: .85rem;
  color: var(--on-surface-soft);
}

.ins-alerta { margin-top: 1rem; font-size: .82rem; line-height: 1.6; }

/* Duas colunas que viram uma sozinhas. `minmax(0, 1fr)` e não `1fr`: um filho
   com tabela larga estoura a coluna, porque o mínimo padrão do grid é `auto`
   (= o conteúdo), não zero. Foi assim que a tabela empurrou o card para fora. */
.ins-duas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.25rem;
}
.ins-duas > * { min-width: 0; }

/* ── Os insights ─────────────────────────────────────────────────────────── */
.ins-item {
  display: flex;
  gap: .85rem;
  padding: .9rem 1rem;
  border-radius: 10px;
  border-left: 3px solid var(--accent-line);
  background: var(--admin-bg-row);
}
.ins-item + .ins-item { margin-top: .6rem; }

.ins-item--info   { border-left-color: var(--accent-line); }
.ins-item--alerta { border-left-color: var(--admin-warning, #C9A96E); }

.ins-item__ico {
  flex: none;
  margin-top: .15rem;
  font-size: .95rem;
  color: var(--accent-text);
}
.ins-item--alerta .ins-item__ico { color: var(--admin-warning, #A07840); }

.ins-item__titulo {
  font-weight: 600;
  font-size: .9rem;
  color: var(--on-surface);
}
.ins-item__texto {
  margin: .3rem 0 0;
  font-size: .82rem;
  line-height: 1.65;
  color: var(--on-surface-muted);
}

/* ── Gráficos ────────────────────────────────────────────────────────────── */
/* Altura FIXA, e é obrigatório: o Chart.js com `maintainAspectRatio:false`
   mede o pai. Pai de altura automática = 0px, e o gráfico não aparece —
   ou entra em laço de redimensionamento. */
.ins-chart { position: relative; height: 18rem; }
.ins-chart--rosca { height: 14rem; margin-bottom: 1.25rem; }

/* ── Etapas ──────────────────────────────────────────────────────────────── */
.ins-etapas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.75rem;
  padding: .5rem 0 .25rem;
}
.ins-etapas__sep { color: var(--on-surface-faint); font-size: 1.5rem; line-height: 1; }

.ins-etapa { text-align: center; }
.ins-etapa__valor {
  /* NÃO usa --font-display. A Cormorant é uma serifada de traço fino, linda em
     título e ruim em número: medido na tela, "11" saía como dois traços soltos
     ("I I") e "758" ficava frágil. Número de painel é para ser lido de relance.
     `tabular-nums` alinha as colunas de dígitos. */
  font-family: var(--font-body);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--on-surface);
  font-variant-numeric: tabular-nums;
}
.ins-etapa__rotulo {
  margin-top: .3rem;
  font-size: .76rem;
  color: var(--on-surface-soft);
}

@media (max-width: 640px) {
  .ins-chart { height: 14rem; }
  .ins-etapas__sep { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   §33 · Roadmap — custos                                        17/07/2026
   ══════════════════════════════════════════════════════════════════════════ */

.rm-custos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr));
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.rm-custos > * { min-width: 0; }

.rm-tag {
  font-size: .72rem;
  color: var(--on-surface-soft);
  white-space: nowrap;
}
.rm-tag--fechado { color: var(--accent-text); font-weight: 600; }

/* `tabular-nums` alinha as casas: coluna de dinheiro com dígito proporcional
   dança a cada linha e obriga a reler. */
.rm-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.rm-total td {
  border-top: 2px solid var(--accent-line);
  background: var(--admin-bg-row);
}

.rm-incluso { color: var(--on-surface-soft); font-size: .8rem; }
.rm-fora    { color: var(--accent-text); font-size: .78rem; font-style: italic; }

.rm-nota {
  margin: 1rem 0 0;
  font-size: .76rem;
  line-height: 1.6;
  color: var(--on-surface-soft);
}

/* ── Hero do roadmap (cliente + % de conclusão) — só tokens, nunca cor literal.
   Reutilizável: o nome e o segmento vêm de settings, o CSS não conhece cliente. */
.rm-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "info pct" "bar bar";
  gap: .75rem 1.25rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--surface-card);
}
.rm-hero__info { grid-area: info; min-width: 0; }
.rm-hero__eyebrow {
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 .25rem;
}
.rm-hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--on-surface);
  margin: 0;
  line-height: 1.2;
}
.rm-hero__sub { font-size: .82rem; color: var(--on-surface-soft); margin: .3rem 0 0; }
.rm-hero__pct { grid-area: pct; text-align: right; }
.rm-hero__pct-num {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.rm-hero__pct-label { font-size: .7rem; color: var(--on-surface-soft); text-transform: uppercase; letter-spacing: .04em; }
.rm-hero__bar {
  grid-area: bar;
  height: .5rem;
  border-radius: 999px;
  background: var(--admin-bg-row);
  overflow: hidden;
}
.rm-hero__bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-line);
  transition: width var(--t-base, .3s) ease;
}

/* ── Lista de entregas por seção ─────────────────────────────────────────── */
.rm-deliv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.rm-deliv__item {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--admin-border-soft);
}
.rm-deliv__item:last-child { border-bottom: 0; }
.rm-deliv__badge { flex-shrink: 0; margin-top: .05rem; }
.rm-deliv__txt { font-size: .85rem; line-height: 1.5; color: var(--on-surface); }

@media (max-width: 560px) {
  .rm-hero { grid-template-columns: 1fr; grid-template-areas: "info" "pct" "bar"; text-align: left; }
  .rm-hero__pct { text-align: left; }
}

/* Prévia ao vivo do post social (card estilo rede). Só tokens. */
.sp-preview {
  max-width: 22rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-card);
}
.sp-preview__head { display: flex; align-items: center; gap: .625rem; padding: .75rem; }
.sp-preview__avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-light, var(--admin-bg-row)); color: var(--accent-text); flex-shrink: 0;
}
.sp-preview__name { font-weight: 600; font-size: .875rem; color: var(--on-surface); }
.sp-preview__meta { font-size: .72rem; color: var(--on-surface-soft); }
.sp-preview__image {
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; gap: .375rem;
  align-items: center; justify-content: center;
  background: var(--admin-bg-row); color: var(--on-surface-soft); font-size: .8rem;
}
.sp-preview__image i { font-size: 1.75rem; opacity: .5; }
.sp-preview__body { padding: .75rem; }
.sp-preview__caption { font-size: .875rem; line-height: 1.55; color: var(--on-surface); white-space: pre-wrap; margin: 0; }
.sp-preview__caption.is-placeholder { color: var(--on-surface-soft); font-style: italic; }
.sp-preview__tags { font-size: .82rem; color: var(--accent-text); margin: .5rem 0 0; word-break: break-word; }

/* Botão de busca global no topbar. Só tokens. */
.topbar-search-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 2.1rem;
  padding: 0 .625rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--admin-bg-row);
  color: var(--on-surface-soft);
  font-size: .8125rem;
  cursor: pointer;
}
.topbar-search-btn:hover { color: var(--on-surface); border-color: var(--accent-line); }
.topbar-search-btn__kbd,
.cmdp kbd, .kbd-help kbd {
  font: inherit;
  font-size: .7rem;
  padding: .1rem .35rem;
  border: 1px solid var(--admin-border);
  border-radius: .3rem;
  background: var(--surface-card);
  color: var(--on-surface-soft);
}
@media (max-width: 640px) {
  .topbar-search-btn__label, .topbar-search-btn__kbd { display: none; }
}

/* Command palette (dialog nativo). Só tokens. */
.cmdp {
  width: min(38rem, 94vw);
  max-height: 70vh;
  padding: 0;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius, .6rem);
  background: var(--surface-raised, var(--surface-card));
  color: var(--on-surface);
  box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,.28));
  top: 12vh;
}
.cmdp::backdrop { background: rgba(0,0,0,.45); }
.cmdp__box { display: flex; flex-direction: column; max-height: 70vh; }
.cmdp__search {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--admin-border);
}
.cmdp__search-ico { color: var(--on-surface-soft); }
.cmdp__input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--on-surface);
  font-size: 1rem;
  outline: none;
}
.cmdp__results { overflow-y: auto; padding: .375rem; }
.cmdp__group {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--on-surface-soft);
  padding: .5rem .625rem .25rem;
}
.cmdp__item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .625rem;
  border-radius: .4rem;
  text-decoration: none;
  color: var(--on-surface);
}
.cmdp__item.is-active { background: var(--admin-bg-row); }
.cmdp__item-ico { width: 1.1rem; text-align: center; color: var(--accent-text); flex-shrink: 0; }
.cmdp__item-label { flex: 1; font-size: .9rem; }
.cmdp__item-sub { font-size: .75rem; color: var(--on-surface-soft); }
.cmdp__empty { padding: 1.5rem; text-align: center; color: var(--on-surface-soft); font-size: .875rem; }
.cmdp__foot {
  display: flex;
  gap: 1rem;
  padding: .5rem 1rem;
  border-top: 1px solid var(--admin-border);
  font-size: .72rem;
  color: var(--on-surface-soft);
}
.kbd-help { display: flex; flex-direction: column; gap: .5rem; }
.kbd-help__row { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; }

/* Criação rápida (+) no topbar — dropdown via <details>. Só tokens. */
.qc-menu { position: relative; }
.qc-menu > summary { list-style: none; cursor: pointer; }
.qc-menu > summary::-webkit-details-marker { display: none; }
.qc-menu__dd {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 13rem;
  background: var(--surface-raised, var(--surface-card));
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius, .5rem);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.14));
  padding: .375rem;
  z-index: 60;
}
.qc-menu__head {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--on-surface-soft);
  padding: .375rem .625rem .25rem;
}
.qc-menu__item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .625rem;
  border-radius: .375rem;
  font-size: .875rem;
  color: var(--on-surface);
  text-decoration: none;
}
.qc-menu__item:hover { background: var(--admin-bg-row); }
.qc-menu__ico { width: 1rem; text-align: center; color: var(--accent-text); }

/* Edição inline (duplo-clique para editar). Só tokens — app.css é compartilhado. */
[data-inline-edit] {
  cursor: cell;
  border-bottom: 1px dashed var(--admin-border);
}
[data-inline-edit]:hover {
  background: var(--admin-bg-row);
}
[data-inline-edit][aria-busy="true"] { opacity: .55; }
.inline-editing { background: var(--admin-bg-row); }
.inline-edit-input {
  width: 100%;
  box-sizing: border-box;
  padding: .3rem .5rem;
  font: inherit;
  color: var(--on-surface);
  background: var(--surface-raised, var(--surface-card));
  border: 1px solid var(--accent-line);
  border-radius: .3rem;
}

/* Bloco de comando das instruções (CLI do daemon de WhatsApp). Só tokens. */
.ins-code {
  margin: 0;
  padding: .875rem 1rem;
  background: var(--admin-bg-row);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius, .5rem);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--on-surface);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   §34 · Ferramentas do cabeçalho — notas, calculadora, zoom, acessibilidade
                                                                  17/07/2026
   Só tokens, nunca cor literal: este arquivo serve o painel E o site, e cor
   chumbada aqui quebra um dos dois temas (§12). O que flutua usa
   --surface-raised (opaco), NÃO --surface-card: card tem superfície atrás,
   dropdown e modal não têm — foi assim que o modal ficou transparente no
   escuro (§9, "Resolvido em 17/07 — Modal do <dialog> no canto").
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Menu de ferramentas ─────────────────────────────────────────────────── */

.tools-dd {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + .5rem);
  width: 17rem;
  padding: .375rem;
  background: var(--surface-raised);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(28,16,8,.18);
  z-index: 200;
}
.tools-dd.is-open { display: block; }

.tools-dd__head {
  padding: .5rem .625rem .375rem;
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-surface-soft);
}
.tools-dd__sep {
  height: 1px;
  margin: .375rem .25rem;
  background: var(--admin-border-soft);
}

.tools-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  width: 100%;
  padding: .5rem .625rem;
  border: 0;
  border-radius: .375rem;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  font-size: .875rem;
  text-align: left;
  cursor: pointer;
  transition: background var(--admin-t, .15s);
}
.tools-item:hover,
.tools-item:focus-visible { background: var(--admin-bg-row); }
.tools-item__ico {
  width: 1rem;
  font-size: .8125rem;
  color: var(--on-surface-soft);
  text-align: center;
}
.tools-item > span { flex: 1; }

.tools-kbd,
.calc__foot kbd {
  padding: .0625rem .3125rem;
  border: 1px solid var(--admin-border);
  border-radius: .1875rem;
  background: var(--admin-bg-row);
  color: var(--on-surface-soft);
  font-family: inherit;
  font-size: .6875rem;
}

/* ── Zoom ────────────────────────────────────────────────────────────────── */

.tools-zoom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .375rem .625rem;
}
.tools-zoom__label { font-size: .875rem; color: var(--on-surface); }
.tools-zoom__ctrl {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.tools-zoom__btn,
.tools-zoom__val {
  border: 1px solid var(--admin-border);
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  cursor: pointer;
  border-radius: .3125rem;
  transition: background var(--admin-t, .15s);
}
.tools-zoom__btn {
  width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center;
  font-size: .6875rem;
}
.tools-zoom__val {
  min-width: 3.25rem;
  height: 1.75rem;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;  /* sem isto o "100%" pula de largura ao virar "125%" */
}
.tools-zoom__btn:hover,
.tools-zoom__val:hover { background: var(--admin-bg-row); }

/* ── Modais das ferramentas ──────────────────────────────────────────────── */

.tool-modal {
  width: min(34rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius, .75rem);
  background: var(--surface-raised);
  color: var(--on-surface);
}
.tool-modal--calc { width: min(20rem, calc(100vw - 2rem)); }
.tool-modal::backdrop { background: rgba(28,16,8,.55); }

.tool-modal__x-form { float: right; margin: -.5rem -.5rem 0 0; }
.tool-modal__x {
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border: 0; border-radius: .375rem;
  background: transparent;
  color: var(--on-surface-soft);
  font-size: .875rem;
  cursor: pointer;
}
.tool-modal__x:hover { background: var(--admin-bg-row); color: var(--on-surface); }

.tool-modal__title {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .375rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--on-surface);
}
.tool-modal__title i { font-size: .9375rem; color: var(--accent-text); }
.tool-modal__sub {
  margin-bottom: 1rem;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--on-surface-soft);
}

/* ── Bloco de notas ──────────────────────────────────────────────────────── */

.tool-notes__area {
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--surface-input);
  color: var(--on-surface);
  font: inherit;
  font-size: .875rem;
  line-height: 1.6;
  resize: vertical;
}
.tool-notes__area:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 1px;
}
.tool-notes__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .5rem;
  min-height: 1.25rem;      /* reserva a linha: sem isto o modal pula de altura
                               quando o status aparece e some */
  font-size: .75rem;
}
.tool-notes__status { color: var(--on-surface-soft); }
.tool-notes__status.is-erro { color: var(--admin-danger); }
.tool-notes__count {
  color: var(--on-surface-faint);
  font-variant-numeric: tabular-nums;
}
.tool-notes__count.is-over { color: var(--admin-danger); }

/* ── Calculadora ─────────────────────────────────────────────────────────── */

.calc__display {
  display: block;
  width: 100%;
  padding: .875rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--surface-input);
  color: var(--on-surface);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-x: auto;         /* número longo rola dentro do visor em vez de
                               alargar o modal */
  white-space: nowrap;
}
.calc__hint {
  min-height: 1rem;
  padding: .25rem .25rem 0;
  color: var(--on-surface-faint);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.calc__pad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .375rem;
  margin-top: .5rem;
}
.calc__k {
  height: 3rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  color: var(--on-surface);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--admin-t, .15s);
}
.calc__k:hover { background: var(--admin-bg-row); }
.calc__k:active { transform: translateY(1px); }
.calc__k--fn { color: var(--on-surface-soft); font-size: .875rem; }
.calc__k--op { color: var(--accent-text); font-weight: 500; }
.calc__k--eq {
  background: var(--accent-line);
  border-color: var(--accent-line);
  color: #1C1008;           /* fixo: o botão é ouro nos DOIS temas, então o texto
                               por cima também precisa ser o mesmo escuro */
  font-weight: 600;
}
.calc__k--eq:hover { filter: brightness(1.08); background: var(--accent-line); }
.calc__foot {
  margin-top: .75rem;
  /* Era `--on-surface-faint` — 3,02:1 no claro e 3,52:1 no escuro, medido em
     17/07 com o auditor. Esse degrau reprova AA de PROPÓSITO: o comentário dele
     no §1b diz "decorativo — não use em texto que precise ser lido", e este é o
     texto que ensina a usar a calculadora pelo TECLADO. Instrução de
     acessibilidade ilegível é a pior versão do erro. */
  color: var(--on-surface-soft);
  font-size: .6875rem;
  line-height: 1.6;
}

/* ── Acessibilidade ──────────────────────────────────────────────────────── */

.a11y-opt {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .625rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--admin-t, .15s);
}
.a11y-opt:hover { background: var(--admin-bg-row); }
.a11y-opt input { margin-top: .1875rem; accent-color: var(--accent-line); }
.a11y-opt__txt { display: block; }
.a11y-opt__txt strong {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--on-surface);
}
.a11y-opt__txt small {
  display: block;
  margin-top: .125rem;
  font-size: .75rem;
  line-height: 1.5;
  color: var(--on-surface-soft);
}

/* ── O que as opções de acessibilidade REALMENTE fazem ───────────────────────
   Sem estas regras os checkboxes seriam decoração — o atributo mudaria e a
   tela não. É o bug de "classe CSS inexistente" que já apareceu 5 vezes aqui,
   na sua versão mais traiçoeira: o controle existe e não controla nada.
   ─────────────────────────────────────────────────────────────────────────── */

/* Alto contraste: sobe o texto secundário ao texto principal e reforça borda.
   Não inventa cor nova — reaproveita o token que já passa em AA nos 2 temas. */
:root[data-a11y-contrast="high"] .admin-body {
  --on-surface-soft:  var(--on-surface);
  --on-surface-muted: var(--on-surface);
  --on-surface-faint: var(--on-surface-muted);
  --admin-border:      var(--on-surface-muted);
  --admin-border-soft: var(--on-surface-soft);
}
:root[data-a11y-contrast="high"] .admin-body .f-hint {
  color: var(--on-surface-muted);
}

/* ⚠️ Corrigido em 17/07/2026 — e o bug estava DENTRO da regra cujo comentário
   acima diz preveni-lo. É a 6ª ocorrência da lição, na versão mais traiçoeira.
   Duas coisas estavam erradas, e a 2ª é a que importa:

   1. Havia aqui `:root[…] .admin-body .on-surface-faint` — `.on-surface-faint`
      é uma CLASSE, e **nenhum elemento do projeto a carrega** (medido: 0
      ocorrências de `class="…on-surface-faint…"`). As ~20 usam a VARIÁVEL,
      inline: `style="color: var(--on-surface-faint)"`. O seletor casava zero
      elementos. Removido.
   2. O bloco de tokens acima subia `--on-surface-soft` e `--on-surface-muted` e
      **esquecia `--on-surface-faint`** — então todo `var(--on-surface-faint)`
      seguia resolvendo no valor que reprova AA, com o alto contraste LIGADO.

   Por que a linha nova conserta de verdade: mexer no TOKEN cascateia para os
   ~20 `style=` inline — que venceriam qualquer regra de folha de estilo, por
   especificidade. Era impossível alcançá-los por seletor.

   O que isto custava: quem tem baixa visão ligava "Alto contraste", via o
   `.f-hint` melhorar — e concluía que funcionava. "Ordem: 3", "FAQs: 12" e os
   botões de remover medicamento do RECEITUÁRIO ficavam como estavam. Feedback
   parcial é o que impede a descoberta.

   Escopo: `.admin-body` — o site público usa os mesmos `var(--on-surface-faint)`
   e NÃO é afetado (§9, "varra por seletor"). */

/* Sublinhar links: só no conteúdo. A sidebar e os chips são navegação — todos
   viram sublinhado e a tela vira um borrão, que é o oposto de acessível. */
:root[data-a11y-links="underline"] .admin-body .a-card a,
:root[data-a11y-links="underline"] .admin-body .a-table a {
  text-decoration: underline;
  text-underline-offset: .15em;
}

/* Reduzir movimento. `!important` porque o alvo é justamente sobrepor a
   transition declarada em cada componente — sem ele, a regra específica vence
   e o botão não faz nada. */
:root[data-a11y-motion="reduce"] *,
:root[data-a11y-motion="reduce"] *::before,
:root[data-a11y-motion="reduce"] *::after {
  transition-duration: .001ms !important;
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}

@media (max-width: 640px) {
  .tools-dd { width: min(16rem, calc(100vw - 1.5rem)); }
  .tool-modal { padding: 1.125rem; }
}

/* ==========================================================================
   §35 · Quadro de tarefas (kanban)                              17/07/2026
   ==========================================================================

   Dois tokens próprios, e o motivo de não reusar os que existem: no ESCURO,
   `--admin-bg-row` e `--surface-raised` valem os dois `--brown-mid`. Coluna e
   cartão sairiam com o mesmo fundo — o cartão desapareceria dentro da lista, e
   só no tema escuro, que é onde ninguém olha primeiro (§12).

   A escala é a de um quadro físico: a lista é um RECUO na página e o cartão é
   um papel POUSADO nela. Por isso a lista é mais escura que o corpo e o cartão
   mais claro que a lista — nos dois temas, na mesma direção.

           corpo (--surface-1)   lista (--kb-col-bg)   cartão (--kb-card-bg)
   claro   #F7F3EF               #EFEAE3               #FFFFFF
   escuro  #1C1008               #150C05               #2A1A08

   São `--kb-*` e só as regras `.kb-*` os leem: o app.css é compartilhado com o
   site público (§9), e token novo com nome próprio não pode mudar o outro lado.
   ========================================================================== */

:root {
  --kb-col-bg:  #EFEAE3;
  --kb-card-bg: #FFFFFF;
}
:root[data-theme="dark"] {
  --kb-col-bg:  #150C05;
  --kb-card-bg: var(--brown-mid);
}

/* O quadro rola na horizontal, e só ele: `overflow-x` aqui, nunca no body.
   Página que rola de lado é o defeito que o §"Responsivo" existe para evitar. */
.kb-board {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: .75rem;
}

.kb-col {
  display: flex;
  flex-direction: column;
  /* Largura fixa: a lista não encolhe conforme o número de listas, senão criar
     a quarta lista espremeria as três que já estavam boas. */
  flex: 0 0 18rem;
  max-height: calc(100vh - 16rem);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  background: var(--kb-col-bg);
}

.kb-col__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem .875rem;
  border-bottom: 1px solid var(--admin-border-soft);
}

.kb-col__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  margin: 0;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--on-surface);
}

.kb-col__count {
  padding: .0625rem .375rem;
  border-radius: 1rem;
  background: var(--admin-border-soft);
  font-size: .75rem;
  font-weight: 500;
  color: var(--on-surface-soft);
}

.kb-col__actions { display: flex; gap: .125rem; }

.kb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: .375rem;
  background: none;
  color: var(--on-surface-soft);
  font-size: .8125rem;
  cursor: pointer;
  transition: background var(--admin-t), color var(--admin-t);
}
.kb-icon-btn:hover { background: var(--admin-border-soft); color: var(--on-surface); }
.kb-icon-btn--danger:hover { color: var(--admin-danger); }

/* min-height: a lista VAZIA precisa de área para receber um cartão arrastado.
   Sem isso ela colapsa e não há onde soltar — a lista "Feito" nasce assim. */
.kb-cards {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-height: 3.5rem;
  padding: .625rem;
  overflow-y: auto;
}

.kb-card {
  padding: .625rem .75rem;
  border: 1px solid var(--admin-border-soft);
  border-radius: .375rem;
  background: var(--kb-card-bg);
  cursor: pointer;
  transition: border-color var(--admin-t), transform var(--admin-t);
}
.kb-card:hover { border-color: var(--admin-border); }
.kb-card:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 1px;
}
/* O cartão é focável e abre no Enter — arrastar é inacessível ao teclado, e o
   quadro não pode existir só para o mouse (§9, tela de profissionais). */
.kb-card--ghost { opacity: .4; }

.kb-card__title {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--on-surface);
  /* O título é livre até 200 caracteres: sem isto, uma palavra longa colada
     (uma URL) alarga o cartão e a lista inteira sai do lugar. */
  overflow-wrap: anywhere;
}

.kb-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .5rem;
}
.kb-card__meta:empty { margin-top: 0; }

.kb-tag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .6875rem;
  color: var(--on-surface-soft);
}
.kb-tag i { font-size: .625rem; }
/* `media` não tem selo: se todo cartão tem, selo nenhum chama atenção. */
.kb-tag--alta  { color: var(--admin-danger);  font-weight: 600; }
/* `--on-surface-faint` seria o degrau "apagado" que este selo pede — e reprova
   AA de propósito: é decorativo (§12). Selo de prioridade é TEXTO, e a palavra
   "Baixa" tem de ser legível. Fica no degrau `soft`, como os demais selos: quem
   diz que é baixa é a palavra, não o quanto ela some. */
.kb-tag--baixa { color: var(--on-surface-soft); }
.kb-tag--late  { color: var(--admin-danger);  font-weight: 600; }

.kb-add {
  margin: 0 .625rem .625rem;
  padding: .5rem;
  border: 1px dashed var(--admin-border);
  border-radius: .375rem;
  background: none;
  color: var(--on-surface-soft);
  font-size: .75rem;
  cursor: pointer;
  transition: background var(--admin-t), color var(--admin-t);
}
.kb-add:hover { background: var(--admin-border-soft); color: var(--on-surface); }

.kb-form { display: flex; flex-direction: column; gap: .875rem; }
.kb-form__actions { display: flex; align-items: center; gap: .5rem; }

.kb-archive { margin-top: 1.5rem; }
.kb-archive__summary {
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  color: var(--on-surface);
}
.kb-archive__summary i { margin-right: .375rem; color: var(--on-surface-soft); }

@media (max-width: 640px) {
  /* No celular a lista ocupa quase a tela toda: 18rem deixaria um naco da
     próxima aparecendo, que lê como conteúdo cortado. */
  .kb-col { flex-basis: min(17rem, 85vw); max-height: none; }
}

/* ==========================================================================
/* ══════════════════════════════════════════════════════════════════════════
   §36 · Inbox estilo WhatsApp Web + multi-atendimento                17/07/2026
   ==========================================================================
   Duas colunas em altura cheia: lista (com abas Minhas/Fila/Todas) e diálogo
   com bolhas. SÓ TOKENS — o app.css serve painel E site. O verde do WhatsApp
   é o único acento próprio (--wa-out), definido nos dois temas.
   ========================================================================== */

:root {
  --wa-out: #d9fdd3;          /* bolha enviada (claro) */
  --wa-out-text: #111b21;
}
:root[data-theme="dark"] {
  --wa-out: #144d37;          /* bolha enviada (escuro) */
  --wa-out-text: #e9edef;
}

.wa {
  display: grid;
  grid-template-columns: minmax(15.5rem, 21rem) minmax(0, 1fr) auto;
  /* Altura vem do pai flush (admin-body--flush → admin-content flex). O calc
     é só o fallback caso a tela seja usada fora do modo flush. */
  height: 100%;
  min-height: 0;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius, .6rem);
  overflow: hidden;
  background: var(--surface-card);
}

/* ── Modo tela fixa (flush): sem rolagem de página, só as colunas rolam ────
   A inbox seta `admin-body--flush` no <body>. O documento trava o scroll e o
   conteúdo ocupa exatamente `100vh - topbar` (o .admin-main já é flex-column
   com padding-top = topbar). O .wa cresce para preencher esse espaço. */
.admin-body--flush { overflow: hidden; height: 100vh; }
/* O teto rígido: .admin-main tinha só min-height:100vh e CRESCIA com o conteúdo,
   levando a página a rolar. Aqui vira exatamente 100vh (box-sizing:border-box, o
   padding-top = topbar entra na conta) e não cresce. Especificidade 0,2,0 vence a
   regra inline .admin-main (0,1,0), independente da ordem de carga. */
.admin-body--flush .admin-main { height: 100vh; min-height: 0; overflow: hidden; padding: var(--topbar-h) 0 0 0; }
.admin-body--flush .admin-content {
  padding: 0; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.admin-body--flush .flash { margin: .75rem .75rem 0; flex-shrink: 0; }
.admin-body--flush .wa {
  flex: 1; min-height: 0;
  border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
}
/* Itens do grid precisam de min-height:0 para o overflow interno (msgs/lista)
   virar o scroll — senão o grid os estica à altura do conteúdo. */
.wa__side, .wa__chat { min-height: 0; }

/* Botão "voltar" à lista — só aparece no modo single-pane (mobile). */
.wa__back { display: none; color: var(--on-surface-soft); padding: .35rem .5rem .35rem 0; text-decoration: none; }
.wa__back:hover { color: var(--on-surface); }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.wa__side { display: flex; flex-direction: column; border-right: 1px solid var(--admin-border); min-width: 0; background: var(--surface-card); }
.wa__side-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--admin-border); }
.wa__conn { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; }
.wa__conn--ok   { color: var(--admin-success); }
.wa__conn--warn { color: var(--admin-warning); }
.wa__side-cfg { color: var(--on-surface-soft); }
.wa__side-cfg:hover { color: var(--on-surface); }

.wa__tabs { display: flex; gap: .25rem; padding: .5rem .625rem; border-bottom: 1px solid var(--admin-border); overflow-x: auto; }
.wa__tab { flex-shrink: 0; padding: .35rem .625rem; border-radius: 999px; font-size: .8rem; color: var(--on-surface-soft); text-decoration: none; white-space: nowrap; }
.wa__tab:hover { background: var(--admin-bg-row); }
.wa__tab.is-active { background: var(--accent-line); color: var(--surface-card); }
.wa__tab-n { font-size: .7rem; padding: 0 .3rem; border-radius: 999px; background: rgba(0,0,0,.12); }
.wa__tab.is-active .wa__tab-n { background: rgba(255,255,255,.25); }

.wa__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.wa__empty-list { padding: 2.5rem 1.25rem; text-align: center; color: var(--on-surface-soft); }
.wa__empty-list i { font-size: 1.75rem; opacity: .4; display: block; margin-bottom: .5rem; }
.wa__empty-list p { font-size: .85rem; margin: 0; }

.wa__conv { display: flex; gap: .625rem; padding: .625rem .75rem; text-decoration: none; color: var(--on-surface); border-bottom: 1px solid var(--admin-border-soft); }
.wa__conv:hover { background: var(--admin-bg-row); }
.wa__conv.is-active { background: var(--admin-bg-row); }
.wa__avatar {
  flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-light, var(--admin-bg-row)); color: var(--accent-text);
  font-weight: 600; font-size: .85rem;
}
.wa__avatar--lg { width: 2.4rem; height: 2.4rem; }
.wa__conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.wa__conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.wa__conv-name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa__conv-time { font-size: .7rem; color: var(--on-surface-soft); flex-shrink: 0; }
.wa__conv-bot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.wa__conv-preview { font-size: .8rem; color: var(--on-surface-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.wa__unread { flex-shrink: 0; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: var(--admin-success); color: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wa__conv-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .1rem; }
.wa__tag { font-size: .68rem; padding: .05rem .4rem; border-radius: 999px; white-space: nowrap; }
.wa__tag--user    { background: rgba(74,124,90,.15); color: var(--admin-success); }
.wa__tag--queue   { background: var(--admin-bg-row); color: var(--on-surface-soft); }
.wa__tag--patient { background: rgba(74,107,138,.15); color: var(--admin-info); }

.wa__pager { display: flex; gap: .25rem; padding: .5rem; flex-wrap: wrap; border-top: 1px solid var(--admin-border); }
.wa__page { padding: .2rem .5rem; border-radius: .3rem; font-size: .8rem; color: var(--on-surface-soft); text-decoration: none; }
.wa__page.is-active { background: var(--accent-line); color: var(--surface-card); }

/* ── Chat ────────────────────────────────────────────────────────────────── */
.wa__chat { display: flex; flex-direction: column; min-width: 0; background: var(--admin-bg-row); }
.wa__placeholder { margin: auto; text-align: center; color: var(--on-surface-soft); padding: 2rem; }
.wa__placeholder i { font-size: 3.5rem; opacity: .35; color: var(--admin-success); }
.wa__placeholder h2 { font-size: 1.1rem; margin: 1rem 0 .25rem; color: var(--on-surface); }
.wa__placeholder p { font-size: .875rem; margin: 0; }
.wa__placeholder-warn { margin-top: 1rem; color: var(--admin-warning); }

.wa__chat-head { display: flex; align-items: center; gap: .75rem; padding: .625rem .875rem; background: var(--surface-card); border-bottom: 1px solid var(--admin-border); }
.wa__chat-id { flex: 1; min-width: 0; }
.wa__chat-name { font-weight: 600; font-size: .95rem; }
.wa__chat-sub { font-size: .78rem; color: var(--on-surface-soft); }
.wa__chat-actions { display: flex; align-items: center; gap: .5rem; }
.wa__assign { display: flex; align-items: center; gap: .3rem; margin: 0; }
.wa__assign-ico { color: var(--on-surface-soft); font-size: .8rem; }
.wa__assign .f-control { width: auto; padding: .3rem .5rem; font-size: .8rem; }
.wa__icon-btn { border: 0; background: transparent; color: var(--on-surface-soft); cursor: pointer; padding: .4rem; border-radius: .3rem; }
.wa__icon-btn:hover { background: var(--admin-bg-row); color: var(--on-surface); }

.wa__link { display: flex; align-items: center; gap: .5rem; padding: .5rem .875rem; background: var(--surface-card); border-bottom: 1px solid var(--admin-border); font-size: .8rem; }
.wa__link .f-control { width: 9rem; padding: .3rem .5rem; }

.wa__msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.wa__msgs-empty { text-align: center; color: var(--on-surface-soft); font-size: .85rem; margin: auto; }
.wa__msg { display: flex; }
.wa__msg--in  { justify-content: flex-start; }
.wa__msg--out { justify-content: flex-end; }
.wa__bubble { max-width: 68%; padding: .45rem .625rem .3rem; border-radius: .6rem; position: relative; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.wa__msg--in  .wa__bubble { background: var(--surface-card); border-top-left-radius: .15rem; }
.wa__msg--out .wa__bubble { background: var(--wa-out); color: var(--wa-out-text); border-top-right-radius: .15rem; }
.wa__text { margin: 0; font-size: .875rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.wa__media { margin: 0 0 .2rem; font-size: .8rem; opacity: .85; }
.wa__msg-meta { display: flex; align-items: center; gap: .3rem; justify-content: flex-end; font-size: .68rem; color: var(--on-surface-soft); margin-top: .1rem; }
.wa__msg--out .wa__msg-meta { color: rgba(0,0,0,.45); }
:root[data-theme="dark"] .wa__msg--out .wa__msg-meta { color: rgba(233,237,239,.55); }
.wa__author { font-weight: 600; }
.wa__tick { font-size: .72rem; }
.wa__tick--read, .wa__tick--delivered { color: var(--admin-info); }
.wa__tick--failed { color: var(--admin-danger); }
.wa__err { display: block; font-size: .7rem; color: var(--admin-danger); margin-top: .15rem; }

.wa__composer { display: flex; gap: .5rem; align-items: flex-end; padding: .625rem .875rem; background: var(--surface-card); border-top: 1px solid var(--admin-border); }
.wa__input { flex: 1; resize: none; max-height: 8rem; padding: .625rem .75rem; border: 1px solid var(--admin-border); border-radius: var(--radius-xl); background: var(--admin-bg-row); color: var(--on-surface); font: inherit; font-size: .875rem; }
.wa__input:focus { outline: none; border-color: var(--accent-line); }
.wa__send { flex-shrink: 0; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: var(--admin-success); color: #fff; cursor: pointer; }
.wa__send:disabled { opacity: .5; cursor: not-allowed; }

/* ── Multi-atendimento: busca, situação, prioridade, etiquetas ──────────────── */
.wa__search { padding: .5rem .625rem; border-bottom: 1px solid var(--admin-border); display: flex; flex-direction: column; gap: .4rem; }
.wa__search-box { position: relative; display: flex; align-items: center; }
.wa__search-box i { position: absolute; left: .65rem; color: var(--on-surface-soft); font-size: .8rem; pointer-events: none; }
.wa__search-box input { width: 100%; padding: .45rem .6rem .45rem 1.9rem; border: 1px solid var(--admin-border); border-radius: var(--radius-lg); background: var(--admin-bg-row); color: var(--on-surface); font: inherit; font-size: .85rem; }
.wa__search-box input:focus { outline: none; border-color: var(--accent-line); }
.wa__situacao { padding: .4rem .5rem; border: 1px solid var(--admin-border); border-radius: var(--radius-lg); background: var(--admin-bg-row); color: var(--on-surface); font: inherit; font-size: .82rem; }
.wa__pri-dot { position: absolute; right: -1px; bottom: -1px; width: .72rem; height: .72rem; border-radius: 50%; border: 2px solid var(--surface-card); }
.wa__star-mini { color: #E6A700; font-size: .72rem; }
.wa__mini-badge { font-size: .62rem; padding: .03rem .34rem; vertical-align: middle; }

/* ── Separador de dia ───────────────────────────────────────────────────────── */
.wa__daysep { text-align: center; margin: .5rem 0 .25rem; }
.wa__daysep span { font-size: .7rem; color: var(--on-surface-soft); background: var(--surface-card); border: 1px solid var(--admin-border-soft); border-radius: 1rem; padding: .15rem .75rem; }

/* ── Nota interna (só a equipe vê) ──────────────────────────────────────────── */
.wa__note { align-self: center; max-width: 82%; background: #FDF6E3; border: 1px solid #EBD9A8; border-radius: .6rem; padding: .5rem .7rem; margin: .15rem 0; }
[data-theme="dark"] .wa__note { background: #2E2A18; border-color: #5A4E28; }
.wa__note-head { font-size: .7rem; font-weight: 600; color: #8A6D1E; margin-bottom: .2rem; }
[data-theme="dark"] .wa__note-head { color: #D6B85A; }
.wa__note-body { font-size: .84rem; color: var(--on-surface); line-height: 1.45; }

/* ── Compositor: abas + ferramentas + painéis ──────────────────────────────── */
.wa__composer-wrap { border-top: 1px solid var(--admin-border); background: var(--surface-card); flex-shrink: 0; }
.wa__cmp-tabs { display: flex; align-items: center; gap: .25rem; padding: .3rem .5rem 0; }
.wa__cmp-tab { border: 0; background: none; font: inherit; font-size: .8rem; color: var(--on-surface-soft); padding: .35rem .6rem; border-radius: .4rem .4rem 0 0; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.wa__cmp-tab.is-active { color: var(--accent-text); border-bottom: 2px solid var(--accent-line); font-weight: 600; }
.wa__cmp-tools { margin-left: auto; display: flex; gap: .25rem; }
.wa__cmp-tool { border: 0; background: none; color: var(--on-surface-soft); cursor: pointer; width: 2rem; height: 2rem; border-radius: .4rem; }
.wa__cmp-tool:hover { background: var(--admin-bg-row); color: var(--on-surface); }
.wa__composer { display: none; border-top: 0; }
.wa__composer.is-active { display: flex; }
.wa__attach { flex-shrink: 0; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: var(--admin-bg-row); color: var(--on-surface-soft); cursor: pointer; }
.wa__attach:hover:not(:disabled) { color: var(--accent-text); }
.wa__attach:disabled { opacity: .5; cursor: not-allowed; }
.wa__input--note { background: #FDF6E3; border-color: #EBD9A8; }
[data-theme="dark"] .wa__input--note { background: #2E2A18; border-color: #5A4E28; color: var(--on-surface); }
.wa__send--note { background: #B4741E; }

/* Modificadores do compositor. Chegaram do modelo COMO HOOK SEM REGRA — a
   "lição recorrente" do §9 (classe que a view usa e o CSS não define). Aqui a
   distinção não é enfeite: escrever nota interna e escrever PARA A PACIENTE são
   dois atos diferentes no mesmo lugar da tela, e confundi-los publica para a
   paciente um comentário que era da equipe. O textarea creme e o botão âmbar já
   diferenciavam; a faixa lateral marca o modo no bloco inteiro, que é o que se
   enxerga com o olho na conversa, não no campo. */
.wa__composer--note.is-active { border-left: 3px solid #B4741E; background: rgba(180,116,30,.05); }
[data-theme="dark"] .wa__composer--note.is-active { background: rgba(180,116,30,.10); }
.wa__composer--reply.is-active { border-left: 3px solid var(--accent-line); }

/* Relógio de "na fila": o § do modelo definia lido/entregue/falhou e esquecia
   este — justamente o estado em que a mensagem AINDA NÃO SAIU, que é o que a
   recepção precisa distinguir enquanto o daemon está desligado. */
.wa__tick--pending { color: var(--on-surface-soft); }

.wa__quickpanel { border-top: 1px solid var(--admin-border-soft); padding: .5rem .75rem; max-height: 15rem; overflow-y: auto; background: var(--admin-bg-row); }
.wa__quickpanel-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; margin-bottom: .4rem; color: var(--on-surface); }
.wa__link-btn { border: 0; background: none; color: var(--accent-text); font: inherit; font-size: .78rem; cursor: pointer; }
.wa__quicklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.wa__quick-item { display: flex; align-items: center; gap: .3rem; }
.wa__quick-pick { flex: 1; text-align: left; border: 1px solid var(--admin-border); background: var(--surface-card); border-radius: .45rem; padding: .4rem .55rem; cursor: pointer; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.wa__quick-pick:hover { border-color: var(--accent-line); }
.wa__quick-title { font-size: .8rem; font-weight: 600; color: var(--on-surface); }
.wa__quick-body { font-size: .74rem; color: var(--on-surface-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa__quick-del { border: 0; background: none; color: var(--on-surface-soft); cursor: pointer; padding: .3rem; }
.wa__quick-del:hover { color: #C0392B; }
.wa__quick-empty { font-size: .8rem; color: var(--on-surface-soft); padding: .3rem 0; }
.wa__quicknew-form { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--admin-border); }

.wa__emojipanel { display: grid; grid-template-columns: repeat(8, 1fr); gap: .15rem; padding: .5rem .75rem; border-top: 1px solid var(--admin-border-soft); background: var(--admin-bg-row); max-height: 10rem; overflow-y: auto; }
.wa__emoji { border: 0; background: none; font-size: 1.15rem; cursor: pointer; border-radius: .3rem; padding: .15rem; line-height: 1; }
.wa__emoji:hover { background: var(--admin-border-soft); }
.wa__icon-btn.is-on { color: #E6A700; }

/* ── Painel de detalhes (coluna 3) ─────────────────────────────────────────── */
.wa__info { display: flex; flex-direction: column; width: 20rem; border-left: 1px solid var(--admin-border); background: var(--surface-card); overflow-y: auto; min-height: 0; }
.wa__info-close { display: none; }
.wa__info-contact { text-align: center; padding: 1.25rem 1rem 1rem; border-bottom: 1px solid var(--admin-border-soft); }
.wa__avatar--xl { width: 4rem; height: 4rem; font-size: 1.3rem; margin: 0 auto .6rem; }
.wa__info-name { font-weight: 700; font-size: 1rem; color: var(--on-surface); }
.wa__info-phone { font-size: .82rem; color: var(--on-surface-muted); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.wa__info-client { display: inline-flex; align-items: center; gap: .35rem; margin-top: .5rem; font-size: .82rem; color: var(--accent-text); text-decoration: none; }
.wa__info-client--none { color: var(--on-surface-soft); }
.wa__info-sec { padding: .85rem 1rem; border-bottom: 1px solid var(--admin-border-soft); }
.wa__info-sec h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--on-surface-soft); margin: 0 0 .6rem; }
.wa__info-label { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--on-surface-muted); margin-bottom: .35rem; }
.wa__info-assign, .wa__info-prio { margin-bottom: .75rem; }
.wa__info-prio { margin-bottom: 0; }
.wa__info-assign .f-control { width: 100%; }
.wa__prio-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; }
.wa__prio-btn { border: 1px solid var(--admin-border); background: var(--admin-bg-row); font: inherit; font-size: .7rem; padding: .3rem .1rem; border-radius: .35rem; cursor: pointer; color: var(--on-surface-muted); }
.wa__prio-btn.is-on { color: #fff; background: var(--pc, var(--accent-line)); border-color: var(--pc, var(--accent-line)); font-weight: 600; }
.wa__info-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.wa__tag-chip { display: inline-flex; align-items: center; gap: .2rem; }
.wa__tag-x { border: 0; background: none; color: inherit; opacity: .7; cursor: pointer; padding: 0 0 0 .1rem; font-size: .7rem; }
.wa__tag-x:hover { opacity: 1; }
.wa__info-addtag { display: flex; flex-direction: column; gap: .4rem; }
.wa__info-addtag .f-control { font-size: .8rem; padding: .35rem .5rem; width: 100%; }
.wa__newtag { display: grid; grid-template-columns: 1fr auto; gap: .3rem; align-items: end; }
.wa__newtag input { grid-column: 1 / -1; }
.wa__info-muted { font-size: .8rem; color: var(--on-surface-soft); }
.wa__info-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; color: var(--on-surface-muted); }
.wa__info-stats span { font-weight: 700; color: var(--on-surface); }
.wa__info-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.wa__info-hist li { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--on-surface-muted); }
.wa__info-hist i { color: var(--on-surface-soft); font-size: .72rem; }
.wa__info-hist-time { margin-left: auto; font-size: .72rem; color: var(--on-surface-soft); }
.wa__info-toggle { display: none; }

/* ≤1180px: o painel de detalhes vira overlay, aberto pelo botão (i) do cabeçalho. */
@media (max-width: 1180px) {
  .wa { grid-template-columns: minmax(15.5rem, 21rem) minmax(0, 1fr); }
  .wa__info { position: absolute; top: 0; right: 0; bottom: 0; width: 20rem; max-width: 88vw; transform: translateX(100%); transition: transform .2s ease; box-shadow: -8px 0 24px rgba(0,0,0,.14); z-index: 6; }
  .wa--info-open .wa__info { transform: translateX(0); }
  .wa__info-close { display: grid; place-items: center; position: absolute; top: .5rem; right: .5rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: var(--admin-bg-row); color: var(--on-surface-muted); cursor: pointer; }
  .wa__info-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 820px) {
  /* Single-pane, como o WhatsApp Web no celular: mostra a LISTA ou a CONVERSA,
     nunca as duas empilhadas (que rolaria a página). Qual aparece vem do
     servidor: `.wa--chat-open` quando há conversa selecionada. Altura continua
     preenchendo o viewport — nada de `height:auto`, que traria a rolagem de
     volta. */
  .wa { grid-template-columns: 1fr; }
  .wa__side { border-right: 0; }
  .wa__chat { display: none; }
  .wa--chat-open .wa__side { display: none; }
  .wa--chat-open .wa__chat { display: flex; }
  .wa__back { display: inline-flex; align-items: center; }
  .wa__bubble { max-width: 85%; }
}

/* ── Inbox completo: banner, presença, massa, snooze, quote, agendar, CSAT ── */
.admin-body--flush .wa-banner { flex-shrink: 0; }
.wa-banner { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; font-size: .82rem; background: rgba(180,116,30,.12); color: #8A5A12; border-bottom: 1px solid rgba(180,116,30,.25); }
[data-theme="dark"] .wa-banner { background: rgba(180,116,30,.18); color: #E0B45A; }
.wa-banner a { color: inherit; font-weight: 600; text-decoration: underline; }

.wa__side-tools { display: flex; align-items: center; gap: .25rem; }
.wa__side-cfg { color: var(--on-surface-soft); background: none; border: 0; cursor: pointer; width: 2rem; height: 2rem; border-radius: .4rem; display: inline-flex; align-items: center; justify-content: center; }
.wa__side-cfg:hover { color: var(--on-surface); background: var(--admin-bg-row); }
.wa__presence { position: relative; }
.wa__presence > summary { list-style: none; cursor: pointer; width: 2rem; height: 2rem; border-radius: .4rem; display: inline-flex; align-items: center; justify-content: center; }
.wa__presence > summary::-webkit-details-marker { display: none; }
.wa__presence > summary:hover { background: var(--admin-bg-row); }
.wa__pres-dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.wa__pres-dot--sm { width: .55rem; height: .55rem; margin-right: .1rem; }
.wa__presence-menu { position: absolute; right: 0; top: 100%; z-index: 20; background: var(--surface-card); border: 1px solid var(--admin-border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: .3rem; min-width: 9rem; }
.wa__pres-opt { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; background: none; font: inherit; font-size: .82rem; color: var(--on-surface); padding: .4rem .5rem; border-radius: .35rem; cursor: pointer; text-align: left; }
.wa__pres-opt:hover { background: var(--admin-bg-row); }
.wa__pres-opt.is-on { font-weight: 600; }

.wa__bulkbar { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .5rem .625rem; border-bottom: 1px solid var(--admin-border); background: rgba(28,74,117,.06); }
.wa__bulk-count { font-size: .78rem; color: var(--on-surface-muted); margin-right: auto; }
.wa__bulkbar .f-control { font-size: .8rem; padding: .3rem .45rem; }
.wa__li { display: flex; align-items: stretch; }
.wa__pick { display: flex; align-items: center; padding: 0 .1rem 0 .55rem; }
.wa__pick input { width: 1rem; height: 1rem; accent-color: var(--accent-line); cursor: pointer; }
.wa__li .wa__conv { flex: 1; min-width: 0; }

.wa__snooze-menu { position: relative; }
.wa__snooze-menu > summary { list-style: none; }
.wa__snooze-menu > summary::-webkit-details-marker { display: none; }
.wa__menu { position: absolute; right: 0; top: 100%; z-index: 20; background: var(--surface-card); border: 1px solid var(--admin-border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: .3rem; min-width: 11rem; }
.wa__menu-item { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; background: none; font: inherit; font-size: .82rem; color: var(--on-surface); padding: .4rem .5rem; border-radius: .35rem; cursor: pointer; text-align: left; }
.wa__menu-item:hover { background: var(--admin-bg-row); }
.wa__status-sel { border: 1px solid var(--admin-border); border-radius: .4rem; background: var(--admin-bg-row); color: var(--on-surface); font: inherit; font-size: .78rem; padding: .25rem .4rem; }

.wa__insearch { display: flex; align-items: center; gap: .5rem; padding: .5rem .875rem; border-bottom: 1px solid var(--admin-border); background: var(--surface-card); }
.wa__insearch i { color: var(--on-surface-soft); font-size: .8rem; }
.wa__insearch input { flex: 1; border: 0; background: none; font: inherit; font-size: .85rem; color: var(--on-surface); outline: none; }
.wa__insearch button { border: 0; background: none; color: var(--on-surface-soft); cursor: pointer; }
.wa__snoozed-bar { padding: .4rem .875rem; font-size: .8rem; color: #8A5A12; background: rgba(180,116,30,.1); border-bottom: 1px solid var(--admin-border-soft); }
[data-theme="dark"] .wa__snoozed-bar { color: #E0B45A; }

.wa__bubble { position: relative; }
.wa__quote-btn { position: absolute; top: .2rem; right: .2rem; opacity: 0; border: 0; background: var(--surface-card); color: var(--on-surface-soft); width: 1.5rem; height: 1.5rem; border-radius: 50%; cursor: pointer; font-size: .68rem; box-shadow: 0 1px 4px rgba(0,0,0,.15); transition: opacity .12s; }
.wa__msg:hover .wa__quote-btn { opacity: 1; }
.wa__quoted { font-size: .76rem; opacity: .8; border-left: 2px solid currentColor; padding: .1rem .5rem; margin-bottom: .3rem; }
.wa__quote-bar { display: flex; align-items: center; gap: .5rem; padding: .4rem .875rem; background: var(--admin-bg-row); border-bottom: 1px solid var(--admin-border-soft); font-size: .8rem; }
.wa__quote-bar-txt { flex: 1; min-width: 0; color: var(--on-surface-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa__quote-bar button { border: 0; background: none; color: var(--on-surface-soft); cursor: pointer; }

.wa__schedpanel { padding: .6rem .75rem; border-top: 1px solid var(--admin-border-soft); background: var(--admin-bg-row); display: flex; flex-direction: column; gap: .5rem; }
.wa__schedpanel-head { font-size: .82rem; color: var(--on-surface); }
.wa__sched-row { display: flex; gap: .5rem; }
.wa__sched-row .f-control { flex: 1; }
.wa__schedlist { list-style: none; margin: .2rem 0 0; padding: .5rem 0 0; border-top: 1px dashed var(--admin-border); display: flex; flex-direction: column; gap: .3rem; }
.wa__schedlist li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--on-surface-muted); }
.wa__schedlist li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wa__csat { display: flex; flex-direction: column; gap: .4rem; }
.wa__csat-stars, .wa__csat-done { display: flex; gap: .2rem; align-items: center; }
.wa__csat-star { border: 0; background: none; color: #E6A700; font-size: 1.1rem; cursor: pointer; padding: 0; }
.wa__csat-star:hover ~ .wa__csat-star { color: var(--on-surface-soft); }
.wa__csat-done span { font-size: .78rem; margin-left: .3rem; }
.wa__merge { display: flex; flex-direction: column; gap: .4rem; }
.wa__merge .f-control { font-size: .82rem; }

.wa__modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.wa__modal-box { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(0,0,0,.3); width: 100%; max-width: 26rem; overflow: hidden; }
.wa__modal-head { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1rem; border-bottom: 1px solid var(--admin-border); font-size: .95rem; color: var(--on-surface); }
.wa__modal-form { padding: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.wa__modal-form .f-label { margin-top: .4rem; }
.wa__modal-actions { display: flex; gap: .5rem; margin-top: .75rem; }

/* CORREÇÃO: o atributo `hidden` PRECISA vencer os `display:flex/grid` explícitos
   dos painéis. Sem isto, a regra de autor (`.wa__emojipanel{display:grid}` etc.)
   sobrepõe o `display:none` do UA e os painéis (emoji, agendar, citação, busca
   na conversa, ações em massa) e o modal de nova conversa abrem por padrão. */
.wa [hidden], .wa__modal[hidden] { display: none !important; }

/* ==========================================================================
   §37 · Registro de e-mails — barras de consumo do rate limit   17/07/2026
   Usadas só na tela /admin/registros/emails. Tokens de tema (compartilha o
   app.css com o site público — §9, "varra por seletor").
   ========================================================================== */
.rl-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.rl-usage__item { min-width: 0; }
.rl-usage__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .375rem; }
.rl-usage__label { font-size: .8rem; color: var(--on-surface-muted); }
.rl-usage__count { font-size: .95rem; font-weight: 600; color: var(--on-surface); font-variant-numeric: tabular-nums; }
.rl-usage__cap { font-weight: 400; color: var(--on-surface-soft); }
.rl-usage__bar { height: .5rem; border-radius: 999px; background: var(--admin-bg-row); overflow: hidden; }
.rl-usage__fill { display: block; height: 100%; border-radius: 999px; background: var(--color-success); transition: width .3s ease; }
.rl-usage__fill.is-warning { background: var(--gold-bright); }
.rl-usage__fill.is-danger  { background: var(--color-danger); }

/* ==========================================================================
   §38 · Menu do usuário conectado (topbar)                      17/07/2026
   <details> como o menu de criação rápida: abre no teclado, sem JS, não pisca.
   Só tokens de tema (app.css é compartilhado com o site público — §9).
   ========================================================================== */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu__btn {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 2.25rem; padding: 0 .5rem 0 .375rem;
  border: 1px solid var(--admin-border); border-radius: 999px;
  background: transparent; color: var(--on-surface);
  transition: background .15s ease, border-color .15s ease;
}
.user-menu[open] > .user-menu__btn,
.user-menu__btn:hover { background: var(--admin-bg-row); border-color: var(--admin-border); }
.user-menu__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; flex-shrink: 0;
  border-radius: 50%; background: var(--surface-sidebar); color: var(--cream);
  font-size: .8rem; font-weight: 600; line-height: 1;
}
.user-menu__avatar--lg { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }
.user-menu__name {
  font-size: .875rem; font-weight: 500; max-width: 9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu__caret { font-size: .7rem; color: var(--on-surface-soft); transition: transform .15s ease; }
.user-menu[open] .user-menu__caret { transform: rotate(180deg); }
.user-menu__dd {
  position: absolute; top: calc(100% + .5rem); right: 0; min-width: 15rem;
  background: var(--surface-raised, var(--surface-card));
  border: 1px solid var(--admin-border); border-radius: var(--admin-radius, .5rem);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.14));
  padding: .375rem; z-index: 60;
}
.user-menu__ident {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem; margin-bottom: .25rem;
  border-bottom: 1px solid var(--admin-border-soft, var(--admin-border));
}
.user-menu__ident-txt { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.user-menu__ident-name { font-weight: 600; font-size: .9rem; color: var(--on-surface); }
.user-menu__ident-mail {
  font-size: .78rem; color: var(--on-surface-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11rem;
}
.user-menu__ident-role {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent-text); margin-top: .1rem;
}
.user-menu__item {
  display: flex; align-items: center; gap: .625rem;
  padding: .5rem .625rem; border-radius: .375rem;
  font-size: .875rem; color: var(--on-surface); text-decoration: none;
}
.user-menu__item:hover { background: var(--admin-bg-row); }
.user-menu__item--danger { color: var(--admin-danger); }
.user-menu__item--danger:hover { background: rgba(155,58,58,.1); }
.user-menu__ico { width: 1rem; text-align: center; color: var(--accent-text); }
.user-menu__item--danger .user-menu__ico { color: var(--admin-danger); }
.user-menu__sep { height: 1px; background: var(--admin-border-soft, var(--admin-border)); margin: .25rem .25rem; }
@media (max-width: 640px) {
  .user-menu__name { display: none; }
  .user-menu__caret { display: none; }
  .user-menu__btn { padding: .25rem; border-color: transparent; }
}

/* ==========================================================================
   §39 · Dashboard — resumo do dia, assistente e mini kanban     17/07/2026
   Só tokens de tema (app.css é compartilhado com o site público — §9).
   ========================================================================== */
.a-card__meta { font-size: .8rem; color: var(--on-surface-soft); }
.dash-cols { align-items: start; }

/* Resumo do dia: grade de números clicáveis */
.day-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.day-fig { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .6rem .7rem; border: 1px solid var(--admin-border-soft); border-radius: var(--radius-lg); text-decoration: none; color: var(--on-surface); background: var(--admin-bg-row); transition: border-color .15s ease; }
.day-fig:hover { border-color: var(--admin-border); }
.day-fig__ico { color: var(--on-surface-soft); font-size: .85rem; }
.day-fig--has .day-fig__ico { color: var(--accent-text); }
.day-fig__val { font-size: 1.4rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.day-fig__lbl { font-size: .72rem; color: var(--on-surface-soft); }

.day-sub { font-size: .8rem; font-weight: 600; color: var(--on-surface-muted); text-transform: uppercase; letter-spacing: .04em; margin: 1rem 0 .5rem; }
.day-agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.day-agenda__row { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--admin-border-soft); }
.day-agenda__row:last-child { border-bottom: 0; }
.day-agenda__time { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-text); flex-shrink: 0; }
.day-agenda__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.day-agenda__who strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-agenda__svc { font-size: .78rem; color: var(--on-surface-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Assistente: ações rápidas + quick task */
.dash-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.dash-action { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border: 1px solid var(--admin-border-soft); border-radius: var(--radius-lg); text-decoration: none; color: var(--on-surface); font-size: .875rem; background: var(--admin-bg-row); transition: border-color .15s ease, color .15s ease; }
.dash-action:hover { border-color: var(--accent-line); color: var(--accent-text); }
.dash-action i { width: 1.1rem; text-align: center; color: var(--accent-text); }
.dash-quicktask { margin-top: 1rem; }
.quicktask-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.quicktask-form .f-control { flex: 1; min-width: 10rem; }
.quicktask-prio { flex: 0 0 auto; width: auto; }

/* Mini kanban (dashboard): reusa .kb-* do §35, mais compacto */
.kb-board--mini { padding-bottom: .25rem; }
.kb-board--mini .kb-col { max-height: 22rem; overflow-y: auto; }
.kb-col__empty { color: var(--on-surface-faint); font-size: .8rem; text-align: center; padding: .5rem 0; }
.kb-col__more { display: block; font-size: .78rem; color: var(--accent-text); text-decoration: none; padding: .35rem 0; }
.kb-col__more:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .day-figures { grid-template-columns: repeat(2, 1fr); }
  .dash-actions { grid-template-columns: 1fr; }
}

/* ==========================================================================
   §40 · Financeiro — contas a pagar/receber (§9 #23)           17/07/2026
   Só tokens de tema (app.css é compartilhado com o site — §9).
   ========================================================================== */
.fin-actions { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }

/* Popover de baixa/cancelamento: <details> com o corpo flutuando, para não
   esticar a linha da tabela. */
.fin-pop { position: relative; }
.fin-pop > summary { list-style: none; cursor: pointer; }
.fin-pop > summary::-webkit-details-marker { display: none; }
.fin-pop__body {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40;
  width: 15rem; padding: .75rem;
  background: var(--surface-raised, var(--surface-card));
  border: 1px solid var(--admin-border); border-radius: var(--admin-radius, .5rem);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.14));
  text-align: left;
}
.fin-pop__body .f-label { margin-top: .5rem; }
.fin-pop__body .f-label:first-child { margin-top: 0; }
.fin-pop__body .f-control { width: 100%; }

/* Segmentado A receber / A pagar no formulário. */
.fin-type-toggle { display: flex; gap: .5rem; flex-wrap: wrap; }
.fin-type {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .9rem; border: 1px solid var(--admin-border); border-radius: 999px;
  cursor: pointer; color: var(--on-surface-muted); user-select: none;
}
.fin-type input { position: absolute; opacity: 0; width: 0; height: 0; }
.fin-type.is-on,
.fin-type:has(input:checked) { border-color: var(--accent-line); color: var(--accent-text); background: var(--admin-bg-row); font-weight: 600; }
.fin-type:has(input:focus-visible) { outline: 2px solid var(--accent-line); outline-offset: 2px; }

/* ==========================================================================
   §41 · RBAC — matriz de papéis e permissões (/admin/roles)     17/07/2026
   Só tokens de tema (app.css é compartilhado com o site — §9).
   ========================================================================== */
.rbac-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.rbac-group { border: 1px solid var(--admin-border); border-radius: var(--radius-lg); padding: .75rem 1rem 1rem; min-width: 0; }
.rbac-group__title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); padding: 0 .35rem; }
.rbac-perm { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; font-size: .875rem; color: var(--on-surface); cursor: pointer; }
.rbac-perm input { width: 1rem; height: 1rem; flex-shrink: 0; accent-color: var(--accent-line); }
.rbac-perm:hover { color: var(--accent-text); }

/* ==========================================================================
   §42 · NPS — escala de 0 a 10 na página pública            22/07/2026
   ==========================================================================
   Usada SÓ em /avaliar/{token}. Tokens de tema apenas (o app.css é
   compartilhado com o painel — §12, "varra por seletor").

   As notas são <button type=submit>, não radio: um toque no celular responde a
   pesquisa inteira. Por isso o alvo tem 2.75rem — abaixo de 44px o dedo erra, e
   uma pesquisa em que se erra o alvo é uma pesquisa não respondida.
   ========================================================================== */

.nps-scale {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: .35rem;
}
.nps-scale__btn {
  min-height: 2.75rem;
  border: 1px solid var(--admin-border, rgba(28,16,8,.15));
  background: var(--surface-2);
  color: var(--on-surface);
  border-radius: var(--radius-lg);
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.nps-scale__btn:hover,
.nps-scale__btn:focus-visible {
  background: var(--accent-line);
  border-color: var(--accent-line);
  color: var(--brown);
  transform: translateY(-1px);
}
.nps-scale__legend {
  display: flex;
  justify-content: space-between;
  margin-top: .5rem;
  font-size: .78rem;
  /* --on-surface-soft, não --on-surface-faint: o faint reprova AA de propósito
     (é decorativo, e o §12 registra isso). Legenda de escala é texto que a
     pessoa PRECISA ler para responder certo. */
  color: var(--on-surface-soft);
}

/* Abaixo de 30rem, 11 colunas dão ~1.6rem cada — menor que o dedo. Duas
   fileiras de 6 mantêm o alvo utilizável sem esconder nenhuma nota. */
@media (max-width: 30rem) {
  .nps-scale { grid-template-columns: repeat(6, 1fr); }
}

/* ==========================================================================
   §43 · Prontuário inteligente — blocos arrastáveis e barra de autoria
   ==========================================================================
   Só tokens de tema (o app.css é compartilhado com o site — §12, "varra por
   seletor"). Nenhum seletor aqui alcança o público: tudo é .tpl-* / .rec-*.
   ========================================================================== */

.tpl-blocks { display: flex; flex-direction: column; gap: .6rem; }

.tpl-block {
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  align-items: start;
  gap: .5rem;
  padding: .7rem;
  background: var(--admin-bg-row);
  border: 1px solid var(--admin-border-soft);
  border-radius: .6rem;
}
/* A alça é o ÚNICO ponto de arrasto: com o bloco inteiro arrastável, selecionar
   o texto de um textarea viraria arrastar o bloco — e a profissional perderia o
   gesto mais usado da tela. */
.tpl-block__grip {
  cursor: grab;
  color: var(--on-surface-soft);
  padding: .4rem 0;
  text-align: center;
  align-self: center;
}
.tpl-block__grip:active { cursor: grabbing; }
.tpl-block__body { min-width: 0; }        /* item de grid precisa disso p/ não estourar */
.tpl-block__del {
  border: 0; background: none; cursor: pointer;
  color: var(--on-surface-soft); width: 2rem; height: 2rem; border-radius: .4rem;
  align-self: center;
}
.tpl-block__del:hover { color: var(--admin-danger); background: var(--surface-raised); }
/* Fantasma do arrasto: sinaliza o destino sem sumir com o bloco. */
.tpl-block--ghost { opacity: .4; border-style: dashed; }

/* Barra de autoria no formulário de evolução */
.rec-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  padding: .85rem;
  margin-bottom: 1rem;
  background: var(--admin-bg-row);
  border: 1px solid var(--admin-border-soft);
  border-radius: .6rem;
}
.rec-tools__group { min-width: 0; }
.rec-tools__row { display: flex; gap: .4rem; align-items: center; }
.rec-tools__row .f-control { min-width: 0; }

@media (max-width: 40rem) {
  .tpl-block { grid-template-columns: 1.6rem 1fr 1.6rem; padding: .5rem; }
}

/* ==========================================================================
   §44 · Biolink no painel — itens arrastáveis              22/07/2026
   ==========================================================================
   Só tokens de tema. Nenhum seletor aqui alcança o site público: tudo é .bl-item.
   (O CSS da PÁGINA pública /@username é inline na própria view — ela não usa
   este arquivo, para não carregar 180 KB num cartão de visita.)
   ========================================================================== */

.bl-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }

.bl-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr 2rem;
  align-items: center;
  gap: .5rem;
  padding: .55rem .7rem;
  background: var(--admin-bg-row);
  border: 1px solid var(--admin-border-soft);
  border-radius: var(--radius-lg);
}
/* A alça é o ÚNICO ponto de arrasto: com o item inteiro arrastável, clicar no
   botão de remover viraria início de arrasto. */
.bl-item__grip { cursor: grab; color: var(--on-surface-soft); text-align: center; }
.bl-item__grip:active { cursor: grabbing; }
.bl-item__body { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.bl-item__body strong { font-size: .88rem; font-weight: 600; color: var(--on-surface); }
.bl-item__del {
  border: 0; background: none; cursor: pointer; color: var(--on-surface-soft);
  width: 1.9rem; height: 1.9rem; border-radius: .35rem;
}
.bl-item__del:hover { color: var(--admin-danger); background: var(--surface-raised); }
.bl-item--ghost { opacity: .4; border-style: dashed; }

/* ==========================================================================
   §45 — PRIMEIROS PASSOS (roteiro de quem acabou de receber o sistema)
   ==========================================================================
   Só tokens de tema. Todo seletor é `.fs-*`, prefixo que não existe em nenhuma
   view pública — o app.css é compartilhado com o site (§12), e trocar por VALOR
   em vez de por SELETOR foi o que quase quebrou o público em 17/07.
   ========================================================================== */

.fs-bar {
  height: .5rem;
  border-radius: 999px;
  background: var(--admin-bg-row);
  border: 1px solid var(--admin-border-soft);
  overflow: hidden;
}
.fs-bar__fill {
  display: block;
  height: 100%;
  background: var(--accent-line);
  transition: width 320ms ease;
}

.fs-list { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.25rem; }

.fs-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
}
/* Concluído recua VISUALMENTE, mas continua legível: risco no texto do passo
   feito tiraria a possibilidade de conferir o que foi feito. */
.fs-step--done { opacity: .72; }

.fs-step__mark {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--admin-bg-row);
  border: 1px solid var(--admin-border-soft);
  color: var(--on-surface-soft);
}
.fs-step--done .fs-step__mark {
  background: rgba(74,124,90,.12);
  border-color: rgba(74,124,90,.3);
  color: var(--admin-success);
}

.fs-step__body { min-width: 0; }
.fs-step__title {
  font-size: 1rem; font-weight: 600; color: var(--on-surface);
  margin: 0 0 .2rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
/* `--on-surface-soft`, NÃO `--on-surface-faint`: o "porquê" é o texto que faz
   o roteiro valer alguma coisa, e o degrau `faint` reprova AA de propósito
   (§12, "Aberto"). Já errei isso no selo "Baixa" do kanban. */
.fs-step__why { font-size: .875rem; color: var(--on-surface-soft); margin: 0; line-height: 1.55; }
.fs-step__cta { flex-shrink: 0; }

@media (max-width: 640px) {
  .fs-step { grid-template-columns: 2.5rem 1fr; }
  .fs-step__cta { grid-column: 2; justify-self: start; }
}

/* Card compacto na home — só o que FALTA. Dez itens com oito riscados vira
   paisagem, e os dois que importam se perdem. */
.fs-home { display: flex; flex-direction: column; gap: .5rem; }
.fs-home__item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .7rem;
  background: var(--admin-bg-row);
  border: 1px solid var(--admin-border-soft);
  border-radius: var(--radius-lg);
  color: var(--on-surface);
  text-decoration: none;
}
.fs-home__item:hover { border-color: var(--accent-line); }
.fs-home__item i { color: var(--on-surface-soft); width: 1.1rem; text-align: center; }
.fs-home__item strong { font-size: .875rem; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════
   §46 · "Powered by" do rodapé (28/07/2026)
   ══════════════════════════════════════════════════════════════════════════
   Substitui as duas linhas de texto de crédito por logo. Discreto de
   propósito: é assinatura de fornecedor, não conversão da página — se
   competisse com o CTA de agendamento, estaria roubando o que o site
   existe para fazer.

   A opacidade base (.55) e o realce no hover são o mesmo recurso que o
   `.footer-dev-link` já usava, agora aplicados à imagem. Preferido a
   clarear o SVG: mexer na cor exigiria dois arquivos (um por tema), e o
   ponto do gradiente é ser UM arquivo para todos os sites.
   ────────────────────────────────────────────────────────────────────── */
.footer-powered {
  display: flex;
  align-items: center;      /* o logo e o texto centrados no MESMO eixo, como
                               se fossem uma linha só — pedido do cliente */
  justify-content: center;
  gap: .4rem;
}
.footer-powered__label {
  font-size: .75rem;
  letter-spacing: .02em;
  color: var(--on-surface-soft);
}
.footer-powered__link {
  display: inline-flex;
  align-items: center;
  line-height: 0;             /* sem isto o <a> herda a caixa de texto e
                                 desalinha o SVG em ~3px */
  opacity: .55;
  transition: opacity .2s ease;
}
.footer-powered__link:hover,
.footer-powered__link:focus-visible { opacity: 1; }
.footer-powered__logo {
  /* 56px de largura -> ~16,7px de altura (a proporção do viewBox é 3,36).
     O texto ao lado tem 12px: o logo fica LEVEMENTE maior, que é o peso
     visual pedido — ele assina, sem competir com o conteúdo do rodapé. */
  width: 56px;
  height: auto;               /* o `height` do atributo reserva o espaço e
                                 evita o CLS; o `auto` preserva a proporção
                                 se alguém trocar a largura */
  display: block;
}

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