
/* =====================================================================
   BURBUJAS DE NOTIFICACIÓN, CARGA, CAMPANA Y SWEETALERT COMPACTO
   ===================================================================== */
#dt-toasts { position: fixed; top: 76px; right: 18px; z-index: 20000; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
.dt-toast {
    pointer-events: auto; position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 13px 40px 15px 14px;
    background: var(--dt-surface, #fff); border: 1px solid var(--dt-line, #ece5eb); border-left: 5px solid var(--tc, #0E8FD6);
    border-radius: 14px; box-shadow: 0 14px 36px rgba(40, 10, 30, .20); overflow: hidden;
    animation: dt-toast-in .32s cubic-bezier(.2, .9, .3, 1.2) both;
}
.dt-toast-success { --tc: #12A150; --tb: #E6F8EE; }
.dt-toast-error { --tc: #DC3545; --tb: #FDECEE; }
.dt-toast-warning { --tc: #E89A0C; --tb: #FFF6E0; }
.dt-toast-info { --tc: #0E8FD6; --tb: #E6F4FD; }
.dt-toast-ico { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--tb); color: var(--tc); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.dt-toast-body { min-width: 0; padding-top: 1px; }
.dt-toast-title { font-weight: 700; font-size: .9rem; line-height: 1.25; color: var(--text-primary-light); word-break: break-word; }
.dt-toast-text { font-size: .8rem; line-height: 1.35; color: var(--text-secondary-light); margin-top: 3px; word-break: break-word; max-height: 6.5em; overflow: auto; }
.dt-toast-x { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: var(--text-secondary-light); font-size: 20px; line-height: 1; padding: 2px; border-radius: 50%; display: flex; }
.dt-toast-x:hover { color: var(--tc); background: var(--tb); }
.dt-toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.dt-toast-bar span { display: block; height: 100%; background: var(--tc); transform-origin: left; animation: dt-toast-bar linear forwards; }
.dt-toast-pausa .dt-toast-bar span { animation-play-state: paused; }
.dt-toast-out { animation: dt-toast-out .26s ease forwards; }
.dt-toast-pulse { animation: dt-shake .32s ease; }
@keyframes dt-toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dt-toast-out { to { opacity: 0; transform: translateX(40px) scale(.96); height: 0; padding: 0; margin: -5px 0; border-width: 0; } }
@keyframes dt-toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 575.98px) { #dt-toasts { top: 68px; right: 14px; left: 14px; width: auto; } }

/* Barra de carga superior + pastilla "Cargando…" */
#dt-topbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 20001; opacity: 0; transition: opacity .2s; pointer-events: none; overflow: hidden; }
#dt-topbar.on { opacity: 1; }
#dt-topbar span { position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, #A8186F, #F26522, transparent); animation: dt-top 1.1s ease-in-out infinite; }
@keyframes dt-top { from { left: -40%; } to { left: 100%; } }
#dt-loader {
    position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 20001; display: flex; align-items: center; gap: 10px;
    background: var(--dt-surface, #fff); border: 1px solid var(--dt-line); color: var(--primary-700); font-weight: 600; font-size: .85rem;
    padding: 9px 18px; border-radius: 999px; box-shadow: 0 12px 30px rgba(141, 14, 88, .25); opacity: 0; pointer-events: none; transition: all .25s ease;
}
#dt-loader.on { opacity: 1; transform: translate(-50%, 0); }

/* Campana */
.dt-bell-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--primary-50); color: var(--primary-700); display: flex; align-items: center; justify-content: center; font-size: 22px; transition: all .18s; }
.dt-bell-btn:hover { background: var(--primary-100); transform: rotate(-12deg); }
.dt-bell-badge { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: linear-gradient(135deg, #F26522, #DC3545); color: #fff; font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--dt-surface, #fff); animation: dt-pop .4s ease; }
@keyframes dt-pop { from { transform: scale(0); } to { transform: scale(1); } }
.dt-bell-menu { width: 360px; max-width: 94vw; border: 1px solid var(--dt-line); border-radius: 16px; box-shadow: 0 24px 60px rgba(40, 10, 30, .25); overflow: hidden; }
.dt-bell-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: var(--dt-grad); color: #fff; font-weight: 700; }
.dt-bell-clear { border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.dt-bell-clear:hover { background: rgba(255, 255, 255, .3); }
.dt-bell-body { max-height: 400px; overflow: auto; }
.dt-bell-sec { padding: 9px 16px 5px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary-500); background: color-mix(in srgb, var(--primary-50) 60%, transparent); }
.dt-bell-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--dt-line); color: inherit; text-decoration: none; transition: background .12s; }
a.dt-bell-item:hover { background: var(--primary-50); }
.dt-bell-item.nuevo { background: color-mix(in srgb, var(--primary-50) 70%, transparent); }
.dt-bell-ico { flex: 0 0 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.dt-ico-success { background: #E6F8EE; color: #12A150; } .dt-ico-error { background: #FDECEE; color: #DC3545; }
.dt-ico-warning { background: #FFF6E0; color: #C77F00; } .dt-ico-info { background: #E6F4FD; color: #0E8FD6; }
.dt-bell-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.dt-bell-txt b { font-size: .85rem; font-weight: 700; color: var(--text-primary-light); }
.dt-bell-txt small { font-size: .75rem; color: var(--text-secondary-light); }
.dt-bell-hora { opacity: .75; font-size: .68rem !important; }
.dt-bell-n { min-width: 30px; text-align: center; font-weight: 800; font-size: .78rem; padding: 3px 8px; border-radius: 999px; background: var(--dt-grad); color: #fff; }
.dt-bell-vacio { padding: 18px 16px; text-align: center; font-size: .82rem; color: var(--text-secondary-light); }

/* Burbujas numéricas en el menú lateral */
.dt-menu-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: linear-gradient(135deg, #F26522, #DC3545); color: #fff; font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(242, 101, 34, .4); }
.sidebar.active:not(:hover) .dt-menu-badge { display: none; }
.sidebar-menu li > a { display: flex; align-items: center; }

/* SweetAlert2: diálogos compactos y ordenados */
.swal2-popup.dt-swal:not([style*="width"]) { width: 26rem; }
.swal2-popup.dt-swal { max-width: 94vw; padding: 1.3rem 1.2rem 1.1rem !important; border-radius: 18px !important; box-shadow: 0 30px 80px rgba(40, 10, 30, .35); }
.swal2-popup.dt-swal .swal2-icon { font-size: .68rem; margin: .1rem auto .35rem; }
.swal2-popup.dt-swal .swal2-title { font-size: 1.12rem !important; font-weight: 800; line-height: 1.3; padding: 0 .4rem; margin: 0; color: var(--text-primary-light); }
.swal2-popup.dt-swal .swal2-html-container { font-size: .9rem; line-height: 1.45; margin: .65rem .4rem .2rem; color: var(--text-secondary-light); text-align: center; max-height: 55vh; }
.swal2-popup.dt-swal .swal2-actions { margin: 1.05rem 0 0; gap: .5rem; width: 100%; }
.swal2-popup.dt-swal .swal2-styled { font-size: .88rem !important; padding: .55rem 1.15rem !important; margin: 0 !important; flex: 1 1 auto; }
.swal2-popup.dt-swal .swal2-input, .swal2-popup.dt-swal .swal2-textarea, .swal2-popup.dt-swal .swal2-select { font-size: .9rem; margin: .8rem .2rem 0; width: calc(100% - .4rem); border-radius: 10px; border: 1.5px solid #E1D8E0; box-shadow: none; }
.swal2-popup.dt-swal .swal2-input:focus, .swal2-popup.dt-swal .swal2-textarea:focus { border-color: var(--primary-600); box-shadow: 0 0 0 4px var(--dt-ring); }
.swal2-popup.dt-swal .form-control, .swal2-popup.dt-swal .form-select { font-size: .88rem; text-align: left; }
.swal2-popup.dt-swal pre { margin: 0; }
.swal2-popup.dt-swal .swal2-close { font-size: 1.6rem; }
.swal2-backdrop-show { backdrop-filter: blur(3px); }

/* Tarjetas del panel: más color */
.card.bg-gradient-start-1 { background: linear-gradient(135deg, #E6F6FD 0%, var(--dt-surface) 70%) !important; }
.card.bg-gradient-start-2 { background: linear-gradient(135deg, #F1EAFE 0%, var(--dt-surface) 70%) !important; }
.card.bg-gradient-start-3 { background: linear-gradient(135deg, #E6F8EE 0%, var(--dt-surface) 70%) !important; }
.card.bg-gradient-start-4 { background: linear-gradient(135deg, #FFF1E2 0%, var(--dt-surface) 70%) !important; }
.card.bg-gradient-start-5 { background: linear-gradient(135deg, #FDE8EF 0%, var(--dt-surface) 70%) !important; }
