/* Badges de alertas (campana navbar + ítem Alertas en sidebar) */
.wow-notif-badge {
  top: 3px;
  right: 3px;
  left: auto !important;
  transform: none !important;
  min-width: 1.125rem;
  min-height: 1.125rem;
  padding: 0.12rem 0.38rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.wow-notif-badge[style*="display:none"],
.wow-notif-badge[style*="display: none"] {
  display: none !important;
}
.sidebar-menu-badge {
  vertical-align: middle;
  margin-left: 0.35rem;
  font-size: 0.65rem !important;
  padding: 0.14rem 0.42rem !important;
  line-height: 1.15 !important;
  min-width: 1.15rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.sidebar-menu-badge[style*="display:none"],
.sidebar-menu-badge[style*="display: none"] {
  display: none !important;
}

/* ── Página Alertas /agent/notifications ─────────────────── */
.agent-notifications-page__icon {
  width: 52px;
  height: 52px;
}
.agent-notifications-card {
  overflow: hidden;
}
.agent-notifications-list {
  padding: 0;
}
.agent-notifications-list__item {
  border-bottom: 1px solid var(--neutral-200, #e8ecf1);
}
.agent-notifications-list__item:last-child {
  border-bottom: 0;
}
.agent-notif-item {
  position: relative;
  padding: 1.25rem 1.5rem;
  transition: background-color 0.15s ease;
}
@media (min-width: 768px) {
  .agent-notif-item {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}
.agent-notif-item--unread {
  background: linear-gradient(90deg, rgba(0, 146, 249, 0.06) 0%, rgba(255, 255, 255, 0) 48%),
    rgba(0, 146, 249, 0.04);
}
.agent-notif-item--read {
  background: var(--base, #fff);
}
.agent-notif-item--read:hover {
  background-color: rgba(20, 19, 59, 0.02);
}
.agent-notif-item__marker {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: transparent;
}
.agent-notif-item--unread .agent-notif-item__marker {
  background: linear-gradient(180deg, #0092f9 0%, #00e1c6 100%);
}
.agent-notif-item__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .agent-notif-item__inner {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}
.agent-notif-item__icon {
  width: 40px;
  height: 40px;
  margin-top: 2px;
  flex-shrink: 0;
}
.agent-notif-item--unread .agent-notif-item__icon {
  background: rgba(0, 146, 249, 0.12);
  color: #0092f9;
}
.agent-notif-item--read .agent-notif-item__icon {
  background: rgba(20, 19, 59, 0.06);
  color: #6b7280;
}
.agent-notif-item__title {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-primary-light, #14133b);
  min-width: 0;
  font-weight: 600;
}
.agent-notif-item__content {
  min-width: 0;
}
.agent-notif-item__body {
  line-height: 1.55;
}
.agent-notif-item__time {
  letter-spacing: 0.02em;
}
.agent-notif-item__badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.agent-notif-item__badge--new {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}
.agent-notif-item__badge--read {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}
.agent-notifications-empty__circle {
  width: 88px;
  height: 88px;
  background: linear-gradient(145deg, rgba(0, 146, 249, 0.08), rgba(0, 225, 198, 0.06));
}

.agent-notifications-scroll {
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.agent-notifications-pagination__nav .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}
.agent-notifications-pagination__nav .page-item.active .page-link {
  background-color: var(--primary-600, #487fff);
  border-color: var(--primary-600, #487fff);
  color: #fff;
}

/* Modal Ver información — reclasificaciones */
.recl-info-modal-inner .recl-info-card .card-header {
  border-radius: 12px 12px 0 0;
}
.recl-info-modal-inner .recl-info-card {
  overflow: hidden;
}
.recl-info-card-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  font-size: 1.125rem;
}
.recl-info-hero {
  background: linear-gradient(135deg, rgba(0, 146, 249, 0.07) 0%, rgba(0, 225, 198, 0.09) 100%);
}
.recl-info-quote {
  background: linear-gradient(135deg, rgba(0, 146, 249, 0.06) 0%, rgba(0, 225, 198, 0.07) 100%);
  border: 1px solid rgba(0, 146, 249, 0.18);
}
.recl-info-quote--muted {
  background: #f4f6f8;
  border: 1px solid #e8ecf1;
}
.recl-info-extra-table tbody tr:hover {
  background-color: rgba(0, 146, 249, 0.04);
}
#modalReclInfo .modal-body {
  border-radius: 0 0 12px 12px;
}

/* Historial reclasificaciones: cada fila en una sola línea (scroll horizontal si hace falta) */
.reclasificaciones-historial-table th,
.reclasificaciones-historial-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.reclasificaciones-historial-wrap {
  min-height: 0;
}
.reclasificaciones-historial-arrows {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  pointer-events: none;
}
/* Triple chevron: degradado #00E1C6 → #0092F9 (150deg) + animación en secuencia */
.reclasificaciones-historial-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.recl-triple-chev-svg {
  display: block;
  width: 3.95rem;
  height: auto;
  max-height: 2.75rem;
  overflow: visible;
  shape-rendering: geometricPrecision;
}
.reclasificaciones-historial-arrow--left .recl-triple-chev-svg {
  transform: scaleX(-1);
}
.reclasificaciones-historial-arrow.is-visible {
  opacity: 1;
}
.reclasificaciones-historial-arrow.is-visible .recl-chev {
  animation: recl-chev-seq 0.95s ease-in-out infinite;
}
.reclasificaciones-historial-arrow.is-visible .recl-chev--1 {
  animation-delay: 0ms;
}
.reclasificaciones-historial-arrow.is-visible .recl-chev--2 {
  animation-delay: 0.16s;
}
.reclasificaciones-historial-arrow.is-visible .recl-chev--3 {
  animation-delay: 0.32s;
}
/* Ola de brillo en secuencia, sin transform en paths (convive con scaleX en la flecha izquierda) */
@keyframes recl-chev-seq {
  0%,
  100% {
    opacity: 0.4;
  }
  35% {
    opacity: 1;
  }
  70% {
    opacity: 0.55;
  }
}

/* Tabla reclasificaciones: botones de acción alineados en fila */
.recl-table-acciones {
  vertical-align: middle !important;
}
.recl-th-acciones {
  vertical-align: middle;
}
.recl-acciones-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  min-height: 36px;
}
.recl-acciones-inner .recl-acciones-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  line-height: 1;
  flex: 0 0 auto;
}
.recl-acciones-inner .recl-btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.recl-acciones-inner .recl-btn-icon .recl-action-svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  flex-shrink: 0;
}

aside.sidebar {
    background: #14133b;
}

/* Items del menú en blanco (excepto active-page que tiene su propio estilo) */
.sidebar .sidebar-menu a {
    color: #fff;
}
.sidebar .sidebar-menu a:hover {
    color: #fff;
    opacity: 0.9;
}
.sidebar .sidebar-menu .menu-icon,
.sidebar .sidebar-menu iconify-icon {
    color: #fff !important;
}
.sidebar .sidebar-menu-group-title {
    color: rgba(255, 255, 255, 0.85);
}
.sidebar .sidebar-logo {
    color: #fff;
}
.sidebar-logo {
    border-block-end: 1px solid #ebecef00;
}

.sidebar-menu li > a.active-page {
    background-color: var(--primary-600);
    color: #fff;
    background-image: linear-gradient(150deg, #00E1C6 0%, #0092F9 100%);
}

.btn-primary-600 {
    background-image: linear-gradient(150deg, #00E1C6 0%, #0092F9 100%);
    border: 0;
}

.cursor-pointer {
    cursor: pointer;
}

/* Tooltips de ApexCharts: más anchos para que no se corte la información */
.apexcharts-tooltip.apexcharts-theme-light,
.apexcharts-tooltip {
    min-width: 180px;
    max-width: 320px;
    padding: 10px 14px !important;
}
.apexcharts-tooltip .apexcharts-tooltip-title,
.apexcharts-tooltip .apexcharts-tooltip-series-group,
.apexcharts-tooltip-text-y-label,
.apexcharts-tooltip-text-y-value {
    white-space: normal !important;
    word-break: break-word;
}
.apexcharts-tooltip-box {
    min-width: 160px;
}

/*
 * Wowdash: .accordion .accordion-button[aria-expanded=true|false]::after pone +/- (remixicon).
 * Hay que igualar esa especificidad e incluir .accordion en la ruta + !important en content/display.
 */
#modalTotalCasos .accordion .accordion-button::after,
#modalTotalCasos .accordion .accordion-button:not(.collapsed)::after,
#modalTotalCasos .accordion .accordion-button[aria-expanded=true]::after,
#modalTotalCasos .accordion .accordion-button[aria-expanded=false]::after,
#modalTotalCasos .accordion .accordion-button[aria-expanded="true"]::after,
#modalTotalCasos .accordion .accordion-button[aria-expanded="false"]::after,
#modalPendientesCasos .accordion .accordion-button::after,
#modalPendientesCasos .accordion .accordion-button:not(.collapsed)::after,
#modalPendientesCasos .accordion .accordion-button[aria-expanded=true]::after,
#modalPendientesCasos .accordion .accordion-button[aria-expanded=false]::after,
#modalPendientesCasos .accordion .accordion-button[aria-expanded="true"]::after,
#modalPendientesCasos .accordion .accordion-button[aria-expanded="false"]::after,
#modalGestionCasos .accordion .accordion-button::after,
#modalGestionCasos .accordion .accordion-button:not(.collapsed)::after,
#modalGestionCasos .accordion .accordion-button[aria-expanded=true]::after,
#modalGestionCasos .accordion .accordion-button[aria-expanded=false]::after,
#modalGestionCasos .accordion .accordion-button[aria-expanded="true"]::after,
#modalGestionCasos .accordion .accordion-button[aria-expanded="false"]::after,
#modalFinalizadosCasos .accordion .accordion-button::after,
#modalFinalizadosCasos .accordion .accordion-button:not(.collapsed)::after,
#modalFinalizadosCasos .accordion .accordion-button[aria-expanded=true]::after,
#modalFinalizadosCasos .accordion .accordion-button[aria-expanded=false]::after,
#modalFinalizadosCasos .accordion .accordion-button[aria-expanded="true"]::after,
#modalFinalizadosCasos .accordion .accordion-button[aria-expanded="false"]::after,
#modalCasosDia .accordion .accordion-button::after,
#modalCasosDia .accordion .accordion-button:not(.collapsed)::after,
#modalCasosDia .accordion .accordion-button[aria-expanded=true]::after,
#modalCasosDia .accordion .accordion-button[aria-expanded=false]::after,
#modalCasosDia .accordion .accordion-button[aria-expanded="true"]::after,
#modalCasosDia .accordion .accordion-button[aria-expanded="false"]::after,
#tableroCasos.accordion .accordion-button::after,
#tableroCasos.accordion .accordion-button:not(.collapsed)::after,
#tableroCasos.accordion .accordion-button[aria-expanded=true]::after,
#tableroCasos.accordion .accordion-button[aria-expanded=false]::after,
#tableroCasos.accordion .accordion-button[aria-expanded="true"]::after,
#tableroCasos.accordion .accordion-button[aria-expanded="false"]::after {
    content: "" !important;
    display: none !important;
    background-image: none !important;
    border: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    position: absolute !important;
    inset-inline-end: 0 !important;
}

/* SweetAlert2: tamaño del título */
h2#swal2-title {
    font-size: 26px !important;
}

/* Card repetibles de productos en Datos de la radicación */
.product-card-radicacion {
    background: #f7f7f7;
}

/* Tabla Productos reportados: bloque unificado con scroll (table-responsive) */
.productos-reportados-responsive {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.productos-reportados-responsive .basic-border-table {
    border-collapse: separate;
}
.productos-reportados-responsive .productos-reportados-col-num,
.productos-reportados-responsive td:first-child {
    width: 3rem;
}

/* —— Estilo tipo Dropzone (portal + vista agente) —— */
.portal-dropzone-shell {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.portal-dropzone-shell.is-dragover {
    background: linear-gradient(135deg, rgba(0, 225, 198, 0.06) 0%, rgba(0, 146, 249, 0.06) 100%);
    border-color: rgba(0, 146, 249, 0.45);
    box-shadow: 0 0 0 1px rgba(0, 146, 249, 0.2), 0 4px 16px rgba(0, 146, 249, 0.08);
}
.portal-dropzone-shell--readonly {
    background: #f4f6f9;
    border-style: solid;
    cursor: default;
}
.portal-supports-dropzone {
    min-height: 88px;
    margin: 12px;
    padding: 16px 14px 12px;
    cursor: pointer;
    border: 1px dashed #b8c3d1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.45);
}

/* Dropzone.js (portal / radicar PQRS) — alineado con botones primary (gradiente cyan–azul) */
.dropzone.dropzone-portal {
    min-height: 168px;
    margin: 0;
    padding: 20px 16px 16px;
    cursor: pointer;
    border: none !important;
    border-radius: 0;
    background: #fafbfc;
}
.dropzone.dropzone-portal.dz-drag-hover {
    background: linear-gradient(180deg, rgba(0, 225, 198, 0.07) 0%, rgba(0, 146, 249, 0.05) 100%);
}
.dropzone.dropzone-portal .dz-message {
    margin: 0;
    width: 100%;
}
.dropzone.dropzone-portal .dz-message .dz-portal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px 4px;
    max-width: 420px;
    margin: 0 auto;
}
.dz-portal-empty__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}
.dz-portal-empty__sub {
    margin: 0;
    line-height: 1.45;
}
.dz-portal-empty__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 6px 12px;
    border-radius: 8px;
    color: #0092f9;
    background: linear-gradient(150deg, rgba(0, 225, 198, 0.12) 0%, rgba(0, 146, 249, 0.12) 100%);
    border: 1px solid rgba(0, 146, 249, 0.2);
}
/* Previews tipo tarjeta (coherente con el resto del formulario) */
.dropzone.dropzone-portal.dz-started {
    min-height: auto;
    padding-bottom: 12px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    justify-content: flex-start;
}
/* Mensaje “añadir más” ocupa toda la fila; las .dz-preview fluyen en horizontal con salto de línea */
.dropzone.dropzone-portal.dz-started .dz-message {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    order: -1;
}
.dropzone.dropzone-portal .dz-preview {
    float: none;
    flex: 0 0 auto;
    width: 128px;
    min-height: 0;
    margin: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dropzone.dropzone-portal .dz-preview:hover {
    border-color: rgba(0, 146, 249, 0.35);
    box-shadow: 0 4px 12px rgba(0, 146, 249, 0.1);
}
/* Misma altura en todas las tarjetas de archivo (PDF, etc.) */
.dropzone.dropzone-portal .dz-preview.dz-file-preview {
    display: flex;
    flex-direction: column;
    height: 142px;
    min-height: 142px;
    max-height: 142px;
    box-sizing: border-box;
}
.dropzone.dropzone-portal .dz-preview.dz-file-preview .dz-details {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dropzone.dropzone-portal .dz-preview.dz-file-preview .dz-remove {
    margin-top: auto;
    flex-shrink: 0;
}
.dropzone.dropzone-portal .dz-preview .dz-image {
    border-radius: 6px;
    overflow: hidden;
    width: 112px;
    height: 88px;
}
.dropzone.dropzone-portal .dz-preview .dz-image img {
    object-fit: cover;
}
/* Miniatura de Dropzone para PDF suele ser un <img> vacío: ocultamos y mostramos icono por extensión (JS) */
.dropzone.dropzone-portal .dz-preview.dz-file-preview .dz-image {
    position: relative;
    background: linear-gradient(180deg, #f1f5f9 0%, #e8ecf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dropzone.dropzone-portal .dz-preview.dz-file-preview .dz-image img {
    display: none !important;
}
.dropzone.dropzone-portal .dz-preview.dz-file-preview .dz-file-type-icon {
    font-size: 2.25rem;
    line-height: 1;
    color: #0092f9;
}
.dropzone.dropzone-portal .dz-preview.dz-file-preview[data-dz-ext="pdf"] .dz-file-type-icon {
    color: #dc2626;
}
.dropzone.dropzone-portal .dz-preview.dz-file-preview[data-dz-ext="doc"] .dz-file-type-icon,
.dropzone.dropzone-portal .dz-preview.dz-file-preview[data-dz-ext="docx"] .dz-file-type-icon {
    color: #2563eb;
}
.dropzone.dropzone-portal .dz-preview.dz-file-preview[data-dz-ext="xls"] .dz-file-type-icon,
.dropzone.dropzone-portal .dz-preview.dz-file-preview[data-dz-ext="xlsx"] .dz-file-type-icon {
    color: #16a34a;
}
.dropzone.dropzone-portal .dz-preview .dz-details {
    padding: 6px 0 0;
    min-width: 0;
}
.dropzone.dropzone-portal .dz-preview .dz-filename {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dropzone.dropzone-portal .dz-preview .dz-filename span {
    font-size: 0.72rem;
    font-weight: 500;
    color: #334155;
}
.dropzone.dropzone-portal .dz-preview .dz-size {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 2px;
}
.dropzone.dropzone-portal .dz-preview .dz-remove {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 4px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0092f9 !important;
    text-align: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    text-decoration: none !important;
}
.dropzone.dropzone-portal .dz-preview .dz-remove:hover {
    background: rgba(0, 146, 249, 0.08);
    color: #0077cc !important;
}
.dropzone.dropzone-portal .dz-progress,
.dropzone.dropzone-portal .dz-upload {
    display: none !important;
}
.dropzone.dropzone-portal .dz-error-message {
    font-size: 0.7rem;
    color: #dc2626;
}
.portal-dropzone-hint {
    padding-bottom: 4px;
}
.portal-supports-cards {
    width: 100%;
    min-height: 0;
}
.portal-dropzone-toolbar {
    padding: 10px 16px 14px;
    margin: 0;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
}

/* Tarjetas archivo (Dropzone-like) */
.dz-file-card {
    width: 124px;
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #dde2e9;
    border-radius: 10px;
    padding: 8px 8px 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
a.dz-file-card-link:hover {
    border-color: #b8c5d6;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}
/* Lightbox: adjuntos imagen en vista agente */
a.js-evidence-image {
    cursor: zoom-in;
}
a.js-evidence-image:focus-visible {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}
.dz-file-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 2;
    width: 26px;
    height: 26px;
    border-radius: 8px !important;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dz-file-preview {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    background: #e8ecf1;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}
.dz-file-preview--image {
    padding: 0;
    background: #e8ecf1;
}
.dz-file-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Misma pila que imágenes: icono en el recuadro superior, nombre, peso abajo (ticket agente) */
.dz-file-preview--doc {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 0;
}
.dz-file-size-top {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    padding: 8px 6px 4px;
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.dz-file-icon-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #0092f9;
    min-height: 100%;
    width: 100%;
}
.dz-file-icon-center .ri-file-pdf-line,
.dz-file-icon-center .ri-file-paper-line {
    font-size: 2rem;
    line-height: 1;
}
.dz-file-ext {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #94a3b8;
}
.dz-file-name {
    font-size: 0.72rem;
    line-height: 1.3;
    color: #1e293b;
    max-width: 100%;
    text-align: center;
}
.dz-file-meta {
    font-size: 0.65rem;
    color: #64748b;
    text-align: center;
    margin-top: 4px;
}

/* Tarjetas de tareas del caso (vista ticket agente) */
.agent-task-card {
    border: 1px solid #dde2e9;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Comentarios internos: hilos en ramas (árbol con línea vertical + codos) */
#comments-section .comment-node-card {
    border: 1px solid #dde2e9;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
#comments-section .comment-thread-branch {
    position: relative;
    margin-top: 0.75rem;
    margin-bottom: 10px;
    margin-left: 0;
    padding-left: 1.35rem;
    /* Tronco vertical de la rama */
    border-left: 2px solid rgba(0, 146, 249, 0.45);
    padding-bottom: 0.15rem;
}
/* Ramas anidadas: más indentación = sub-ramas visibles */
#comments-section .comment-thread-branch .comment-thread-branch {
    margin-left: 0.35rem;
    border-left-color: rgba(0, 146, 249, 0.35);
    padding-left: 1.15rem;
}
#comments-section .comment-thread-branch .comment-thread-branch .comment-thread-branch {
    border-left-color: rgba(0, 225, 198, 0.5);
}
/* Respuestas: tarjeta ligada visualmente a la rama */
#comments-section .comment-node--reply > .comment-node-card {
    position: relative;
    background: linear-gradient(90deg, rgba(0, 146, 249, 0.06) 0%, rgba(255, 255, 255, 0) 12%);
    border-color: rgba(0, 146, 249, 0.22);
}
/* Codo horizontal desde la línea vertical hasta la tarjeta */
#comments-section .comment-thread-branch .comment-node--reply > .comment-node-card::before {
    content: '';
    position: absolute;
    left: -1.36rem;
    top: 1.1rem;
    width: 0.85rem;
    height: 2px;
    background: rgba(0, 146, 249, 0.45);
    border-radius: 1px;
    pointer-events: none;
}
/* Glifo “↳” en respuestas (refuerzo de rama) */
#comments-section .comment-thread-branch .comment-node--reply .comment-branch-glyph {
    flex-shrink: 0;
    line-height: 1;
    color: rgba(0, 146, 249, 0.7);
    font-weight: 700;
    font-size: 0.85rem;
    user-select: none;
}

/* Reacciones: junto a Responder; ocultas hasta hover; si ya hay una elegida, se ve solo esa hasta volver a pasar el cursor */
#comments-section .comment-node-card .comment-reactions:not(.comment-reactions--has-mine) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
#comments-section .comment-node-card:hover .comment-reactions,
#comments-section .comment-node-card:focus-within .comment-reactions {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}
#comments-section .comment-reactions--has-mine {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
#comments-section .comment-node-card:not(:hover):not(:focus-within) .comment-reactions--has-mine .comment-reaction-btn:not(.comment-reaction-active) {
    display: none !important;
}
#comments-section .comment-node-card:hover .comment-reactions--has-mine .comment-reaction-btn,
#comments-section .comment-node-card:focus-within .comment-reactions--has-mine .comment-reaction-btn {
    display: inline-flex !important;
}
#comments-section .comment-reactions {
    gap: 0.35rem !important;
}
#comments-section .comment-card-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}
#comments-section .comment-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    line-height: 1.2;
    border-radius: 999px;
    border: 1px solid #dde2e9;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8125rem;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
#comments-section .comment-reaction-btn:hover:not(:disabled) {
    background: #eef2f7;
    border-color: #cbd5e1;
}
#comments-section .comment-reaction-btn:disabled {
    opacity: 0.7;
}
#comments-section .comment-reaction-btn.comment-reaction-active {
    background: rgba(0, 146, 249, 0.14);
    border-color: rgba(0, 146, 249, 0.45);
    color: #0369a1;
    font-weight: 600;
}
#comments-section .comment-reaction-emoji {
    font-size: 1rem;
    line-height: 1;
}
#comments-section .comment-reaction-count {
    min-width: 1ch;
    font-variant-numeric: tabular-nums;
}

