/* Tela de login — split layout + glassmorphism premium (Luke palette) */

.login-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', system-ui, sans-serif;
  color: #1e222b;
  overflow-x: hidden;
}

.login-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, #f5f9ff 0%, #eaf1fb 50%, #e2ebf7 100%);
}

.login-bg__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.login-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.login-bg__glow--a {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  top: -10%;
  left: -8%;
  background: rgba(143, 177, 238, 0.35);
}

.login-bg__glow--b {
  width: min(48vw, 440px);
  height: min(48vw, 440px);
  bottom: 0;
  right: 5%;
  background: rgba(114, 206, 71, 0.12);
}

.login-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .login-shell {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 2.5rem 2rem;
  }
}

/* —— Marca (esquerda) —— */
.login-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.login-brand__logo img {
  height: 3.25rem;
  width: auto;
  max-width: 220px;
}

@media (min-width: 1024px) {
  .login-brand__logo img {
    height: 4rem;
    max-width: 280px;
  }
}

.login-brand__headline {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #1e222b;
  max-width: 16ch;
}

.login-brand__headline em {
  font-style: normal;
  color: #6d96d9;
}

.login-brand__sub {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #475569;
  max-width: 36rem;
}

.login-bubbles {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 1024px) {
  .login-bubbles {
    display: flex;
  }
}

.login-bubble {
  align-self: flex-start;
  max-width: 22rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem 1rem 1rem 0.35rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 32px rgba(143, 177, 238, 0.1);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #475569;
  animation: login-bubble-in 0.6s ease backwards;
}

.login-bubble:nth-child(2) {
  align-self: flex-start;
  margin-left: 2.5rem;
  border-radius: 1rem 1rem 0.35rem 1rem;
  animation-delay: 0.12s;
}

.login-bubble:nth-child(3) {
  animation-delay: 0.24s;
}

.login-bubble strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d96d9;
  margin-bottom: 0.2rem;
}

@keyframes login-bubble-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Card (direita) —— */
.login-form-wrap {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .login-form-wrap {
    width: 100%;
    max-width: 440px;
  }
}

.login-glass-card {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem 2.25rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 24px 48px -12px rgba(109, 150, 217, 0.18),
    0 8px 20px -8px rgba(30, 34, 43, 0.08);
  overflow: hidden;
}

.login-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.9) 20%,
    rgba(255, 255, 255, 0.9) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.login-glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

@media (min-width: 640px) {
  .login-glass-card {
    padding: 2.75rem 2.25rem 2.5rem;
    border-radius: 1.625rem;
  }
}

.login-card__welcome {
  position: relative;
  z-index: 1;
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #1e222b;
  text-align: center;
  margin: 0 0 2rem;
}

.login-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

.login-input-wrap {
  display: flex;
  align-items: center;
  min-height: 2.875rem;
  border-radius: 0.625rem;
  background: #ffffff;
  border: 1px solid #e8ecf2;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-input-wrap:focus-within {
  background: #ffffff;
  border-color: #b8ccf5;
  box-shadow: 0 0 0 3px rgba(143, 177, 238, 0.2);
}

.login-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.8125rem 1rem;
  font-size: 0.9375rem;
  color: #1e222b;
  outline: none;
}

.login-input-wrap input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Neutraliza o amarelo do autofill do Chrome */
.login-input-wrap input:-webkit-autofill,
.login-input-wrap input:-webkit-autofill:hover,
.login-input-wrap input:-webkit-autofill:focus,
.login-input-wrap input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1e222b !important;
  caret-color: #1e222b;
  transition: background-color 99999s ease-out 0s;
}

.login-input-wrap .login-suffix {
  padding: 0.8125rem 1rem;
  font-size: 0.875rem;
  color: #64748b;
  user-select: none;
  white-space: nowrap;
}

.login-toggle-pw {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: 0.125rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.login-toggle-pw:hover {
  color: #6d96d9;
  background: rgba(143, 177, 238, 0.1);
}

.login-toggle-pw iconify-icon {
  display: block;
}

/* Captcha — visual suave, input com ênfase inferior */
.login-captcha-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 420px) {
  .login-captcha-row {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.875rem;
  }
}

.login-captcha-visual {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.375rem 0.5rem 0.375rem 0.375rem;
  background: #f1f5f9;
  border-radius: 0.625rem;
}

.login-captcha-img {
  display: block;
  width: 200px;
  height: 56px;
  border: 0;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(30, 34, 43, 0.04);
}

.login-captcha-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #6d96d9;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, transform 0.2s ease;
}

.login-captcha-refresh:hover {
  color: #4a6fad;
  background: rgba(143, 177, 238, 0.15);
}

.login-captcha-refresh:active {
  transform: rotate(-90deg);
}

.login-captcha-refresh iconify-icon {
  display: block;
}

.login-input-wrap--underline {
  background: #f8fafc;
  border: none;
  border-radius: 0.5rem;
  box-shadow: inset 0 -1px 0 #cbd5e1;
}

.login-input-wrap--underline:focus-within {
  background: #ffffff;
  box-shadow:
    inset 0 -2px 0 #8fb1ee,
    0 0 0 3px rgba(143, 177, 238, 0.12);
}

.login-captcha-input {
  flex: 1;
  min-width: 0;
}

.login-captcha-help {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}

.login-btn-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1rem;
  border: 0;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, #a8c4f2 0%, #8fb1ee 42%, #7ba3e8 72%, #6d96d9 100%);
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 6px 20px rgba(109, 150, 217, 0.38);
}

.login-btn-primary:hover {
  filter: brightness(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 8px 24px rgba(109, 150, 217, 0.42);
}

.login-btn-primary:active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.login-remember {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: #8fb1ee;
}

.login-alert {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

.login-alert--error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.login-alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.login-mobile-logo {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

@media (min-width: 1024px) {
  .login-mobile-logo {
    display: none;
  }
}

/* Voltar à landing (/) — login e fluxo SaaS */
.auth-back-landing {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: #334155;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.4);
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-back-landing:hover {
  background: #fff;
  color: #1e222b;
}

@media (min-width: 1024px) {
  .auth-back-landing {
    top: 1.25rem;
    left: 1.5rem;
  }
}
