/* =====================================================
   ATDI — assets/css/auth.css
   Estilos das páginas de login e verificação OTP
===================================================== */

html, body {
  overflow: hidden;
  background: var(--navy);
}

.auth-wrap {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* ══ PAINEL ESQUERDO ══ */
.auth-left {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
}
.auth-left-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 30%, rgba(29,78,216,.5) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(14,165,233,.28) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 60% 10%, rgba(59,130,246,.18) 0%, transparent 50%),
    #050d1f;
}
#leftCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.auth-left-content {
  position: relative;
  z-index: 2;
}

/* logo */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-logo-box {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(29,78,216,.5);
  flex-shrink: 0;
}
.auth-logo-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.2px;
}
.auth-logo-sub {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  margin-top: 2px;
}

/* hero */
.auth-hero { max-width: 440px; }
.auth-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 28px;
}
.auth-hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 22px; height: 1px;
  background: var(--teal);
}
.auth-hero-h {
  font-size: clamp(38px,4vw,58px);
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.auth-hero-h span {
  background: linear-gradient(90deg, var(--blue2), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-hero-p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,.45);
  max-width: 360px;
}
.auth-feats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
}
.auth-feat {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,.5);
}
.auth-feat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* stats row */
.auth-stats-row {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 28px;
}
.auth-stat { flex: 1; padding-right: 24px; }
.auth-stat + .auth-stat {
  padding-left: 24px;
  padding-right: 0;
  border-left: 1px solid rgba(255,255,255,.07);
}
.auth-stat-n {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1;
  margin-bottom: 3px;
}
.auth-stat-l {
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}

/* ══ PAINEL DIREITO ══ */
.auth-right {
  width: 480px;
  flex-shrink: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 52px;
  position: relative;
  overflow: hidden;
  box-shadow: -20px 0 80px rgba(0,0,0,.35);
}
.auth-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}
.auth-right::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(29,78,216,.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 40%, transparent 100%);
}

.auth-form-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

/* brand no form */
.auth-f-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}
.auth-f-brand-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-f-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.auth-f-brand-sub {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pale);
  margin-top: 2px;
}

.auth-f-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.auth-f-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--mid);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* campos */
.auth-field { margin-bottom: 16px; }
.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--ink);
  margin-bottom: 7px;
  text-transform: uppercase;
}
.auth-input-wrap { position: relative; }
.auth-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--off);
  font-family: var(--f);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 0 14px 0 42px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  -webkit-appearance: none;
}
.auth-input::placeholder { color: var(--pale); font-weight: 300; font-style: italic; }
.auth-input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
.auth-ico {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--pale);
  pointer-events: none;
  display: flex;
  transition: color .18s;
}
.auth-input-wrap:focus-within .auth-ico { color: var(--blue); }

/* msg erro */
.auth-error {
  display: none;
  font-family: var(--fm);
  font-size: 11px;
  color: var(--red);
  background: rgba(239,68,68,.07);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 8px;
  padding: 10px 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* botão submit */
.auth-btn {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--f);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  box-shadow: 0 4px 18px rgba(29,78,216,.38), 0 1px 0 rgba(255,255,255,.15) inset;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(29,78,216,.5);
  filter: brightness(1.06);
}
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { pointer-events: none; opacity: .75; }
.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transform: translateX(-100%);
  animation: shimBtn 2.5s ease-in-out infinite;
}
@keyframes shimBtn {
  0%      { transform: translateX(-100%); }
  55%,100%{ transform: translateX(100%); }
}

.auth-btn-spin {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-btn.loading .auth-btn-spin { display: block; }
.auth-btn.loading .auth-btn-arrow { display: none; }
.auth-btn-arrow {
  display: flex;
  transition: transform .2s;
}
.auth-btn:hover .auth-btn-arrow { transform: translateX(3px); }

/* footer */
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.auth-status-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid);
}
.auth-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(16,185,129,.2);
  animation: onlinePulse 2.5s ease-in-out infinite;
}
.auth-ver-tag {
  font-family: var(--fm);
  font-size: 9px;
  color: var(--pale);
  letter-spacing: 1px;
}

/* ══ OTP ESPECÍFICO ══ */
.otp-dev-banner {
  display: none;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-family: var(--fm);
  font-size: 12px;
  color: var(--amber);
  line-height: 1.5;
}
.otp-dev-banner strong { font-size: 20px; letter-spacing: 4px; display: block; margin-top: 4px; }

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.otp-input {
  width: 48px; height: 58px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--off);
  font-family: var(--fm);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  -webkit-appearance: none;
}
.otp-input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
.otp-input.filled {
  border-color: var(--blue);
  background: rgba(29,78,216,.04);
}

.otp-timer {
  font-family: var(--fm);
  font-size: 12px;
  color: var(--mid);
  text-align: center;
  margin-bottom: 16px;
}
.otp-timer span { color: var(--blue2); font-weight: 500; }
.otp-timer.expired span { color: var(--red); }

.otp-resend {
  width: 100%;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue2);
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  transition: background .15s;
  margin-top: 4px;
}
.otp-resend:hover { background: rgba(59,130,246,.06); }
.otp-resend:disabled { color: var(--pale); cursor: default; }

.otp-email-hint {
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--mid);
  margin-bottom: 28px;
  line-height: 1.6;
}
.otp-email-hint strong { color: var(--ink); font-weight: 600; }

/* ══ ANIMAÇÕES ENTRADA ══ */
.auth-left-content { animation: lIn .9s .05s cubic-bezier(.16,1,.3,1) both; }
@keyframes lIn {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.auth-f-brand   { animation: fIn .7s .10s cubic-bezier(.16,1,.3,1) both; }
.auth-f-title   { animation: fIn .7s .17s cubic-bezier(.16,1,.3,1) both; }
.auth-f-sub     { animation: fIn .7s .22s cubic-bezier(.16,1,.3,1) both; }
.auth-field:nth-of-type(1) { animation: fIn .7s .27s cubic-bezier(.16,1,.3,1) both; }
.auth-field:nth-of-type(2) { animation: fIn .7s .33s cubic-bezier(.16,1,.3,1) both; }
.auth-error     { animation: fIn .7s .33s cubic-bezier(.16,1,.3,1) both; }
.auth-btn       { animation: fIn .7s .38s cubic-bezier(.16,1,.3,1) both; }
.auth-footer    { animation: fIn .7s .44s cubic-bezier(.16,1,.3,1) both; }
.otp-dev-banner { animation: fIn .7s .10s cubic-bezier(.16,1,.3,1) both; }
.otp-email-hint { animation: fIn .7s .17s cubic-bezier(.16,1,.3,1) both; }
.otp-inputs     { animation: fIn .7s .24s cubic-bezier(.16,1,.3,1) both; }
.otp-timer      { animation: fIn .7s .30s cubic-bezier(.16,1,.3,1) both; }
@keyframes fIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; padding: 48px 32px; }
}
