/* Estilos personalizados para el formulario de login moderno */

.login-container {
    padding: 20px 0;
}

.login-card {
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card .card-header {
    border-radius: 15px 15px 0 0 !important;
    background: #495057 !important;
    border: none;
}

.login-card .card-body {
    background: rgba(255, 255, 255, 0.95);
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 12px 15px;
    font-size: 16px;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

/* Foco especial para input-group */
.input-group .form-control:focus {
    transform: none;
    z-index: 3;
}

.input-group .form-control:focus + .btn-outline-secondary {
    border-color: #667eea;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.btn-primary {
    background: #495057;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(73, 80, 87, 0.3);
    background: #343a40;
}

.btn-outline-success, .btn-outline-info {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-success:hover, .btn-outline-info:hover {
    transform: translateY(-1px);
}

.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fcc419 100%);
    color: #495057;
}

.input-group {
    width: 100%;
}

.input-group .btn-outline-secondary {
    border-radius: 0 10px 10px 0;
    border-left: none;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    border-left: none;
}

.input-group .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.input-group .form-control {
    border-radius: 10px 0 0 10px;
    border-right: none;
    flex: 1;
}

/* Modal personalizado */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    background: #495057;
    color: white;
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        margin: 10px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Efectos hover para los enlaces */
.nav-link:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Estilos para el estado disabled */
.form-control:disabled, .form-select:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mejoras para el selector de tipo de login */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Estilos para el icono de ojo en el campo de contraseña */
#togglePassword {
    border-left: 1px solid #dee2e6;
    min-width: 45px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#togglePassword:hover {
    background-color: #e9ecef;
}

#toggleIcon {
    font-size: 16px;
    color: #6c757d;
}

/* Mejoras para los botones de acción */
.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
}

/* Estilos para el separador */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    margin: 2rem 0;
}

/* Estilos para validación de formulario */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Estilos para el botón deshabilitado */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Mejoras para el modal de recuperación de contraseña */
.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1.5rem 2rem;
}

/* Estilos para el indicador de carga */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras para dispositivos móviles */
@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .modal-body, .modal-footer {
        padding: 1rem;
    }
}
