diff --git a/src/index.html b/src/index.html
index 9b9c631..df4cf9e 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1833,8 +1833,15 @@ function openPrintPreview(data, mode) {
background: #444; color: #fff; border: none; border-radius: 6px;
font-size: 15px; cursor: pointer;
`;
+ // Salva qual modal estava aberto antes do preview (para reabrir ao fechar)
+ const modalConfirmOpen = document.getElementById('modal-confirm')?.classList.contains('open');
+
btnFechar.onclick = () => {
document.body.removeChild(overlay);
+ // Se o modal de confirmação estava aberto antes, reabre ele
+ if (modalConfirmOpen) {
+ document.getElementById('modal-confirm').classList.add('open');
+ }
};
const btnImprimir = document.createElement('button');