body.auth{
  background: var(--bg);
  overflow: hidden;
}

/* Fundo */
body.auth .bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 15% 20%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 65%),
    radial-gradient(900px 520px at 85% 18%, color-mix(in srgb, var(--secondary) 14%, transparent), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}
body.auth .bg::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: radial-gradient(rgba(15,23,42,0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.18;
  mask-image: radial-gradient(circle at 30% 30%, rgba(0,0,0,0.9), transparent 70%);
}

/* Layout */
body.auth .layout{
  min-height: 100vh;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 30px;
  position: relative;
  z-index: 1;
}

/* Card */
body.auth .card{
  width: min(460px, 94vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  padding: 34px;
  position: relative;
  overflow: hidden;
}
body.auth .card::before{
  content:"";
  position:absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.95;
}
body.auth .card::after{
  content:"";
  position:absolute;
  width: 420px;
  height: 420px;
  right: -220px;
  top: -220px;
  background: radial-gradient(circle, rgba(31,78,216,0.18), transparent 60%);
  filter: blur(2px);
  pointer-events:none;
}

/* Brand */
body.auth .brand{
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 18px;
}
body.auth .brandLogoTop{
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(15,23,42,0.14));
  opacity: 0.98;
}
body.auth .brandText h1{
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
body.auth .brandText p{
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-light);
}

/* Form */
body.auth .form{ display:grid; gap:14px; margin-top:10px; }
body.auth .field label{
  display:block;
  font-size: 13px;
  font-weight: 650;
  color: rgba(11,18,32,0.92);
  margin-bottom: 8px;
}

body.auth .inputWrap{
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 12px 12px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
body.auth .inputWrap:hover{ border-color: rgba(15,23,42,0.18); }
body.auth .inputWrap:focus-within{
  border-color: color-mix(in srgb, var(--primary) 55%, rgba(15,23,42,0.12));
  box-shadow: var(--ring);
  transform: translateY(-1px);
}
body.auth .inputWrap input{
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
body.auth .inputWrap--password{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* Botão do olho */
body.auth .iconBtn{
  border:none;
  background: rgba(15,23,42,0.06);
  color: rgba(11,18,32,0.72);
  padding: 9px 10px;
  border-radius: 12px;
  cursor:pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
  display: grid;
  place-items: center;
}
body.auth .iconBtn:hover{ background: rgba(15,23,42,0.10); transform: translateY(-1px); }
body.auth .iconBtn.is-on{
  background: color-mix(in srgb, var(--secondary) 14%, rgba(15,23,42,0.06));
  color: rgba(31,78,216,0.85);
}
body.auth .iconBtn .icon{ width:18px; height:18px; }

body.auth .icon-eye-closed {
  display: none;
}

body.auth .iconBtn.is-on .icon-eye-open {
  display: none;
}

body.auth .iconBtn.is-on .icon-eye-closed {
  display: block;
}

/* Botão principal */
body.auth .btn{
  width: 100%;
  border: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 12.5px 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--primary) 22%, transparent);
  transition: transform .14s var(--ease), filter .18s var(--ease), box-shadow .18s var(--ease);
  position: relative;
  overflow: hidden;
}
body.auth .btn:hover{
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 22px 52px color-mix(in srgb, var(--primary) 26%, transparent);
}

/* Alert */
/* ===== ALERTS COMO TOAST NO TOPO ===== */
body.auth .alerts{
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  z-index: 9999;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

body.auth .alerts .alert{
  pointer-events: auto;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.25;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 45px rgba(15,23,42,0.18);

  animation: toast-in .22s var(--ease, ease-out) both;
}

/* Animação */
@keyframes toast-in{
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== CORES POR TIPO ===== */
body.auth .alert.alert-danger{
  border-color: color-mix(in srgb, #ef4444 40%, rgba(15,23,42,0.12));
  background: color-mix(in srgb, #ef4444 12%, rgba(255,255,255,0.96));
  color: rgba(127, 29, 29, 0.98);
}

body.auth .alert.alert-success{
  border-color: color-mix(in srgb, #22c55e 35%, rgba(15,23,42,0.12));
  background: color-mix(in srgb, #22c55e 12%, rgba(255,255,255,0.96));
  color: rgba(20, 83, 45, 0.98);
}

body.auth .alert.alert-warning{
  border-color: color-mix(in srgb, #f59e0b 40%, rgba(15,23,42,0.12));
  background: color-mix(in srgb, #f59e0b 14%, rgba(255,255,255,0.96));
  color: rgba(120, 53, 15, 0.98);
}

/* animação de saída */
body.auth .alerts .alert.is-hiding{
  animation: toast-out .18s var(--ease, ease-in) both;
}

@keyframes toast-out{
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}


/* OTP */
body.auth .otp{
  display:flex;
  justify-content:center;
  gap:10px;
}
body.auth .otpBox{
  width: 46px;
  height: 56px;
  text-align:center;
  font-size: 22px;
  font-weight: 800;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.92);
  outline:none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
body.auth .otpBox:focus{
  border-color: color-mix(in srgb, var(--primary) 55%, rgba(15,23,42,0.12));
  box-shadow: var(--ring);
  transform: translateY(-1px);
}

/* Footer */
body.auth .footer{
  margin-top: 8px;
  text-align:center;
  color: rgba(91,103,122,0.9);
  font-size: 12px;
  display:grid;
  gap:4px;
}
body.auth .footer .dev{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 1px;
  line-height: 1;
}
body.auth .footer .dev img{
  height: 50px;
  width:auto;
  display:block;
  margin-left: -12px;
  transform: translateY(3px);
}

/* Responsivo */
@media (max-width: 420px){
  body.auth .card{ padding: 22px; }
  body.auth .otp{ gap: 8px; }
  body.auth .otpBox{ width: 42px; height: 52px; font-size: 20px; }
}