/* Autocompletado @menciones (position:fixed desde JS; lista encima o debajo del textarea) */
#mentionList.mention-list-dropdown {
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

/* Formulario de comentario: debajo del hilo por defecto; bajo la tarjeta al pulsar Responder */
#comment-form-slot-default .comment-form-inline-wrap {
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--neutral-200, #e2e8f0);
    background: var(--base, #fff);
}
.comment-form-inline-wrap.comment-form-inline-wrap--under-comment {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px dashed rgba(0, 146, 249, 0.45);
    background: rgba(0, 146, 249, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
#comments-section .comment-node .comment-form-inline-wrap--under-comment {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
/* Respuestas anidadas: alinear el formulario con la rama */
#comments-section .comment-thread-branch .comment-form-inline-wrap--under-comment {
    margin-left: 0;
}

/* Tablero: encabezado acordeón con acciones (no anidar <button> dentro del toggle) */
.tablero-caso-accordion-header .accordion-button {
    width: auto !important;
    flex: 1 1 0%;
    min-width: 0;
}
.tablero-caso-header-actions {
    align-self: stretch;
}

/* Tablero: resumen de datos del caso (acordeón) */
.tablero-caso-resumen__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.25rem;
}
.tablero-caso-resumen__value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    word-break: break-word;
}

/* Tablero: modal flujo de tareas (pantalla completa) */
#tableroFlowModal .modal-body {
    flex: 1 1 auto;
}
/* ═══════════════════════════════════════════════════════════
   Flow-Map v2 — Vertical flow with side-by-side fork columns
   Shared by tablero modal & ticket modal
   ═══════════════════════════════════════════════════════════ */
#tableroFlowScroll,
#ticketFlowScroll {
    -webkit-overflow-scrolling: touch;
}
.tablero-flow-inner,
.ticket-flow-inner {
    transition: transform 0.15s ease;
}
.tablero-flow-canvas,
.ticket-flow-canvas {
    min-height: 50vh;
    padding: 32px 24px 48px;
    display: flex;
    justify-content: center;
}

/* ── Legend ──────────────────────────────────────────────── */
.fmap-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    font-size: 0.75rem;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.fmap-legend__dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.fmap-legend__dot--done     { background: linear-gradient(135deg,#22c55e,#16a34a); }
.fmap-legend__dot--current  { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.fmap-legend__dot--pending  { background: linear-gradient(135deg,#94a3b8,#64748b); }
.fmap-legend__dot--skipped  { background: #cbd5e1; border: 1.5px dashed #94a3b8; }
.fmap-legend__dot--future   { background: #f1f5f9; border: 1.5px solid #cbd5e1; }

.fmap-empty {
    color: #94a3b8;
    text-align: center;
    padding: 40px 20px;
}

/* ── Vertical Track ─────────────────────────────────────── */
.fmap-vtrack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
}
.fmap-vtrack--root {
    margin: 0 auto;
}

/* ── Step Card ──────────────────────────────────────────── */
.fmap-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-left: 5px solid #cbd5e1;
    box-shadow: 0 2px 10px rgba(15,23,42,0.05);
    width: 100%;
    max-width: 420px;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}
.fmap-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15,23,42,0.1);
}

/* ── Card Icon ──────────────────────────────────────────── */
.fmap-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

/* ── Card Body ──────────────────────────────────────────── */
.fmap-card__body {
    flex: 1;
    min-width: 0;
}
.fmap-card__title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}
.fmap-card__role {
    font-size: 0.73rem;
    color: #94a3b8;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fmap-card__role i { font-size: 0.78rem; }

/* ── Card Badge ─────────────────────────────────────────── */
.fmap-card__badge {
    position: absolute;
    top: -9px;
    right: 14px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 10px;
    border-radius: 10px;
    line-height: 1.5;
}

/* ── Card Kinds ─────────────────────────────────────────── */
.fmap-card--done {
    border-left-color: #22c55e;
    border-color: rgba(34,197,94,0.35);
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 60%);
}
.fmap-card--done .fmap-card__icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 3px 10px rgba(22,163,74,0.3);
}
.fmap-card--done .fmap-card__badge {
    background: #dcfce7;
    color: #16a34a;
}

.fmap-card--current {
    border-left-color: #3b82f6;
    border-color: rgba(59,130,246,0.4);
    background: linear-gradient(135deg, #eff6ff 0%, #fff 60%);
    box-shadow: 0 4px 20px rgba(37,99,235,0.15);
}
.fmap-card--current .fmap-card__icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 3px 12px rgba(37,99,235,0.35);
    animation: fmapIconPulse 2s ease-in-out infinite;
}
.fmap-card--current .fmap-card__badge {
    background: #dbeafe;
    color: #2563eb;
}

@keyframes fmapIconPulse {
    0%, 100% { box-shadow: 0 3px 12px rgba(37,99,235,0.35); }
    50%      { box-shadow: 0 3px 18px rgba(37,99,235,0.55), 0 0 0 6px rgba(59,130,246,0.1); }
}

.fmap-card--pending {
    border-left-color: #94a3b8;
    border-style: dashed;
    border-left-style: solid;
    background: #fafbfc;
}
.fmap-card--pending .fmap-card__icon {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 2px 8px rgba(100,116,139,0.2);
}
.fmap-card--pending .fmap-card__badge {
    background: #f1f5f9;
    color: #64748b;
}

.fmap-card--skipped {
    border-left-color: #94a3b8;
    border-color: #cbd5e1;
    border-style: dotted;
    border-left-style: solid;
    opacity: 0.78;
    background: #f1f5f9;
}
.fmap-card--skipped .fmap-card__icon {
    background: linear-gradient(135deg, #b0bec5, #90a4ae);
    box-shadow: 0 2px 6px rgba(144,164,174,0.2);
}
.fmap-card--skipped .fmap-card__badge {
    background: #e2e8f0;
    color: #64748b;
}
.fmap-card--skipped .fmap-card__title { color: #475569; }

.fmap-card--future {
    border-left-color: #b0bec5;
    border-color: #cfd8dc;
    border-style: dashed;
    border-left-style: solid;
    opacity: 0.72;
    background: #f5f7fa;
}
.fmap-card--future .fmap-card__icon {
    background: linear-gradient(135deg, #cfd8dc, #b0bec5);
    color: #fff;
    box-shadow: 0 2px 6px rgba(176,190,197,0.2);
}
.fmap-card--future .fmap-card__badge {
    background: #e2e8f0;
    color: #78909c;
}
.fmap-card--future .fmap-card__title { color: #607d8b; }

.fmap-card--branch_other {
    border-left-color: #90a4ae;
    border-color: #b0bec5;
    border-style: dotted;
    border-left-style: solid;
    opacity: 0.72;
    background: #f1f5f9;
}
.fmap-card--branch_other .fmap-card__icon {
    background: linear-gradient(135deg, #b0bec5, #90a4ae);
    box-shadow: 0 2px 6px rgba(144,164,174,0.15);
}
.fmap-card--branch_other .fmap-card__badge {
    background: #e2e8f0;
    color: #64748b;
}
.fmap-card--branch_other .fmap-card__title { color: #475569; }

/* on-path subtle glow */
.fmap-card--on-path.fmap-card--done {
    box-shadow: inset 0 0 0 0 transparent, 0 2px 12px rgba(22,163,74,0.12);
}
.fmap-card--on-path.fmap-card--current {
    box-shadow: inset 0 0 0 0 transparent, 0 4px 20px rgba(37,99,235,0.18);
}
.fmap-card--on-path.fmap-card--pending {
    box-shadow: inset 0 0 0 0 transparent, 0 2px 12px rgba(100,116,139,0.12);
}

/* ── Vertical Edge (connector with arrow) ────────────────── */
.fmap-edge-v {
    width: 3px;
    height: 36px;
    flex-shrink: 0;
    position: relative;
    background:
        repeating-linear-gradient(
            180deg,
            #d1d5db 0, #d1d5db 5px,
            transparent 5px, transparent 10px
        );
}
.fmap-edge-v::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #d1d5db;
}
.fmap-edge-v--done {
    background: linear-gradient(180deg, #22c55e, #16a34a);
}
.fmap-edge-v--done::after {
    border-top-color: #16a34a;
}
.fmap-edge-v--active {
    background: linear-gradient(180deg, #3b82f6, #60a5fa);
}
.fmap-edge-v--active::after {
    border-top-color: #3b82f6;
    animation: fmapArrowPulse 1.5s ease-in-out infinite;
}
@keyframes fmapArrowPulse {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    50%      { filter: drop-shadow(0 0 4px rgba(59,130,246,0.4)); }
}

/* ── Fork (decision → side-by-side columns) ──────────────── */
.fmap-fork {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Fork header (decision bar) */
.fmap-fork__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 3px 12px rgba(245,158,11,0.18);
    position: relative;
    z-index: 1;
}
.fmap-fork__header-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.fmap-fork__header-text {
    font-size: 0.84rem;
    font-weight: 600;
    color: #92400e;
    line-height: 1.35;
}
.fmap-fork__pending-pill {
    display: inline-block;
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #fed7aa;
    margin-left: 6px;
    vertical-align: middle;
}

/* Fork columns container */
.fmap-fork__cols {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-top: 16px;
    position: relative;
}
/* top connector lines from header to columns */
.fmap-fork__cols::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 16px;
    background: #fbbf24;
}

/* Individual column */
.fmap-fork__col {
    flex: 1;
    min-width: 0;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 0;
    background: #fafbfc;
    overflow: hidden;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}
.fmap-fork__col--chosen {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #f0f7ff 0%, #fafbfc 40%);
    box-shadow: 0 3px 16px rgba(59,130,246,0.1);
}
.fmap-fork__col--alt {
    opacity: 0.75;
    background: #f5f7fa;
}
.fmap-fork__col--pending {
    border-color: #fcd34d;
    border-style: dashed;
    background: linear-gradient(180deg, #fffbeb 0%, #fafbfc 40%);
}

/* Column label */
.fmap-fork__col-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    padding: 14px 18px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255,255,255,0.7);
    line-height: 1.35;
}
.fmap-fork__col--chosen .fmap-fork__col-label {
    color: #1d4ed8;
    border-bottom-color: #bfdbfe;
    background: rgba(239,246,255,0.5);
}
.fmap-fork__col--alt .fmap-fork__col-label {
    color: #64748b;
}
.fmap-fork__col--pending .fmap-fork__col-label {
    color: #92400e;
    border-bottom-color: #fde68a;
    background: rgba(255,251,235,0.5);
}

.fmap-fork__chosen-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #2563eb;
    color: #fff;
    font-size: 0.58rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}
.fmap-fork__chosen-tag i { font-size: 0.65rem; }

/* Column inner track */
.fmap-fork__col > .fmap-vtrack {
    padding: 18px 16px;
    align-items: center;
}
.fmap-fork__col > .fmap-vtrack .fmap-card {
    max-width: none;
}

/* Dim cards in alt (non-chosen) branches */
.fmap-fork__col--alt .fmap-card { opacity: 0.9; }

/* ── Note ────────────────────────────────────────────────── */
.fmap-note {
    font-size: 0.78rem;
    color: #64748b;
    font-style: italic;
    padding: 10px 16px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    width: 100%;
    max-width: 420px;
    line-height: 1.4;
    text-align: center;
}
.fmap-note i {
    color: #94a3b8;
    margin-right: 5px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .fmap-fork__cols {
        flex-direction: column;
    }
    .fmap-card {
        max-width: none;
    }
    .fmap-fork__header {
        max-width: none;
    }
}

/* Card «Correo asociado a esta tarea»: scroll vertical (Quill no desborda la página) */
.task-email-card {
    max-height: min(70vh, 720px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.task-email-card .js-task-email-editor {
    min-height: 200px;
}
.task-email-card .js-task-email-editor .ql-container {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.task-email-card .js-task-email-editor .ql-editor {
    min-height: 120px;
}

/* Vista previa del correo en modal (Producto no solicitado · PQRS en proceso) */
.task-email-modal-body {
    max-height: 360px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.task-email-modal-body img {
    max-width: 100%;
    height: auto;
}

/* Modal «Correo para el cliente»: scroll en el contenido */
.modal-correo-cliente .modal-correo-cliente__dialog {
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
}
.modal-correo-cliente .modal-content {
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}
.modal-correo-cliente form[data-modal-correo-cliente="1"] {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.modal-correo-cliente .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(75vh, 720px);
}

.modal-correo-quill-wrap .ql-container {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.modal-correo-quill-wrap .ql-editor {
    min-height: 160px;
}

/*
 * {{lista_faltantes_sobrantes}}: en PHP se generan DOS bloques — div (vista en Quill) + table (correo).
 * Al enviar, TemplateMailer::sanitizeHtmlForSend elimina el bloque entre LISTA_FS_PREVIEW_* y deja solo la tabla.
 * En el modal: mostramos el div; la tabla real va oculta (sr-only) para que el submit siga enviándola.
 */
.modal-correo-cliente .ql-editor .lista-fs-mail-bloque,
.task-email-card .ql-editor .lista-fs-mail-bloque {
    position: relative;
    width: 100%;
    max-width: 100%;
}
.modal-correo-cliente .ql-editor .lista-fs-mail-preview-only,
.task-email-card .ql-editor .lista-fs-mail-preview-only {
    display: block !important;
    width: 100%;
    white-space: normal !important;
    word-wrap: break-word;
}
.modal-correo-cliente .ql-editor:has(.lista-fs-mail-preview-only),
.task-email-card .ql-editor:has(.lista-fs-mail-preview-only) {
    white-space: normal !important;
}
/* Tabla solo para el HTML del correo: oculta en el editor (sigue en el DOM para el POST) */
.modal-correo-cliente .ql-editor .lista-fs-mail-email-only,
.task-email-card .ql-editor .lista-fs-mail-email-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.modal-correo-cliente .ql-editor .lista-fs-mail-checkbox,
.task-email-card .ql-editor .lista-fs-mail-checkbox {
    display: inline-block !important;
    vertical-align: middle !important;
}
/* Vista previa lista faltantes/sobrantes: se renderiza FUERA de Quill, bajo el editor del modal */
.modal-correo-lista-preview__body {
    background: #ffffff;
    max-height: 420px;
    overflow-y: auto;
}
.modal-correo-lista-preview .lista-fs-preview-sec-h {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}
.modal-correo-lista-preview blockquote.lista-fs-preview-card {
    border-left: none !important;
    padding-left: 0 !important;
    margin-inline: 0 !important;
}
.modal-correo-lista-preview .lista-fs-mail-checkbox {
    display: inline-block !important;
    vertical-align: middle !important;
}

/*
 * Quill en modal «Correo para el cliente»: el tema (style.css) aplica colores genéricos a .ql-fill/.ql-stroke
 * y el reset global `span { display: inline-block }` puede afectar el flujo del texto formateado.
 * Aquí forzamos negrita/cursiva visibles y un estado .ql-active claro en la barra.
 */
.modal-correo-cliente .ql-editor strong,
.modal-correo-cliente .ql-editor b {
    font-weight: 700 !important;
}
.modal-correo-cliente .ql-editor em,
.modal-correo-cliente .ql-editor i {
    font-style: italic !important;
}
/* Quill: spans en párrafos/listas; no aplicar a tablas (cajas inline-block del HTML de correo) */
.modal-correo-cliente .ql-editor :is(p, li, h1, h2, h3, h4, h5, h6) span:not(.ql-ui) {
    display: inline;
}
.modal-correo-cliente .ql-editor table span:not(.ql-ui)[style*="inline-block"] {
    display: inline-block !important;
}
/* Botones de la barra: estado activo (Negrita/Cursiva) bien visible */
.modal-correo-cliente .ql-snow.ql-toolbar button.ql-active,
.modal-correo-cliente .ql-snow .ql-toolbar button.ql-active {
    background-color: rgba(13, 110, 253, 0.12);
    border-radius: 6px;
}
.modal-correo-cliente .ql-snow.ql-toolbar button.ql-active .ql-fill,
.modal-correo-cliente .ql-snow .ql-toolbar button.ql-active .ql-fill {
    fill: #0d6efd !important;
}
.modal-correo-cliente .ql-snow.ql-toolbar button.ql-active .ql-stroke,
.modal-correo-cliente .ql-snow .ql-toolbar button.ql-active .ql-stroke {
    stroke: #0d6efd !important;
}
.modal-correo-cliente .ql-snow.ql-toolbar button:hover .ql-fill,
.modal-correo-cliente .ql-snow .ql-toolbar button:hover .ql-fill {
    fill: #0d6efd !important;
}
.modal-correo-cliente .ql-snow.ql-toolbar button:hover .ql-stroke,
.modal-correo-cliente .ql-snow .ql-toolbar button:hover .ql-stroke {
    stroke: #0d6efd !important;
}

/* Selección de adjuntos del caso en el modal de correo */
.modal-correo-evidencia-item {
    cursor: pointer;
    max-width: 140px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.modal-correo-evidencia-item:has(input:checked) {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.35);
}

/* Misma corrección en la tarjeta de correo de tarea (no modal) */
.task-email-card .ql-editor strong,
.task-email-card .ql-editor b {
    font-weight: 700 !important;
}
.task-email-card .ql-editor em,
.task-email-card .ql-editor i {
    font-style: italic !important;
}
.task-email-card .ql-editor :is(p, li, h1, h2, h3, h4, h5, h6) span:not(.ql-ui) {
    display: inline;
}
.task-email-card .ql-editor table span:not(.ql-ui)[style*="inline-block"] {
    display: inline-block !important;
}
.task-email-card .ql-snow.ql-toolbar button.ql-active,
.task-email-card .ql-snow .ql-toolbar button.ql-active {
    background-color: rgba(13, 110, 253, 0.12);
    border-radius: 6px;
}
.task-email-card .ql-snow.ql-toolbar button.ql-active .ql-fill,
.task-email-card .ql-snow .ql-toolbar button.ql-active .ql-fill {
    fill: #0d6efd !important;
}
.task-email-card .ql-snow.ql-toolbar button.ql-active .ql-stroke,
.task-email-card .ql-snow .ql-toolbar button.ql-active .ql-stroke {
    stroke: #0d6efd !important;
}

/* Offcanvas «Datos de la radicación» (vista ticket agente): 80% del viewport */
.agent-ticket-datos-offcanvas {
    --bs-offcanvas-width: 80vw;
}
@media (max-width: 575.98px) {
    .agent-ticket-datos-offcanvas {
        --bs-offcanvas-width: 100%;
    }
}

/* Magnific Popup: por encima del offcanvas (~1045) y modales (~1055), p. ej. adjuntos abiertos desde el panel lateral */
.mfp-bg {
    z-index: 1090 !important;
}
.mfp-wrap {
    z-index: 1091 !important;
}
.mfp-content {
    z-index: 1093 !important;
}
.mfp-preloader {
    z-index: 1092 !important;
}
button.mfp-close,
button.mfp-arrow {
    z-index: 1094 !important;
}
/* Ajuste visual lightbox: imágenes de adjuntos ajustadas al viewport */
.mfp-figure figure {
    margin: 0;
}
.mfp-gallery .mfp-image-holder .mfp-figure {
    transform: none !important;
}
.mfp-img {
    max-width: min(78vw, 980px) !important;
    max-height: 68vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}
@media (min-width: 576px) {
    .agent-ticket-datos-offcanvas .offcanvas-body {
        overflow-y: auto;
    }
}

/* Offcanvas «Historial de actividades» (mismo ancho que datos de radicación) */
.agent-ticket-historial-offcanvas {
    --bs-offcanvas-width: 50vw;
}
@media (max-width: 575.98px) {
    .agent-ticket-historial-offcanvas {
        --bs-offcanvas-width: 100%;
    }
}

/* Vista caso agente (/agent/tickets/{id}): jerarquía y agrupación (solo presentación; no altera flujos) */
/* Sentinela: 1px visible para geometría (visibility:hidden rompe IntersectionObserver en algunos navegadores) */
.agent-ticket-view__topbar-sentinel {
    height: 1px;
    margin: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
}
/* Topbar caso: «Ver información» e «Ver historial» misma altura (iconify vs remixicons) */
.agent-ticket-view__topbar .agent-ticket-topbar-action-btn {
    min-height: 2.375rem;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    line-height: 1.25;
}
.agent-ticket-view__topbar .agent-ticket-topbar-action-btn__icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.agent-ticket-view__topbar .agent-ticket-topbar-action-btn iconify-icon.agent-ticket-topbar-action-btn__icon {
    box-sizing: content-box;
}

/* Topbar sticky: z-index 1 (< navbar z-index 2) para que dropdowns de alertas del header queden encima */
.agent-ticket-view__topbar {
    position: sticky;
    top: 4.5rem;
    z-index: 1;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 12px;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
}
/* Fondo/sombra en ::before + slide (evita transform en el propio sticky) */
.agent-ticket-view__topbar--stuck {
    padding: 1rem 1.25rem;
    overflow: hidden;
}
.agent-ticket-view__topbar--stuck::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-color: var(--white, #ffffff);
    background-image: linear-gradient(180deg, rgba(0, 146, 249, 0.07) 0%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid var(--neutral-200, #e8ecf1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    pointer-events: none;
    animation: agent-ticket-topbar-slide-down 0.35s ease-out forwards;
}
@keyframes agent-ticket-topbar-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    .agent-ticket-view__topbar--stuck::before {
        animation: none;
    }
}
.agent-ticket-tasks-card > .card-body {
    padding-top: 1.25rem;
}
.agent-ticket-tasks-card__header {
    row-gap: 0.75rem;
}

.agent-task-acciones-dropdown__btn {
    border: none !important;
    box-shadow: none !important;
}
.agent-task-acciones-dropdown__btn:hover,
.agent-task-acciones-dropdown__btn:focus-visible {
    background-color: var(--neutral-100, #f4f6f8) !important;
    color: var(--text-primary-light, #14133b) !important;
}

/* Delegación: botón «Devolver tarea» más visible junto al menú de la tarea */
.agent-task-btn-devolver {
    border-width: 2px !important;
}
.agent-task-btn-devolver:hover {
    transform: translateY(-1px);
}
.agent-task-btn-devolver:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 0.2rem rgba(234, 179, 8, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Vista caso agente: fila principal */
.agent-ticket-view__main {
    align-items: flex-start !important;
}
.agent-ticket-activity-card__body--offcanvas {
    max-height: calc(100vh - 5.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Historial de tareas: línea de tiempo vertical (referencia UI) */
.agent-ticket-historial-card .card-header {
    border-color: var(--neutral-200, #e8ecf1);
}
.agent-ticket-timeline {
    padding: 1.125rem 1.25rem 1.25rem 0.75rem;
}
.agent-ticket-timeline__item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0 0.75rem;
    position: relative;
    padding-bottom: 1.25rem;
}
.agent-ticket-timeline__item:last-child {
    padding-bottom: 0;
}
.agent-ticket-timeline__marker {
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 0.125rem;
    z-index: 1;
}
.agent-ticket-timeline__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    background: var(--neutral-100, #f4f6f8);
    border: 1px solid var(--neutral-200, #e8ecf1);
    flex-shrink: 0;
    box-sizing: border-box;
}
.agent-ticket-timeline__icon {
    font-size: 0.875rem;
    line-height: 1;
    color: var(--primary-600, #0092f9);
}
.agent-ticket-timeline__icon-wrap--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}
.agent-ticket-timeline__icon-wrap--success .agent-ticket-timeline__icon {
    color: rgb(22, 163, 74);
}
.agent-ticket-timeline__icon-wrap--warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.4);
}
.agent-ticket-timeline__icon-wrap--warning .agent-ticket-timeline__icon {
    color: rgb(217, 119, 6);
}
.agent-ticket-timeline__icon-wrap--danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.35);
}
.agent-ticket-timeline__icon-wrap--danger .agent-ticket-timeline__icon {
    color: rgb(185, 28, 28);
}
.agent-ticket-timeline__icon-wrap--muted {
    background: var(--neutral-100, #f4f6f8);
    border-color: var(--neutral-200, #e8ecf1);
}
.agent-ticket-timeline__icon-wrap--muted .agent-ticket-timeline__icon {
    color: var(--text-secondary-light, #6b7280);
}
/* Línea vertical entre ítems */
.agent-ticket-timeline__item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    bottom: 0;
    width: 1px;
    transform: translateX(-50%);
    background: var(--neutral-200, #e8ecf1);
    z-index: 0;
}
.agent-ticket-timeline__time {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary-light, #14133b);
    letter-spacing: 0.01em;
    margin-bottom: 0.375rem;
    line-height: 1.3;
}
.agent-ticket-timeline__summary {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--text-primary-light, #14133b);
    margin-bottom: 0;
}
.agent-ticket-timeline__title {
    font-weight: 500;
}
.agent-ticket-timeline__actor {
    font-weight: 600;
}
.agent-ticket-timeline__summary .agent-ticket-timeline__title + .agent-ticket-timeline__actor::before {
    content: " · ";
    font-weight: 500;
    color: var(--neutral-500, #6b7280);
}
.agent-ticket-timeline__actor--muted {
    font-weight: 500;
    color: var(--text-secondary-light, #6b7280);
}
.agent-ticket-timeline__detail {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary-light, #6b7280);
    margin-top: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.agent-ticket-tasks-card__actions .btn {
    white-space: nowrap;
}
.agent-ticket-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 146, 249, 0.07);
    border-radius: 10px;
    border: 1px solid rgba(0, 146, 249, 0.16);
}
.agent-ticket-section-title {
    color: var(--text-primary-light, #14133b);
    letter-spacing: 0.01em;
}
.agent-ticket-comments-card > .card-header {
    background: linear-gradient(180deg, rgba(0, 146, 249, 0.05) 0%, transparent 100%);
}

/* Tablero agente (/agent/tablero): sin sombra en acordeones (override tema Wowdash) */
#tableroCasos.accordion .accordion-item {
    box-shadow: none !important;
}

/* Tablero agente (/agent/tablero): acordeones impares */
#tableroCasos > .tablero-caso-item:nth-child(odd) {
    background-color: #e8ecf14a !important;
}
#tableroCasos > .tablero-caso-item:nth-child(odd) .tablero-caso-header-actions.bg-base {
    background-color: #f4f6f8 !important;
}

/* Reasignaciones (/agent/reasignaciones): ancho tabla + scroll como historial reclasificaciones */
.agent-reasig-table {
    width: max-content;
    min-width: 100%;
}

