/* Fondo oscuro que cubre el área de la vista actual [1, 2] */
.capa-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

/* Contenedor al 98% con bordes redondeados [1-3] */
.capa-contenedor {
    width: 98%;
    height: 98%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column; /* Apila barra superior e iframe verticalmente */
    overflow: hidden;
}

/* Barra superior de la ventana */
.barra-superior {
    height: 45px;
    background: #f3f4f6;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Título izquierda, X derecha */
    padding: 0 15px;
}

/* Estilo del título */
.titulo-ventana {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

/* Botón de cierre (X) a la derecha */
.btn-cerrar {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #6b7280;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-cerrar:hover { 
    background: #e5e7eb;
    color: #111827;
}

/* Iframe que carga la siguiente vista [1, 2] */
.capa-contenedor iframe {
    flex-grow: 1; /* Ocupa todo el espacio restante debajo de la barra */
    width: 100%;
    border: none;
    background: white;
    display: block;
}
