/* Console do gestor. A cor da marca vem de /marca/tema.css (--marca e --marca-texto). */
:root {
  --fundo: #f4f7fb;
  --superficie: #ffffff;
  --texto: #0b1f3a;
  --texto-discreto: #5b6b82;
  --borda: #c9d4e3;
  --foco: #2f6bff;
  --erro-fundo: #fdecec;
  --erro-texto: #8a1c1c;
  --ok-fundo: #e8f5ee;
  --ok-texto: #14532d;
  --perigo: #b42318;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0d1522;
    --superficie: #152033;
    --texto: #eaf1fb;
    --texto-discreto: #9fb3cc;
    --borda: #34445c;
    --foco: #7fa6ff;
    --erro-fundo: #3a1515;
    --erro-texto: #ffc9c9;
    --ok-fundo: #12301f;
    --ok-texto: #b8f0cd;
    --perigo: #ff8a80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background: var(--fundo);
  color: var(--texto);
}

a { color: var(--foco); }

:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }

.pular {
  position: absolute; left: -9999px; top: 0;
  background: var(--superficie); color: var(--texto); padding: .5rem 1rem;
}
.pular:focus { left: 1rem; z-index: 10; }

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.topo {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem;
  padding: .75rem 1.25rem;
  background: var(--superficie);
  border-top: 6px solid var(--marca);
  border-bottom: 1px solid var(--borda);
}
.marca { display: flex; align-items: center; gap: .75rem; }
.logo { height: 38px; width: auto; }
.nome-console { font-weight: 600; color: var(--texto-discreto); }
.topo nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; flex: 1; }
.topo nav a { text-decoration: none; padding: .25rem 0; color: var(--texto); }
.topo nav a[aria-current="page"] { border-bottom: 3px solid var(--marca); font-weight: 600; }
.sair { display: flex; align-items: center; gap: .5rem; margin: 0; }
.quem { color: var(--texto-discreto); font-size: .9rem; overflow-wrap: anywhere; }

main { max-width: 72rem; margin: 0 auto; padding: 1.25rem; }
main:focus { outline: none; }
h1 { font-size: 1.6rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }

.rodape { text-align: center; color: var(--texto-discreto); font-size: .85rem; padding: 2rem 1rem; }

.cartao {
  display: block;
  background: var(--superficie);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  color: var(--texto);
}
.estreito { max-width: 30rem; margin: 2rem auto; }
.grade { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.grade > .cartao { margin-bottom: 0; }
.discreto { color: var(--texto-discreto); }
.cabeca { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }

label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
label.opcao { font-weight: 400; display: flex; align-items: center; gap: .5rem; margin: .35rem 0; }
fieldset { border: 0; padding: 0; margin: .5rem 0; }
legend { font-weight: 600; padding: 0; margin-bottom: .25rem; }

input[type="email"], input[type="password"], input:not([type]), input[type="text"], select {
  width: 100%;
  padding: .55rem .7rem;
  font: inherit;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid var(--borda);
  border-radius: 6px;
}
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--foco); }

button, .botao {
  display: inline-block;
  margin-top: 1rem;
  padding: .55rem 1.1rem;
  font: inherit; font-weight: 600;
  color: var(--marca-texto);
  background: var(--marca);
  border: 1px solid var(--borda);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
button.secundario { margin-top: 0; background: transparent; color: var(--texto); }
button.perigo { background: var(--perigo); color: #ffffff; }
@media (prefers-color-scheme: dark) { button.perigo { color: #1a0000; } }
button:disabled { opacity: .5; cursor: not-allowed; }

.aviso { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid var(--borda); }
.aviso-erro { background: var(--erro-fundo); color: var(--erro-texto); }
.aviso-ok { background: var(--ok-fundo); color: var(--ok-texto); }
.selo { font-size: .8rem; padding: .05rem .45rem; border: 1px solid var(--borda); border-radius: 999px; }

.tabela-rolavel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--superficie); }
caption { text-align: left; padding: .5rem 0; caption-side: bottom; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { font-size: .9rem; }

.ficha { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
.ficha dt { font-weight: 600; }
.ficha dd { margin: 0; overflow-wrap: anywhere; }

.numeros { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; padding: 0; }
.numeros li { background: var(--superficie); border: 1px solid var(--borda); border-radius: 10px; padding: .75rem 1rem; }
.numeros strong { font-size: 1.5rem; display: block; }
.atalhos { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.atalhos a { text-decoration: none; height: 100%; }
.atalhos strong { display: block; color: var(--foco); }
.atalhos span { color: var(--texto-discreto); }

.modelos { columns: 2 14rem; margin-top: .5rem; }
.senha code { font-size: 1.4rem; padding: .5rem .75rem; display: inline-block; background: var(--fundo); border: 1px dashed var(--borda); border-radius: 6px; user-select: all; }
