/* =========================================
   MODALES Y FORMULARIOS
========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(12, 15, 56, 0.6); /* Secondary con opacidad */
    backdrop-filter: blur(4px); /* Efecto moderno */
    justify-content: center; align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #ffffff;
    padding: var(--space-xl);
    border-radius: 16px;
    width: 90%; max-width: 550px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
}
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 950px; }

.modal-content h2, .modal-content h3 { 
    margin-bottom: var(--space-lg); 
    color: var(--secondary); 
    font-family: var(--font-head);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--bg-light); 
    padding-bottom: var(--space-sm); 
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid #f0f0f0;
}

/* Spinner */
.spinner {
    border: 4px solid rgba(38, 103, 255, 0.1);
    width: 50px; height: 50px;
    border-radius: 50%;
    border-left-color: var(--primary-main);
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }