/* Login — HIF Sorteo 2026 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  color: var(--hif-white);
  background: var(--hif-gradient-dark);
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.login-bg__mesh {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(14, 165, 233, 0.22), transparent 55%),
    radial-gradient(ellipse 45% 35% at 80% 70%, rgba(16, 185, 129, 0.2), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(139, 92, 246, 0.12), transparent 55%);
  animation: meshDrift 25s ease-in-out infinite alternate;
}

.login-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
}

.login-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: orbFloat 12s ease-in-out infinite;
}

.login-bg__orb--1 {
  width: 320px; height: 320px;
  background: rgba(16, 185, 129, 0.35);
  top: -80px; right: -60px;
}

.login-bg__orb--2 {
  width: 280px; height: 280px;
  background: rgba(14, 165, 233, 0.3);
  bottom: -60px; left: -40px;
  animation-delay: -4s;
}

@keyframes meshDrift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(2%, -2%) rotate(2deg); }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.05); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 2px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(14, 165, 233, 0.3), rgba(139, 92, 246, 0.2));
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: cardEnter 0.7s var(--ease) both;
}

.login-card__inner {
  background: rgba(12, 25, 41, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: calc(var(--radius-xl) - 2px);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.login-card__banner {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  display: block;
  box-shadow: var(--shadow-md);
}

.login-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hif-green-light);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.login-card__badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--hif-green-light);
  box-shadow: 0 0 8px var(--hif-green-light);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.login-card__title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.45rem;
  background: linear-gradient(135deg, #fff 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card__sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.login-field {
  position: relative;
  margin-bottom: 1rem;
  text-align: left;
}

.login-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.5rem;
}

.login-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--hif-white);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.login-field input::placeholder { color: rgba(255, 255, 255, 0.3); }

.login-field input:focus {
  outline: none;
  border-color: var(--hif-green);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.login-field__toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s;
}

.login-field__toggle:hover { color: rgba(255, 255, 255, 0.85); }

.login-btn {
  width: 100%;
  padding: 1.05rem 1.5rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--hif-white);
  background: var(--hif-gradient);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.login-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(16, 185, 129, 0.45);
}

.login-btn:hover:not(:disabled)::after { transform: translateX(100%); }

.login-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }

.login-error {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  min-height: 0;
}

.login-error:empty { display: none; padding: 0; border: none; background: none; }

.login-foot {
  margin-top: 1.75rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 480px) {
  .login-card__inner { padding: 1.75rem 1.35rem 1.5rem; }
  .login-card__title { font-size: 1.75rem; }
}
