/* acesso.css — telas públicas de acesso (login, esqueci a senha, solicitar acesso)
   v2 corporativa: card compacto, painel lateral estreito com o Hugo, tipografia
   contida e cor só onde orienta (filete, foco, botão, brilho de fundo da cena).
   Folha própria — o login_style.css antigo fica intocado (nenhuma tela o usa). */

:root {
    --ac-a: #22d3ee;          /* cores da cena (brilhos, foco, filete) */
    --ac-b: #3b82f6;
    --ac-c: #8b5cf6;
    --ac-bg: #070c1a;
    --ac-card: #0d1426;
    --ac-painel: #0a1122;
    --ac-line: rgba(255, 255, 255, 0.08);
    --ac-line-2: rgba(255, 255, 255, 0.14);
    --ac-text: #f1f5f9;
    --ac-text-2: #a3aec4;
    --ac-text-3: #7d889e;
    --ac-ok: #34d399;
    --ac-err: #f87171;
    --ac-warn: #fbbf24;
}
/* Cenas: só a temperatura das cores muda ao longo do dia */
body.cena-manha { --ac-a: #22d3ee; --ac-b: #f59e0b; --ac-c: #38bdf8; }
body.cena-tarde { --ac-a: #38bdf8; --ac-b: #3b82f6; --ac-c: #14b8a6; }
body.cena-noite { --ac-a: #a78bfa; --ac-b: #6366f1; --ac-c: #ec4899; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.acesso {
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px;
    background: var(--ac-bg);
    color: var(--ac-text);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* Fundo de moléculas (o mesmo do login antigo, agora na cor da cena) */
#acessoCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* Dois brilhos grandes e parados, nas cores da cena */
.acesso-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.acesso-glow span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .22; }
.acesso-glow span:first-child { width: 48vw; height: 48vw; top: -22vw; left: -14vw; background: var(--ac-a); }
.acesso-glow span:last-child  { width: 40vw; height: 40vw; bottom: -20vw; right: -12vw; background: var(--ac-c); opacity: .16; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =========================================================================
   CARD
   ========================================================================= */
.acesso-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 760px;
    display: grid; grid-template-columns: 270px minmax(0, 1fr);
    border-radius: 16px; overflow: hidden;
    background: var(--ac-card);
    border: 1px solid var(--ac-line);
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
    animation: acIn .5s cubic-bezier(.2,.8,.2,1) both;
}
.acesso-card::before {   /* filete fino na cor da cena */
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3;
    background: linear-gradient(90deg, var(--ac-a), var(--ac-b), var(--ac-c));
}
@keyframes acIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Painel lateral (marca + Hugo) ---------- */
.acesso-vitrine {
    position: relative;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 28px 22px 26px;
    background: var(--ac-painel);
    background:
        radial-gradient(120% 60% at 50% 38%, color-mix(in srgb, var(--ac-a) 14%, transparent), transparent 70%),
        var(--ac-painel);
    border-right: 1px solid var(--ac-line);
}
.vit-logos { display: flex; align-items: center; gap: 10px; }
.vit-rfx { height: 20px; width: auto; display: block; }
.vit-mb  { height: 18px; width: auto; display: block; filter: brightness(0) invert(1); }
.vit-sep { width: 1px; height: 18px; background: var(--ac-line-2); }

.vit-palco { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; margin: 14px 0 8px; }
.vit-hugo {
    width: 150px; height: auto; aspect-ratio: 340 / 320;
    transition: opacity .18s ease;
    user-select: none; -webkit-user-drag: none;
}
.vit-hugo.trocando { opacity: 0; }

.vit-fala { width: 100%; min-height: 62px; }
.vit-fala strong { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ac-text); }
.vit-fala span { display: block; margin-top: 4px; font-size: 0.8rem; line-height: 1.5; color: var(--ac-text-3); }
.vit-fala strong, .vit-fala span { transition: opacity .18s ease, color .2s; }
.vit-fala.trocando strong, .vit-fala.trocando span { opacity: 0; }
.vit-fala.f-ok strong   { color: var(--ac-ok); }
.vit-fala.f-err strong  { color: var(--ac-err); }
.vit-fala.f-warn strong { color: var(--ac-warn); }

/* ---------- Formulário ---------- */
.acesso-form { padding: 38px 40px 32px; display: flex; flex-direction: column; justify-content: center; }
.acesso-form h1 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.3px; }
.acesso-form .sub { margin: 6px 0 24px; color: var(--ac-text-2); font-size: 0.88rem; line-height: 1.5; }

