/* =====================================================================
   Aki · Vidro + Bento (redesign aprovado em 2026-10-03)
   Camada carregada DEPOIS de style.css: vidro do iOS 26 (fundo com luz
   dourada, superfícies translúcidas, barra de abas flutuante com marcador
   que desliza) + telas principais em blocos (bento).
   Protótipo de referência: ~/comp/aki-redesign/index.html (modelos A e B).
   ===================================================================== */
:root {
  --plano: #07070a;
  --vidro: rgb(var(--veu) / 0.055);
  --vidro-2: rgb(var(--veu) / 0.09);
  --vidro-3: rgb(var(--veu) / 0.13);
  --vidro-brilho: rgb(var(--veu) / 0.12);
  --vidro-sombra: 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  --ouro: #fbc560;
  --ouro-rgb: 251, 197, 96;
  --ouro-luz: #e6d3a6;
  --ouro-metal: linear-gradient(115deg, var(--ouro-luz), var(--ouro) 70%, var(--ouro-2));
  --acento: var(--ouro-2);
  --acento-claro: var(--ouro);
  --acento-escuro: #705020;
  --ouro-2: #9b743b;
  --ouro-tinta: #1b1204;
  --raio: 16px;
  --raio-g: 24px;
  --mola-vidro: cubic-bezier(.3, 1.35, .5, 1);
  /* Tema: o claro (css/claro.css) troca só estes valores. */
  --veu: 255 255 255;
  --vidro-grad: linear-gradient(160deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03) 58%);
  --vidro-barra: linear-gradient(160deg, rgba(40, 38, 35, 0.86), rgba(16, 16, 18, 0.82));
  --ouro-texto: var(--ouro);
  --tinta-forte: #fff;
  /* Cores-base antigas (marrons, bordas douradas) viram neutras: tudo que ainda usa
     superfície/borda do style.css passa a combinar com o vidro sem mexer em cada tela. */
  --superficie: #141416;
  --superficie-2: #1c1c1f;
  --superficie-3: #26262a;
  --hairline: rgb(var(--veu) / 0.07);
  --borda: rgb(var(--veu) / 0.075);
  --borda-forte: rgb(var(--veu) / 0.14);
  --trilha: #2a2a2e;
  --acento-tinto: rgba(var(--ouro-rgb), 0.14);
}

/* ---------- fundo: luz dourada que se move devagar ---------- */
html { background: var(--plano); }
/* O body fica transparente: com fundo próprio ele cobriria a camada de luz (z-index -1). */
body { background: transparent; }
body::before {
  content: ''; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(30% 24% at 28% 22%, rgba(226, 156, 40, 0.42), transparent 70%),
    radial-gradient(28% 24% at 80% 34%, rgba(118, 76, 196, 0.22), transparent 70%),
    radial-gradient(36% 28% at 42% 78%, rgba(236, 184, 84, 0.20), transparent 70%);
  animation: vidro-deriva 26s ease-in-out infinite alternate;
}
@keyframes vidro-deriva { to { transform: translate3d(3%, -2%, 0) rotate(5deg) scale(1.05); } }

/* ---------- superfícies de vidro ---------- */
.cartao, .vidro {
  background: var(--vidro-grad);
  border: 0;
  border-radius: var(--raio-g);
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.045), var(--vidro-sombra);
}
@media (any-hover: hover) { .cartao-clique:hover { box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgba(240, 199, 94, 0.22), var(--vidro-sombra); } }

