/* Login, cadastro e verificação · Noite.
   One centered card floating over the live 3D night sky. */
.auth-body [hidden] { display: none !important; }
html.auth-page { background: var(--noite); }
body.auth-body { min-height: 100svh; background: var(--noite) !important; color: var(--texto); }

/* The sky fills the whole screen, behind everything */
.auth-ceu { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.auth-ceu-still, .auth-ceu-3d { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-ceu-3d { opacity: 0; transition: opacity 1.4s var(--ease); }
.auth-ceu-3d.vivo { opacity: 1; }
.auth-ceu::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 45%, rgba(7, 3, 14, .55) 0%, rgba(7, 3, 14, .15) 70%), linear-gradient(0deg, rgba(7, 3, 14, .7), transparent 35%); }

/* Single centered column */
.auth-shell { position: relative; z-index: 1; min-height: 100svh; display: grid; place-items: center; padding: clamp(24px, 5vh, 56px) 16px; }
.auth-panel-column { width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.auth-top { display: flex; justify-content: center; }
.auth-brand img { height: 40px; width: auto; display: block; filter: drop-shadow(0 4px 20px rgba(124, 58, 237, .6)); }

.auth-card {
  width: 100%; display: grid; gap: 22px;
  padding: clamp(26px, 4vw, 44px) !important;
  background: rgba(16, 10, 30, .74) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(196, 181, 253, .2) !important;
  border-radius: 18px !important;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, .08), 0 40px 100px -30px rgba(0, 0, 0, .9), 0 0 120px -40px rgba(124, 58, 237, .6) !important;
  animation: auth-entrar .8s var(--ease) both;
}
@keyframes auth-entrar { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(7, 3, 14, .55); border: 1px solid var(--linha); }
.auth-tab { min-height: 46px; border: 0; border-radius: 9px; background: transparent; color: var(--texto-2); font: 700 15px/1 var(--fonte); font-variation-settings: 'wdth' 106; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.auth-tab:hover { color: #fff; }
.auth-tab.active { background: var(--luz); color: #fff; box-shadow: 0 10px 24px -10px rgba(124, 58, 237, 1); }

.auth-heading { display: grid; gap: 8px; text-align: center; }
.auth-heading h1 { font-size: clamp(30px, 3vw, 40px); color: #fff; }
.auth-heading p { color: var(--texto-2); font-size: 16px; }

#auth-form { display: grid; gap: 16px; }
#auth-form > label:not(.nx-check) { display: grid; gap: 8px; }
#auth-form > label > span { font-weight: 600; font-size: 14px; color: var(--texto); }
.auth-input-wrap { position: relative; }
body.auth-body .auth-input-wrap input {
  width: 100%; min-height: 54px; padding: 14px 16px;
  border: 1px solid var(--linha-forte) !important; border-radius: 10px;
  background: rgba(7, 3, 14, .6) !important; color: var(--texto) !important; font: 500 16px/1.4 var(--fonte);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}
.auth-input-wrap input::placeholder { color: #8a82a3 !important; }
body.auth-body .auth-input-wrap input:focus { outline: none; border-color: var(--luz-clara) !important; background: rgba(7, 3, 14, .8) !important; box-shadow: 0 0 0 4px rgba(167, 139, 250, .18); }
.auth-input-wrap input:-webkit-autofill { -webkit-text-fill-color: var(--texto); box-shadow: 0 0 0 1000px #120a22 inset !important; }
#auth-code { letter-spacing: .3em; font-size: 22px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.auth-code-help { font-size: 13.5px; color: var(--texto-3); margin-top: -6px; }

.auth-input-wrap.has-password-toggle input { padding-right: 52px; }
.auth-password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--texto-3); cursor: pointer; }
.auth-password-toggle:hover { background: rgba(167, 139, 250, .12); color: var(--luz-texto); }
.auth-password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

body.auth-body #auth-form > .nx-check:not([hidden]) { display: flex !important; flex-wrap: nowrap !important; align-items: flex-start !important; gap: 12px; margin: 0 !important; font-size: 14.5px !important; color: var(--texto-2) !important; line-height: 1.5; }
.auth-body .nx-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--luz); flex: none; }

.auth-captcha { display: flex; justify-content: center; min-height: 78px; }
.auth-submit { width: 100%; min-height: 56px; font-size: 17px; border-radius: 10px !important; }
.auth-arrow { font-size: 18px; transition: transform .2s var(--ease); }
.auth-submit:hover .auth-arrow { transform: translateX(3px); }
.auth-message { margin: 0; font-size: 14.5px; line-height: 1.5; text-align: center; }
.auth-message:empty { display: none; }
.auth-message.error { padding: 12px 14px; border-radius: 10px; background: var(--erro-fundo); color: var(--erro); }
.auth-message.success { padding: 12px 14px; border-radius: 10px; background: var(--ok-fundo); color: var(--ok); }

.auth-secondary-actions { display: flex; justify-content: center; gap: 20px; }
.auth-body .nx-link, .auth-switch button { border: 0; background: none; padding: 4px 2px; color: var(--luz-texto); font: 600 15px/1.4 var(--fonte); text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }
.auth-body .nx-link:hover, .auth-switch button:hover { color: #fff; }
.auth-switch { display: flex; justify-content: center; align-items: center; gap: 8px; padding-top: 18px; border-top: 1px solid var(--linha); font-size: 15px; color: var(--texto-2); }

.auth-mfa-setup { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--linha-forte); border-radius: 10px; background: rgba(7, 3, 14, .5); font-size: 14.5px; color: var(--texto-2); }
.auth-mfa-setup [data-auth-mfa-qr] { display: grid; place-items: center; }
.auth-mfa-setup [data-auth-mfa-qr] img { width: 180px; height: 180px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 6px; }
.auth-mfa-setup code { word-break: break-all; font-size: 13px; background: var(--placa-2); padding: 2px 6px; border-radius: 4px; color: var(--texto); }

/* Reassurance row under the card */
.auth-fatos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; color: var(--texto-2); font-size: 14px; font-weight: 600; }
.auth-fatos li { display: inline-flex; align-items: center; gap: 8px; }
.auth-fatos svg { width: 16px; height: 16px; fill: none; stroke: var(--luz-texto); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.auth-footer-info { display: flex; justify-content: center; gap: 20px; font-size: 13.5px; }
.auth-footer-info a { color: var(--texto-3); text-decoration: none; }
.auth-footer-info a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 560px) {
  .auth-shell { place-items: start center; padding-top: 28px; }
  .auth-card { border-radius: 14px !important; }
  .auth-heading { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }
.auth-empresa { margin: -8px 0 0; text-align: center; font-size: 12.5px; color: var(--texto-3); }
.auth-empresa a { color: var(--texto-2); }
