/* ==========================================================================
   ESTILOS ENCUESTAS - CSS unificado para toda la funcionalidad de Encuestas
   y Procesos de Encuesta.
   ========================================================================== */


/* ==========================================================================
   1. UTILIDADES COMUNES ENCUESTAS (breadcrumbs, paneles, layout)
   ========================================================================== */

/* Breadcrumb encuestas */
.enc-breadcrumb {
    list-style: none;
    padding-left: 0;
}

.enc-breadcrumb-item {
    display: inline;
}

.enc-breadcrumb-current {
    font-weight: 500;
    color: #2C3862;
}

/* Panel heading estilo encuestas */
.enc-panel-heading {
    background: #E5E8F3;
    border-bottom: 2px solid #2C3862;
    padding: 15px 20px;
}

.enc-panel-title {
    display: inline-block;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2C3862;
}

.enc-heading-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 10px;
}

.enc-actions-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

.enc-export-menu {
    position: absolute;
    min-width: 220px !important;
    max-width: 260px !important;
    width: 220px !important;
    height: auto !important;
    margin-top: 10px !important;
    padding: 8px 0 !important;
    overflow: visible !important;
}

.enc-export-menu:before {
    content: "";
    position: absolute;
    top: -10px;
    right: 40px;
    width: 20px;
    height: 20px;
    background: rgba(44, 56, 98, 0.12);
    border-radius: 4px;
    transform: rotate(45deg);
    z-index: -1;
}

.enc-export-menu:after {
    content: "";
    position: absolute;
    top: -9px;
    right: 41px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-top: 1px solid rgba(44, 56, 98, 0.16);
    border-left: 1px solid rgba(44, 56, 98, 0.16);
    border-radius: 4px 0 0 0;
    transform: rotate(45deg);
    z-index: -1;
}

.enc-export-menu > li > a {
    display: block;
    padding: 8px 16px;
    white-space: nowrap;
}

.enc-export-menu > li:first-child:before {
    display: none !important;
    content: none !important;
}

.enc-export-menu-title {
    padding: 8px 16px 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280 !important;
    white-space: normal;
}

.enc-export-menu .divider {
    margin: 6px 0;
}

.enc-col-flush {
    padding: 0 !important;
}

.enc-panel-body-clean {
    overflow-x: hidden;
}

/* Formulario inline (botones en cabecera show) */
.enc-inline-form {
    display: inline-block;
    margin-left: 5px;
}

.enc-ml-5 {
    margin-left: 5px;
}

/* Well con flex vertical */
.enc-well-flex {
    display: flex;
    flex-direction: column;
}

/* Tabla thead oscuro */
.enc-thead-dark {
    background: #2C3862;
    color: white;
}

/* Contexto nombre */
.enc-context-name {
    color: #2C3862;
    font-weight: 500;
}

/* Media valores */
.enc-media-value {
    font-weight: 700;
    color: #2C3862;
}

.enc-media-value-secondary {
    font-weight: 600;
    color: #2C3862;
    font-size: 11px;
}

/* Celda fuente bold */
.enc-cell-bold {
    font-weight: 600;
}

/* Flex participacion bar */
.enc-participacion-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.enc-participacion-pct {
    font-weight: 600;
    color: #2C3862;
    min-width: 50px;
    text-align: right;
}

/* ==========================================================================
   2. CONFIGURACION CONTEXTO ENCUESTAS
   ========================================================================== */

#ehabilisgestiondelaformacionbundle_encuestaproceso .form-group:has(#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura),
#ehabilisgestiondelaformacionbundle_encuesta .form-group:has(#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura input[type="radio"],
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura .radio::before,
#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura .radio::after,
#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura label::before,
#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura label::after,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima .radio::before,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima .radio::after,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima label::before,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima label::after {
    display: none !important;
}

#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura label,
#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura .radio label,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima label,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima .radio label {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
    margin-bottom: var(--10-5) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: var(--15-10) var(--20-10) !important;
    border: 2px solid var(--gris-claro) !important;
    border-radius: var(--form-radius) !important;
    background-color: var(--primario-highlight-light) !important;
    color: var(--grafito) !important;
    cursor: pointer !important;
    transition: all var(--tr02) !important;
    font-weight: normal !important;
}

#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura label:hover,
#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura .radio label:hover,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima label:hover,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima .radio label:hover {
    background-color: var(--primario-highlight-medio) !important;
    border-color: var(--primario) !important;
}

#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura input[type="radio"]:checked + label,
#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura .radio input[type="radio"]:checked ~ label,
#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura label:has(input[type="radio"]:checked),
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima input[type="radio"]:checked + label,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima .radio input[type="radio"]:checked ~ label,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima label:has(input[type="radio"]:checked) {
    background-color: var(--primario) !important;
    color: #fff !important;
    border-color: var(--primario) !important;
    font-weight: 500 !important;
}

#ehabilisgestiondelaformacionbundle_encuestaproceso_propagarPorAsignatura .radio,
#ehabilisgestiondelaformacionbundle_encuesta_escalaMaxima .radio {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
}

#asignaturas-propagacion-group {
    width: 100%;
}

.asignaturas-propagacion-hidden {
    display: none;
}

.asignaturas-propagacion-actions {
    display: flex;
    gap: var(--10-5);
    margin-bottom: var(--15-10);
    flex-wrap: wrap;
}

.asignaturas-propagacion-list {
    display: flex;
    flex-direction: column;
    gap: var(--10-5);
}

.asignaturas-propagacion-option {
    display: flex;
    align-items: center;
    gap: var(--10-5);
    padding: var(--15-10);
    background-color: var(--primario-highlight-light);
    border: 1px solid var(--primario-highlight-medio);
    border-radius: var(--form-radius);
    color: var(--grafito);
    cursor: pointer;
    transition: background-color var(--tr02), border-color var(--tr02);
}

.asignaturas-propagacion-option:hover {
    background-color: var(--primario-highlight-medio);
    border-color: var(--primario-highlight);
}

