/* Módulo Encuestas — Resultados / CRUD */
:root {
  --enc-total: #2d8f4e;
  --enc-cl: #2b6cb0;
  --enc-co: #c9a227;
  --enc-pe: #c53030;
  --enc-otros: #718096;
  --enc-surface: #f7f8fa;
  --enc-border: #e2e8f0;
  --enc-ink: #1a202c;
  --enc-muted: #64748b;
}

.enc-page { color: var(--enc-ink); }

.enc-breadcrumb {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 250, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--enc-border);
  padding: 0.65rem 0;
  margin: -0.5rem 0 1.25rem;
}

.enc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #edf2f7;
  color: var(--enc-ink);
}

.enc-chip-anio { background: #e6fffa; color: #234e52; }
.enc-chip-ok { background: #c6f6d5; color: #22543d; }
.enc-chip-warn { background: #feebc8; color: #7b341e; }
.enc-chip-err { background: #fed7d7; color: #822727; }
.enc-chip-muted { background: #edf2f7; color: var(--enc-muted); }

/* Encabezado de página: título + acciones */
.enc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.enc-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.enc-header .enc-sub { color: var(--enc-muted); font-size: 0.875rem; margin-bottom: 0; }
.enc-header .enc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.enc-header-stack { flex-direction: column; align-items: stretch; }
.enc-header-stack .enc-actions { margin-top: 0.15rem; }

/* Subnavegación de la edición */
.enc-subnav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  margin: -0.5rem 0 1.25rem;
  padding: 0.25rem;
  background: var(--enc-surface);
  border: 1px solid var(--enc-border);
  border-radius: 0.65rem;
  scrollbar-width: thin;
}
.enc-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 0.5rem;
  color: var(--enc-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.enc-subnav-link:hover { background: #fff; color: var(--enc-ink); }
.enc-subnav-link.active {
  background: #fff;
  color: var(--enc-cl);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}
.enc-form-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 1.25rem;
  padding: 0.25rem;
  background: var(--enc-surface);
  border-radius: 0.65rem;
}
.enc-form-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 0.5rem;
  color: var(--enc-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
}
.enc-savebar {
  position: fixed;
  bottom: 1.15rem;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(28rem, calc(100vw - 2rem));
  padding: 0.55rem 0.55rem 0.55rem 1.1rem;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 0.7rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}
.enc-savebar-nombre {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.enc-savebar-acciones {
  display: flex;
  flex-shrink: 0;
  gap: 0.45rem;
}
.enc-page:has(.enc-savebar) { padding-bottom: 5.5rem; }
.enc-form-tabs .enc-tab-ok { color: var(--enc-total); font-size: 0.85rem; }
.enc-form-tabs .enc-tab-vacios {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #c05621;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.enc-form-tabs .nav-link:hover { color: var(--enc-ink); }
.enc-form-tabs .nav-link.active {
  background: #fff;
  color: var(--enc-cl);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}
.enc-form-pills {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
  padding: 0.25rem;
  background: var(--enc-surface);
  border-radius: 0.65rem;
}
.enc-form-pills .nav-link {
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--enc-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
}
.enc-form-pills .nav-link:hover { color: var(--enc-ink); }
.enc-form-pills .nav-link.active {
  background: #fff;
  color: var(--enc-cl);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.enc-alert { border-radius: 0.65rem; }

/* Tarjeta con cabecera */
.enc-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--enc-border);
}
.enc-card-head h5, .enc-card-head h6 { margin: 0; font-weight: 700; }
.enc-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--enc-muted);
  margin: 1.5rem 0 0.75rem;
}

/* Filas enteras clicables */
.enc-row-link { cursor: pointer; }
.enc-row-link:hover td { background: #f1f5f9; }

/* Pasos del flujo de una edición */
.enc-steps { counter-reset: paso; }
.enc-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  padding: 1rem 1.1rem 1rem 3.4rem;
  text-decoration: none;
  color: inherit;
}
.enc-step::before {
  counter-increment: paso;
  content: counter(paso);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background: #edf2f7;
  color: var(--enc-muted);
}
.enc-step.is-done::before { content: '\2713'; background: #c6f6d5; color: #22543d; }
.enc-step.is-next { border-color: var(--enc-cl); box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12); }
.enc-step.is-next::before { background: var(--enc-cl); color: #fff; }
.enc-step h6 { margin: 0; font-weight: 700; }

/* Zona de acciones destructivas */
.enc-danger {
  border: 1px solid #fed7d7;
  background: #fff5f5;
  border-radius: 0.75rem;
  padding: 1rem;
}
.enc-danger h6 { color: #9b2c2c; font-weight: 700; }

/* Ayuda bajo campos */
.enc-hint { font-size: 0.8rem; color: var(--enc-muted); margin-top: 0.25rem; }
.enc-logo-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 4.5rem;
  max-width: 100%;
  background: #f1f5f9;
  border: 1px solid var(--enc-border);
  border-radius: 0.5rem;
}
.enc-logo-preview img { max-height: 4rem; max-width: 100%; object-fit: contain; }

/* Navegación entre preguntas */
.enc-qnav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}
.enc-qnav .btn { white-space: nowrap; }

/* Estado de carga */
.enc-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 3rem 1rem;
  color: var(--enc-muted);
}

.enc-card {
  border: 1px solid var(--enc-border);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.enc-card-hover { transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.enc-card-hover:hover,
.enc-card-hover:focus-visible {
  border-color: #cbd5e0;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}
.enc-card-hover:focus-visible { outline: 2px solid var(--enc-cl); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .enc-card-hover, .enc-card-hover:hover { transition: none; transform: none; }
}

.enc-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--enc-surface);
  border: 1px dashed var(--enc-border);
  border-radius: 0.75rem;
}

/* Icono principal: círculo suave centrado (FA7 da ancho fijo, por eso flex y no text-align) */
.enc-empty > i {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #e8f0fb;
  color: var(--enc-cl);
  font-size: 1.9rem;
}
.enc-empty h5 { font-weight: 700; color: var(--enc-ink); margin-bottom: 0.35rem; }
.enc-empty p { max-width: 34rem; margin-left: auto; margin-right: auto; }
.enc-empty .btn { margin-top: 0.5rem; }

.enc-dropzone {
  border: 2px dashed #a0aec0;
  border-radius: 1rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.enc-dropzone:hover,
.enc-dropzone.is-dragover {
  border-color: var(--enc-cl);
  background: #ebf8ff;
}
.enc-dropzone .enc-dz-icon { font-size: 2.75rem; color: var(--enc-cl); margin-bottom: 0.5rem; }

.enc-timeline {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}
.enc-timeline-item {
  min-width: 140px;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--enc-border);
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.enc-timeline-item.active {
  border-color: var(--enc-cl);
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.2);
}
.enc-timeline-item .anio { font-size: 1.25rem; font-weight: 700; }

.enc-table-wrap {
  max-height: 28rem;
  overflow: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--enc-border);
}
.enc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1a202c;
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.enc-table-full {
  max-height: none;
  overflow: visible;
}
.enc-table-full .enc-table {
  width: 100%;
  table-layout: fixed;
}
.enc-table-full .enc-table thead th {
  position: static;
  white-space: normal;
  vertical-align: bottom;
  line-height: 1.2;
  font-size: 0.68rem;
  letter-spacing: 0;
  padding: 0.55rem 0.3rem;
}
.enc-table-full .enc-table td {
  vertical-align: top;
  padding: 0.5rem 0.3rem;
  overflow-wrap: anywhere;
}
.enc-table-matriz th:first-child,
.enc-table-matriz td:first-child { width: 2.75rem; text-align: center; }
.enc-table-matriz th:nth-child(2),
.enc-table-matriz td:nth-child(2) { width: 22%; }
.enc-celda-pct { display: block; font-weight: 700; line-height: 1.15; }
.enc-celda-n { display: block; font-size: 0.72rem; color: var(--enc-muted); }
.enc-table-full .enc-pct-bar { min-width: 0; flex: 1 1 auto; }
.enc-table tbody tr:nth-child(even) { background: #f8fafc; }
.enc-orden {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #edf2f7;
  font-weight: 700;
  font-size: 0.75rem;
}
.enc-pct-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  min-width: 4rem;
}
.enc-pct-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--enc-total);
}

.enc-seg-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.enc-seg-total { background: var(--enc-total); }
.enc-seg-cl { background: var(--enc-cl); }
.enc-seg-co { background: var(--enc-co); }
.enc-seg-pe { background: var(--enc-pe); }

.enc-stat {
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: var(--enc-surface);
  border: 1px solid var(--enc-border);
}
.enc-stat .lbl { font-size: 0.75rem; color: var(--enc-muted); text-transform: uppercase; }
.enc-stat .val { font-size: 1.35rem; font-weight: 700; }

.enc-q-card {
  height: 100%;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.enc-q-card .q-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--enc-muted);
  letter-spacing: 0.04em;
}
.enc-nube-cloud {
  min-height: 0;
}
.enc-nube-svg {
  width: 100%;
  display: block;
}
.enc-nube-svg svg {
  max-height: 22rem;
  width: 100%;
  height: auto;
}
.enc-nube-paises {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.enc-nube-pais {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2rem;
  padding: 0 0.55rem;
  border: 1px solid #cbd5e0;
  border-radius: 0.4rem;
  background: #fff;
  color: #2d3748;
  font-size: 0.8rem;
  line-height: 1;
}
.enc-nube-pais img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.enc-nube-pais .fa-globe {
  font-size: 1rem;
  color: #2b6cb0;
}
.enc-nube-pais.is-active {
  border-color: #1a365d;
  background: #ebf4ff;
  box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.22);
}