/* ---------- topo: transparente; vira vidro quando o título grande sai de vista ---------- */
.topo {
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background .25s, border-color .25s;
}
.topo.topo-compacto {
  background: rgba(10, 10, 12, 0.62); border-bottom-color: rgb(var(--veu) / 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
}
.topo-marca > div { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.topo-logo { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(var(--veu) / 0.12), 0 6px 18px -6px rgba(226, 156, 40, 0.6); }
.topo .botao-icone {
  width: 40px; height: 40px; min-width: 40px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%;
  background: var(--vidro-2); color: var(--tinta);
  box-shadow: inset 0 1px 0 var(--vidro-brilho);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.topo .botao-icone + .botao-icone { margin-left: 8px; }

/* ---------- título grande no lugar do bloco de apresentação ---------- */
.pagina-hero {
  background: none; border: 0; box-shadow: none; min-height: 0;
  padding: 4px 4px 2px; margin-bottom: 16px; align-items: flex-end; overflow: visible;
}
.pagina-hero::after, .pagina-hero-icone { display: none; }
.pagina-hero-sobre {
  color: var(--tinta-2) !important; font-size: 13px !important; font-weight: 550;
  letter-spacing: 0; text-transform: none;
}
.pagina-hero h2 { margin: 2px 0 4px; font-size: clamp(32px, 6vw, 40px); font-weight: 780; letter-spacing: -0.035em; line-height: 1.05; }
.pagina-hero-texto > p:last-child { font-size: 13.5px; }
@media (max-width: 767px) { .pagina-hero-texto > p:last-child:not(:first-child):not(.pagina-hero-sobre) { display: none; } }
.pagina-hero-acoes .botao { border-radius: 999px; min-height: 40px; }

/* O título recebe foco ao trocar de tela (leitor de tela); o contorno não precisa aparecer. */
.conteudo h2[tabindex="-1"]:focus, .conteudo h2[tabindex="-1"]:focus-visible { outline: none; }

/* ---------- botões ---------- */
.botao {
  border-radius: 14px;
  background: var(--ouro-metal);
  color: var(--ouro-tinta);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 26px -10px rgba(230, 160, 40, 0.75);
}
.botao-fantasma, .botao-perigo.botao-fantasma {
  background: var(--vidro-2); color: var(--tinta); border: 0;
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.05);
}
@media (any-hover: hover) {
  .botao:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 30px -10px rgba(230, 160, 40, 0.9); }
  .botao-fantasma:hover { background: var(--vidro-3); box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.08); }
}
.botao-perigo { background: linear-gradient(180deg, #e35d5d, var(--critico)); color: #fff; }

/* ---------- pílulas: vidro; a ativa ganha ouro só no texto e num véu ---------- */
.pilula {
  background: var(--vidro); border: 0; color: var(--tinta-2);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.08), inset 0 0 0 1px rgb(var(--veu) / 0.04);
}
.pilula.ativa {
  background: rgba(var(--ouro-rgb), 0.16); color: var(--ouro-texto); font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(var(--ouro-rgb), 0.28);
}

/* ---------- campos ---------- */
input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="time"],
input[type="password"], input[type="search"], select, textarea {
  background: rgb(var(--veu) / 0.06); border-color: rgb(var(--veu) / 0.08); border-radius: 14px;
}
input:focus, select:focus, textarea:focus { background: rgb(var(--veu) / 0.09); border-color: rgba(var(--ouro-rgb), 0.6); }

/* ---------- barra de abas flutuante (vidro) com marcador que desliza ---------- */
.nav-inferior {
  background: var(--vidro-barra);
  -webkit-backdrop-filter: blur(28px) saturate(1.9); backdrop-filter: blur(28px) saturate(1.9);
  border: 0;
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.16), inset 0 0 0 1px rgb(var(--veu) / 0.06), 0 18px 42px -14px rgba(0, 0, 0, 0.85);
}
@media (max-width: 767px) and (orientation: portrait) {
  .nav-inferior { border-radius: 999px; padding: 6px; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); }
  .nav-item { padding: 6px 0 5px; }
  .nav-item .nav-icone { padding: 2px 10px; }
}
.nav-item { position: relative; z-index: 1; }
.nav-item .nav-icone { opacity: .75; }
.nav-item.ativo { color: var(--ouro-texto); }
.nav-item.ativo .nav-icone { background: none; opacity: 1; }
.nav-marcador {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 999px;
  background: rgb(var(--veu) / 0.11);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.16), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  transition: transform .5s var(--mola-vidro), width .5s var(--mola-vidro), height .5s var(--mola-vidro), opacity .2s;
}
/* Tablet/computador e iPhone deitado: a barra lateral vira um painel de vidro só, sem quadrado em cada ícone. */
@media (min-width: 768px), (min-width: 568px) and (max-width: 767px) and (orientation: landscape) {
  .nav-inferior { border-radius: 24px; padding: 8px 6px; }
  .nav-item .nav-icone, .nav-item.ativo .nav-icone {
    background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  @media (any-hover: hover) { .nav-item:hover .nav-icone, .nav-item.ativo:hover .nav-icone { background: none; } .nav-item:hover { color: var(--tinta); } }
  .nav-marcador { border-radius: 16px; }
}

/* =====================================================================
   BENTO — Início
   ===================================================================== */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); } .bento .bento-largo { grid-column: span 2; } }