.asignaturas-propagacion-option input[type="checkbox"] {
    margin: 0;
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.asignaturas-propagacion-empty,
.asignaturas-propagacion-loading {
    padding: var(--15-10);
    background-color: var(--primario-extra-light);
    border-radius: var(--form-radius);
    color: var(--gris-oscuro);
}

/* Comparativa tab styles */
.enc-comparativa-tab-header th {
    font-size: 11px;
    max-width: 120px;
    word-wrap: break-word;
}

.enc-comparativa-cell-small {
    font-size: 12px;
}

.enc-comparativa-valor-secondary {
    font-size: 10px;
    font-weight: 600;
}

/* Tabs encuestas */
.enc-nav-tabs {
    padding: 15px 20px 0;
    background: #f8f9fa;
    margin: 0;
    border-bottom: 2px solid #E5E8F3;
}

.enc-nav-tabs-simple {
    margin-bottom: 0;
    border-bottom: 2px solid #2C3862;
}

.enc-tab-link {
    color: #2C3862;
    font-weight: 600;
}

.enc-tab-content-padded {
    padding-top: 15px;
}

/* Icon colors */
.enc-icon-detail {
    width: 20px;
    height: 20px;
}

.enc-icon-invert {
    filter: brightness(0) invert(1);
}

/* Flex rows */
.enc-flex-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.enc-flex-stat-row {
    display: flex;
}

/* Badge inline estilo encuesta */
.enc-badge-count {
    background: #2C3862;
    color: white;
    margin-left: 10px;
}

/* Contexto académico label */
.enc-contexto-label {
    font-size: 11px;
    font-weight: 500;
    background: #E5E8F3;
    color: #2C3862;
    padding: 4px 8px;
    display: inline-block;
    margin-bottom: 2px;
}

/* Panel background gris claro */
.enc-bg-light {
    background: #f8f9fa;
}


/* ==========================================================================
   2. FORMULARIO RESPONDER (público - standalone)
   ========================================================================== */

/* Body scope para páginas standalone de encuesta */
.enc-responder-body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

.enc-responder-body *,
.enc-responder-body *::before,
.enc-responder-body *::after {
    box-sizing: border-box;
}

/* Header encuesta */
.encuesta-header {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    color: white;
    padding: 48px 20px 30px;
    text-align: center;
}

.encuesta-header h1 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 600;
}

.encuesta-header .header-subtitulo {
    margin: 0 0 12px 0;
    opacity: 0.75;
    font-size: 14px;
    font-style: italic;
}

.encuesta-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 15px;
}

.encuesta-header .enc-descripcion {
    margin: 0 auto 14px;
    max-width: 620px;
    opacity: 0.85;
    font-size: 14px;
}

.header-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.enc-locale-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.enc-locale-label {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.enc-locale-dropdown {
    position: relative;
    min-width: 132px;
}

.enc-locale-toggle {
    width: 100%;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    padding: 0 10px 0 12px;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.enc-locale-toggle:focus {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.enc-locale-toggle-text {
    min-width: 0;
    text-align: center;
    line-height: 1;
}

.enc-locale-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.95);
    transition: transform 0.2s ease-in-out;
}

.enc-locale-dropdown.is-open .enc-locale-caret {
    transform: rotate(180deg);
}

.enc-locale-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    min-width: 132px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: #f4f6fb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    display: none;
    z-index: 20;
}

.enc-locale-dropdown.is-open .enc-locale-menu {
    display: block;
}

.enc-locale-option {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #2C3862;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 7px 10px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.enc-locale-option:hover,
.enc-locale-option:focus {
    background: #eaedf5;
    color: #161c31;
    outline: none;
}

.enc-locale-option.is-selected {
    background: #dfe5f4;
    color: #161c31;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    letter-spacing: 0.3px;
}

/* Container */
.encuesta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px 40px;
}

