@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.container-fluid:has(.auth-screen) {
  padding: 0 !important;
  max-width: none !important;
}

.auth-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 15% 20%, #2a0a22 0%, #170414 45%, #0c0210 100%);
  font-family: 'Inter', 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
}

.auth-shell {
  position: relative;
  width: 100%;
  max-width: 1080px;
  min-height: 640px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: authShellIn .7s cubic-bezier(.2, .8, .2, 1);
}

@keyframes authShellIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Panel de marca ---------- */

.auth-panel-brand {
  position: relative;
  background: linear-gradient(155deg, #7a1359 0%, #9b1b6e 42%, #c6389a 100%);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  z-index: 0;
}

.auth-blob-1 {
  width: 320px;
  height: 320px;
  background: #ff9ed0;
  top: -80px;
  right: -80px;
  animation: authFloat 9s ease-in-out infinite;
}

.auth-blob-2 {
  width: 260px;
  height: 260px;
  background: #4a0f3d;
  bottom: -60px;
  left: -60px;
  animation: authFloat 11s ease-in-out infinite reverse;
}

.auth-blob-3 {
  width: 180px;
  height: 180px;
  background: #e893c0;
  bottom: 30%;
  right: 10%;
  animation: authFloat 7s ease-in-out infinite;
}

@keyframes authFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(18px, -22px) scale(1.06);
  }
}

.auth-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  color: #fff;
}

.auth-panel-brand .auth-brand-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel-brand .auth-logo {
  width: clamp(180px, 70%, 380px);
  height: auto;
  margin-bottom: 0;
}

.auth-logo {
  height: 34px;
  margin-bottom: 40px;
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, .15));
}

.auth-brand-title {
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.auth-brand-title span {
  background: linear-gradient(90deg, #ffd6ec, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-brand-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 380px;
  line-height: 1.6;
}

/* ---------- Panel de formulario ---------- */

.auth-panel-form {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
}

.auth-form {
  width: 100%;
  max-width: 360px;
}

.auth-form-header {
  margin-bottom: 34px;
}

.auth-logo-mobile {
  display: none;
  height: auto;
  width: clamp(130px, 40vw, 180px);
  margin-bottom: 24px;
  filter: none;
}

.auth-form-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #201421;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-form-header p {
  color: #8a8494;
  font-size: .92rem;
  margin: 0;
}

.auth-field {
  position: relative;
  margin-bottom: 22px;
}

.auth-field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #b1799f;
  font-size: .92rem;
  z-index: 2;
  transition: color .2s ease;
}

.auth-input {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 1.5px solid #e9e3ec;
  background: #faf8fb;
  padding: 22px 44px 8px 44px;
  font-size: .96rem;
  font-weight: 500;
  color: #2c2230;
  outline: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.auth-field input.auth-input#pw {
  padding-right: 46px;
}

.auth-input::placeholder {
  color: transparent;
}

.auth-field label {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .95rem;
  color: #9c93a6;
  pointer-events: none;
  transition: all .18s ease;
  background: transparent;
}

.auth-input:focus,
.auth-input:not(:placeholder-shown) {
  border-color: var(--color-main);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(155, 27, 110, 0.08);
}

.auth-input:focus~.auth-field-icon,
.auth-input:not(:placeholder-shown)~.auth-field-icon {
  color: var(--color-main);
}

.auth-input:focus~label,
.auth-input:not(:placeholder-shown)~label {
  top: 15px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--color-main);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.auth-field-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #b1799f;
  cursor: pointer;
  font-size: .95rem;
  padding: 6px;
  z-index: 2;
  transition: color .2s ease;
}

.auth-field-toggle:hover {
  color: var(--color-main);
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.auth-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.auth-switch input {
  display: none;
}

.auth-switch-track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #e3dde7;
  position: relative;
  transition: background .2s ease;
  flex-shrink: 0;
}

.auth-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}

.auth-switch input:checked~.auth-switch-track {
  background: var(--color-main);
}

.auth-switch input:checked~.auth-switch-track .auth-switch-thumb {
  transform: translateX(16px);
}

.auth-switch-label {
  font-size: .85rem;
  color: #6e6478;
  font-weight: 500;
}

.auth-submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--color-main), var(--color-secondary));
  color: #fff;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 12px 24px -8px rgba(155, 27, 110, 0.55);
}

.auth-submit i {
  font-size: .82rem;
  transition: transform .18s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 16px 30px -8px rgba(155, 27, 110, 0.6);
}

.auth-submit:hover i {
  transform: translateX(3px);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-google {
  width: 100%;
  height: 54px;
  border: 1.5px solid #e6dfee;
  border-radius: 14px;
  background: #fff;
  color: #3c3446;
  font-size: .98rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow: 0 8px 20px -10px rgba(60, 20, 90, 0.25);
}

.auth-google:hover {
  transform: translateY(-2px);
  border-color: var(--color-main);
  color: #3c3446;
  box-shadow: 0 14px 26px -10px rgba(155, 27, 110, 0.4);
}

.auth-hint {
  text-align: center;
  margin: 16px 0 0;
  font-size: .82rem;
  color: #8a8294;
}

.auth-footer-note {
  text-align: center;
  margin: 28px 0 0;
  font-size: .76rem;
  color: #b6afbe;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .auth-panel-brand {
    display: none;
  }

  .auth-panel-form {
    align-items: center;
    padding: 32px 28px;
  }

  .auth-form-header {
    margin-bottom: 24px;
  }

  .auth-logo-mobile {
    display: block;
    margin-bottom: 16px;
  }
}

@media (max-width: 420px) {
  .auth-screen {
    padding: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .auth-shell {
    border-radius: 0;
    height: 100%;
    min-height: 0;
    grid-template-rows: 1fr;
  }

  .auth-panel-form {
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}