.bento-bloco {
  position: relative; overflow: hidden; min-width: 0; padding: 16px; text-align: left; font: inherit; color: var(--tinta);
  border-radius: var(--raio-g);
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.045), var(--vidro-sombra);
  border: 0;
}
button.bento-bloco { cursor: pointer; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; transition: transform .2s var(--mola-vidro); }
.bento-bloco.bento-voz { flex-direction: row; align-items: center; }
button.bento-bloco:active { transform: scale(.97); }
.bento-largo { grid-column: span 2; }
.bento-mini { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 620; color: var(--tinta-2); }
.bento-mini .icone { width: 15px; height: 15px; }
.bento-numero { display: block; margin-top: 14px; font-size: 44px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.bento-numero small { margin-left: 4px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--tinta-2); }
.bento-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--tinta-2); }
.bento-titulo { display: block; margin-top: 16px; font-size: 17px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
/* bloco de destaque (próximo passo): o único ouro cheio da tela */
.bento-destaque {
  min-height: 150px; padding: 18px 18px 20px; color: var(--ouro-tinta);
  background: var(--ouro-metal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 18px 40px -16px rgba(230, 160, 40, 0.75);
}
.bento-destaque .bento-mini { color: rgba(27, 18, 4, 0.66); }
.bento-destaque h2 { margin: 10px 0 4px; max-width: 78%; font-size: 25px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; color: inherit; }
.bento-destaque p { margin: 0; max-width: 76%; font-size: 13.5px; color: rgba(27, 18, 4, 0.72); }
.bento-destaque::before { content: ''; position: absolute; right: -36px; top: -36px; width: 160px; height: 160px; border-radius: 50%; border: 24px solid rgba(255, 255, 255, 0.2); }
.bento-ir { position: absolute; right: 16px; bottom: 16px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #1b1204; color: var(--ouro-texto); }
/* anel de aproveitamento */
.bento-anel { position: relative; display: block; width: 88px; height: 88px; margin: 10px auto 0; }
.bento-anel svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.bento-anel circle { fill: none; stroke-width: 9; }
.bento-anel .trilha { stroke: rgb(var(--veu) / 0.08); }
.bento-anel .valor { stroke: var(--ouro); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.bento-anel b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }
/* mapa dos últimos 14 dias */
.bento-mapa { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.bento-mapa i { aspect-ratio: 1; border-radius: 4px; background: rgb(var(--veu) / 0.07); }
.bento-mapa i[data-n="1"] { background: rgba(var(--ouro-rgb), 0.35); }
.bento-mapa i[data-n="2"] { background: rgba(var(--ouro-rgb), 0.65); }
.bento-mapa i[data-n="3"] { background: var(--ouro); }
.bento-mapa i.hoje { outline: 2px solid var(--ouro); outline-offset: 1px; }
/* falar com o Aki */
.bento-voz { display: flex; align-items: center; gap: 14px; }
.bento-onda { display: flex; align-items: center; gap: 3px; height: 34px; flex: 0 0 auto; }
.bento-onda i { width: 4px; border-radius: 3px; background: var(--ouro); animation: bento-onda 1.2s ease-in-out infinite; }
@keyframes bento-onda { 50% { transform: scaleY(.35); } }
.bento-voz strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.bento-icone { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 20px; border-radius: 13px; background: var(--vidro-2); color: var(--tinta); }
.bento-secao { margin: 22px 4px 10px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; display: flex; justify-content: space-between; align-items: baseline; }
.bento-secao button { border: 0; background: none; color: var(--ouro-texto); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; }
.bento-temas { padding: 16px; }

@media (prefers-reduced-motion: reduce) {
  body::before, .bento-onda i { animation: none !important; }
  .nav-marcador, .bento-anel .valor { transition: none !important; }
}
.nav-item.ativo-pai { color: var(--ouro-texto); }
.nav-item.ativo-pai .nav-icone { opacity: 1; }

/* =====================================================================
   BENTO — Questões
   ===================================================================== */
.bento > .cartao { margin: 0; }
.bento-icone-ouro { background: var(--ouro-metal); color: var(--ouro-tinta); }
.conteudo > .linha-entre > h3 { margin: 10px 4px 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--tinta); }
.banco-busca {
  background: var(--vidro-2); border: 0; border-radius: 999px;
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.05);
}
.banco-busca input[type="search"], .banco-busca input[type="search"]:focus { background: transparent; border: 0; box-shadow: none; }
.quiz-montar-resumo { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--tinta); }

/* =====================================================================
   IA — esfera, campo de pergunta e ferramentas em blocos
   ===================================================================== */
.ia-inicio { display: grid; justify-items: center; gap: 14px; padding: 8px 0 6px; }
.ia-gota { width: 104px; height: 104px; margin: 26px 0 18px; }
.ia-inicio-titulo { margin: 0; font-size: 25px; font-weight: 750; letter-spacing: -0.025em; }
.ia-perguntar {
  width: 100%; display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 18px; border-radius: 28px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.05), var(--vidro-sombra);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.ia-perguntar:focus-within { box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgba(var(--ouro-rgb), 0.45), var(--vidro-sombra); }
.ia-perguntar textarea.ia-perguntar-campo, .ia-perguntar textarea.ia-perguntar-campo:focus {
  flex: 1; min-width: 0; min-height: 44px; max-height: 140px; margin: 0; padding: 11px 0; resize: none; field-sizing: content;
  background: transparent; border: 0; box-shadow: none; font-size: 16px; line-height: 1.4;
}
@media (max-width: 360px) {
  .ia-perguntar { align-items: center; }
  .ia-perguntar textarea.ia-perguntar-campo { min-height: 68px; }
}
.ia-perguntar > button { flex: 0 0 auto; }
.ia-perguntar-enviar {
  width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--ouro-metal); color: var(--ouro-tinta);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 20px -8px rgba(230, 160, 40, 0.8);
  transition: transform .2s var(--mola-vidro);
}
.ia-perguntar-enviar:active { transform: scale(.92); }
.ia-sugestoes { display: flex; gap: 8px; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ia-sugestoes::-webkit-scrollbar { display: none; }
.ia-sugestoes .pilula { white-space: nowrap; }
.ia-ferramentas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .ia-ferramentas { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.bento-bloco.ia-ferramenta { min-height: 128px; padding: 14px 12px; gap: 3px; }
.ia-ferramenta .bento-icone { width: 38px; height: 38px; margin-bottom: auto; }
.ia-ferramenta strong { margin-top: 14px; font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.ia-ferramenta small { font-size: 11.5px; color: var(--tinta-2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ia-rodape-nota { margin: 22px 8px 6px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--tinta-mudo); }
@media (max-width: 380px) { .ia-ferramentas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ia-inicio .ia-inicio-titulo { text-transform: none; color: var(--tinta); letter-spacing: -0.025em; font-size: 25px; }
@media (max-width: 599px) {
  .bento-bloco.ia-ferramenta { min-height: 104px; justify-content: space-between; }
  .ia-ferramenta small { display: none; }
  .ia-ferramenta strong { margin-top: 12px; }
}

/* =====================================================================
   CHAT — balões, cabeçalho, avisos e campo de digitação no vidro
   ===================================================================== */
.mensagem { border-radius: 22px; }
.mensagem.usuario {
  background: var(--ouro-metal); color: var(--ouro-tinta);
  border-bottom-right-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 24px -14px rgba(230, 160, 40, 0.8);
}
.mensagem.usuario a { color: inherit; }
.mensagem.assistente {
  border: 0; border-bottom-left-radius: 8px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.045), var(--vidro-sombra);
}
/* Negrito em branco forte: o dourado fica para ações e progresso. */
.mensagem.assistente strong, .ia-lab-resultado strong { color: var(--tinta-forte); font-weight: 720; }
.mensagem.assistente :is(h1, h2, h3, h4, h5, h6) { color: var(--tinta); }
.mensagem.assistente code { background: rgb(var(--veu) / 0.08); border: 0; }
.mensagem.assistente pre { background: rgba(0, 0, 0, 0.35); border: 0; border-radius: 14px; }
.chat-resposta-meta, .chat-parcial-aviso { border-top-color: rgb(var(--veu) / 0.07); }
.msg-ouvir {
  border: 0; padding: 5px 12px; background: var(--vidro-2); color: var(--tinta-2);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.08);
}
.msg-ouvir.lendo { color: var(--ouro-texto); background: rgba(var(--ouro-rgb), 0.16); }
.chat-cabecalho, .chat-memoria-ref, .chat-anexo-preview, .chat-historico-item {
  border: 0; border-radius: 20px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.04);
}
.chat-historico-item.ativo { box-shadow: inset 0 0 0 1px rgba(var(--ouro-rgb), 0.4); background: rgba(var(--ouro-rgb), 0.1); }
.chat-memoria-ref-icone { background: var(--vidro-2); color: var(--ouro-texto); border-radius: 12px; }
.chat-acao { border-radius: 999px; }
.chat-web-toggle { border: 0; border-radius: 999px; background: var(--vidro-2); box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.08); }
.chat-web-toggle.ligado { color: var(--ouro-texto); background: rgba(var(--ouro-rgb), 0.16); box-shadow: inset 0 0 0 1px rgba(var(--ouro-rgb), 0.3); }
.aviso {
  border: 0; border-radius: 18px; color: var(--tinta-2);
  background: rgba(var(--ouro-rgb), 0.07); box-shadow: inset 0 0 0 1px rgba(var(--ouro-rgb), 0.16);
}
/* Campo de digitação: uma cápsula de vidro com botões redondos e envio dourado. */
.chat-entrada {
  align-items: flex-end; gap: 4px; margin: 10px 0 8px; padding: 6px;
  border-radius: 28px;
  background: var(--vidro-barra);
  -webkit-backdrop-filter: blur(26px) saturate(1.8); backdrop-filter: blur(26px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.14), inset 0 0 0 1px rgb(var(--veu) / 0.05), 0 14px 34px -16px rgba(0, 0, 0, 0.85);
}
.chat-entrada:focus-within { box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.14), inset 0 0 0 1px rgba(var(--ouro-rgb), 0.42), 0 14px 34px -16px rgba(0, 0, 0, 0.85); }
.iamac-compositor .chat-entrada.iamac-entrada {
  padding: 6px; margin-bottom: 8px;
  background: var(--vidro-barra);
}
.chat-entrada textarea, .chat-entrada textarea:focus {
  min-height: 44px; padding: 11px 8px 11px 12px; resize: none;
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
}
.chat-entrada .chat-anexo-acoes { gap: 2px; }
.chat-entrada .chat-anexo-btn, .chat-entrada .botao-icone, .chat-entrada .botao-fantasma:not(.chat-enviar) {
  width: 40px; height: 44px; min-width: 40px; min-height: 44px; padding: 0; border-radius: 50%;
  background: transparent; box-shadow: none; color: var(--tinta-2);
}
@media (any-hover: hover) { .chat-entrada .chat-anexo-btn:hover, .chat-entrada .botao-icone:hover { background: var(--vidro-2); color: var(--tinta); } }
.chat-entrada .chat-enviar {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  background: var(--ouro-metal); color: var(--ouro-tinta);
}
.chat-entrada .chat-enviar:disabled { opacity: 1; background: var(--vidro-2); color: var(--tinta-mudo); box-shadow: none; }

