/* ── OVERLAY (fondo oscuro que cubre la pantalla) ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(30, 0, 60, 0.55);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

/* ── TARJETA DEL MODAL ── */
.modal-contenido {
    background-color: white;
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(103, 80, 164, 0.35);
}

/* ── ENCABEZADO DEL MODAL ── */
.modal-encabezado {
    padding: 22px 24px 18px;
    background-color: #6750A4;
    flex-shrink: 0;
}

.modal-titulo {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.modal-subtitulo {
    margin: 0;
    font-size: 13px;
    color: #EDE7F6;
    line-height: 1.4;
}

/* ── CUERPO DESPLAZABLE ── */
.modal-cuerpo {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.modal-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-lista li {
    padding: 12px 24px;
    border-bottom: 1px solid #ddd;
    border-left: 4px solid transparent;
    font-size: 14px;
    color: #1C1B1F;
    font-weight: 500;
}

.modal-lista li:last-child {
    border-bottom: none;
}

/* Colores de año en la lista del modal — mismos que la tabla principal */
.modal-lista li.fila-primer-anio  { background-color: #C9A7F4; border-left-color: #6A1FCC; }
.modal-lista li.fila-segundo-anio { background-color: #90CAF9; border-left-color: #1565C0; }
.modal-lista li.fila-tercer-anio  { background-color: #FFD9A0; border-left-color: #E65100; }
.modal-lista li.fila-cuarto-anio  { background-color: #A5D6A7; border-left-color: #2E7D32; }

.modal-vacio {
    padding: 40px 24px;
    text-align: center;
    color: #7E57C2;
    font-style: italic;
    margin: 0;
}

/* ── PIE DEL MODAL ── */
.modal-pie {
    padding: 14px 20px;
    border-top: 1px solid #EDE7F6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background-color: #F9F5FF;
    flex-shrink: 0;
}

.modal-pie .button {
    min-width: 120px;
}

/* Botón secundario sobre fondo claro (dentro del modal) */
.button-cerrar-modal {
    background-color: transparent;
    color: #6750A4;
    border: 1.5px solid #6750A4;
}

.button-cerrar-modal:hover {
    background-color: #EDE7F6;
}

/* ── MODAL DE BLOQUEO ── */
.modal-cuerpo-bloqueo {
    padding: 16px 24px;
}

.modal-bloqueo-subtitulo {
    font-weight: 600;
    color: #4A3880;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 16px 0 6px;
}

.modal-cuerpo-bloqueo .modal-lista li {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #C4B5D6;
    margin-bottom: 6px;
    background-color: white;
    font-size: 14px;
}

.modal-cuerpo-bloqueo .modal-lista li:nth-child(odd) {
    background-color: #FAF5FF;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .modal-contenido {
        max-height: 90vh;
        border-radius: 12px;
    }

    .modal-pie {
        flex-direction: column-reverse;
    }

    .modal-pie .button {
        width: 100%;
    }
}
