/* Tela de carregamento: fundo escuro do login, a logo sendo desenhada traço a traço e uma linha que enche uma vez só */
#splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; align-content: center; gap: 30px; background: #0a0710; color: #fff; transition: opacity .55s ease, visibility .55s ease; }
#splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
#splash.out .splash-logo { transform: scale(1.04); }
.splash-logo { position: relative; width: min(60vw, 220px); height: auto; overflow: visible; transition: transform .55s ease; }
/* 1) os contornos se desenham, um depois do outro */
.sl-traco path { fill: none; stroke: var(--c); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: slDraw .95s cubic-bezier(.45,0,.2,1) calc(var(--i) * 18ms) forwards, slSome .45s ease 1.55s forwards; }
/* 2) a cor preenche por dentro */
.sl-fill { opacity: 0; animation: slFill .6s ease forwards; }
.sl-branco { animation-delay: 1.05s; }
.sl-roxo { animation-delay: 1.2s; }
.sl-laranja { animation-delay: 1.3s; }
/* 3) a linha em degradê corre da esquerda para a direita */
.sl-linha { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); animation: slLinha .55s cubic-bezier(.6,0,.2,1) 1.15s forwards; }
@keyframes slDraw { to { stroke-dashoffset: 0; } }
@keyframes slSome { to { stroke-opacity: 0; } }
@keyframes slFill { to { opacity: 1; } }
@keyframes slLinha { to { transform: scaleX(1); } }
.splash-bar { position: relative; width: 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.splash-bar i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #f17b00); transform: scaleX(0); transform-origin: left center; animation: splashEnche 2.2s cubic-bezier(.4,0,.2,1) forwards; }
.splash-txt { position: relative; margin: -14px 0 0; font: 500 12.5px/1 Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); animation: splashFade .6s .3s both; }
@keyframes splashEnche { to { transform: scaleX(1); } }
@keyframes splashFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .sl-traco { display: none; }
  .sl-fill, .sl-linha { animation: none; opacity: 1; transform: none; }
  .splash-bar i { animation-duration: .01s; }
}

/* Tela de entrada: fundo escuro, campo de traços animado no alto e botões em pílula, como a referência.
   A cor da marca aparece só nos traços e no foco dos campos. */
#auth { --a-bg: #0a0710; --a-ink: #ffffff; --a-soft: rgba(255,255,255,.58); --a-faint: rgba(255,255,255,.38); --a-field: rgba(255,255,255,.07); --a-field-line: rgba(255,255,255,.14); --a-btn2: #262230;
  position: fixed; inset: 0; z-index: 100; background: var(--a-bg); color: var(--a-ink); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(20px, env(safe-area-inset-left, 0px)); }
#auth[hidden] { display: none !important; }
body.locked .app { display: none; }
.auth-col { width: 100%; max-width: 380px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: 28px 22px; }
.auth-logo { width: 26px; height: auto; opacity: .95; }
.auth-art { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 22px 0 6px; transition: width .6s cubic-bezier(.2,.7,.1,1), margin .6s cubic-bezier(.2,.7,.1,1); }
.auth-art canvas { width: 100%; height: 100%; display: block; }
#auth[data-step="aluno"] .auth-art, #auth[data-step="codigo"] .auth-art, #auth[data-step="iara"] .auth-art { width: min(44vw, 170px); margin: 12px 0 0; }
.auth-body { width: 100%; display: flex; flex-direction: column; flex: 1; justify-content: flex-end; gap: 0; }
.auth-panel { display: none; flex-direction: column; gap: 12px; animation: authIn .5s cubic-bezier(.2,.7,.1,1) both; }
#auth[data-step="inicio"] .p-inicio, #auth[data-step="aluno"] .p-aluno, #auth[data-step="codigo"] .p-codigo, #auth[data-step="iara"] .p-iara, #auth[data-step="carregando"] .p-carregando { display: flex; }
@keyframes authIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-h { font: 600 clamp(34px, 9vw, 42px)/1.05 Inter, system-ui, sans-serif; letter-spacing: -0.04em; margin: 0; }
.auth-h.sm { font-size: 26px; letter-spacing: -0.03em; }
.auth-sub { color: var(--a-soft); font-size: 15px; margin: 6px 0 22px; text-wrap: balance; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border: 0; border-radius: 99px; font: 600 15px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: transform .2s ease, opacity .2s ease, background .2s ease; }
.auth-btn:active { transform: scale(.98); }
.auth-btn[disabled] { opacity: .55; cursor: default; }
.auth-btn svg { width: 18px; height: 18px; }
.auth-btn.b1 { background: #fff; color: #0a0710; }
.auth-btn.b2 { background: var(--a-btn2); color: #fff; }
.auth-btn.b2:hover { background: #312b3d; }
.auth-btn:focus-visible, .auth-link:focus-visible { outline: 2px solid #f17b00; outline-offset: 3px; }
.auth-fields { display: grid; gap: 10px; text-align: left; }
.auth-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.auth-field label { display: block; font-size: 12.5px; color: var(--a-soft); margin: 0 0 6px 16px; }
.auth-field input { width: 100%; min-height: 52px; border-radius: 16px; border: 1px solid var(--a-field-line); background: var(--a-field); color: #fff; padding: 0 16px; font-size: 16px; outline: none; transition: border-color .2s, background .2s; }
.auth-field input::placeholder { color: var(--a-faint); }
.auth-field input:focus { border-color: #a46cf0; background: rgba(255,255,255,.1); }
.auth-hint { min-height: 0; margin: 6px 0 0 16px; font-size: 12.5px; line-height: 1.35; color: var(--a-soft); }
.auth-hint:empty { display: none; }
.auth-hint.ok { color: #c9b3f7; }
.auth-hint.err { color: #ffb38a; }
.auth-pass { position: relative; }
.auth-pass input { padding-right: 52px; }
.auth-eye { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--a-soft); cursor: pointer; display: grid; place-items: center; }
.auth-eye svg { width: 20px; height: 20px; }
.auth-code input { text-align: center; font-size: 26px; font-weight: 600; letter-spacing: .5em; padding-left: .5em; font-variant-numeric: tabular-nums; }
.auth-msg { min-height: 20px; font-size: 13.5px; line-height: 1.4; color: #ffb38a; text-align: center; }
.auth-msg.ok { color: rgba(255,255,255,.72); }
.auth-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 2px; }
.auth-link { background: none; border: 0; padding: 6px 2px; color: var(--a-soft); font: 500 13.5px Inter, system-ui, sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.auth-link:hover { color: #fff; }
.auth-link[disabled] { opacity: .5; cursor: default; text-decoration: none; }
.auth-foot { margin-top: 20px; font-size: 11.5px; line-height: 1.5; color: var(--a-faint); }
.auth-spin { width: 28px; height: 28px; margin: 10px auto; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.18); border-top-color: #fff; animation: authSpin .8s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }
@media (min-width: 720px) { .auth-col { justify-content: center; } .auth-body { flex: 0; } }
@media (prefers-reduced-motion: reduce) { .auth-panel, .auth-art { animation: none; transition: none; } }

/* botão Sair no topo do app, no lugar do antigo seletor Iara/Aluno */
.logout { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; padding: 9px 14px; font: 500 13.5px Inter, system-ui, sans-serif; cursor: pointer; }
.logout svg { width: 16px; height: 16px; }
.logout:hover { border-color: var(--roxo); color: var(--roxo); }
