/* ════ MODAL DE VISTA PREVIA ════ */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; color: #111; border-radius: 10px; padding: 36px 40px; max-width: 580px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #666; line-height: 1; padding: 4px 8px; }
.modal-close:hover { color: #111; }
.modal h3 { font-family: var(--font-d); font-size: 15px; color: var(--brand); letter-spacing: 2px; margin: 20px 0 10px; text-transform: uppercase; }
.modal-divider { border: none; border-top: 1px solid #e0e0e0; margin: 12px 0; }
.pre-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.pre-row:last-child { border: none; }
.pre-label { color: #555; }
.pre-val { font-weight: 600; }
.modal-dates { font-size: 11px; color: #888; margin-top: 4px; }
.modal-total { font-family: var(--font-d); font-size: 22px; color: var(--brand); text-align: right; margin-top: 14px; letter-spacing: 1px; }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* Sección de estado dentro del modal */
.modal-status-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 14px; background: #f8f5f2; border-radius: var(--radius-md); }
.modal-status-row label { font-size: 12px; color: #555; font-family: var(--font-d); letter-spacing: 1.5px; text-transform: uppercase; }
.modal-status-select { border: 1px solid #ccc; background: white; color: #111; padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font-b); outline: none; cursor: pointer; }
.modal-status-select:focus { border-color: var(--brand); }
.modal-save-status { background: var(--brand); color: white; border: none; padding: 7px 16px; border-radius: var(--radius-sm); font-family: var(--font-d); font-size: 12px; letter-spacing: 1.5px; cursor: pointer; transition: background .2s; }
.modal-save-status:hover { background: var(--brand-light); }

.modal-btn { border: none; padding: 10px 18px; border-radius: var(--radius-md); cursor: pointer; font-size: 13px; font-family: var(--font-d); letter-spacing: 1.5px; display: flex; align-items: center; gap: 7px; transition: all .2s; }
.modal-btn svg { width: 16px; height: 16px; }
.modal-btn-wa { background: var(--green); color: #fff; }
.modal-btn-wa:hover { background: var(--green-dark); }
.modal-btn-mail { background: none; border: 1px solid var(--brand); color: var(--brand); }
.modal-btn-mail:hover { background: var(--brand); color: white; }
.modal-btn-pdf { background: none; border: 1px solid #ccc; color: #444; }
.modal-btn-pdf:hover { border-color: #111; color: #111; }
.modal-btn-edit { background: none; border: 1px solid #d4870a; color: #d4870a; }
.modal-btn-edit:hover { background: #d4870a; color: white; }
.modal-btn-del { background: none; border: 1px solid var(--danger); color: var(--danger); }
.modal-btn-del:hover { background: var(--danger); color: white; }

/* ════ NOTIFICACIÓN ════ */
.notif { position: fixed; bottom: 28px; right: 28px; z-index: 9999; background: #1c2e1c; border: 1px solid #22c55e; border-left: 3px solid #22c55e; color: #86efac; padding: 12px 20px; border-radius: 7px; font-size: 13px; font-family: var(--font-b); display: none; max-width: 300px; box-shadow: 0 4px 20px rgba(0,0,0,.4); }

/* ════ DIÁLOGO DE CONFIRMACIÓN ════ */
.confirm-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 2000; align-items: center; justify-content: center; }
.confirm-bg.open { display: flex; }
.confirm-box { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--danger); border-radius: var(--radius-lg); padding: 28px 32px; max-width: 360px; width: 90%; text-align: center; }
.confirm-box h4 { font-family: var(--font-d); font-size: 16px; letter-spacing: 2px; color: var(--danger); margin-bottom: 10px; }
.confirm-box p { font-size: 13px; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-ok { background: var(--danger); color: white; border: none; padding: 9px 22px; border-radius: var(--radius-sm); font-family: var(--font-d); letter-spacing: 1.5px; cursor: pointer; font-size: 13px; }
.confirm-ok:hover { background: var(--danger-dark); }
.confirm-cancel { background: none; border: 1px solid var(--border2); color: var(--muted); padding: 9px 22px; border-radius: var(--radius-sm); font-family: var(--font-d); letter-spacing: 1.5px; cursor: pointer; font-size: 13px; }
.confirm-cancel:hover { border-color: var(--text); color: var(--text); }

@media (max-width: 700px) {
  .modal { padding: 24px 18px; }
}
