.login-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(var(--brand-rgb), 0.16), transparent 42%),
    radial-gradient(ellipse at 100% 100%, rgba(17, 17, 17, 0.06), transparent 45%),
    var(--paper);
}

.login-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.login-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #2a0f45, #6f2da8);
  color: #fff;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  align-items: flex-end;
}

.login-visual__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-visual__photo img {
  position: absolute;
  inset: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  object-fit: cover;
  object-position: center center;
  filter: blur(2.5px) saturate(1.15) brightness(1.05);
  transform: scale(1.04);
}

.login-visual__tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(42, 15, 69, 0.38), rgba(111, 45, 168, 0.32)),
    linear-gradient(180deg, rgba(13, 6, 20, 0.12), rgba(13, 6, 20, 0.28));
}

.login-visual__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 75, 199, 0.55), transparent 68%);
  animation: pulse 5s ease-in-out infinite;
  z-index: 0;
}

.login-visual__content {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  animation: rise 0.6s ease;
}

/* Escena animada: pin de ubicación */
.delivery-scene {
  position: relative;
  width: min(100%, 220px);
  height: 150px;
  margin: 0 0 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.location-pulse {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  animation: location-ring 2.4s ease-out infinite;
  pointer-events: none;
}

.location-pulse--mid {
  animation-delay: 0.4s;
  border-color: rgba(255, 255, 255, 0.55);
}

.location-pulse--outer {
  animation-delay: 0.8s;
  border-color: rgba(255, 255, 255, 0.35);
}

.location-pulse--inner {
  width: 28px;
  height: 28px;
  animation-delay: 0s;
}

.location-pin {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 84px;
  animation: location-bounce 2.4s ease-in-out infinite;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
}

.location-pin svg {
  display: block;
  width: 100%;
  height: 100%;
}

.location-base {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 34px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  animation: location-shadow 2.4s ease-in-out infinite;
}

.brand-mark {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
}

.brand-mark span {
  color: var(--brand-soft);
}

@keyframes location-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes location-ring {
  0% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0.35);
  }
  70% {
    opacity: 0.15;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.4);
  }
}

@keyframes location-shadow {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translateX(-50%) scale(0.7);
    opacity: 0.18;
  }
}

.login-visual h1 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 16ch;
}

.login-visual__sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
  max-width: 36ch;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-panel__wrap {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.login-brand-logo {
  display: block;
  width: min(280px, 78%);
  height: auto;
  object-fit: contain;
  animation: rise 0.5s ease;
}

.login-panel__inner {
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  animation: rise 0.55s ease 0.08s both;
}

.login-panel__header {
  margin-bottom: 1.4rem;
  text-align: center;
}

.login-panel__header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--ink);
}

.login-panel__header p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.alert {
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.alert-error {
  background: #fdecea;
  color: var(--err);
  border: 1px solid #f5c6c0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 3.4rem;
}

.password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
}

.login-hint {
  margin: 1.2rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.login-hint a {
  color: var(--brand);
  font-weight: 600;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-brand-logo {
    width: min(240px, 72%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .location-pin,
  .location-pulse,
  .location-base {
    animation: none !important;
  }

  .location-pin {
    transform: none;
  }

  .location-pulse {
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(1.2);
  }
}
