/* Estilo da casca (login e menu). Fica em arquivo proprio porque a CSP da casca proibe <style>
   e style="" dentro das paginas. Cores no mesmo tema marinho da Frota. */

:root {
  --fundo: #0A0D14;
  --painel: #121826;
  --painel-2: #1A2236;
  --borda: #263049;
  --texto: #E6EAF2;
  --suave: #A3ADC2;
  --acento: #3A67F5;      /* preenchimento de botao (branco sobre ele passa 4,5:1) */
  --acento-texto: #8AA8FF; /* acento usado como TEXTO: o #3A67F5 puro nao passa no fundo escuro */
  --erro: #FF9A9A;
  --raio: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--acento-texto);
  outline-offset: 2px;
}

button { font: inherit; cursor: pointer; }

/* ---------- Login ---------- */

.login-pagina {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-cartao {
  width: 100%;
  max-width: 380px;
  background: var(--painel);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 28px 24px;
}

.login-cartao h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
}

.login-cartao .sub {
  margin: 0 0 20px;
  color: var(--suave);
}

.login-cartao label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.login-cartao input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  background: var(--fundo);
  color: var(--texto);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  font: inherit;
}

.login-cartao input[type="password"]:focus-visible {
  border-color: var(--acento-texto);
}

.btn-principal {
  width: 100%;
  margin-top: 16px;
  padding: 11px 14px;
  background: var(--acento);
  color: #fff;
  border: 0;
  border-radius: var(--raio);
  font-weight: 600;
}

.btn-principal:hover:not(:disabled) { filter: brightness(1.1); }

.btn-principal:disabled {
  opacity: 0.7;
  cursor: default;
}

.mensagem {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--erro);
}

/* ---------- Casca (menu + palco) ---------- */

.casca {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.topo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 16px;
  background: var(--painel);
  border-bottom: 1px solid var(--borda);
}

.logo-topo { height: 56px; width: auto; display: block; flex: none; }

.logo-login { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 16px; }

.topo .pagina-atual {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--suave);
}

.btn-sair {
  padding: 6px 14px;
  background: transparent;
  color: var(--texto);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
}

.btn-sair:hover { background: var(--painel-2); }

.corpo {
  flex: 1;
  min-height: 0;
  display: flex;
}

.menu {
  width: 240px;
  flex: none;
  overflow-y: auto;
  padding: 12px 8px;
  background: var(--painel);
  border-right: 1px solid var(--borda);
}

.menu h2 {
  margin: 14px 8px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--suave);
}

.menu h2:first-child { margin-top: 4px; }

.menu a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--texto);
  text-decoration: none;
}

.menu a:hover { background: var(--painel-2); }

.menu a[aria-current="page"] {
  background: var(--painel-2);
  color: var(--acento-texto);
  font-weight: 600;
}

.palco {
  flex: 1;
  min-width: 0;
  position: relative;
}

.palco iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--fundo);
}

.aviso {
  padding: 32px 24px;
  color: var(--suave);
  font-size: 16px;
}

@media (max-width: 720px) {
  .corpo { flex-direction: column; }
  .menu {
    width: 100%;
    max-height: 34%;
    border-right: 0;
    border-bottom: 1px solid var(--borda);
  }
}