/* =====================================================================
   Títulos de seção e rótulos: frase normal (sem caixa alta espalhada)
   ===================================================================== */
h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--tinta); }
label.campo { font-size: 13px; font-weight: 620; letter-spacing: 0; text-transform: none; color: var(--tinta-2); }
.saudacao-data, .inicio-painel-sobre { letter-spacing: 0; text-transform: none; }

/* =====================================================================
   SIMULADO — alternativas, comentário e rodapé
   ===================================================================== */
.alternativa {
  border: 0; border-radius: 20px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.1), inset 0 0 0 1px rgb(var(--veu) / 0.045), 0 8px 22px -16px rgba(0, 0, 0, 0.7);
}
@media (any-hover: hover) { .alternativa:not(:disabled):hover { box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.12), inset 0 0 0 1px rgb(var(--veu) / 0.12); } }
.alternativa .letra { background: var(--vidro-2); border: 0; box-shadow: inset 0 0 0 1px rgb(var(--veu) / 0.1); color: var(--tinta); }
.alternativa.selecionada { background: rgba(var(--ouro-rgb), 0.12); box-shadow: inset 0 0 0 1.5px rgba(var(--ouro-rgb), 0.55); }
.alternativa.selecionada .letra { background: var(--ouro); color: var(--ouro-tinta); box-shadow: none; }
.alternativa.correta { background: rgba(52, 199, 89, 0.12); box-shadow: inset 0 0 0 1.5px rgba(52, 199, 89, 0.55); }
.alternativa.correta .letra { background: #34c759; color: #fff; box-shadow: none; }
.alternativa.errada { background: rgba(255, 69, 58, 0.11); box-shadow: inset 0 0 0 1.5px rgba(255, 69, 58, 0.5); }
.alternativa.errada .letra { background: #ff453a; color: #fff; box-shadow: none; }
.alternativa-riscar { border: 0; border-radius: 14px; }
.comentario {
  border-left: 0; border-radius: 20px; position: relative; padding-left: 20px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.1), inset 0 0 0 1px rgb(var(--veu) / 0.045);
}
.comentario::before { content: ''; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--ouro); }
.quiz-rodape { background: linear-gradient(180deg, transparent, rgba(7, 7, 10, 0.75) 45%); }
.quiz-rodape .botao { border-radius: 999px; }
.quiz-rodape .botao-fantasma { background: var(--vidro-2); }
.resultado-painel { border-radius: 20px; background: var(--vidro-2); }