.ac-alert {
    display: flex; gap: 9px; align-items: flex-start;
    margin: 0 0 18px; padding: 10px 12px; border-radius: 8px;
    font-size: 0.84rem; line-height: 1.45;
    border: 1px solid transparent; border-left-width: 3px;
}
.ac-alert i { margin-top: 2px; font-size: 0.85rem; }
.ac-alert.err  { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.25); border-left-color: var(--ac-err); color: #fecaca; }
.ac-alert.ok   { background: rgba(52,211,153,0.08);  border-color: rgba(52,211,153,0.25);  border-left-color: var(--ac-ok);  color: #bbf7d0; }
.ac-alert.warn { background: rgba(251,191,36,0.08);  border-color: rgba(251,191,36,0.28);  border-left-color: var(--ac-warn); color: #fde68a; }
.ac-alert[hidden] { display: none; }

.ac-field { margin-bottom: 14px; }
.ac-field label { display: block; margin: 0 0 6px; font-size: 0.78rem; font-weight: 500; color: var(--ac-text-2); }
.ac-input { position: relative; }
.ac-input > i {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--ac-text-3); font-size: 0.85rem; pointer-events: none; transition: color .2s;
}
.ac-input input {
    width: 100%; height: 44px; padding: 0 42px 0 38px;
    border-radius: 8px; border: 1px solid var(--ac-line-2);
    background: rgba(255, 255, 255, 0.03); color: var(--ac-text);
    font: 400 0.92rem 'Inter', sans-serif;
    transition: border-color .15s, box-shadow .15s;
}
.ac-input input::placeholder { color: #5f6a80; }
.ac-input input:focus { outline: none; border-color: var(--ac-a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-a) 20%, transparent); }
.ac-input:focus-within > i { color: var(--ac-a); }
.ac-input input[aria-invalid="true"] { border-color: var(--ac-err); }
.ac-eye {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; border-radius: 6px; cursor: pointer;
    background: transparent; color: var(--ac-text-3); font-size: 0.9rem;
}
.ac-eye:hover { color: var(--ac-text); }
.ac-eye:focus-visible { outline: 2px solid var(--ac-a); }
.ac-msg { display: block; margin-top: 5px; font-size: 0.78rem; color: var(--ac-err); }
.ac-msg:empty { display: none; }
.ac-caps { display: none; margin-top: 5px; font-size: 0.78rem; color: var(--ac-warn); }
.ac-caps.on { display: flex; align-items: center; gap: 6px; }

.ac-opcoes { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 20px; font-size: 0.82rem; }
.ac-check { display: inline-flex; align-items: center; gap: 7px; color: var(--ac-text-2); cursor: pointer; }
.ac-check input { width: 15px; height: 15px; accent-color: var(--ac-a); cursor: pointer; }
.ac-link { color: var(--ac-a); text-decoration: none; font-weight: 500; }
.ac-link:hover { text-decoration: underline; }
.ac-link:focus-visible { outline: 2px solid var(--ac-a); outline-offset: 2px; border-radius: 3px; }

.ac-btn {
    width: 100%; height: 44px; border: 0; border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #2563eb;
    background: linear-gradient(135deg, var(--ac-b), #2563eb);
    color: #fff; font: 600 0.92rem 'Inter', sans-serif;
    transition: filter .15s, opacity .2s;
}
body.cena-tarde .ac-btn, body.cena-noite .ac-btn { background: linear-gradient(135deg, var(--ac-b), #2563eb); }
body.cena-manha .ac-btn { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.ac-btn:hover { filter: brightness(1.08); }
.ac-btn:active { filter: brightness(.95); }
.ac-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ac-btn:disabled { cursor: not-allowed; opacity: .55; filter: none; background: #334155; }

.ac-rodape-form { margin: 18px 0 0; text-align: center; font-size: 0.84rem; color: var(--ac-text-3); }
.ac-grid-cad { display: block; }   /* e-mail e matrícula empilhados: lado a lado cortavam o texto */
.ac-isca { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.acesso-rodape {
    position: relative; z-index: 1; margin: 16px 0 0; max-width: 420px;
    color: #5f6a80; font-size: 0.74rem; text-align: center; line-height: 1.5;
}
.acesso-rodape i { margin-right: 5px; }

/* =========================================================================
   RESPONSIVO — no celular o painel vira uma faixa com logos + Hugo pequeno
   ========================================================================= */
@media (max-width: 760px) {
    body.acesso { justify-content: flex-start; padding: 20px 12px calc(16px + env(safe-area-inset-bottom)); }
    .acesso-card { grid-template-columns: 1fr; max-width: 420px; }
    .acesso-vitrine {
        border-right: 0; border-bottom: 1px solid var(--ac-line);
        padding: 16px 18px; flex-direction: row; gap: 14px; text-align: left;
    }
    .vit-logos { order: 2; margin-left: auto; flex-direction: column; align-items: flex-end; gap: 6px; }
    .vit-sep { display: none; }
    .vit-palco { order: 0; flex: 0 0 64px; margin: 0; }
    .vit-hugo { width: 64px; }
    .vit-fala { order: 1; min-height: 0; }
    .vit-fala strong { font-size: 0.84rem; }
    .vit-fala span { font-size: 0.76rem; }
    .acesso-form { padding: 24px 20px 22px; }
    .ac-input input { font-size: 16px; }   /* iOS não dá zoom */
}
@media (max-width: 420px) {
    .vit-rfx { height: 15px; }
    .vit-mb  { height: 13px; }
}

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