/* Estilos acotados al historial para respetar los demás modales. */
#modalTodasNotificaciones { --historial-borde: #e2e8f0; --historial-fondo: #f5f7fb; }
#modalTodasNotificaciones .modal-dialog { max-width: 1000px; }
#modalTodasNotificaciones .modal-content { border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 80px #0f172a38; }
#modalTodasNotificaciones .modal-header { border-radius: 0; padding: 22px 26px; border: 0; box-shadow: none; }
#modalTodasNotificaciones .modal-title { font-weight: 700; font-size: 1.15rem; line-height: 1.5; }
#modalTodasNotificaciones .close { color: inherit; opacity: .85; text-shadow: none; }
#modalTodasNotificaciones .modal-body { background: var(--historial-fondo); padding: 24px; max-height: 72vh; max-height: 72dvh; overflow-y: auto; }
#filtrosHistorialNotificaciones { background: #fff; border: 1px solid var(--historial-borde); padding: 20px; border-radius: 16px; }
#filtrosHistorialNotificaciones label { font-size: .78rem; font-weight: 700; color: #475569; }
#filtrosHistorialNotificaciones .form-control { border-radius: 9px; border-color: var(--historial-borde); min-height: 39px; font-size: .85rem; width: 100%; min-width: 0; }
#modalTodasNotificaciones .btn { border-radius: 10px; padding: 10px 16px; font-size: .82rem; font-weight: 600; transition: filter .15s, box-shadow .15s; }
#modalTodasNotificaciones .btn:hover { filter: brightness(.95); }
#modalTodasNotificaciones .btn:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
#modalTodasNotificaciones .btn:disabled { cursor: wait; opacity: .6; }
.historial-acciones, .historial-filtros-acciones, .historial-exportaciones { display: flex; flex-wrap: wrap; gap: 8px; }
.historial-acciones { justify-content: space-between; border-top: 1px solid var(--historial-borde); padding-top: 16px; }
#modalTodasNotificaciones .historial-excel { background: #e9f7ef; color: #166534; border: 1px solid #bbdfc8; }
#modalTodasNotificaciones .historial-pdf { background: #fff0ef; color: #a12525; border: 1px solid #f4cdca; }
#estadoHistorial:not(:empty) { padding: 12px 16px; margin-bottom: 12px; border-radius: 10px; background: #e9eef6; color: #334155; font-size: .88rem; }
#modalTodasNotificaciones .notificacionHistorial { border: 1px solid var(--historial-borde); border-radius: 14px; background: #fff; margin-bottom: 10px; padding: 18px; gap: 0; }
#modalTodasNotificaciones .notificacionHistorialNoVista { border-left: 4px solid #64748b; background: #f8faff; }
#modalTodasNotificaciones .notificacionHistorialTitulo { color: #1e293b; font-size: .92rem; overflow-wrap: anywhere; }
#modalTodasNotificaciones .notificacionHistorialMensaje { color: #64748b; white-space: pre-line; overflow-wrap: anywhere; }
#modalTodasNotificaciones .notificacionHistorialFecha { color: #64748b; }
#modalTodasNotificaciones .marcarVistaHistorial { margin-top: 9px; padding: 5px 10px; }
#modalTodasNotificaciones .modal-footer { padding: 14px 24px; border-top: 1px solid var(--historial-borde); }
.dark-mode #modalTodasNotificaciones { --historial-borde: #475569; --historial-fondo: #1e293b; }
.dark-mode #modalTodasNotificaciones .modal-content,
.dark-mode #filtrosHistorialNotificaciones,
.dark-mode #modalTodasNotificaciones .notificacionHistorial { background: #273449; color: #e2e8f0; }
.dark-mode #modalTodasNotificaciones .notificacionHistorialNoVista { background: #303f56; }
.dark-mode #modalTodasNotificaciones label,
.dark-mode #modalTodasNotificaciones .notificacionHistorialTitulo { color: #f1f5f9; }
.dark-mode #modalTodasNotificaciones .text-muted,
.dark-mode #modalTodasNotificaciones .notificacionHistorialMensaje,
.dark-mode #modalTodasNotificaciones .notificacionHistorialFecha { color: #cbd5e1 !important; }
.dark-mode #modalTodasNotificaciones .form-control { background: #1e293b; color: #f1f5f9; color-scheme: dark; }
.dark-mode #modalTodasNotificaciones #estadoHistorial:not(:empty) { background: #334155; color: #e2e8f0; }
.dark-mode #modalTodasNotificaciones .btn-light { background: #475569; border-color: #64748b; }
.dark-mode #modalTodasNotificaciones .historial-excel { background: #14532d; border-color: #166534; }
.dark-mode #modalTodasNotificaciones .historial-pdf { background: #7f1d1d; border-color: #991b1b; }
@media (max-width: 575.98px) {
    #modalTodasNotificaciones .modal-dialog { margin: 10px; }
    #modalTodasNotificaciones .modal-content { border-radius: 16px; }
    #modalTodasNotificaciones .modal-header { padding: 18px; }
    #modalTodasNotificaciones .modal-title { font-size: 1rem; }
    #modalTodasNotificaciones .modal-body { padding: 12px; max-height: 74vh; max-height: 74dvh; }
    #filtrosHistorialNotificaciones { padding: 14px; }
    #filtrosHistorialNotificaciones .form-group { flex: 0 0 50%; max-width: 50%; }
    .historial-filtros-acciones, .historial-exportaciones { width: 100%; }
    .historial-acciones .btn { flex: 1; padding: 10px 8px; }
    #modalTodasNotificaciones .notificacionHistorial { padding: 12px; }
    #modalTodasNotificaciones .notificacionHistorialIcono { width: 34px; min-width: 34px; height: 34px; margin-right: 9px; }
    #modalTodasNotificaciones #cargarMasHistorial { width: 100%; }
}