.encuesta-preview-scope {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.encuesta-preview-scope,
.encuesta-preview-scope *,
.encuesta-preview-scope *::before,
.encuesta-preview-scope *::after {
    box-sizing: border-box;
}

.encuesta-preview-scope .preview-question-body {
    overflow: hidden;
}

.encuesta-preview-scope .preview-option-item {
    justify-content: flex-start;
    gap: 12px;
}

.encuesta-preview-scope .preview-option-item input[type="radio"],
.encuesta-preview-scope .preview-option-item input[type="checkbox"] {
    flex: 0 0 18px;
    margin: 0;
}

.encuesta-preview-scope .preview-option-item span {
    flex: 1 1 auto;
    min-width: 0;
}

.encuesta-preview-scope .preview-scale-container {
    align-items: center;
}

.encuesta-preview-scope .preview-scale-item {
    position: relative;
    overflow: hidden;
}

.encuesta-preview-scope .preview-scale-item input[type="radio"] {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

.encuesta-preview-scope .submit-container {
    margin-bottom: 0;
}

/* Info box */
.encuesta-info {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.encuesta-info p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.encuesta-info .info-label {
    font-weight: 600;
    color: #2C3862;
}

/* Errores validación */
.errores-container {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.errores-container h4 {
    color: #721c24;
    margin: 0 0 10px 0;
    font-size: 15px;
}

.errores-container ul {
    margin: 0;
    padding-left: 20px;
}

.errores-container li {
    color: #721c24;
    font-size: 13px;
    margin-bottom: 4px;
}

/* Footer */
.encuesta-footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
}

/* Botón enviar */
.submit-container {
    text-align: center;
    margin-top: 30px;
}

.btn-enviar {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    color: white;
    border: none;
    padding: 14px 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.btn-enviar:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 56, 98, 0.3);
}

.btn-enviar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* ==========================================================================
   3. PREVISUALIZACIÓN Y PREGUNTAS (compartido responder + preview admin)
   ========================================================================== */

/* Cards de preguntas */
.preview-question-card {
    background: #f4f6fb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #c5cce8;
}

.preview-question-card.has-error {
    box-shadow: 0 0 0 2px #dc3545, 0 2px 8px rgba(220, 53, 69, 0.15);
}

.preview-question-header {
    background: #eaedf5;
    padding: 15px 20px;
    border-bottom: 1px solid #d8dcee;
}

.preview-question-header h5 {
    margin: 0;
    color: #2C3862;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-question-header .question-text {
    flex: 1;
    min-width: 200px;
}

.preview-question-header .badge {
    background: #e8ebf5;
    color: #2C3862;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}

.preview-question-header .badge-required {
    background: #dc3545;
    color: white;
    margin-right: 10px;
}

.required-asterisk {
    color: #dc3545;
    font-weight: 700;
    margin-left: 4px;
    font-size: 16px;
    line-height: 1;
}

/* Botón limpiar respuesta */
.btn-limpiar {
    background: none;
    border: 1px solid #c5cce8;
    border-radius: 5px;
    padding: 4px 8px;
    cursor: pointer;
    color: #8a94b8;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-limpiar:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}

.preview-question-body {
    padding: 20px;
    background: #f4f6fb;
}

/* Opciones RADIO/CHECKBOX */
.preview-option-item {
    margin: 0;
    color: #2C3862;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
    flex: 1;
    min-width: 200px;
    cursor: pointer;
}

.preview-option-item:last-child {
    margin-bottom: 0;
}

.preview-option-item:hover {
    border-color: #2C3862;
    background: #f8f9ff;
}

.preview-option-item.selected {
    border-color: #2C3862;
    background: #e8ebf5;
}

.preview-option-item strong {
    color: inherit;
    font-size: inherit;
    font-weight: 700;
    margin-right: 4px;
}

.preview-option-item span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: inherit;
}

.preview-option-item input[type="radio"],
.preview-option-item input[type="checkbox"] {
    accent-color: #2C3862;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

.preview-option-item label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    flex: 1;
}

.preview-option-item svg {
    flex-shrink: 0;
}

/* Text inputs responder */
.respuesta-text-input {
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}

.respuesta-text-input:focus {
    outline: none;
    border-color: #2C3862;
    box-shadow: 0 0 0 3px rgba(44, 56, 98, 0.1);
}

textarea.respuesta-text-input {
    min-height: 120px;
    resize: vertical;
}

/* Preview text input (solo lectura, admin preview) */
.preview-text-input {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 15px;
    color: #aaa;
    font-style: italic;
    font-size: 13px;
}

/* Escala */
.preview-scale-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
}

.preview-scale-break {
    flex-basis: 100%;
    width: 100%;
    height: 0;
}

.preview-scale-item {
    width: 50px;
    height: 50px;
    border: 2px solid #2C3862;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #2C3862;
    background: white;
    transition: all 0.2s;
    cursor: pointer;
}

.preview-scale-item-special {
    width: auto;
    min-width: 62px;
    padding: 0 14px;
    border-radius: 14px;
    border-style: dashed;
    background: #f4f6fb;
    font-size: 13px;
    letter-spacing: 0.03em;
}

.preview-scale-item:hover {
    background: #e8ebf5;
}

.preview-scale-item-special:hover {
    background: #e3e8f4;
}

.preview-scale-item.selected {
    background: #2C3862;
    color: white;
}

.preview-scale-item-special.selected {
    background: #5a678f;
    border-color: #5a678f;
    color: white;
}

.preview-scale-item input[type="radio"] {
    display: none;
}

.preview-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    margin-top: 15px;
}

.encuesta-scale-legend {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f4f6fb;
    border: 1px solid #d9e0ef;
    border-radius: 10px;
    color: #2c3862;
}

.encuesta-scale-legend-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.encuesta-scale-legend-range {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.6;
}

.encuesta-scale-legend-extreme {
    font-weight: 600;
}

.encuesta-scale-legend-values {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.encuesta-scale-legend-note {
    margin-top: 6px;
    color: #4f5f8d;
}

.encuesta-scale-legend-note strong {
    color: #2c3862;
}

/* Preview footer (admin preview) */
.preview-footer {
    margin-top: 30px;
    text-align: center;
}

/* Preview notice (admin preview) */
.preview-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #856404;
    font-size: 13px;
}

.preview-free-question-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 28px;
    padding: 16px;
}

.preview-free-question-list .preview-question-card {
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.preview-free-question-list .preview-question-card:last-child {
    margin-bottom: 0;
}


/* preview-question-header — collapsible variant (estadísticas) */
.preview-question-header.enc-collapsible {
    cursor: pointer;
    transition: background 0.2s;
}

.preview-question-header.enc-collapsible:hover {
    background: #dde1ee;
}

.preview-question-header.enc-collapsible .collapse-icon {
    color: #2C3862;
    transition: transform 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
}

/* Stat option items: read-only preview-option-item with embedded bar */
.stat-option-item {
    cursor: default;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    min-height: auto;
}

.preview-question-card-stats .stat-option-item {
    display: grid;
    grid-template-columns: clamp(220px, 34%, 360px) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--15-10);
    row-gap: var(--10-5);
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 6px 0;
    margin-bottom: 2px;
    min-width: 0;
}

.stat-option-item:hover {
    border-color: #c5cce8;
    background: white;
}

.preview-question-card-stats .stat-option-item:hover {
    border-color: transparent;
    background: transparent;
}

.stat-option-label {
    flex: 1;
    min-width: 150px;
    font-size: 13px;
    line-height: 1.35;
}

.preview-question-card-stats .stat-option-label {
    min-width: 0;
    font-weight: 400;
    width: 100%;
}

.stat-option-bar-wrapper {
    flex: 2;
    min-width: 120px;
    align-self: center;
}

.stat-option-bar-wrapper .progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    margin-bottom: 0;
}

.stat-option-bar-wrapper .progress-bar {
    background: var(--primario-accent);
    border-radius: 4px;
}

.stat-option-count {
    text-align: right;
    min-width: 76px;
    color: #2C3862;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.preview-question-card-stats .stat-option-bar-wrapper {
    min-width: 0;
    width: 100%;
}

.preview-question-card-stats .stat-option-count {
    justify-self: end;
}