/* =====================================================================
   JANELAS (modais) e Ajustes
   ===================================================================== */
.modal {
  border: 0; border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, rgba(34, 33, 31, 0.92), rgba(16, 16, 18, 0.94));
  -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.12), 0 -18px 50px rgba(0, 0, 0, 0.6);
}
.modal::before { background: rgba(255, 255, 255, 0.22); }
@media (min-width: 768px) { .modal { border-radius: 30px; } }
.aj-conta {
  border: 0; border-radius: 22px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.05);
}
.aj-conta-cab { border-bottom-color: rgb(var(--veu) / 0.07); }
.aj-conta-icone { border: 0; background: var(--vidro-2); }
.aj-conta-status { border: 0; background: var(--vidro-2); }
.quiz-montar > h3 { font-size: 13px; font-weight: 620; color: var(--tinta-2); }
/* Chaves de API: texto mascarado em vez de type=password (o Safari tratava os Ajustes como login). */
.campo-segredo { -webkit-text-security: disc; text-security: disc; font-family: inherit; }

/* Abas internas das páginas (Materiais, Consulta, IA…): pílulas de vidro; a ativa em véu dourado. */
.pagina-abas .pilula, .pagina-abas .pilula:hover {
  border: 0; border-radius: 999px; background: var(--vidro); color: var(--tinta-2);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.08), inset 0 0 0 1px rgb(var(--veu) / 0.05);
}
@media (any-hover: hover) { .pagina-abas .pilula:not(.ativa):hover { background: var(--vidro-2); color: var(--tinta); } }
.pagina-abas .pilula.ativa, .pagina-abas .pilula.ativa:hover {
  background: rgba(var(--ouro-rgb), 0.16); color: var(--ouro-texto); font-weight: 680;
  box-shadow: inset 0 0 0 1px rgba(var(--ouro-rgb), 0.3);
}
.anamnese-recuperacao {
  border: 0; border-radius: 18px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.1), inset 0 0 0 1px rgb(var(--veu) / 0.045);
}
.anamnese-p2-barra {
  border: 0; border-radius: 20px;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.1), inset 0 0 0 1px rgb(var(--veu) / 0.045);
}
.clin-emergencia-aviso { border: 0; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.35); }

