/* Estilos para formularios de usuarios en el admin */

/* Tarjeta del formulario */
.user-form-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid #e9ecef;
    margin-top: 1.5rem;
}

.user-form-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.user-form-header h3 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1.25rem;
}

.user-form-body {
    padding: 2rem;
}

/* Campos del formulario */
.form-row {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Select específico */
.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;
    padding-right: 2.5rem;
}

/* Botones del formulario */
.form-buttons {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.btn-submit {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 0.375rem;
    margin-right: 0.5rem;
}

.btn-submit:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.btn-cancel {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-decoration: none;
    display: inline-block;
}

.btn-cancel:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
    text-decoration: none;
}

/* Mensajes de validación */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
}

/* Campos de contraseña */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: #495057;
}

/* Indicador de fortaleza de contraseña */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak {
    background-color: #dc3545;
    width: 25%;
}

.strength-fair {
    background-color: #ffc107;
    width: 50%;
}

.strength-good {
    background-color: #28a745;
    width: 75%;
}

.strength-strong {
    background-color: #17a2b8;
    width: 100%;
}

/* Responsividad */
@media (max-width: 768px) {
    .user-form-body {
        padding: 1.5rem;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .form-buttons {
        text-align: center;
    }
}