.preview-question-card-stats {
    background: white;
    border: 1px solid #d5dbea;
    border-radius: 10px;
    box-shadow: none;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.preview-question-header-stats {
    background: transparent;
    border-bottom: 1px solid #e8edf7;
    padding: 0 0 10px;
}

.preview-question-header-stats h5 {
    margin: 0;
    color: #2C3862;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-question-header-stats .question-text {
    flex: 1;
    min-width: 200px;
}

.preview-question-header-stats .question-order {
    color: inherit;
    font-size: inherit;
    font-weight: 700;
    margin-right: 4px;
}

.preview-question-header-stats .question-title-text {
    line-height: 1.35;
}

.preview-question-header-stats .question-type-badge {
    background: white;
    border: 1px solid #cfd8ea;
    color: #2C3862;
    font-weight: 600;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 11px;
}

.preview-question-body-stats {
    background: white;
    padding: 12px 0 0;
}

.preview-question-card-stats .preview-scale-container {
    padding: 6px 0 10px;
}

.preview-question-card-stats .preview-info-badge {
    background: var(--primario-extra-light);
    color: #2C3862;
}

.preview-question-card-stats .stat-mini-card {
    border: 1px solid #d5dbea;
    box-shadow: none;
    min-height: 104px;
}

.question-key-stats {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    margin-top: 8px;
    overflow-x: auto;
}

.question-key-stat {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 10px;
    text-align: center;
}

.question-key-stat:last-child {
    border-right: none;
}

.question-key-stat-label {
    font-size: 10px;
    color: #6b7391;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    font-weight: 600;
}

.question-key-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2C3862;
    line-height: 1.2;
    white-space: nowrap;
}

.question-key-stat-highlight .question-key-stat-value {
    color: var(--primario-accent);
}

@media (max-width: 991px) {
    .question-key-stats {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .question-key-stat {
        flex-basis: 50%;
        min-width: 160px;
    }

    .question-key-stat:last-child {
        border-right: none;
    }

    .question-key-stat:nth-child(2n + 1) {
        border-right: none;
    }

    .question-key-stat:nth-child(2n) {
        border-right: none;
    }
}

@media (max-width: 767px) {
    .preview-question-card-stats .stat-option-item {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .preview-question-card-stats .stat-option-label {
        grid-column: 1 / -1;
    }

    .preview-question-card-stats .stat-option-bar-wrapper {
        grid-column: 1 / 2;
    }

    .preview-question-card-stats .stat-option-count {
        grid-column: 2 / 3;
        align-self: center;
    }

    .question-key-stat {
        flex-basis: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: none;
    }
}

.preview-question-card-stats .text-response-item {
    background: #fff;
    border: 1px solid #d5dbea;
    border-left: 3px solid var(--primario-accent);
}

.preview-question-card-stats .no-responses {
    background: var(--primario-extra-light);
    color: #6b7391;
}

/* Scale in stats mode: avg value highlighted */
.preview-scale-container.stat-scale-container {
    padding-bottom: 28px;
    margin-bottom: 10px;
}

.preview-scale-item.stat-avg {
    background: #2C3862;
    color: white;
    box-shadow: 0 3px 10px rgba(44, 56, 98, 0.4);
    transform: scale(1.15);
    position: relative;
}

.stat-avg-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #2C3862;
    font-weight: 700;
    white-space: nowrap;
}

/* ==========================================================================
   4. SECCIONES (grupos de preguntas)
   ========================================================================== */

.seccion-group {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 28px;
    margin-top: 10px;
    overflow: hidden;
    border: 2px solid #2C3862;
}

.seccion-group-header {
    background: #f0f2f8;
    border-left: 5px solid #2C3862;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-seccion-num {
    background: #2C3862;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.seccion-group-header .seccion-name {
    font-weight: 700;
    color: #2C3862;
    font-size: 15px;
}

.seccion-group-header .seccion-desc {
    color: #888;
    font-size: 13px;
    margin-left: 8px;
}

.seccion-group-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.seccion-group-body .preview-question-card {
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.seccion-group-body .preview-question-card:last-child {
    margin-bottom: 0;
}

.seccion-group-stats {
    box-shadow: none;
    border-color: #cfd7ea;
    margin-top: 0;
}

.seccion-group-stats .seccion-group-header {
    background: #f0f2f8;
    border-left-color: #2C3862;
}

.seccion-group-stats .preview-seccion-num {
    background: #2C3862;
}

.seccion-group-stats .seccion-name {
    color: #2C3862;
}

.seccion-group-stats .seccion-desc {
    color: #2C3862;
    opacity: 0.8;
}

.seccion-group-body-stats {
    padding: 14px;
    background: #fbfcff;
}

.seccion-group-body-stats .preview-question-card-stats {
    margin-bottom: 10px;
}


/* ==========================================================================
   5. ESTADÍSTICAS AVANZADAS
   ========================================================================== */

/* KPI Cards */
.kpi-card {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
    overflow: hidden;
    height: 130px;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kpi-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-info {
    flex: 1;
}

.kpi-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-description {
    font-size: 12px;
    opacity: 0.7;
}

.kpi-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    margin-left: 15px;
}

.kpi-icon-wrapper img {
    width: 28px;
    height: 28px;
}

.kpi-progress {
    margin-top: 10px;
}

.kpi-progress .progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-bottom: 0;
}

.kpi-progress .progress-bar {
    background: rgba(255, 255, 255, 0.9);
}

/* Media general card */
.enc-media-general-card {
    background: white;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    margin-left: 15px;
    margin-right: 15px;
    border: 1px solid #d5dbea;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.enc-media-general-label {
    color: #2C3862;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.enc-media-general-desc {
    color: #888;
    font-size: 12px;
}

.enc-media-general-values {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.enc-media-general-num {
    font-size: 36px;
    font-weight: 800;
    color: #2C3862;
    line-height: 1;
}

.enc-media-general-denom {
    font-size: 13px;
    color: #999;
}

.enc-media-general-sep {
    font-size: 18px;
    color: #ccc;
    margin: 0 4px;
}

/* Tablas de participación */
.participacion-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #d5dbea;
    overflow: hidden;
    margin-bottom: 20px;
    margin-left: 15px;
    margin-right: 15px;
}

.participacion-header {
    padding: 12px 18px;
    font-weight: 600;
    font-size: 15px;
    color: #2C3862;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primario-extra-light);
    border-bottom: 1px solid #d5dbea;
}

.participacion-header.titulacion {
    background: var(--primario-extra-light);
}

.participacion-table {
    margin: 0;
}

.participacion-table thead th {
    background: #f8f9fa;
    color: #2C3862;
    font-weight: 600;
    border: none;
    padding: 12px 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.participacion-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.participacion-table tbody tr:hover {
    background: #f0f2f8;
}

.participacion-table .progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    margin-bottom: 0;
}

.participacion-table .progress-bar {
    border-radius: 4px;
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
}

.enc-stats-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -7px;
    margin-right: -7px;
}

