/* Contenedor principal del login */
.login-container {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--fondo) 0%, #F9F5F0 100%);
}

/* Tarjeta de login */
.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(139, 94, 60, 0.15);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(139, 94, 60, 0.1);
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Título del login */
.login-title {
  font-family: 'Merriweather', serif;
  color: var(--primario);
  margin: 0 0 8px 0;
  font-size: 32px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.login-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--acento);
  border-radius: 2px;
}

/* Subtítulo */
.login-subtitle {
  color: var(--texto);
  opacity: 0.7;
  text-align: center;
  margin: 0 0 30px 0;
  font-size: 15px;
}

/* Formulario de login */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Grupos de input */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: var(--texto);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label::before {
  content: '•';
  color: var(--acento);
  font-size: 18px;
}

/* Inputs específicos para login */
.login-form input[type="text"],
.login-form input[type="password"] {
  padding: 14px 16px;
  border: 2px solid #E8E0D5;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s ease;
  background: #FCFAF7;
  color: var(--texto);
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--primario);
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.1);
  background: #fff;
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
  color: #A89B8C;
  opacity: 0.7;
}

/* Botón de login específico */
.login-btn {
  background: linear-gradient(135deg, var(--primario) 0%, #9C6B4A 100%);
  color: var(--fondo);
  padding: 16px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  margin-top: 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(139, 94, 60, 0.25);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 94, 60, 0.35);
  background: linear-gradient(135deg, #9C6B4A 0%, var(--primario) 100%);
}

.login-btn:active {
  transform: translateY(0);
}

/* Mensaje de error */
.error-message {
  background: linear-gradient(135deg, #F8E9E7 0%, #F5DFDD 100%);
  border-left: 4px solid #c14a3a;
  padding: 14px 16px;
  border-radius: 8px;
  margin-top: 20px;
  color: #8B3A30;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.error-message::before {
  content: '⚠';
  font-size: 18px;
}

/* Logo en el login (opcional) */
.login-logo {
  text-align: center;
  margin-bottom: 25px;
}

.login-logo-text {
  font-family: 'Merriweather', serif;
  font-size: 36px;
  color: var(--primario);
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.login-logo-text::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--acento), transparent);
}

/* Enlace de recuperación (si lo agregas después) */
.login-forgot {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 94, 60, 0.1);
}

.login-forgot a {
  color: var(--primario);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.login-forgot a:hover {
  color: var(--acento);
  text-decoration: underline;
}

/* Responsive para login */
@media (max-width: 768px) {
  .login-container {
    padding: 20px;
    min-height: calc(100vh - 130px);
  }
  
  .login-card {
    padding: 30px 25px;
    margin: 0 15px;
  }
  
  .login-title {
    font-size: 28px;
  }
  
  .login-form input[type="text"],
  .login-form input[type="password"] {
    padding: 12px 14px;
  }
  
  .login-btn {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 25px 20px;
    border-radius: 12px;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .login-logo-text {
    font-size: 28px;
  }
}

/* Efecto de carga (opcional para futuro) */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* auth.css - Estilos específicos para autenticación (login, registro, recuperación) */

/* ===========================================
   VARIABLES ESPECÍFICAS PARA AUTENTICACIÓN
=========================================== */
:root {
  --auth-primary: #8B5E3C;
  --auth-accent: #D9A441;
  --auth-bg: #F5F1E8;
  --auth-text: #3A2F2A;
  --auth-error: #c14a3a;
  --auth-success: #2ecc71;
  --auth-warning: #f39c12;
}

/* ===========================================
   CONTENEDORES Y LAYOUT
=========================================== */
.auth-container {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--auth-bg) 0%, #F9F5F0 100%);
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(139, 94, 60, 0.15);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(139, 94, 60, 0.1);
  animation: authFadeIn 0.5s ease-out;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================================
   LOGO Y ENCABEZADOS
=========================================== */
.auth-logo {
  text-align: center;
  margin-bottom: 25px;
}

.auth-logo-text {
  font-family: 'Merriweather', serif;
  font-size: 36px;
  color: var(--auth-primary);
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.auth-logo-text::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--auth-accent), transparent);
}

.auth-title {
  font-family: 'Merriweather', serif;
  color: var(--auth-primary);
  margin: 0 0 8px 0;
  font-size: 32px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.auth-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--auth-accent);
  border-radius: 2px;
}

.auth-subtitle {
  color: var(--auth-text);
  opacity: 0.7;
  text-align: center;
  margin: 0 0 30px 0;
  font-size: 15px;
}

