/* Base visual do IACorp: o que vale para todas as telas sem precisar repetir classe. As cores vêm de js/tema.js. */
:root {
  --menu-largura: 15.5rem;
  --marca: #4650DC;
  --marca-anel: rgb(70 80 220 / 0.2);
  --borda: #E1E4ED;
  --borda-forte: #CBD0DE;
  --abas-altura: 3.75rem;
}
html.menu-recolhido { --menu-largura: 4.25rem; }

[x-cloak] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-feature-settings: "ss01"; }
h1, h2, h3, .font-titulo { font-family: "Bricolage Grotesque", Geist, ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.012em; }
main h1 { letter-spacing: -0.022em; }
td, th, .tabular { font-variant-numeric: tabular-nums; }

/* rede de proteção no celular: nada empurra a página para o lado (tabelas largas rolam dentro do próprio quadro) */
main { overflow-x: clip; }
main :where(p, li, td, dd, label, h1, h2, h3, summary) { overflow-wrap: anywhere; }

/* campos */
:where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=hidden]), select, textarea) {
  background-color: #fff;
  border-color: var(--borda-forte);
  transition: border-color .12s ease, box-shadow .12s ease;
}
:where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=hidden]), select, textarea):hover { border-color: #7F88A0; }
input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=hidden]):focus,
select:focus, textarea:focus { outline: 0; border-color: var(--marca); box-shadow: 0 0 0 3px var(--marca-anel); }
::placeholder { color: #7F88A0; opacity: 1; }
select:not([multiple]) {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6780' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .55rem center; background-size: 1rem;
  padding-right: 2rem;
}
input[type=checkbox], input[type=radio] { accent-color: var(--marca); width: 1rem; height: 1rem; }
input[type=file] { font-size: .875rem; }
input[type=file]::file-selector-button {
  font: inherit; color: #3A4158; background: #fff; border: 1px solid var(--borda-forte); border-radius: .5625rem;
  padding: .3rem .7rem; margin-right: .6rem; cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: #F6F7FB; }

/* foco por teclado e movimento reduzido */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; border-radius: .375rem; }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

summary { cursor: pointer; }
pre { border-radius: .5625rem; }
::selection { background: #C8CFFB; }

/* tabelas com a mesma cara em todas as telas */
main table thead th { font-weight: 600; color: #5F6780; }

/* menu lateral */
.nav-icon { width: 1.1rem; height: 1.1rem; flex: none; }
.menu-lateral { width: var(--menu-largura); transition: width .16s ease; background: #10132B; color: #BCC2D6; }
.conteudo-app { transition: padding-left .16s ease; }
@media (min-width: 1024px) { .conteudo-app { padding-left: var(--menu-largura); } }
.menu-item { display: flex; align-items: center; gap: .7rem; padding: .38rem .65rem; border-radius: .5625rem; font-size: .875rem; color: #BCC2D6; transition: background-color .1s ease, color .1s ease; white-space: nowrap; }
.menu-item:hover { background: rgb(255 255 255 / .06); color: #fff; }
.menu-item[aria-current=page] { background: #4650DC; color: #fff; }
.menu-grupo { font-size: .75rem; color: #7F88A0; padding: .8rem .65rem .25rem; white-space: nowrap; }
.menu-contador { margin-left: auto; min-width: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: rgb(255 255 255 / .12); color: #fff; font-size: .6875rem; font-weight: 600; line-height: 1.25rem; text-align: center; font-variant-numeric: tabular-nums; }
.menu-decidir { background: #FBBF24; color: #10132B; font-weight: 600; }
.menu-decidir:hover { background: #FCD34D; color: #10132B; }
.menu-decidir[aria-current=page] { background: #FBBF24; color: #10132B; box-shadow: 0 0 0 2px #10132B, 0 0 0 4px #FBBF24; }
.menu-decidir .menu-contador { background: #10132B; color: #FCD34D; }
html.menu-recolhido .menu-rotulo { display: none; }
html.menu-recolhido .menu-item { justify-content: center; padding-left: 0; padding-right: 0; position: relative; }
html.menu-recolhido .menu-grupo { height: .5rem; padding: 0; margin: .55rem .65rem; border-top: 1px solid rgb(255 255 255 / .08); font-size: 0; }
html.menu-recolhido .menu-contador { position: absolute; top: -.1rem; right: .35rem; min-width: 1rem; line-height: 1rem; padding: 0 .2rem; font-size: .5625rem; }
html.menu-recolhido .so-aberto { display: none; }
html:not(.menu-recolhido) .so-recolhido { display: none; }
.menu-rolagem { scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .16) transparent; }

/* menu inferior (celular e app instalado) */
.abas-inferior { height: calc(var(--abas-altura) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
.aba { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; flex: 1 1 0; min-width: 0; font-size: .6875rem; line-height: 1; color: #5F6780; -webkit-tap-highlight-color: transparent; }
.aba svg { width: 1.4rem; height: 1.4rem; }
.aba[aria-current=page], .aba[aria-expanded=true] { color: #4650DC; font-weight: 600; }
.aba[aria-current=page]::before { content: ""; position: absolute; top: 0; width: 1.75rem; height: 2px; border-radius: 0 0 2px 2px; background: #4650DC; }
.aba-contador { position: absolute; top: .3rem; left: calc(50% + .3rem); min-width: 1.05rem; padding: 0 .25rem; border-radius: 999px; background: #FBBF24; color: #10132B; font-size: .625rem; font-weight: 700; line-height: 1.05rem; text-align: center; }
@media (max-width: 1023.98px) { .tem-abas { padding-bottom: calc(var(--abas-altura) + env(safe-area-inset-bottom)); } }

/* janela de confirmação */
dialog.confirmar { border: 0; border-radius: 1.125rem; padding: 0; width: min(26rem, calc(100vw - 2rem)); box-shadow: 0 28px 64px -18px rgb(23 27 52 / .38); color: #272D44; }
dialog.confirmar::backdrop { background: rgb(16 19 43 / .5); }

/* perfil Leitor: só consulta; o que grava nem aparece (o servidor recusaria de qualquer forma) */
body.so-leitura main form[method=post] { display: none; }