.enc-stats-grid > [class*="col-"] {
    padding-left: 7px;
    padding-right: 7px;
}

.enc-progress-accent .progress-bar {
    background: var(--primario-accent);
}

/* Secciones card */
.secciones-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #d5dbea;
    overflow: hidden;
    margin-bottom: 20px;
    margin-left: 15px;
    margin-right: 15px;
}

.secciones-header {
    background: #f8f9fa;
    border-bottom: 1px solid #d5dbea;
    padding: 12px 18px;
    color: #2C3862;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seccion-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.seccion-row:hover {
    background: #f8f9fa;
}

.seccion-row:last-child {
    border-bottom: none;
}

.seccion-nombre {
    flex: 1;
    font-weight: 600;
    color: #2C3862;
    font-size: 15px;
}

.seccion-media-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.seccion-media-valor {
    font-size: 28px;
    font-weight: 700;
    color: #2C3862;
    min-width: 80px;
    text-align: right;
}

.seccion-media-barra {
    width: 200px;
}

.seccion-media-barra .progress {
    height: 12px;
    border-radius: 6px;
    background: #e9ecef;
    margin-bottom: 0;
}

.seccion-media-barra .progress-bar {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    border-radius: 6px;
}

/* Section header */
.section-header {
    color: #333;
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e3ea;
}

.section-header i {
    margin-right: 8px;
    color: #2C3862;
}

/* Question cards (estadísticas) */
.question-card {
    background: #f4f6fb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #c5cce8;
}

.question-card-header {
    background: #eaedf5;
    padding: 15px 20px;
    border-bottom: 1px solid #d8dcee;
    cursor: pointer;
    transition: all 0.2s;
}

.question-card-header:hover {
    background: #dde1ee;
}

.question-card-header h5 {
    margin: 0;
    color: #2C3862;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.question-card-header .question-text {
    flex: 1;
    padding-right: 15px;
}

.question-card-header .badge {
    background: #e8ebf5;
    color: #2C3862;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #c5cce8;
}

.question-card-header .collapse-icon {
    color: #2C3862;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.question-card-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.question-card-body {
    padding: 20px;
    border-top: 1px solid #d8dcee;
    background: #f4f6fb;
}

/* Stats mini cards */
.stat-mini-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.stat-mini-card:hover {
    border-color: #2C3862;
    box-shadow: 0 2px 8px rgba(44, 56, 98, 0.1);
}

.stat-mini-card .stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-mini-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2C3862;
}

/* Options table */
.options-table {
    border-radius: 8px;
    overflow: hidden;
}

.options-table thead th {
    background: #2C3862;
    color: white;
    font-weight: 500;
    border: none;
    padding: 12px 15px;
}

.options-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.options-table .progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
}

.options-table .progress-bar {
    background: var(--primario-accent);
    border-radius: 4px;
}

.opcion-orden {
    display: inline-block;
    min-width: 28px;
    font-weight: 600;
    color: #2C3862;
    background: #E5E8F3;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    text-align: center;
}

/* Text responses */
.text-response-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 3px solid #2C3862;
}

.text-response-item p {
    margin-bottom: 5px;
    color: #333;
}

.text-response-item small {
    color: #666;
}

