/*/login/*/

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: calc(100vh - 150px); /* Ajustar altura para que ocupe casi toda la pantalla */
    padding: var(--spacing-xl);
    background-color: var(--background-light); /* Fondo consistente */
  }


  .login {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-md);
    padding: var(--spacing-xl);
    height: auto; /* Altura automática para el contenido */
    width: 90%; /* Ancho responsivo */
    max-width: 400px; /* Ancho máximo para el formulario */
    display: flex;
    justify-content: center; /* Centrar elementos verticalmente */
    align-items: center;
    flex-direction: column;
    gap: var(--spacing-md); /* Espacio entre elementos */
    animation: fadeIn 0.8s ease-out; /* Animación de entrada */
}

.elemento p a {
  display: inline;
}

.h2-login {
    font-size: 2em;
    margin-bottom: var(--spacing-lg);
    color: var(--text-color-dark);
    text-align: center;
}

.login form {
    display: flex;
    flex-direction: column;
    width: 100%; /* El formulario ocupa todo el ancho del contenedor .login */
}

.login label {
    font-size: 1em;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color-dark);
}

.login input[type="email"],
.login input[type="password"] {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1em;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-md);
    width: 100%;
    box-sizing: border-box; /* Incluir padding y borde en el ancho */
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Transición para focus */
}

.login input[type="email"]:focus,
.login input[type="password"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
  outline: none;
}

.login button[type="submit"] {
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    cursor: pointer;
    font-size: 1em;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-top: var(--spacing-md);
    width: 100%; /* Botón ocupa todo el ancho */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login button[type="submit"]:hover {
    background-color: #0056b3; /* Azul más oscuro al pasar el ratón */
    transform: translateY(-2px);
}

.elemento {
  text-align: center;
  width: 100%;
}

.elemento p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-color-light);
  font-size: 0.9em;
}

.login a {
    color: var(--primary-color); /* Color consistente para los enlaces */
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.login a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsividad */
@media (max-width: 480px) {
  .login {
    padding: var(--spacing-lg);
    width: 95%;
  }

  .h2-login {
    font-size: 1.8em;
  }

  .login button[type="submit"] {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4facfe, #00f2fe, #4facfe);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-header h1 i {
    color: #4facfe;
    font-size: 24px;
}

.login-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Alert styles moved to base.css */

/* Form Styles */
.login-form {
    margin-bottom: 30px;
    position: relative;
    z-index: 5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #667eea;
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.input-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

/* Password Input Container */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    background: #f0f0f0;
    color: #333;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    position: relative;
    padding-left: 30px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #e0e0e0;
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 15px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
}

.login-button:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.3);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    z-index: 5;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.login-divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    position: relative;
    z-index: 5;
}

.social-button {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-button.google:hover {
    border-color: #db4437;
    color: #db4437;
}

.social-button.facebook:hover {
    border-color: #4267B2;
    color: #4267B2;
}

.social-button i {
    font-size: 16px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    position: relative;
    z-index: 5;
}

.login-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
        min-height: 100vh;
    }
    
    .login-card {
        padding: 30px 20px;
        margin: 10px;
        max-width: 100%;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .social-login {
        gap: 10px;
    }
    
    .social-button {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .form-input {
        padding: 12px 15px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .login-button {
        padding: 12px 15px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 5px;
    }
    
    .login-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-header p {
        font-size: 14px;
    }
    
    .form-input {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .login-button {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Animation for form inputs */
.form-input:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(-2px); }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Fix for mobile menu dropdown */
@media (max-width: 768px) {
    .header {
        position: relative;
        z-index: 1000;
    }
    
    .header__buttons {
        position: relative;
        z-index: 1001;
    }
    
    .profile-dropdown {
        position: relative;
        z-index: 1002;
    }
    
    .dropdown-content {
        position: absolute;
        right: 0;
        top: 100%;
        min-width: 200px;
        z-index: 1003;
    }
}

/* Ensure login form is above header */
.login-container {
    position: relative;
    z-index: 999;
}

.login-card {
    position: relative;
    z-index: 1000;
}

/* Estilos para el botón de admin */
.admin-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    margin-top: 15px;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.admin-button:hover {
    background: linear-gradient(135deg, #3a9bfe 0%, #00e6fe 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.admin-button:active {
    transform: translateY(0);
}

.admin-button i {
    font-size: 16px;
}

/* Animación para el botón de admin */
@keyframes adminButtonPulse {
    0% { box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(79, 172, 254, 0.5); }
    100% { box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3); }
}

.admin-button:hover {
    animation: adminButtonPulse 2s infinite;
}

/* Estilos para la página de forgot-password */
.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 5px;
    font-style: italic;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.back-link:hover {
    color: #3a9bfe;
    transform: translateX(-5px);
}

.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    border: 1px solid #dee2e6;
}

.info-title {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-title i {
    color: #4facfe;
    font-size: 18px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 14px;
}

.info-list li i {
    color: #28a745;
    font-size: 16px;
    flex-shrink: 0;
}

/* Responsive para forgot-password */
@media (max-width: 768px) {
    .info-card {
        margin-top: 20px;
        padding: 15px;
    }
    
    .info-title {
        font-size: 14px;
    }
    
    .info-list li {
        font-size: 13px;
    }
}