.enc-chart-box {
  position: relative;
  height: 280px;
  padding: 0.5rem;
}
.inf-cmp { width: 100%; }
.inf-cmp table { width: 100%; border-collapse: separate; border-spacing: 1.2px 2px; }
.inf-cmp th {
  width: 32%;
  padding: 0 6px 0 0;
  text-align: right;
  vertical-align: middle;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  color: #333;
}
.inf-cmp td { padding: 0; vertical-align: middle; }
.inf-cmp-track { position: relative; height: 22px; overflow: hidden; }
.inf-cmp-bar { position: absolute; left: 0; top: 0; bottom: 0; }
.inf-cmp-val {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
}
.inf-cmp-leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #ddd;
  font-size: 12px;
  color: #333;
}
.inf-cmp-leyenda i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  vertical-align: -1px;
}

/* Más específico que .offcanvas.offcanvas-end de Bootstrap, que carga después de este archivo */
.offcanvas.offcanvas-end.enc-panel-grafico {
  width: 75vw;
  max-width: 75vw;
}
.enc-panel-tab {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 1035;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.9rem 0.5rem;
  border: 0;
  border-radius: 0.65rem 0 0 0.65rem;
  background: #1a365d;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  box-shadow: -2px 2px 10px rgba(16, 24, 40, 0.18);
}
.enc-panel-tab i { writing-mode: horizontal-tb; font-size: 0.95rem; }
.enc-panel-tab:hover { background: #2a4365; color: #fff; }
@media (max-width: 991.98px) {
  .offcanvas.offcanvas-end.enc-panel-grafico { width: 100vw; max-width: 100vw; }
}

.enc-pre {
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.55;
  background: var(--enc-surface);
  border: 1px solid var(--enc-border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 0;
  max-height: 70vh;
  overflow: auto;
}

.enc-doc-page {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
}
.enc-doc-block {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--enc-border);
}

.enc-floats {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  width: 22rem;
  max-width: calc(100vw - 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}
.enc-floats .enc-analisis-float {
  position: static;
  right: auto;
  bottom: auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  pointer-events: auto;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--enc-border);
  border-left: 4px solid var(--enc-cl);
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
  padding: 0.85rem 1rem;
}
.enc-floats .enc-analisis-float .small,
.enc-floats .enc-analisis-float a {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.enc-analisis-float.is-error { border-left-color: var(--enc-pe); }
.enc-analisis-float.is-ok { border-left-color: var(--enc-total); }
.enc-analisis-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

/* Editor de grupos: columna de sueltas + grupos */
.enc-org {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.enc-pool {
  position: sticky;
  top: 0.75rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 7.5rem);
  background: #fff;
  border: 1px solid var(--enc-border);
  border-radius: 0.75rem;
  overflow: hidden;
}
.enc-pool-head, .enc-grupos-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--enc-border);
  background: #f8fafc;
}
.enc-pool-head strong, .enc-grupos-bar strong { font-size: 0.92rem; }
.enc-lane-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--enc-ink);
  font-size: 0.75rem;
  font-weight: 700;
}
.enc-pool-buscar {
  border: 0;
  border-bottom: 1px solid var(--enc-border);
  border-radius: 0;
  padding: 0.55rem 0.85rem;
}
.enc-pool .enc-drop { overflow: auto; flex: 1; }
.enc-nuevo {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.enc-nuevo .form-control { flex: 1; }
.enc-grupo {
  background: #fff;
  border: 1px solid var(--enc-border);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.enc-grupo-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--enc-border);
}
.enc-g-grip, .enc-colapsar, .enc-grupo-borrar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  background: transparent;
  color: var(--enc-muted);
  border-radius: 0.4rem;
  padding: 0;
}
.enc-g-grip { cursor: grab; }
.enc-g-grip:active { cursor: grabbing; }
.enc-colapsar:hover, .enc-grupo-borrar:hover { background: #fff; color: var(--enc-ink); }
.enc-grupo-borrar:hover { color: var(--enc-pe); }
.enc-colapsar i { transition: transform 0.15s ease; }
.enc-grupo.is-collapsed .enc-colapsar i { transform: rotate(-90deg); }
.enc-grupo-nombre, .enc-grupo-desc {
  border: 0;
  background: transparent;
  min-width: 0;
}
.enc-grupo-nombre {
  flex: 1;
  width: auto;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.2rem 0.35rem;
  color: var(--enc-ink);
}
.enc-grupo-desc {
  display: block;
  width: 100%;
  padding: 0.35rem 0.85rem 0.55rem 2.55rem;
  font-size: 0.85rem;
  color: var(--enc-muted);
}
.enc-grupo-nombre:focus, .enc-grupo-desc:focus {
  outline: 2px solid #bee3f8;
  background: #fff;
  border-radius: 0.35rem;
  color: var(--enc-ink);
}
.enc-grupo.is-collapsed .enc-grupo-desc,
.enc-grupo.is-collapsed .enc-drop,
.enc-grupo.is-collapsed .enc-grupo-head { border-bottom-color: transparent; }
.enc-grupo.is-collapsed .enc-grupo-desc,
.enc-grupo.is-collapsed .enc-drop { display: none; }
.enc-drop { min-height: 2.5rem; }
.enc-drop.is-over { background: #f0fff4; box-shadow: inset 0 0 0 2px #38a169; }
.enc-drop:empty::before {
  content: 'Suelta preguntas aquí';
  display: block;
  margin: 0.65rem;
  padding: 0.7rem;
  border: 1px dashed #cbd5e0;
  border-radius: 0.5rem;
  color: var(--enc-muted);
  font-size: 0.85rem;
  text-align: center;
}
.enc-q {
  display: grid;
  grid-template-columns: 1rem auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: #fff;
  cursor: grab;
}
.enc-q:last-child { border-bottom: 0; }
.enc-q:hover { background: #f8fafc; }
.enc-q-grip { color: #cbd5e0; font-size: 0.8rem; }
.enc-q code { font-size: 0.78rem; }
.enc-q-titulo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
}
.enc-q-abrir {
  color: var(--enc-muted);
  text-decoration: none;
  padding: 0.15rem 0.35rem;
}
.enc-q-abrir:hover { color: var(--enc-cl); }
.enc-q.is-dragging, .enc-grupo.is-dragging { opacity: 0.4; }
.enc-q.is-filtrada { display: none; }
@media (max-width: 991.98px) {
  .enc-org { grid-template-columns: 1fr; }
  .enc-pool { position: static; max-height: 22rem; }
}

tr.enc-dup > td { background: #fff7ed; }

/* Respuestas: filtros en badges (completitud y estado) */
.enc-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }
.enc-filtros-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.enc-filtros-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--enc-muted); margin-right: 0.15rem; }
.enc-filtros-buscar { max-width: 280px; margin-left: auto; }
.enc-filtro {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.4rem 0.25rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 999px;
  background: #fff;
  color: #2d3748;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.enc-filtro:not(:has(.enc-filtro-n)) { padding-right: 0.75rem; }
.enc-filtro:hover { border-color: var(--enc-cl); color: var(--enc-cl); }
.enc-filtro-n { padding: 0.1rem 0.45rem; border-radius: 999px; background: #edf2f7; color: #4a5568; font-size: 0.75rem; }
.enc-filtro.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.enc-filtro.active .enc-filtro-n { background: rgba(255, 255, 255, 0.25); color: #fff; }
.enc-filtro-warn .enc-filtro-n { background: #feebc8; color: #7b341e; }
.enc-filtro-vacio:not(.active) { color: #a0aec0; }
.enc-filtro-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); vertical-align: -2px; }
.enc-filtro-flag-alt { width: 20px; text-align: center; color: #a0aec0; }
.enc-filtros-pais { width: 340px; max-width: 100%; }
#respPaisForm .select2-container .select2-selection--multiple { min-height: 31px; border-color: #cbd5e0; border-radius: 999px; padding: 0 0.4rem; }
#respPaisForm .select2-selection__choice { border-radius: 999px; background: #edf2f7; border-color: #e2e8f0; font-size: 0.8rem; }
@media (max-width: 767.98px) { .enc-filtros-buscar { max-width: none; margin-left: 0; } }

@media print {
  .sidebar-menu, .enc-no-print, .enc-breadcrumb, .enc-subnav, .enc-alert { display: none !important; }
  .enc-doc-page { max-width: none; padding: 0; }
  .enc-doc-block { page-break-after: always; border: 0; }
}