.text-response-count {
    display: inline-block;
    background: #E5E8F3;
    color: #2C3862;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.no-responses {
    color: #888;
    font-style: italic;
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Tabs overrides */
.nav-tabs > li > a {
    color: #2C3862;
    border-radius: 4px 4px 0 0;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
    color: #2C3862;
    font-weight: 700;
    border-bottom: 3px solid #2C3862;
    background: white;
}

/* Footer actions */
.footer-actions {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.footer-actions .btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.footer-actions .btn-default {
    background: white;
    border: 1px solid #2C3862;
    color: #2C3862;
}

.footer-actions .btn-default:hover {
    background: #2C3862;
    color: white;
}

/* Seccion badge en pregunta */
.seccion-badge {
    display: inline-block;
    background: #2C3862;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
    font-weight: 600;
}

.seccion-badge-stats {
    margin-right: 0;
    margin-left: 8px;
    vertical-align: middle;
}

/* Info Card del proceso */
.proceso-info-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #d5dbea;
    overflow: hidden;
}

.proceso-info-header {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.proceso-info-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.proceso-info-title i {
    font-size: 22px;
    opacity: 0.9;
}

.proceso-estado {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.proceso-estado.estado-borrador {
    background: #ffc107;
    color: #333;
}

.proceso-estado.estado-encurso {
    background: #28a745;
    color: white;
}

.proceso-estado.estado-cerrado {
    background: #6c757d;
    color: white;
}

.proceso-info-details {
    display: flex;
    padding: 18px;
    gap: 40px;
    flex-wrap: wrap;
    background: white;
}

.proceso-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-icon-wrapper {
    width: 40px;
    height: 40px;
    background: #E5E8F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2C3862;
    font-size: 16px;
    flex-shrink: 0;
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #2C3862;
}

/* Tabla de respuestas individuales */
.responses-table {
    border-radius: 8px;
    overflow: hidden;
}

.responses-table thead th {
    background: #2C3862;
    color: white;
    font-weight: 500;
    border: none;
    padding: 12px 15px;
}

.responses-table tbody tr:hover {
    background: #f8f9fa;
}

.responses-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Alerta estilizada */
.alert-styled {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: none;
    border-radius: 8px;
    color: #1565c0;
    padding: 15px 20px;
}

.alert-styled i {
    margin-right: 8px;
}

/* Comparative tables */
.enc-comparativa-tabs {
    margin-bottom: 0;
    border-bottom: 1px solid #d5dbea;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.enc-comparativa-tabs > li {
    margin-bottom: -1px;
}

.enc-comparativa-tabs > li > a {
    color: #5f6b91;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    padding: 10px 14px;
    background: #f6f8fd;
    margin-right: 0;
}

.enc-comparativa-tabs > li.active > a,
.enc-comparativa-tabs > li.active > a:focus,
.enc-comparativa-tabs > li.active > a:hover {
    color: #2C3862;
    background: #fff;
    border: 1px solid #d5dbea;
    border-bottom-color: #fff;
}

.enc-comparativa-content {
    padding-top: 14px;
}

.enc-comparativa-table-wrap {
    background: #fff;
    border: 1px solid #d5dbea;
    border-radius: 10px;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.enc-comparativa-table-wrap.enc-comparativa-table-wrap-wide {
    display: block;
    overflow-x: auto;
}

.comparativa-table {
    font-size: 13px;
    margin-bottom: 0;
    table-layout: auto;
    width: 100%;
    min-width: 100%;
}

.comparativa-table.comparativa-table-wide {
    width: auto;
}

.comparativa-table thead th {
    vertical-align: middle;
    background: var(--primario-extra-light);
    color: #2C3862;
    border-bottom: 1px solid #d5dbea;
    padding: 12px 14px;
}

.comparativa-table tbody td {
    vertical-align: middle;
    padding: 11px 14px;
    border-color: #edf1f8;
}

.comparativa-table tbody tr:hover {
    background: #f0f4ff;
}

.enc-comparativa-context-th {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    text-align: center;
}

.enc-comparativa-context-info {
    color: var(--primario-accent);
    font-size: 16px;
    line-height: 1;
    cursor: help;
}

.enc-comparativa-label-cell {
    font-size: 12px;
    color: #2C3862;
    background: #fbfcff;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.comparativa-table-modern th:first-child {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.enc-comparativa-question-cell {
    font-size: 12px;
    color: #2C3862;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

/* Wordcloud */
.wordcloud-canvas {
    display: block;
}

/* Wordcloud frequency table clickable */
.wf-clickable {
    cursor: pointer;
    color: #2C3862;
    font-weight: 600;
    transition: all 0.2s;
}

.wf-clickable:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Buscador libre de palabras */
.keyword-search-box {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.keyword-search-box input {
    flex: 1;
    border: 1px solid #dde1ea;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.keyword-search-box input:focus {
    border-color: #2C3862;
    box-shadow: 0 0 0 2px rgba(44, 56, 98, 0.1);
}

.keyword-search-box button {
    background: #2C3862;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.keyword-search-box button:hover {
    background: #3d4a73;
}


/* ==========================================================================
   6. MODAL PALABRA (Wordcloud detail)
   ========================================================================== */

.word-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10500;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--tr02), visibility var(--tr02);
}

.word-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.word-modal-panel {
    background: #fff;
    width: 94%;
    max-width: 780px;
    border-radius: var(--form-radius);
    box-shadow: var(--shadow-modal-content);
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    transform: translateY(30px) scale(0.97);
    transition: transform var(--tr04);
    overflow: hidden;
}

.word-modal-overlay.active .word-modal-panel {
    transform: translateY(0) scale(1);
}

.word-modal-header {
    background: var(--primario-highlight);
    color: var(--primario);
    padding: var(--20-10);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-shrink: 0;
    border-radius: var(--form-radius) var(--form-radius) 0 0;
    border-bottom: 1px solid var(--primario-highlight-medio);
}

.word-modal-header-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--form-radius);
    background: var(--primario-highlight-light);
    color: var(--primario);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.word-modal-header-text {
    flex: 1;
    min-width: 0;
}

.word-modal-header-text h3 {
    margin: 0 0 var(--10-5) 0;
    font-size: var(--h5-fs);
    color: var(--primario);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.word-modal-header-text h3 .searched-word {
    background: var(--primario-highlight-light);
    padding: 2px 10px;
    border-radius: var(--form-radius);
    font-style: italic;
    display: inline-block;
    margin-top: 2px;
}

.word-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primario-highlight-light);
    color: var(--primario);
    border-radius: var(--full-radius);
    padding: 4px 14px;
    font-weight: 600;
}

.word-modal-badge-error {
    background: var(--danger);
    color: #fff;
}

.word-modal-close {
    background: transparent;
    border: none;
    color: var(--primario);
    width: 32px;
    height: 32px;
    border-radius: var(--full-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    transition: background-color var(--tr02), color var(--tr02), transform var(--tr02);
    flex-shrink: 0;
}

.word-modal-close:hover {
    background: var(--primario-highlight-light);
    color: var(--primario-dark);
    transform: rotate(90deg);
}

.word-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--20-10);
    overscroll-behavior: contain;
    background: #fff;
}

.word-modal-body::-webkit-scrollbar {
    width: 6px;
}

.word-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.word-modal-body::-webkit-scrollbar-thumb {
    background: var(--primario-lighter);
    border-radius: 3px;
}

.word-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primario-light);
}

.word-match-card {
    background: var(--primario-highlight-light);
    border-radius: var(--container-radius);
    padding: var(--20-10);
    margin-bottom: 12px;
    border: 1px solid var(--primario-extra-light);
    transition: transform var(--tr02), box-shadow var(--tr02), border-color var(--tr02);
    position: relative;
}

.word-match-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-block);
    border-color: var(--primario-lighter);
}

.word-match-card:last-child {
    margin-bottom: 0;
}

.word-match-card .card-question-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primario-extra-light);
    color: var(--primario);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: var(--form-radius);
    margin-bottom: 10px;
}

.word-match-card .card-response-text {
    color: var(--grafito);
    line-height: 1.7;
    word-break: break-word;
}

