/* ============================================
   Cobro Móvil Rewards — Login Styles (React adaptation)
   Basado en los estilos del componente Register de React
   ============================================ */

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

/* ── Variables ── */
:root {
  --bg-mint: #E5FAF7;
  --teal-light: #1CABA6;
  --teal-mid: #2abfaa;
  --teal-dark: #0e9e88;
  --blue-gradient-start: #0FB5C9;
  --blue-gradient-end: #0086B2;
  --white: #ffffff;
  --shadow-input: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-button: 4px 4px 8px -2px rgba(0,0,0,0.6);
  --radius-input: 0.5rem;
  --radius-button: 0.5rem;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg-mint) 0%, #d0f0ec 100%);
}

/* ── Contenedor principal ── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.login-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  max-height: 900px;
  background-color: var(--bg-mint);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  animation: containerEntrance 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes containerEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo Wrapper (igual que en React) ── */
.logo-wrapper {
  position: relative;
  z-index: 20;
  padding: 0;
  margin-top: 2vh;
  display: flex;
  justify-content: center;
}

.feature-logo {
  height: 20vh;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ── Hero Person Wrapper (igual que en React) ── */
.hero-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  margin-top: 10vh;
  padding: 0 0 0 0;
  pointer-events: none;
}

.hero-person {
  height: 20vh;
  max-height: 20vh;
  width: auto;
  object-fit: contain;
}

/* ── Bottom Area (fijo abajo) ── */
.bottom-area {
  position: absolute;
  bottom: -2vh;
  left: 0;
  right: 0;
  z-index: 1;
}

/* SVG de fondo */
.bottom-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  overflow: hidden;
}

.bottom-wave {
  width: 100%;
  height: 64vh;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── Formulario (posicionado sobre el SVG) ── */
.login-form {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  padding: 0 2rem;
  margin-bottom: 10vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Campos de input (igual que en React) ── */
.input-field {
  width: 100%;
}

.input-field input {
  width: 100%;
  height: 2.25rem; /* h-9 en Tailwind = 36px */
  background-color: var(--white);
  border: 0;
  padding: 0 1.25rem;
  font-size: 1.2rem;
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-input);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  transition: box-shadow 0.2s, transform 0.2s;
}

.input-field input::placeholder {
  color: var(--teal-light);
  font-weight: 600;
  opacity: 0.8;
}

.input-field input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(28, 171, 166, 0.2);
  transform: scale(1.01);
}

/* ── Botón de login (igual que en React) ── */
.button-wrapper {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

.btn-login {
  height: 2.25rem;
  padding: 0 3rem;
  background: linear-gradient(180deg, #0FB5C9 0%, #0086B2 100%);
  border: none;
  border-radius: var(--radius-button);
  box-shadow: var(--shadow-button);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  min-width: 180px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 12px -2px rgba(0,0,0,0.6);
  filter: brightness(1.05);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 2px 2px 6px -2px rgba(0,0,0,0.6);
}

/* ── Alertas ── */
.alert-error {
  background: rgba(245, 226, 226, 1);
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  color: #dc3545;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(4px);
}

.alert-success {
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.5);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  color: #28a745;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(4px);
}

/* ── Footer del formulario (similar a React) ── */
.form-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.5rem;
}

.register-link {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.register-link-btn {
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.register-link-btn:hover {
  text-decoration: underline;
}

.terms-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  font-weight: 400;
  margin-top: 0.25rem;
}

.terms-link {
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.terms-link:hover {
  text-decoration: underline;
}

/* ── Animaciones (igual que en React con Framer Motion) ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleAnimation {
  0% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 1; transform: scale(1.7); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-down {
  animation: fadeDown 0.6s ease-out both;
}

.scale-animation {
  animation: scaleAnimation 0.7s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fade-up {
  animation: fadeUp 0.6s 0.2s ease-out both;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .login-container {
    border-radius: 0;
    max-width: 100%;
  }
  
  .feature-logo {
    height: 20vh;
  }
  
  .hero-person {
    max-height: 55vh;
  }
  
  .login-form {
    padding: 0 1.5rem;
  }
  
  .input-field input {
    font-size: 1rem;
    height: 2rem;
  }
  
  .btn-login {
    padding: 0 2rem;
    min-width: 150px;
  }
}

@media (max-width: 380px) {
  .feature-logo {
    height: 20vh;
  }
  
  .hero-person {
    max-height: 55vh;
  }
  
  .login-form {
    padding: 0 1rem;
  }
}