/* ===========================================
   FORMULARIOS
=========================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form .form-group label {
  font-weight: 500;
  color: var(--auth-text);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-form .form-group label::before {
  content: '•';
  color: var(--auth-accent);
  font-size: 18px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  padding: 14px 16px;
  border: 2px solid #E8E0D5;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s ease;
  background: #FCFAF7;
  color: var(--auth-text);
  width: 100%;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.1);
  background: #fff;
}

.auth-form input::placeholder {
  color: #A89B8C;
  opacity: 0.7;
}

/* ===========================================
   BOTONES DE AUTENTICACIÓN
=========================================== */
.auth-btn {
  background: linear-gradient(135deg, var(--auth-primary) 0%, #9C6B4A 100%);
  color: #fff;
  padding: 16px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  margin-top: 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(139, 94, 60, 0.25);
  width: 100%;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 94, 60, 0.35);
  background: linear-gradient(135deg, #9C6B4A 0%, var(--auth-primary) 100%);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ===========================================
   MANEJO DE CONTRASEÑAS
=========================================== */
.password-container {
  position: relative;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-primary);
  cursor: pointer;
  font-size: 18px;
  padding: 5px;
  z-index: 10;
}

.password-toggle:hover {
  color: #9C6B4A;
}

.password-strength {
  margin-top: 5px;
  font-size: 13px;
  display: none;
}

.strength-meter {
  height: 4px;
  background: #eee;
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.strength-weak { background: #ff4d4d; }
.strength-medium { background: #ffa500; }
.strength-strong { background: #2ecc71; }

.requirements {
  margin-top: 10px;
  padding: 10px;
  background: #F9F5F0;
  border-radius: 6px;
  border-left: 3px solid var(--auth-primary);
  display: none;
}

.requirement {
  font-size: 13px;
  color: #666;
  margin: 3px 0;
  display: flex;
  align-items: center;
}

.requirement i {
  margin-right: 8px;
  font-size: 12px;
}

.requirement.valid i {
  color: var(--auth-success);
}

.requirement.invalid i {
  color: var(--auth-error);
}

.requirement.valid {
  color: #27ae60;
}

.requirement.invalid {
  color: #c0392b;
}

/* ===========================================
   MENSAJES Y ALERTAS
=========================================== */
.auth-message {
  padding: 14px 16px;
  border-radius: 8px;
  margin-top: 20px;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: authSlideIn 0.3s ease-out;
}

@keyframes authSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-error {
  background: linear-gradient(135deg, #F8E9E7 0%, #F5DFDD 100%);
  border-left: 4px solid var(--auth-error);
  color: #8B3A30;
}

.auth-success {
  background: linear-gradient(135deg, #E8F7EF 0%, #DFF2E9 100%);
  border-left: 4px solid var(--auth-success);
  color: #1e7a4d;
}

.auth-warning {
  background: linear-gradient(135deg, #FFF3CD 0%, #FFEEBA 100%);
  border-left: 4px solid var(--auth-warning);
  color: #856404;
}

/* ===========================================
   ENLACES ADICIONALES
=========================================== */
.auth-links {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 94, 60, 0.1);
}

.auth-links a {
  color: var(--auth-primary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.auth-links a:hover {
  color: var(--auth-accent);
  text-decoration: underline;
}

.auth-register {
  text-align: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.auth-register a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-register a:hover {
  text-decoration: underline;
}

/* ===========================================
   CHECKBOX Y OPCIONES
=========================================== */
.auth-options {
  margin-top: 10px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--auth-text);
}

.auth-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-primary);
}

/* ===========================================
   NOTIFICACIONES FLOTANTES
=========================================== */
.auth-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 400px;
  animation: authNotificationIn 0.3s ease-out;
}

@keyframes authNotificationIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes authNotificationOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.auth-notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
  padding: 0;
  line-height: 1;
}

/* ===========================================
   LOADERS Y ESTADOS DE CARGA
=========================================== */
.auth-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

/* ===========================================
   RESPONSIVE
=========================================== */
@media (max-width: 768px) {
  .auth-container {
    padding: 20px;
    min-height: calc(100vh - 130px);
  }
  
  .auth-card {
    padding: 30px 25px;
    margin: 0 15px;
  }
  
  .auth-title {
    font-size: 28px;
  }
  
  .auth-logo-text {
    font-size: 32px;
  }
  
  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"] {
    padding: 12px 14px;
  }
  
  .auth-btn {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(139, 94, 60, 0.1);
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .auth-logo-text {
    font-size: 28px;
  }
  
  .auth-subtitle {
    font-size: 14px;
  }
  
  .auth-form {
    gap: 18px;
  }
}

/* ===========================================
   PÁGINAS ESPECÍFICAS
=========================================== */
/* Para registro */
.auth-password-hint {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
}

.auth-form-error {
  color: var(--auth-error);
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

/* Para recuperación de contraseña */
.auth-recovery-info {
  background: #F9F5F0;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--auth-text);
  border-left: 4px solid var(--auth-accent);
}

/* ===========================================
   ESTILOS ESPECÍFICOS PARA REGISTRO
=========================================== */

/* Input de edad */
.age-input {
    max-width: 100px;
    text-align: center;
}

/* Fila de formulario */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Texto de ayuda */
.register-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
    line-height: 1.4;
}

/* Errores de formulario */
.form-error {
    color: var(--auth-error);
    font-size: 14px;
    margin-top: 5px;
    padding: 5px 8px;
    background: #FEF2F2;
    border-radius: 4px;
    border-left: 3px solid var(--auth-error);
    display: none;
}

/* Checkbox de términos */
.terms-container {
    margin: 15px 0;
    padding: 15px;
    background: #F9F5F0;
    border-radius: 8px;
    border: 1px solid #E8E0D5;
}

.terms-text {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive para registro */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 15px;
    }
    
    .age-input {
        max-width: 100%;
    }
}