/* Arguente — sistema visual
   Neutros suaves, verde de destaque, ícones sólidos e superfícies "liquid glass". */

:root {
  color-scheme: light;
  --bg: #F4F5F2;
  --blob-1: rgba(96, 196, 96, .16);
  --blob-2: rgba(170, 182, 172, .30);
  --blob-3: rgba(102, 45, 145, .06);
  --surface: rgba(255, 255, 255, .62);
  --surface-strong: rgba(255, 255, 255, .86);
  --surface-sunken: rgba(29, 31, 30, .045);
  --glass-border: rgba(255, 255, 255, .78);
  --glass-edge: rgba(29, 31, 30, .07);
  --glass-highlight: rgba(255, 255, 255, .9);
  --glass-sheen: rgba(255, 255, 255, .55);
  --shadow: 0 10px 34px rgba(28, 40, 33, .09), 0 1px 3px rgba(28, 40, 33, .07);
  --shadow-lg: 0 24px 60px rgba(28, 40, 33, .16), 0 2px 8px rgba(28, 40, 33, .08);
  --text: #1C1E1D;
  --text-2: #5C625E;
  --text-3: #8C928E;
  --sep: rgba(29, 31, 30, .09);
  /* Sistema visual Arguente 2.0: --accent é o verde de texto e links; --acao, o verde dos botões
     (verde 700, o mesmo dos ícones do menu: contraste de 5,6:1 com o texto branco, WCAG AA). */
  --accent: #2C772C;
  --accent-strong: #215921;
  --accent-soft: rgba(96, 196, 96, .16);
  --accent-contrast: #163C16;
  --acao: #2C772C;
  --acao-forte: #215921;
  --acao-texto: #FFFFFF;
  --certifica: #662D91;
  --certifica-soft: rgba(102, 45, 145, .10);
  --warn: #99510B;
  --warn-soft: rgba(229, 122, 16, .13);
  --danger: #BD3B35;
  --danger-soft: rgba(189, 59, 53, .11);
  --user-bubble: rgba(29, 31, 30, .065);
  --focus: 0 0 0 3px rgba(96, 196, 96, .45);
  --paper: #FFFFFF;
  --paper-text: #1B1B1B;

  --r-xl: 28px;
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 11px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-doc: "Times New Roman", Times, "Liberation Serif", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --topbar-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0D0F0E;
    --blob-1: rgba(96, 196, 96, .12);
    --blob-2: rgba(90, 104, 96, .20);
    --blob-3: rgba(102, 45, 145, .12);
    --surface: rgba(34, 38, 36, .55);
    --surface-strong: rgba(38, 42, 40, .88);
    --surface-sunken: rgba(255, 255, 255, .05);
    --glass-border: rgba(255, 255, 255, .09);
    --glass-edge: rgba(0, 0, 0, .4);
    --glass-highlight: rgba(255, 255, 255, .12);
    --glass-sheen: rgba(255, 255, 255, .06);
    --shadow: 0 10px 34px rgba(0, 0, 0, .38), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
    --text: #ECEEEC;
    --text-2: #A6ACA8;
    --text-3: #767C78;
    --sep: rgba(255, 255, 255, .08);
    --accent: #8FD68F;
    --accent-strong: #BFE3BF;
    --accent-soft: rgba(96, 196, 96, .16);
    --accent-contrast: #0F2410;
    --acao: #2C772C;
    --acao-forte: #215921;
    --acao-texto: #FFFFFF;
    --certifica: #B88ADB;
    --certifica-soft: rgba(184, 138, 219, .16);
    --warn: #F19337;
    --warn-soft: rgba(229, 122, 16, .16);
    --danger: #EE7B74;
    --danger-soft: rgba(238, 123, 116, .14);
    --user-bubble: rgba(255, 255, 255, .075);
    --focus: 0 0 0 3px rgba(96, 196, 96, .45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0F0E;
  --blob-1: rgba(96, 196, 96, .12);
  --blob-2: rgba(90, 104, 96, .20);
  --blob-3: rgba(102, 45, 145, .12);
  --surface: rgba(34, 38, 36, .55);
  --surface-strong: rgba(38, 42, 40, .88);
  --surface-sunken: rgba(255, 255, 255, .05);
  --glass-border: rgba(255, 255, 255, .09);
  --glass-edge: rgba(0, 0, 0, .4);
  --glass-highlight: rgba(255, 255, 255, .12);
  --glass-sheen: rgba(255, 255, 255, .06);
  --shadow: 0 10px 34px rgba(0, 0, 0, .38), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  --text: #ECEEEC;
  --text-2: #A6ACA8;
  --text-3: #767C78;
  --sep: rgba(255, 255, 255, .08);
  --accent: #8FD68F;
  --accent-strong: #BFE3BF;
  --accent-soft: rgba(96, 196, 96, .16);
  --accent-contrast: #0F2410;
  --acao: #2C772C;
  --acao-forte: #215921;
  --acao-texto: #FFFFFF;
  --certifica: #B88ADB;
  --certifica-soft: rgba(184, 138, 219, .16);
  --warn: #F19337;
  --warn-soft: rgba(229, 122, 16, .16);
  --danger: #EE7B74;
  --danger-soft: rgba(238, 123, 116, .14);
  --user-bubble: rgba(255, 255, 255, .075);
  --focus: 0 0 0 3px rgba(96, 196, 96, .45);
}

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }  /* no iOS, só o body não impede a rolagem lateral */
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;  /* "hidden" criaria uma área de rolagem própria e anularia a trilha fixa (sticky) */
}
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 12% 8%, var(--blob-1), transparent 70%),
    radial-gradient(34% 30% at 92% 18%, var(--blob-2), transparent 70%),
    radial-gradient(44% 38% at 62% 96%, var(--blob-3), transparent 72%);
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 100; background: var(--surface-strong); padding: 8px 12px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