.word-match-card .card-response-text mark {
    background: var(--secundario-extra-light);
    padding: 1px 7px;
    border-radius: var(--form-radius);
    font-weight: 700;
    color: var(--secundario-dark);
    border: 1px solid var(--secundario-light);
}

.word-match-card .card-person {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--gris-oscuro);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--primario-extra-light);
}

.word-match-card .card-person i {
    color: var(--gris-claro);
}

.word-modal-empty {
    text-align: center;
    padding: var(--50-25) var(--20-10);
    color: var(--gris-oscuro);
}

.word-modal-empty i {
    font-size: var(--h2-fs);
    margin-bottom: var(--15-10);
    display: block;
    color: var(--gris-claro);
}

.word-modal-empty p {
    margin: 0;
}

.word-modal-footer {
    width: 100%;
    padding: var(--20-10);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    background: var(--primario-highlight-medio);
    border-top: 1px solid var(--primario-highlight);
    border-radius: 0 0 var(--form-radius) var(--form-radius);
}

.word-modal-footer .btn-close-modal {
    align-items: center;
    appearance: none;
    background-color: var(--primario-highlight-light);
    border: none;
    border-radius: var(--btn-radius);
    box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
    box-sizing: border-box;
    color: var(--primario);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    justify-content: space-between;
    line-height: 1;
    overflow: hidden;
    padding: var(--10-5) var(--15-10);
    text-decoration: none;
    transition: box-shadow .15s, transform .15s, background-color .15s, color .15s;
    user-select: none;
    white-space: nowrap;
}

.word-modal-footer .btn-close-modal:hover {
    background-color: var(--primario-highlight);
    color: var(--primario-dark);
    box-shadow: rgba(45, 35, 66, 0.4) 0 4px 8px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
    transform: translateY(-2px);
}

.word-modal-footer .btn-close-modal:focus {
    background-color: var(--primario-highlight);
    color: var(--primario-dark);
    box-shadow: #D6D6E7 0 0 0 1.5px inset, rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
    outline: none;
}

.word-modal-footer .btn-close-modal:active {
    background-color: var(--primario-highlight);
    color: var(--primario-dark);
    box-shadow: #D6D6E7 0 3px 7px inset;
    transform: translateY(2px);
}


/* ==========================================================================
   7. RESPUESTAS INDIVIDUALES (filtros)
   ========================================================================== */

/* Filter card */
.filter-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    border: none;
}

.filter-card-header {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-card-header h5 {
    margin: 0;
    color: white;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.enc-filter-badge-active {
    background: white;
    color: #2C3862;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    margin-left: 10px;
}

.enc-filter-chevron {
    transition: transform 0.3s ease;
}

.enc-filter-body {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.enc-table-bg {
    background: white;
}


/* ==========================================================================
   8. FORMULARIO SECCIÓN (modal)
   ========================================================================== */

#form_seccion_container {
    padding: 0 15px;
}

#form_seccion_container .form-group {
    margin-bottom: 25px;
}

#form_seccion_container .form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: block;
    font-size: 14px;
}

#form_seccion_container label.required:after {
    content: " *";
    color: #d9534f;
}

#form_seccion_container .grupo-traduccion {
    padding: 0;
    margin: 0;
}

#form_seccion_container .traduccion-row {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

#form_seccion_container .traduccion-row:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#form_seccion_container .traduccion-row > div {
    padding: 0;
    margin-bottom: 10px;
}

#form_seccion_container .traduccion-row > div:last-child {
    margin-bottom: 0;
}

#form_seccion_container .form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#form_seccion_container .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}

#form_seccion_container .locale-select {
    height: 38px;
}

#form_seccion_container textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

#modal_seccion .modal-body {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding: 20px;
}

#modal_seccion .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
    background: #f8f9fa;
}

#modal_seccion .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    background: #fff;
}

#modal_seccion .modal-header .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Botón para añadir idiomas */
#form_seccion_container .btn-success.btn-add-idioma {
    margin-top: 10px;
    margin-bottom: 5px;
}

/* Select2 en modal sección */
#modal_seccion .select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

#modal_seccion .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    color: #495057;
}

#modal_seccion .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}


/* ==========================================================================
   9. MODAL AÑADIR DESTINATARIOS
   ========================================================================== */

/* Arreglo para que el contenido del modal no salga por fuera del mismo */
#modal_anadir_destinatarios_encuesta_proceso .modal-content {
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #ffffff;
}

/* Estilos para el header del modal */
#modal_anadir_destinatarios_encuesta_proceso .modal-header {
    position: relative;
    padding: 15px;
    background-color: #ffffff;
}

#modal_anadir_destinatarios_encuesta_proceso .modal-title {
    color: #2c3862;
    padding-right: 30px;
}

#modal_anadir_destinatarios_encuesta_proceso .modal-header .close {
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 1;
}

#modal_anadir_destinatarios_encuesta_proceso .panel-body {
    background-color: #ffffff;
}


/* ==========================================================================
   10. FORMULARIO PREGUNTAS (opciones, formato numeración)
   ========================================================================== */

#ehabilisgestiondelaformacionbundle_encuestapregunta_opciones,
[id$="_opciones"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px;
}

.opcion-item {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-end;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.opcion-item > div {
    flex: 1;
}

.opcion-item input[id$="_orden"] {
    display: none;
}

.opcion-item label[for$="_orden"] {
    display: none;
}

.remove-opcion {
    white-space: nowrap;
}

.add-opcion:disabled {
    opacity: 0.5 !important;
    color: var(--primario) !important;
    background-color: var(--primario-extra-light) !important;
    cursor: not-allowed !important;
    border-color: var(--primario-extra-light) !important;
}

/* Estilos para radio buttons de formato de numeración */
#ehabilisgestiondelaformacionbundle_encuestapregunta_esOrdenNumerico {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#ehabilisgestiondelaformacionbundle_encuestapregunta_esOrdenNumerico > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

#ehabilisgestiondelaformacionbundle_encuestapregunta_esOrdenNumerico input[type="radio"] {
    margin: 0 !important;
    position: relative;
    top: 0;
}