/* Listas soltas (calculadoras, protocolos…): viram um grupo de vidro, como nos Ajustes do iPhone. */
.conteudo :is(div, section):has(> .lista-item + .lista-item):not(.cartao, .bento-bloco, .modal *) {
  border-radius: 20px; padding: 0; overflow: hidden;
  background: var(--vidro-grad);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.09), inset 0 0 0 1px rgb(var(--veu) / 0.04);
}
.conteudo :is(div, section):has(> .lista-item + .lista-item):not(.cartao, .bento-bloco, .modal *) > .lista-item { padding-left: 16px; padding-right: 14px; border-radius: 0; }
.lista-item-selecionado, .lista-item-selecionado:is(.lista-item-botao, .crono-bloco-botao) {
  border-color: var(--hairline) !important; background: rgba(var(--ouro-rgb), 0.1) !important;
}
.lista-item-selecionado .lista-titulo { color: var(--ouro-texto); }
.ia-lab-voltar {
  border: 0; border-radius: 999px; padding: 9px 14px 9px 10px; font-size: 12.5px;
  background: var(--vidro-2); color: var(--tinta); box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.1);
}

/* =====================================================================
   LEITOR / CADERNO — barras flutuantes de vidro sobre a página
   ===================================================================== */
.leitor-topo, .leitor-ferramentas, .leitor-barra-extra, .leitor-lateral {
  border: 0;
  background: var(--vidro-barra);
  -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.14), inset 0 0 0 1px rgb(var(--veu) / 0.06), 0 14px 34px -12px rgba(0, 0, 0, 0.6);
}
.leitor-topo { border-radius: 22px; }
.leitor-ferramentas, .leitor-barra-extra, .leitor-lateral { border-radius: 20px; }
.leitor-ferr, .leitor-extra-btn {
  border: 0; background: rgb(var(--veu) / 0.06); box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.06);
}
.leitor-ferr { border-radius: 14px; }
.leitor-extra-btn { border-radius: 999px; }
.leitor-ferr-mais { background: transparent; box-shadow: inset 0 0 0 1px rgb(var(--veu) / 0.12); }
.leitor-ferr.ativa { background: var(--ouro-metal); color: var(--ouro-tinta); box-shadow: 0 6px 16px -6px rgba(230, 160, 40, 0.75); }
.leitor-extra-btn.ligado, .leitor-acoes .ligado, .leitor-lateral .botao-icone.ligado { background: rgba(var(--ouro-rgb), 0.16); color: var(--ouro-texto); }
.leitor-adesivo-toggle { border: 0; border-radius: 999px; background: rgba(var(--ouro-rgb), 0.14); color: var(--ouro-texto); }
.leitor-adesivo-toggle.revelado { background: rgb(var(--veu) / 0.06); color: var(--tinta-2); }
/* Janelas do leitor (Criar PDF, Documento, ferramentas). */
.leitor-opt-rot { font-size: 13px; font-weight: 620; letter-spacing: 0; text-transform: none; color: var(--tinta-2); }
.leitor-opt, .leitor-doc-acao, .leitor-menu-ferr-btn, .leitor-favoritar {
  border: 0; background: rgb(var(--veu) / 0.06);
  box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.07), inset 0 0 0 1px rgb(var(--veu) / 0.04);
}
.leitor-opt { border-radius: 999px; }
.leitor-doc-acao, .leitor-menu-ferr-btn, .leitor-favoritar { border-radius: 16px; }
.leitor-opt.ativa, .leitor-menu-ferr-btn.ativo, .leitor-doc-acao.destaque {
  background: rgba(var(--ouro-rgb), 0.15); color: var(--ouro-texto); box-shadow: inset 0 0 0 1px rgba(var(--ouro-rgb), 0.3);
}
/* Barra de abas: um pouco mais escura, para não ficar cinza-clara sobre páginas brancas. */
.nav-inferior { background: var(--vidro-barra); }