svg.i { width: 20px; height: 20px; flex: none; fill: currentColor; display: inline-block; vertical-align: middle; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 28px; height: 28px; }
svg.i.xl { width: 40px; height: 40px; }

/* ---------------------------------------------------------------- Liquid glass */

.glass {
  position: relative;
  background: var(--surface);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  backdrop-filter: blur(24px) saturate(185%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 var(--glass-edge);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, var(--glass-sheen) 0%, transparent 38%, transparent 70%, var(--glass-sheen) 100%);
  opacity: .7;
}
.glass > * { position: relative; }

.field, .select, .textarea {
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--glass-border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05), inset 0 1px 0 var(--glass-highlight), 0 1px 2px rgba(0, 0, 0, .04);
  padding: 11px 14px;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.field:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.field.erro { border-color: var(--danger); }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238C928E'%3E%3Cpath d='M12 15.6a1 1 0 0 1-.7-.3l-5-5a1 1 0 1 1 1.4-1.4l4.3 4.3 4.3-4.3a1 1 0 1 1 1.4 1.4l-5 5a1 1 0 0 1-.7.3Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

/* ---------------------------------------------------------------- Botões e chips */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), opacity .2s;
  text-decoration: none !important;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--acao); color: var(--acao-texto); box-shadow: 0 6px 18px rgba(44, 119, 44, .28), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:hover { background: var(--acao-forte); }
.btn-glass {
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border-color: var(--glass-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06), inset 0 1px 0 var(--glass-highlight);
  color: var(--text);
}
.btn-glass:hover { background: var(--surface-strong); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn-icon.btn-sm { width: 34px; min-height: 34px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05), inset 0 1px 0 var(--glass-highlight);
  font-size: 14px;
  font-weight: 550;
  transition: background .2s, transform .15s var(--ease), border-color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip:active { transform: scale(.96); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-sunken);
  color: var(--text-2);
}
.pill.verde { background: var(--accent-soft); color: var(--accent); }
.pill.roxo { background: var(--certifica-soft); color: var(--certifica); }
.pill.ambar { background: var(--warn-soft); color: var(--warn); }
.pill.vermelho { background: var(--danger-soft); color: var(--danger); }

/* ---------------------------------------------------------------- Barra superior */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-radius: 0;
  border-width: 0 0 1px;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  height: var(--topbar-h);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 26px; width: auto; display: block; }
/* Logotipo preto no tema claro; verde no escuro (sistema ou escolha manual). */
.brand-logo.logo-escuro { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo.logo-claro { display: none; }
  :root:not([data-theme="light"]) .brand-logo.logo-escuro { display: block; }
}
:root[data-theme="dark"] .brand-logo.logo-claro { display: none; }
:root[data-theme="dark"] .brand-logo.logo-escuro { display: block; }
.topbar-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
@media (max-width: 440px) {
  .topbar-actions { gap: 6px; }
  #ia-status span { display: none; }  /* só o ícone da IA em telas estreitas */
  #ia-status { padding: 6px; }
}