#ehabilisgestiondelaformacionbundle_encuestapregunta_esOrdenNumerico label {
    margin: 0 !important;
    font-weight: normal;
    cursor: pointer;
}


/* ==========================================================================
   11. DRAG & DROP / ORDENACIÓN (compartido sección, pregunta, opción)
   ========================================================================== */
.orden-column {
    width: 80px;
}

.orden-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.orden-number {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.drag-handle {
    cursor: move;
    color: #999;
    font-size: 16px;
}

.sortable-ghost {
    opacity: 0.4;
    background: #f0f0f0;
}

.sortable-drag {
    opacity: 0.8;
}

tbody tr:hover .drag-handle {
    color: #333;
}

/* Sección index extras */
.btn-editar-seccion {
    cursor: pointer;
    color: #337ab7;
    margin-right: 8px;
}

.btn-editar-seccion:hover {
    color: #23527c;
}

/* Opción index extras */
.actions-column {
    width: 130px;
}

.checkbox-column {
    width: 40px;
}

.orden-config-icon {
    cursor: pointer;
    margin-left: 5px;
    color: #2C3870;
}

.orden-config-icon:hover {
    color: #A8C6FC;
}


/* ==========================================================================
   12. PÁGINAS ERROR / GRACIAS (standalone)
   ========================================================================== */

/* Body centering para páginas standalone error/gracias */
.enc-centered-page {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Error card */
.error-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.error-icon.icon-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.error-icon.icon-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.error-icon.icon-info {
    background: linear-gradient(135deg, #2C3862 0%, #3a4a7a 100%);
}

.error-icon svg {
    width: 36px;
    height: 36px;
}

.error-card h1 {
    color: #2C3862;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.error-card p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.error-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 12px;
}

/* Gracias card */
.gracias-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.gracias-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2C3862 0%, #3a4a7a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.gracias-icon i {
    color: white;
    font-size: 36px;
}

.gracias-card h1 {
    color: #2C3862;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.gracias-card p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.gracias-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 12px;
}


/* ==========================================================================
   12b. DETALLE DE RESPUESTA INDIVIDUAL
   ========================================================================== */

/* Tarjeta info encuestado */
.encuestado-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.encuestado-info-header {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.encuestado-info-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.encuestado-tipo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.encuestado-tipo.tipo-alumno {
    background: #17a2b8;
    color: white;
}

.encuestado-tipo.tipo-tutor {
    background: #ffc107;
    color: #333;
}

.encuestado-info-details {
    display: flex;
    padding: 20px 25px;
    gap: 40px;
    flex-wrap: wrap;
    background: #f8f9fa;
}

.encuestado-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.encuestado-detail-item .detail-icon-wrapper {
    width: 40px;
    height: 40px;
    background: #E5E8F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2C3862;
    font-size: 16px;
    flex-shrink: 0;
}

.encuestado-detail-item .detail-content {
    display: flex;
    flex-direction: column;
}

.encuestado-detail-item .detail-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.encuestado-detail-item .detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #2C3862;
}

/* Tarjeta de pregunta en detalle respuesta */
.question-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    overflow: hidden;
    border: none;
}

.question-card-header {
    background: linear-gradient(135deg, #2C3862 0%, #3d4a73 100%);
    padding: 15px 20px;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s;
}

.question-card-header:hover {
    background: linear-gradient(135deg, #3d4a73 0%, #4d5a83 100%);
}

.question-card-header h5 {
    margin: 0;
    color: white;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.question-card-header .question-text {
    flex: 1;
    padding-right: 15px;
}

.question-card-header .badge {
    background: white;
    color: #2C3862;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 10px;
}

.question-card-header .collapse-icon {
    color: white;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.question-card-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.question-card-body {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

/* Respuesta destacada */
.respuesta-value {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 15px 20px;
    border: 1px solid #e9ecef;
}

.respuesta-value.escala {
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.respuesta-value .valor-numerico {
    font-size: 32px;
    font-weight: 700;
    color: #2C3862;
}

.respuesta-value .valor-maximo {
    font-size: 18px;
    color: #888;
}

.respuesta-texto {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    border-left: 4px solid #2C3862;
}

.respuesta-texto p {
    margin: 0;
    white-space: pre-wrap;
    color: #333;
}

/* Lista de opciones seleccionadas */
.opciones-seleccionadas {
    list-style: none;
    padding: 0;
    margin: 0;
}

.opciones-seleccionadas li {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.opciones-seleccionadas li:last-child {
    margin-bottom: 0;
}

.opciones-seleccionadas li i {
    color: #28a745;
    font-size: 16px;
}

/* Sin respuesta */
.sin-respuesta {
    color: #888;
    font-style: italic;
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Section header */
.section-header {
    color: #2C3862;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2C3862;
}

.section-header i {
    margin-right: 8px;
}

.enc-subsection-header {
    color: #2C3862;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d5dbea;
}


/* ==========================================================================
   12c. FORMULARIO PROCESO ENCUESTA (edit)
   ========================================================================== */

/* Fix radios propagarPorAsignatura: evitar salto al marcar */
[data-contexto-field="TITULACION_PROPAGAR"] .radio input[type="radio"]:checked {
    --check-size: 16px !important;
    margin-left: -20px !important;
    box-shadow: none !important;
}


/* ==========================================================================
   7. MODAL CONFIGURACIÓN TIPO DE ORDEN (opciones de respuesta)
   ========================================================================== */

.btn-orden-opciones {
    display: flex;
    gap: var(--15-10);
    margin-bottom: var(--20-10);
    flex-wrap: wrap;
}

.btn-orden-opciones .btn {
    flex: 1;
    min-width: 160px;
}

.btn-orden-tipo.btn-tipo-activo {
    background-color: var(--primario);
    color: white;
    border-color: var(--primario-dark);
    box-shadow: var(--shadow-block);
}

.btn-orden-tipo.btn-tipo-activo:hover {
    background-color: var(--primario-dark);
    border-color: var(--primario-dark);
}

/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */

@media (max-width: 600px) {
    .encuesta-header h1 {
        font-size: 20px;
    }

    .preview-scale-item {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .btn-enviar {
        width: 100%;
    }
}