/* =====================================================================
   TELA DE ENTRADA (login obrigatório) e conta aguardando aprovação
   ===================================================================== */
body.sem-sessao > .topo, body.sem-sessao > .nav-inferior, body.sem-sessao > #conteudo, body.sem-sessao > .pular-conteudo { display: none !important; }
body.sem-sessao { padding-bottom: 0; }
.tela-entrada {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
}
.entrada-conteudo { width: min(420px, 100%); display: grid; justify-items: center; gap: 10px; animation: ia-entrar .6s var(--mola) backwards; }
.entrada-gota { width: 108px; height: 108px; margin: 18px 0 14px; cursor: default; pointer-events: none; }
.entrada-titulo { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.entrada-sub { margin: 4px 0 14px; text-align: center; color: var(--tinta-2); font-size: 15px; line-height: 1.5; max-width: 340px; }
.entrada-cartao {
  width: 100%; display: grid; gap: 12px; padding: 18px; border-radius: 28px;
  background: var(--vidro-grad);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 1px 0 var(--vidro-brilho), inset 0 0 0 1px rgb(var(--veu) / 0.05), 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}
.entrada-abas { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); }
.entrada-abas[hidden] { display: none; }
.entrada-abas button { border: 0; background: none; height: 38px; border-radius: 999px; color: var(--tinta-2); font: inherit; font-weight: 650; cursor: pointer; transition: background .25s, color .25s; }
.entrada-abas button[aria-selected="true"] { background: var(--vidro-3); color: var(--tinta); box-shadow: inset 0 1px 0 rgb(var(--veu) / 0.12); }
.entrada-rotulo { display: grid; gap: 6px; font-size: 13px; font-weight: 620; color: var(--tinta-2); }
.entrada-rotulo[hidden] { display: none; }
.entrada-rotulo input { margin: 0; font-size: 16px; }
.entrada-campo-senha { position: relative; }
.entrada-campo-senha input { padding-right: 78px; }
.entrada-mostrar { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ouro-texto); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; padding: 6px; }
.botao.entrada-principal { width: 100%; height: 50px; border-radius: 999px; font-size: 16px; margin-top: 2px; }
.entrada-mensagem { margin: 0; min-height: 0; font-size: 13px; line-height: 1.45; color: var(--tinta-2); text-align: center; }
.entrada-mensagem:empty { display: none; }
.entrada-mensagem.erro { color: #ff8a80; }
.entrada-mensagem.ok { color: #7ee2a8; }
.entrada-link { justify-self: center; border: 0; background: none; color: var(--tinta-2); font: inherit; font-size: 14px; cursor: pointer; padding: 6px; }
.entrada-link:hover { color: var(--tinta); }
.entrada-link[hidden] { display: none; }
.entrada-externos { display: grid; gap: 10px; }
.entrada-externos[hidden] { display: none; }
.entrada-ou { display: flex; align-items: center; gap: 10px; color: var(--tinta-mudo); font-size: 12.5px; }
.entrada-ou::before, .entrada-ou::after { content: ''; flex: 1; height: 1px; background: rgb(var(--veu) / 0.1); }
.entrada-externo {
  height: 50px; border: 0; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 650; font-size: 15.5px; cursor: pointer;
}
.entrada-externo.apple { background: #fff; color: #000; }
.entrada-externo.google { background: rgb(var(--veu) / 0.1); color: var(--tinta); box-shadow: inset 0 0 0 1px rgb(var(--veu) / 0.12); }
.entrada-logo { display: grid; place-items: center; }
.entrada-texto { margin: 0; font-size: 15px; line-height: 1.55; text-align: center; }
.entrada-rodape { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12.5px; color: var(--tinta-mudo); text-align: center; }
.entrada-nova-senha { display: grid; gap: 10px; }
.entrada-nova-senha input { margin: 0; }
/* Ajustes e Admin */
.aj-excluir-conta { display: block; margin: 14px auto 2px; border: 0; background: none; color: #ff8a80; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.admin-selo.pendente { background: rgba(var(--ouro-rgb), 0.16); color: var(--ouro-texto); }
.admin-usuario.pendente { box-shadow: inset 0 0 0 1.5px rgba(var(--ouro-rgb), 0.4); }
.admin-aprovacao { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(var(--ouro-rgb), 0.08); }
.admin-aprovacao p { flex: 1 1 200px; margin: 0; font-size: 13.5px; color: var(--tinta-2); }
.admin-aprovacao .botao { border-radius: 999px; min-height: 38px; }
@media (prefers-reduced-motion: reduce) { .entrada-conteudo { animation: none; } }
.entrada-rodape { display: block; }
.entrada-rodape .icone { margin-right: 6px; vertical-align: -2px; }
/* Ajustes → Aparência */
.aj-tema { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 999px; background: var(--vidro-2); }
.aj-tema button { border: 0; background: none; height: 38px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 620; color: var(--tinta-2); cursor: pointer; transition: background .25s, color .25s; }
.aj-tema button[aria-checked="true"] { background: var(--vidro-3); color: var(--tinta); box-shadow: inset 0 1px 0 var(--vidro-brilho); }
html[data-tema="claro"] .aj-tema button[aria-checked="true"] { background: #fff; box-shadow: 0 2px 8px -4px rgba(70, 52, 18, 0.35); }
.aj-conta-status { color: var(--tinta-2); }