.theme-toggle {
  position: relative;
  width: 68px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface-sunken);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .08);
  padding: 0;
}
.theme-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15), inset 0 1px 0 var(--glass-highlight);
  transition: transform .35s var(--ease);
}
.theme-icon { position: absolute; top: 7px; width: 18px; height: 18px; display: grid; place-items: center; transition: color .3s; }
.theme-icon svg { width: 18px; height: 18px; fill: currentColor; }
.theme-sun { left: 8px; color: #D59A1E; }
.theme-moon { right: 8px; color: var(--text-3); }
.escuro .theme-knob { transform: translateX(32px); }
.escuro .theme-sun { color: var(--text-3); }
.escuro .theme-moon { color: #9DB7FF; }

/* ---------------------------------------------------------------- Páginas */

#view { outline: none; }
#view:focus, #view:focus-visible { box-shadow: none; }  /* o foco vai ao conteúdo a cada troca de tela; sem anel */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 16px 64px; animation: entrar .35s var(--ease); }
.page.estreita { max-width: 880px; }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 28px; }
.hero p { color: var(--text-2); font-size: 16px; max-width: 620px; }
.secao { margin-top: 36px; }
.secao-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.voltar { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 550; margin-bottom: 16px; }
.voltar:hover { color: var(--text); text-decoration: none; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { border-radius: var(--r-lg); padding: 20px; }
.card-modelo { display: flex; flex-direction: column; gap: 14px; min-height: 230px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card-modelo:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight); }
.card-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icone-bolha {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.icone-bolha svg { width: 24px; height: 24px; }
/* Logotipo da instituição no lugar do capelo: fundo branco (logos são feitos para fundo claro). */
.icone-bolha.logo-ies { width: auto; min-width: 44px; max-width: 96px; padding: 5px; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.icone-bolha.logo-ies img { display: block; height: 34px; width: auto; max-width: 86px; object-fit: contain; }
.card-modelo h3 { font-size: 17px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card-rodape { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.card-rodape .btn-primary { flex: 1; }
.card-linha { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.card-icones { display: flex; gap: 0; margin-right: -6px; }
.aval-subtitulo { font-size: 15px; margin: 14px 0 4px; color: var(--text-2); }
.texto-alerta { color: var(--warn); display: inline-flex; gap: 5px; align-items: center; }
.selo-verificado { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--certifica); }
.card-topo { container-type: inline-size; }
.card-marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-marca .selo-verificado { margin-top: 0; white-space: nowrap; }
/* Cartão estreito com 3 ações (administração): o selo fica só com o ícone, sem empurrar os botões. */
@container (max-width: 250px) {
  .card-topo:has(.card-icones > :nth-child(3)) .selo-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.card-modelo .sigla { color: var(--accent); font-weight: 600; }
.icone-acao {
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: none; color: var(--text-3); cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease);
}
.icone-acao .i { width: 19px; height: 19px; }
.icone-acao:hover { color: var(--accent); background: var(--accent-soft); }
.icone-acao.perigo:hover { color: var(--danger); background: var(--danger-soft); }
.icone-acao[aria-pressed="true"] { color: var(--accent); }
.icone-acao.favorito:hover, .icone-acao.favorito[aria-pressed="true"] { color: #E0475A; }
.icone-acao.favorito:hover { background: rgba(224, 71, 90, .12); }
.icone-acao:focus-visible { outline: none; box-shadow: var(--focus); }

.card-novo {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  display: flex;  /* primeiro cartão da grade de modelos, com o conteúdo centralizado */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  min-height: 230px;
  color: var(--text);
  transition: transform .25s var(--ease), background .25s;
}
.card-novo:hover { transform: translateY(-2px); background: var(--accent-soft); }
.card-novo .icone-grande { color: var(--accent); }
.card-novo .icone-grande { display: grid; }
.card-novo .icone-grande svg { width: 46px; height: 46px; }

.lista { border-radius: var(--r-lg); overflow: hidden; }
.linha {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--text);
  border-bottom: 1px solid var(--sep);
}
.linha:last-child { border-bottom: 0; }
a.linha:hover { background: var(--surface-sunken); text-decoration: none; }
.linha-corpo { flex: 1; min-width: 0; }
.linha-titulo { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha-sub { color: var(--text-2); font-size: 13.5px; }
.avatar-link { flex: none; border-radius: 50%; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.avatar-link:hover { transform: scale(1.06); box-shadow: 0 0 0 3px var(--accent-soft); text-decoration: none; }
.avatar-link:focus-visible { outline: none; box-shadow: var(--focus); }
.membro-nome { display: flex; align-items: center; gap: 4px; }
.icone-acao.marcador { width: 28px; height: 28px; }
.icone-acao.marcador[aria-pressed="true"] { color: var(--accent); }
.link-discreto { color: inherit; }
.link-discreto:hover { color: var(--accent); text-decoration: none; }
.linha-email { display: flex; align-items: center; gap: 5px; margin-top: 2px; word-break: break-all; }
.linha-email a { color: inherit; }

/* Linha de banca (listas): grade que empilha no celular. */
.linha-banca {
  display: grid; align-items: center; column-gap: 14px; row-gap: 6px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "icone titulo status seta" "icone info status seta";
}
.lb-icone { grid-area: icone; }
.lb-titulo { grid-area: titulo; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.lb-seta { grid-area: seta; }
.lb-info { grid-area: info; display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--text-2); font-size: 13.5px; min-width: 0; }
.lb-info > span { display: inline-flex; align-items: flex-start; gap: 5px; min-width: 0; }
.lb-info .i { flex: none; margin-top: 3px; color: var(--text-3); }
.lb-status { grid-area: status; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 720px) {
  .linha-banca {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icone titulo seta" "info info info" "status status status";
    row-gap: 10px; padding: 16px;
  }
  .lb-info { flex-direction: column; gap: 4px; }
  .lb-status { justify-content: flex-start; }
}
.vazio { padding: 28px; text-align: center; color: var(--text-2); }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 700;
  font-size: 14px;
  background: var(--surface-sunken);
  color: var(--text-2);
}
.avatar.presidente { background: var(--accent-soft); color: var(--accent); }

.barra { height: 6px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.barra > span { display: block; height: 100%; border-radius: inherit; background: var(--acao); transition: width .5s var(--ease); }

/* ---------------------------------------------------------------- Navegação */

/* A trilha acompanha a rolagem, logo abaixo da barra superior: o caminho de volta fica sempre à mão. */
.trilha {
  position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px); z-index: 15;
  width: fit-content; max-width: 100%; margin-bottom: 14px; font-size: 13.5px;
  padding: 3px 4px; border-radius: 999px; border: 1px solid transparent;
  transition: background .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.trilha.flutuando {
  background: var(--surface-strong); border-color: var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.trilha ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 6px; min-width: 0; overflow: hidden; }
.trilha li { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.trilha li + li::before { content: "›"; color: var(--text-3); }
.trilha a, .trilha span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(46ch, 70vw); padding: 3px 6px; border-radius: 8px; }
.trilha a { color: var(--text-2); font-weight: 550; }
.trilha a:hover { background: var(--surface-sunken); color: var(--text); text-decoration: none; }
.trilha [aria-current] { color: var(--text); font-weight: 650; }
.abas { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 999px; background: var(--surface-sunken); max-width: 100%; overflow-x: auto; }
.abas a { padding: 7px 14px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.abas a:hover { color: var(--text); text-decoration: none; }
.abas a[aria-current] { background: var(--surface-strong); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }

/* ---------------------------------------------------------------- Chat (layout inspirado no Claude Code) */

.chat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top));
}
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sep);
}
.chat-head .titulo { flex: 1; min-width: 0; }
.chat-head .titulo strong { display: block; font-size: 15px; }
.chat-head .titulo span { display: block; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .barra { width: 120px; }
.transcript { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.transcript-inner { max-width: 780px; margin: 0 auto; padding: 28px 16px 24px; display: flex; flex-direction: column; gap: 18px; }

.msg { display: flex; gap: 12px; animation: entrar .3s var(--ease); }
.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #47B37A, #237349);
  color: #fff;
  margin-top: 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.msg-avatar svg { width: 17px; height: 17px; }
.msg-corpo { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.6; overflow-wrap: anywhere; }
.msg-corpo strong { font-weight: 650; }
.msg-corpo ul { margin: 6px 0; padding-left: 20px; }
.msg-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.msg.usuario { justify-content: flex-end; }
.bolha {
  max-width: min(80%, 560px);
  background: var(--user-bubble);
  border-radius: 20px 20px 6px 20px;
  padding: 10px 16px;
  font-size: 15.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bolha.comando { background: transparent; border: 1px dashed var(--sep); color: var(--text-2); font-size: 13.5px; padding: 6px 12px; border-radius: 999px; }
.bolha .i { margin-right: 6px; color: var(--accent); }
.dica {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
  margin-left: 42px;
}
.dica .i { color: var(--accent); }
.digitando { display: inline-flex; gap: 4px; padding: 10px 0; }
.digitando span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: pulso 1.2s infinite; }
.digitando span:nth-child(2) { animation-delay: .15s; }
.digitando span:nth-child(3) { animation-delay: .3s; }
@keyframes pulso { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.resumo-card { border-radius: var(--r-lg); padding: 6px 0; margin-top: 4px; }
.resumo-grupo { padding: 10px 16px; }
.resumo-grupo + .resumo-grupo { border-top: 1px solid var(--sep); }
.resumo-grupo h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 6px; font-weight: 700; }
.resumo-item { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 5px 0; font-size: 14px; }
.resumo-item .rot { color: var(--text-2); }
.resumo-item .val { overflow-wrap: anywhere; }
.lapis {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  display: grid;
  place-items: center;
  margin-top: -3px;
}
.lapis:hover { background: var(--accent-soft); color: var(--accent); }
.lapis svg { width: 15px; height: 15px; }

.composer-wrap {
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--bg) 35%);
}
.composer-area { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.composer { border-radius: var(--r-xl); padding: 10px 10px 8px 16px; transition: box-shadow .2s var(--ease); }
.composer:focus-within { box-shadow: var(--shadow), var(--focus), inset 0 1px 0 var(--glass-highlight); }
.composer textarea {
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 15.5px;
  line-height: 1.5;
  max-height: 220px;
  padding: 6px 0;
  display: block;
}
.composer textarea::placeholder { color: var(--text-3); }
.composer textarea:focus-visible { box-shadow: none; }
.composer .entrada-especial { display: flex; gap: 10px; align-items: center; padding: 4px 0 6px; flex-wrap: wrap; }
.composer .entrada-especial .field, .composer .entrada-especial .select { flex: 1; min-width: 180px; }
.composer-rodape { display: flex; align-items: center; gap: 6px; }
.composer-rodape .espaco { flex: 1; }
.composer-rodape .atalho { font-size: 12px; color: var(--text-3); margin-right: 6px; }
.enviar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--acao);
  color: var(--acao-texto);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(46, 139, 87, .3);
  transition: transform .15s var(--ease), opacity .2s;
}
.enviar:disabled { opacity: .35; box-shadow: none; }
.enviar:active { transform: scale(.93); }
.enviar svg { width: 20px; height: 20px; }
.ferramenta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 550;
}
.ferramenta:hover { background: var(--surface-sunken); color: var(--text); }
.ferramenta svg { width: 17px; height: 17px; }
.arquivo-alvo {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r);
  border: 1.5px dashed var(--sep);
  color: var(--text-2);
  background: transparent;
  text-align: left;
}
.arquivo-alvo:hover, .arquivo-alvo.sobre { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.lista-busca { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lista-opcoes { display: flex; flex-wrap: wrap; gap: 8px; max-height: min(34vh, 220px); overflow-y: auto; padding: 2px; }
.calendario { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cal-atalhos { display: flex; gap: 8px; }
.cal-topo { display: flex; align-items: center; justify-content: space-between; }
.cal-topo strong { font-size: 14.5px; }
.cal-topo strong::first-letter { text-transform: uppercase; }
.cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-sem { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 2px 0; }
.dia { border: 0; background: transparent; border-radius: 10px; height: clamp(30px, 4.6vh, 38px); font-size: 14px; font-variant-numeric: tabular-nums; }
.dia:hover { background: var(--accent-soft); color: var(--accent); }
.dia.passado { color: var(--text-3); }
.dia.hoje { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 700; }
.chat-side { border-left: 1px solid var(--sep); overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.chat-side .glass { border-radius: var(--r-lg); }
.progresso-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.progresso-card .linha-progresso { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); }
.so-mobile { display: none; }

@media (max-width: 1020px) {
  .chat { grid-template-columns: 1fr; }
  .chat-side { display: none; }
  .so-mobile { display: inline-flex; }
  .chat-head .barra { display: none; }
}

/* ---------------------------------------------------------------- Banca */

.banca-topo { border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.banca-topo h1 { font-size: clamp(22px, 3.2vw, 28px); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .i { color: var(--accent); width: 17px; height: 17px; }
.duas-colunas { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
@media (max-width: 900px) { .duas-colunas { grid-template-columns: 1fr; } }
.painel { border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.acoes-membro { display: flex; gap: 4px; flex: none; }
.aviso {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: 14px;
  background: var(--surface-sunken);
  color: var(--text-2);
}
.aviso.verde { background: var(--accent-soft); color: var(--text); }
.aviso.verde .i { color: var(--accent); }
.aviso.ambar { background: var(--warn-soft); color: var(--text); }
.aviso.ambar .i { color: var(--warn); }

/* ---------------------------------------------------------------- Ficha de avaliação */

.ficha-topo { border-radius: var(--r-xl); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.ident { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.ident div { font-size: 14px; }
.ident dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.ident dd { margin: 2px 0 0; }
.criterios { border-radius: var(--r-lg); margin-top: 18px; overflow: hidden; }
.criterios-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--sep); }
.criterio { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 6px 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--sep); }
.criterio:last-child { border-bottom: 0; }
.criterio .desc { font-weight: 550; }
.criterio .max { font-size: 12.5px; color: var(--text-3); }
.criterio .barra { grid-column: 1 / -1; height: 4px; }
.nota-input { display: flex; align-items: center; gap: 6px; }
.nota-input .field { text-align: center; font-size: 17px; font-weight: 650; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.nota-input .de { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.total-dock {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom));
  margin-top: 22px;
  border-radius: var(--r-xl);
  padding: 12px 14px 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 5;
}
.total-dock .parciais { display: flex; gap: 18px; flex: 1; min-width: 200px; font-size: 13.5px; color: var(--text-2); }
.total-dock .parciais b { color: var(--text); font-size: 15px; }
.total-dock .acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.anel { --p: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-sunken) 0); }
.anel > span { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-strong); display: grid; place-items: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.anel.grande { width: 112px; height: 112px; }
.anel.grande > span { width: 92px; height: 92px; font-size: 26px; flex-direction: column; line-height: 1.1; }
.anel.grande small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.assinatura {
  margin-top: 18px;
  border-radius: var(--r-lg);
  border: 1.5px dashed var(--sep);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--text-2);
  font-size: 14px;
}
.assinatura .i { color: var(--accent); }

/* ---------------------------------------------------------------- Presidência */

.placar { width: 100%; border-collapse: collapse; font-size: 14px; }
.placar th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; padding: 10px 14px; }
.placar td { padding: 12px 14px; border-top: 1px solid var(--sep); }
.placar td.num, .placar th.num { text-align: right; }
.resultados { display: grid; gap: 10px; }
.opcao-resultado {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1.5px solid var(--sep);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.opcao-resultado:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.opcao-resultado input { position: absolute; inset: 0; opacity: 0; pointer-events: none; margin: 0; }
.opcao-resultado .icone-bolha { width: 38px; height: 38px; border-radius: 12px; }
.opcao-resultado strong { display: block; }
.opcao-resultado small { color: var(--text-2); font-size: 13px; }
.opcao-resultado .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sep); display: grid; place-items: center; color: transparent; }
.opcao-resultado:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opcao-resultado:has(input:checked) .check { background: var(--acao); border-color: var(--accent); color: var(--acao-texto); }
.opcao-resultado:has(input:focus-visible) { box-shadow: var(--focus); }
.opcao-resultado.ambar .icone-bolha { background: var(--warn-soft); color: var(--warn); }
.opcao-resultado.vermelho .icone-bolha { background: var(--danger-soft); color: var(--danger); }
.sugestao-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }

/* ---------------------------------------------------------------- Ata (prévia A4) */

.ata-barra {
  position: sticky;
  top: calc(var(--topbar-h) + 10px);
  z-index: 6;
  border-radius: 999px;
  padding: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 22px;
  width: fit-content;
  max-width: 100%;
}
.papel {
  background: var(--paper);
  color: var(--paper-text);
  max-width: 794px;
  min-height: 1123px;
  margin: 0 auto;
  padding: 72px 64px 72px 96px;
  box-shadow: var(--shadow-lg);
  border-radius: 6px;
  font-family: var(--font-doc);
  font-size: 16px;
  line-height: 1.5;
}
.papel .cab { text-align: center; font-weight: 700; font-size: 14.5px; line-height: 1.35; padding-bottom: 12px; border-bottom: 1.2px solid #2F7D57; }
.papel .cab img { display: block; max-height: 72px; max-width: 60%; margin: 0 auto 10px; }
.papel h2 { text-align: center; font-family: var(--font-doc); font-size: 19px; margin: 22px 0 18px; letter-spacing: 0; }
.papel .texto { text-align: justify; text-indent: 1.25cm; hyphens: auto; }
.papel .assin { margin-top: 34px; }
.papel .assin h3 { font-family: var(--font-doc); font-size: 16px; margin-bottom: 8px; }
.papel .assin-linha { display: grid; grid-template-columns: 55% 45%; align-items: center; padding: 8px 0; border-bottom: 1px solid #D5D9D5; }
.papel .assin-linha:last-child { border-bottom: 0; }
.papel .assin-linha small { color: #6B6F6C; display: block; font-size: 14px; }
.papel .caixa { height: 52px; border: 1px dashed #C9CEC9; border-radius: 5px; display: grid; place-items: center; font-family: var(--font); font-size: 10.5px; color: #A3A8A4; }
@media (max-width: 720px) {
  .papel { padding: 36px 22px; min-height: 0; font-size: 14.5px; }
  .papel .assin-linha { grid-template-columns: 1fr; gap: 6px; }
  .ata-barra { border-radius: var(--r-lg); }
}

/* ---------------------------------------------------------------- Modais e avisos */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 14, 12, .28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: var(--r-xl);
  padding: 24px;
  background: var(--surface-strong);
  animation: surgir .3s var(--ease);
}
@keyframes surgir { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h2 { margin-bottom: 8px; }
.modal .corpo { color: var(--text-2); display: flex; flex-direction: column; gap: 14px; }
.modal .rodape { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal.folha { width: min(560px, 100%); }
@media (max-width: 640px) {
  .overlay { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
.check-linha { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text); font-size: 14.5px; }
.check-linha input { width: 18px; height: 18px; accent-color: var(--accent); }

#toast-root { position: fixed; left: 50%; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 550; display: flex; align-items: center; gap: 8px; animation: surgir .3s var(--ease); background: var(--surface-strong); }
.toast .i { color: var(--accent); }
.toast.erro .i { color: var(--danger); }

.menu { position: absolute; z-index: 30; min-width: 240px; border-radius: var(--r); padding: 6px; background: var(--surface-strong); }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: 14px; }
.menu button:hover { background: var(--accent-soft); }

/* ---------------------------------------------------------------- Cronômetro da sessão */

.sessao-topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sessao-topo h1 { margin-top: 8px; }
.acoes-topo { display: flex; gap: 8px; flex-wrap: wrap; }
.sessao-grade { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .sessao-grade { grid-template-columns: 1fr; } }
.cronometro { border-radius: var(--r-xl); padding: 26px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.etapa-contador { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cronometro h2 { font-size: 20px; }
.relogio { --p: 0; --cor: var(--accent); width: min(330px, 74vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--cor) calc(var(--p) * 1%), var(--surface-sunken) 0); }
.relogio > div { width: calc(100% - 24px); aspect-ratio: 1; border-radius: 50%; background: var(--surface-strong); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; box-shadow: inset 0 2px 10px rgba(0, 0, 0, .06); }
.digitos { font-size: clamp(52px, 14vw, 84px); font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.relogio.aviso { --cor: var(--warn); } .relogio.aviso .digitos { color: var(--warn); }
.relogio.esgotado { --cor: var(--danger); } .relogio.esgotado .digitos { color: var(--danger); }
.controles { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.btn-redondo { width: 48px; min-height: 48px; padding: 0; border-radius: 50%; }
.btn-play { width: 76px; min-height: 76px; padding: 0; border-radius: 50%; }
.btn-play svg { width: 32px; height: 32px; }
.etapas { border-radius: var(--r-lg); padding: 6px 0; overflow: hidden; }
.etapas-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 18px; }
.etapas ol { list-style: none; margin: 0; padding: 0; }
.fase { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--sep); }
.fase.atual { background: var(--accent-soft); }
.fase.fora { opacity: .5; }
.fase-ir { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: transparent; padding: 0; min-width: 0; }
.fase-ir > span:last-child { min-width: 0; }
.fase-ir strong { display: block; font-size: 14.5px; }
.fase-ir small { display: block; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fase-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 700;
  background: var(--surface-sunken); color: var(--text-2); }
.fase.atual .fase-num { background: var(--acao); color: var(--acao-texto); }
.fase-usado { font-size: 12.5px; color: var(--text-2); }
.fase-usado.excedeu { color: var(--danger); font-weight: 600; }
.fase-min { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.fase-min .field { width: 58px; padding: 6px 6px; text-align: center; border-radius: 10px; }
.fase input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 560px) { .fase { grid-template-columns: minmax(0, 1fr) auto auto; } .fase-usado { display: none; } }
.palco-apresentacao { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3vh; padding: 24px; text-align: center; }
.palco-apresentacao .rotulo { font-size: clamp(20px, 3.4vw, 40px); font-weight: 650; color: var(--text-2); }
.palco-apresentacao .gigante { font-size: clamp(96px, 24vw, 340px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.palco-apresentacao.aviso .gigante { color: var(--warn); }
.palco-apresentacao.esgotado .gigante { color: var(--danger); }
.palco-apresentacao .barra { width: min(900px, 90vw); height: 10px; }
.palco-apresentacao.aviso .barra > span { background: var(--warn); }
.palco-apresentacao.esgotado .barra > span { background: var(--danger); }

/* ---------------------------------------------------------------- Conta, menu e novas telas */

img.avatar { object-fit: cover; }
.avatar.mini { width: 28px; height: 28px; font-size: 11px; }
.avatar.grande { width: 76px; height: 76px; font-size: 26px; background: var(--accent-soft); color: var(--accent); }

.menu-botao {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 10px;
  border-radius: 999px; border: 1px solid var(--glass-border); background: var(--surface-strong);
  color: var(--text-2); cursor: pointer; box-shadow: var(--shadow);
}
.menu-botao[hidden] { display: none; }
.menu-botao .i { width: 18px; height: 18px; }
.menu-botao:focus-visible { outline: none; box-shadow: var(--focus); }

.menu-fundo { position: fixed; inset: 0; z-index: 60; background: rgba(10, 14, 12, .28); animation: aparecer .18s var(--ease); }
.menu-lateral {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(320px, calc(100vw - 20px));
  border-radius: var(--r-xl); padding: 16px; overflow-y: auto; background: var(--surface-strong);
  display: flex; flex-direction: column; gap: 14px; animation: deslizar .22s var(--ease);
}
.menu-conta { display: flex; align-items: center; gap: 12px; padding: 4px 2px 12px; border-bottom: 1px solid var(--sep); }
.menu-conta > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-conta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-grupo { display: flex; flex-direction: column; gap: 2px; }
.menu-grupo-titulo { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 0 10px 4px; }
.menu-grupo a, .menu-grupo button {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text); text-decoration: none; font: inherit; font-size: 15px; background: none; border: 0; cursor: pointer; text-align: left;
}
.menu-grupo .i { width: 20px; height: 20px; color: var(--text-2); }
.menu-grupo a:hover, .menu-grupo button:hover { background: var(--surface-sunken); }
.menu-grupo a:focus-visible, .menu-grupo button:focus-visible { outline: none; box-shadow: var(--focus); }
.menu-grupo a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.menu-grupo a[aria-current="page"] .i { color: var(--accent); }
@keyframes aparecer { from { opacity: 0; } }
@keyframes deslizar { from { transform: translateX(24px); opacity: 0; } }

.entrar { display: grid; place-items: center; min-height: calc(100dvh - var(--topbar-h) - 40px); }
.entrar-cartao { width: 100%; max-width: 420px; border-radius: var(--r-xl); padding: 32px 26px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.entrar-marca { margin: 0 auto; border-radius: 18px; }
.entrar-botoes { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.entrar-botoes:empty { display: none; }
.botao-google {
  width: 100%; max-width: 400px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border-radius: 999px; border: 1px solid #DADCE0; background: #FFFFFF; color: #1F1F1F; cursor: pointer;
  font: 500 15px/1 "Roboto", var(--font); text-decoration: none; transition: background .15s var(--ease), box-shadow .15s var(--ease);
}
.botao-google:hover { background: #F7F8F8; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.botao-google:focus-visible { outline: none; box-shadow: var(--focus); }
.entrar-google { width: 100%; display: flex; justify-content: center; min-height: 44px; }
.entrar-apple { width: 100%; max-width: 400px; height: 44px; cursor: pointer; }
.entrar-demo { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.entrar-rodape { display: flex; gap: 6px; align-items: flex-start; justify-content: center; text-align: left; }

.filtros { border-radius: var(--r-lg); padding: 16px; display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: end; }
.segmentado { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-sunken); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 520px) {
  .segmentado { display: flex; width: 100%; }
  .segmentado label { flex: 1; min-width: 0; }
  .segmentado span { padding: 8px 6px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
}
.segmentado label { position: relative; }
.segmentado input { position: absolute; opacity: 0; pointer-events: none; }
.segmentado span { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.segmentado input:checked + span { background: var(--surface-strong); color: var(--text); box-shadow: var(--shadow); }
.segmentado input:focus-visible + span { box-shadow: var(--focus); }
.campo-compacto { width: auto; min-width: 140px; }
.secao-titulo { font-size: 15px; color: var(--text-2); margin: 18px 2px 8px; }

.perfil-topo { border-radius: var(--r-xl); padding: 22px; display: flex; align-items: center; gap: 18px; }
.perfil-foto { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.perfil-foto-botao { position: relative; cursor: pointer; border-radius: 50%; }
.perfil-foto-botao:focus-within { box-shadow: var(--focus); }
.perfil-foto-camera {
  position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--acao); color: var(--acao-texto); border: 2px solid var(--surface-strong);
}
.perfil-id { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.perfil-id h1 { font-size: 24px; }
.perfil-pontos { border-radius: var(--r-xl); padding: 20px; margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.perfil-nivel { display: flex; align-items: center; gap: 12px; }
.perfil-nivel > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.perfil-total { text-align: right; display: flex; flex-direction: column; }
.perfil-total strong { font-size: 30px; line-height: 1; color: var(--accent); }
.estatisticas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.estatisticas > div { background: var(--surface-sunken); border-radius: var(--r-sm); padding: 10px; text-align: center; display: flex; flex-direction: column; }
.estatisticas strong { font-size: 20px; }
.estatisticas span { font-size: 12px; color: var(--text-2); }
.lista-simples { display: flex; flex-direction: column; }
.conquista { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--sep); }
.conquista:last-child { border-bottom: 0; }
.conquista > span:first-child { flex: 1; }
.conquista strong { color: var(--accent); }

.modal.modal-largo { width: min(680px, 100%); }
.curriculo-linha { display: flex; gap: 8px; }
.curriculo-linha .field { flex: 1; min-width: 0; }
.curriculo-conectado { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.producao { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--sep); }
.producao:last-child { border-bottom: 0; }
.proximos-passos { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.proximos-topo { display: flex; align-items: center; gap: 12px; }
.proximos-topo .icone-bolha { background: var(--accent-soft); color: var(--accent); }
.proximos-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.proximos-acoes .btn { flex: 1 1 200px; justify-content: center; }
.form-remarcar { display: flex; flex-direction: column; gap: 14px; }
.duas-colunas-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .duas-colunas-form { grid-template-columns: 1fr; } }
.producao-acoes { display: flex; gap: 6px; flex: none; }
.producao-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lattes-titulo { font-size: 15px; margin: 14px 0 6px; }
.lattes-campos { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lattes-campos > div { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-sunken); }
.lattes-campos dt { font-size: 13px; color: var(--text-2); }
.lattes-campos dd { margin: 0; font-size: 14px; word-break: break-word; }
@media (max-width: 560px) { .lattes-campos > div { grid-template-columns: 1fr auto; } .lattes-campos dt { grid-column: 1 / -1; } }
.sobre-app { border-radius: var(--r-xl); padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sobre-app img { border-radius: 18px; }
.sobre-pessoa { display: flex; gap: 16px; align-items: center; }
.sobre-pessoa p { margin-top: 4px; }
.sobre-contatos { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .sobre-pessoa { flex-direction: column; text-align: center; } }
.interruptor { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; }
.interruptor-trilho { flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--surface-sunken); position: relative; transition: background .2s var(--ease); margin-top: 2px; }
.interruptor-trilho::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.interruptor input:checked + .interruptor-trilho { background: var(--acao); }
.interruptor input:checked + .interruptor-trilho::after { transform: translateX(20px); }
.interruptor input:focus-visible + .interruptor-trilho { box-shadow: var(--focus); }
.integracao { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sep); }
.integracao:last-child { border-bottom: 0; }
.integracao > div { flex: 1; }

.ranking { list-style: none; margin: 0; padding: 0; }
.ranking .linha.eu { background: var(--accent-soft); }
.posicao { width: 44px; flex: none; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.posicao .i { width: 16px; height: 16px; }
.posicao-1 { color: #C9962B; }
.posicao-2 { color: #8E979C; }
.posicao-3 { color: #B0703C; }

@media (max-width: 720px) {
  .filtros { grid-template-columns: 1fr; }
  .estatisticas { grid-template-columns: repeat(2, 1fr); }
  .perfil-topo { flex-direction: column; text-align: center; }
  .perfil-id .card-meta { justify-content: center; }
}

/* ---------------------------------------------------------------- Feedback (fase de testes) */

.feedback-botao {
  position: fixed; right: 0; top: 50%; z-index: 45; transform: translateY(-50%);
  writing-mode: vertical-rl; display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 7px; border: 1px solid var(--glass-border); border-right: 0; border-radius: 12px 0 0 12px;
  background: var(--acao); color: var(--acao-texto); font: 600 12.5px/1 var(--font); letter-spacing: .02em;
  box-shadow: var(--shadow); cursor: pointer; opacity: .92; transition: opacity .15s var(--ease), padding .15s var(--ease);
}
.feedback-botao .i { transform: rotate(90deg); }
.feedback-botao:hover { opacity: 1; padding-right: 10px; }
.feedback-botao:focus-visible { outline: none; box-shadow: var(--focus); }
.feedback-botao:disabled { opacity: .6; cursor: progress; }
.fb-captura { margin: 12px 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--sep); }
.fb-captura img { display: block; width: 100%; max-height: 240px; object-fit: cover; object-position: top; }
.fb-captura-rodape { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-sunken); }
.fb-captura-rodape .subtle { flex: 1; display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; }
.fb-botoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fb-anexar { cursor: pointer; }
.fb-dica { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; margin-top: 8px; }
.fb-item { margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.fb-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-topo .subtle { flex: 1; }
.fb-texto { white-space: pre-wrap; margin: 0; }
.fb-imagens { display: flex; gap: 10px; flex-wrap: wrap; }
.fb-imagens:empty { display: none; }
.fb-miniatura { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.fb-miniatura img { width: 180px; height: 120px; object-fit: cover; object-position: top; border-radius: var(--r-sm); border: 1px solid var(--sep); }
.fb-contexto { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; margin: 10px 0 0; font-size: 13px; }
.fb-contexto dt { color: var(--text-2); }
.fb-contexto dd { margin: 0; word-break: break-word; }
@media print { .feedback-botao { display: none !important; } }
html.nativo .feedback-botao { top: auto; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: none; }
html.nativo.barra-sistema .feedback-botao { display: none; }  /* no app 2.0, o feedback fica no menu nativo */

/* ---------------------------------------------------------------- App iOS (html.nativo)
   O app fornece barra de abas, menu e botão de voltar nativos (Liquid Glass): a web esconde os seus. */

html.nativo { --topbar-h: 0px; --barra-nativa: 58px; }
html.nativo.barra-sistema { --barra-nativa: 0px; }  /* env(safe-area-inset-top) já inclui a barra do sistema */
/* Sob a barra do sistema, a saudação fica a ~16px dos botões: o mesmo respiro entre os cartões
   (a área segura já termina um pouco abaixo deles; o app só desfoca a borda depois de rolar). */
html.nativo.barra-sistema .page { padding-top: 0; }
html.nativo.barra-sistema .hero { margin-top: 0; }
html.nativo .topbar, html.nativo .skip, html.nativo .theme-toggle { display: none !important; }
html.nativo body { padding-top: calc(env(safe-area-inset-top) + var(--barra-nativa)); }
html.nativo .page { padding-bottom: calc(env(safe-area-inset-bottom) + 32px); }
html.nativo .chat { height: calc(100dvh - env(safe-area-inset-top) - var(--barra-nativa)); }
html.nativo #toast-root { top: calc(env(safe-area-inset-top) + var(--barra-nativa) + 8px); }
html.nativo .trilha { display: none; }  /* o botão voltar nativo cumpre esse papel */
html.nativo .entrar { min-height: calc(100dvh - env(safe-area-inset-top) - var(--barra-nativa) - env(safe-area-inset-bottom) - 40px); }
.entrar-app-botao { width: 100%; justify-content: center; min-height: 48px; font-size: 16px; }

/* ---------------------------------------------------------------- Ajustes para celular */

.duas-colunas > * { min-width: 0; }  /* colunas encolhem com a tela, em vez de passar da borda */
@media (max-width: 560px) {
  .linha-membro { flex-wrap: wrap; align-items: flex-start; }
  .linha-membro .linha-corpo { flex: 1 1 calc(100% - 60px); }
  .linha-membro .acoes-membro { width: 100%; padding-left: 54px; justify-content: flex-start; }
  .fb-topo .subtle { order: 3; flex-basis: 100%; }
  .fb-topo select { margin-left: auto; }
  .integracao { flex-wrap: wrap; }
  .integracao > div { flex: 1 1 calc(100% - 60px); }
  .integracao .btn { margin-left: 54px; }
  .producao { flex-wrap: wrap; }
  .producao-corpo { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  body::before, .topbar, .ata-barra, #toast-root, #overlay-root, .voltar, .nao-imprimir { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .papel { box-shadow: none; max-width: none; min-height: 0; padding: 0; border-radius: 0; }
  @page { size: A4; margin: 2.2cm 2cm 2cm 3cm; }
}

/* ---------------------------------------------------------------- Política de Privacidade */
.politica-texto h2 { font-size: 1.05rem; margin: 22px 0 8px; }
.politica-texto h2:first-child { margin-top: 0; }
.politica-texto p, .politica-texto li { line-height: 1.6; }
.politica-texto p + p { margin-top: 8px; }
.politica-texto ul { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.politica .aviso { margin-bottom: 16px; }
.politica-aceite {
  position: sticky; bottom: 16px; z-index: 5;
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 18px; padding: 12px; border-radius: 999px;
}
.entrar-ou { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text-3); font-size: .85rem; }
.entrar-ou::before, .entrar-ou::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .25; }
