:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --error-color: #ef233c;
    --success-color: #2ec4b6;
    --warning-color: #ff9e00;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #2b2d42;
    --muted-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.form-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

.form-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.form-header {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-color);
    font-weight: 700;
    font-size: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.section-title {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 4px;
}

.required-label::after {
    content: " *";
    color: var(--error-color);
    font-weight: bold;
}

.form-control, .form-select {
    border-radius: var(--border-radius);
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.invalid-feedback {
    font-size: 0.85rem;
    color: var(--error-color);
    margin-top: 5px;
    font-weight: 500;
}

.image-upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    background-color: rgba(67, 97, 238, 0.05);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.image-upload-area:hover {
    background-color: rgba(67, 97, 238, 0.1);
    transform: translateY(-2px);
}

.image-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.upload-icon {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.image-upload-area:hover .upload-icon {
    transform: scale(1.1);
    color: var(--accent-color);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 30px;
    font-weight: 600;
    width: 100%;
    transition: var(--transition);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(58, 12, 163, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(58, 12, 163, 0.4);
}

.btn-submit:active {
    transform: translateY(1px);
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.btn-submit:hover::after {
    opacity: 1;
}

.btn-submit span {
    position: relative;
    z-index: 2;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.image-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.monto-container {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(248, 249, 250, 0.7);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    animation: fadeIn 0.4s ease-out;
}

.form-check-input:checked ~ .monto-container {
    display: block;
}

.alert {
    border-radius: var(--border-radius);
    padding: 15px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mejoras para los checkboxes y radios */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.2em;
}

.form-check-label {
    margin-left: 8px;
    font-weight: 500;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Efecto para los campos inválidos */
.is-invalid {
    border-color: var(--error-color);
    background-image: none;
    padding-right: 12px;
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 35, 60, 0.2);
    border-color: var(--error-color);
}

/* Responsive design mejorado */
@media (min-width: 768px) {
    .form-container {
        max-width: 750px;
        padding: 40px 0;
    }
    
    .btn-submit {
        width: auto;
        float: right;
    }
    
    .form-card {
        padding: 40px;
    }
}

@media (min-width: 992px) {
    .form-container {
        max-width: 800px;
    }
}

/* Efecto de carga */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: middle;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
/* Agrega esto al final de tu archivo CSS */

/* Contenedor del mensaje de estado */
#statusMessage {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
    max-height: 100px;
    transition: all 0.3s ease;
}

/* Versión compacta para mensajes de error */
#statusMessage.alert-danger {
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: rgba(239, 35, 60, 0.1);
    border: 1px solid rgba(239, 35, 60, 0.2);
    color: var(--error-color);
}

/* Icono de error */
#statusMessage.alert-danger::before {
    content: "⚠";
    margin-right: 8px;
    font-size: 1.1em;
}

/* Asegurar que el botón permanezca visible */
#submitBtn {
    margin-top: 20px !important;
    position: relative;
    z-index: 2;
}

/* Animación para mensajes */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake-error {
    animation: shake 0.5s ease-in-out;
}

/* Versión responsiva */
@media (max-width: 576px) {
    #statusMessage {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}