/* ============================================================
   VARIABLES Y RESET
   ============================================================ */

:root {
    --font-family-sans-serif: "Open Sans", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";

    --color-primary: #572364;
    --color-primary-dark: #3E1847;
    --color-primary-light: #7A3A8A;
    --color-primary-hover: #6A2B79;

    --color-danger: #a71c1c;
    --color-danger-hover: #8b0000;
    --color-success: #28a745;

    --color-text: #515151;
    --color-text-dark: #2c3e50;
    --color-bg: #f8f2fa;

    --sidebar-width: 238px;
    --toolbar-height: 84px;
}
*,
*::before,
*::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    font-family: sans-serif;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

nav {
    display: block;
}

body {
    margin: 0;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    text-align: left;
    background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    background-color: transparent;
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: "Nunito", sans-serif;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

h1, .h1 {
    font-size: 2.5rem;
    font-weight: normal;
}

/* ============================================================
   LAYOUT PRINCIPAL (DASHBOARD)
   ============================================================ */

main {
    min-height: 100vh;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.dashboard-app {
    display: flex;
    flex-direction: column;
    flex-grow: 2;
    margin-top: var(--toolbar-height);
}

.dashboard-content {
    flex-grow: 2;
    padding: 25px;
    background: linear-gradient(135deg, #faf7ff 0%, #efe8ff 100%);
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================================================
   SIDEBAR / NAV
   ============================================================ */

.dashboard-nav {
    min-width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow: visible;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    z-index: 1050;
}

.dashboard-compact .dashboard-nav {
    display: none;
}

.dashboard-nav header {
    min-height: var(--toolbar-height);
    padding: 8px 27px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-nav header .menu-toggle {
    display: none;
    margin-right: auto;
}

.dashboard-nav a {
    color: #fff;
}

.dashboard-nav a:hover {
    text-decoration: none;
}

.dashboard-nav-list {
    display: flex;
    flex-direction: column;
}

.dashboard-nav-item {
    min-height: 56px;
    padding: 8px 20px 8px 70px;
    display: flex;
    align-items: center;
    letter-spacing: 0.02em;
    transition: ease-out 0.5s;
}

.dashboard-nav-item i {
    width: 36px;
    font-size: 19px;
    margin-left: -40px;
}

.dashboard-nav-item:hover {
    background: var(--color-primary-hover);
}

.active {
    background: rgba(0, 0, 0, 0.1);
}

.nav-item-divider {
    height: 1px;
    margin: 1rem 0;
    overflow: hidden;
    background-color: rgba(236, 238, 239, 0.3);
}

/* Dropdown del nav */
.dashboard-nav-dropdown {
    display: flex;
    flex-direction: column;
}

.dashboard-nav-dropdown.show {
    background: rgba(255, 255, 255, 0.04);
}

.dashboard-nav-dropdown.show > .dashboard-nav-dropdown-toggle {
    font-weight: bold;
}

.dashboard-nav-dropdown.show > .dashboard-nav-dropdown-toggle::after {
    transform: none;
}

.dashboard-nav-dropdown.show > .dashboard-nav-dropdown-menu {
    display: flex;
}

.dashboard-nav-dropdown-toggle::after {
    content: "";
    margin-left: auto;
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.72);
    transform: rotate(90deg);
}

.dashboard-nav-dropdown-menu {
    display: none;
    flex-direction: column;
}

.dashboard-nav-dropdown-item {
    min-height: 40px;
    padding: 8px 20px 8px 70px;
    display: flex;
    align-items: center;
    transition: ease-out 0.5s;
}

.dashboard-nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* ============================================================
   TOOLBAR (BARRA SUPERIOR)
   ============================================================ */

.dashboard-toolbar {
    min-height: 60px;
    background-color: #f7f4ff;
    display: flex;
    align-items: center;
    padding: 5px 20px;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
}

.menu-toggle {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-dark);
}

.menu-toggle:hover,
.menu-toggle:active,
.menu-toggle:focus {
    text-decoration: none;
    color: var(--color-primary);
}

.menu-toggle i {
    font-size: 20px;
}

/* ============================================================
   BRAND LOGO
   ============================================================ */

.brand-logo {
    font-family: "Nunito", sans-serif;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    color: var(--color-text);
    align-items: center;
}

.brand-logo:focus,
.brand-logo:active,
.brand-logo:hover {
    color: #dbdbdb;
    text-decoration: none;
}

.brand-logo i {
    color: #d2d1d1;
    font-size: 27px;
    margin-right: 10px;
}

/* ============================================================
   PÁGINA: HEADER
   ============================================================ */

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.header-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
}

.header-icon i {
    font-size: 1.8rem;
    color: white;
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ============================================================
   TARJETAS GENÉRICAS
   ============================================================ */

.card-contenido {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0;
}

.card-body-contenido {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-header-contenido {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    text-align: center;
}

/* Tarjeta tipo tabla */
.table-card,
.custom-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 2rem;
    position: relative;
}

.card-top-accent {
    height: 6px;
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    width: 100%;
}

.card-body-custom {
    padding: 1.5rem;
}

/* Card para encuestas */
.card-encuesta {
    background-color: #f8f4ff;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.125);
    overflow: hidden;
}

.card-encuesta .card-body {
    padding: 1.25rem;
}

/* ============================================================
   LOGIN / FORMULARIOS DE AUTENTICACIÓN
   ============================================================ */

.card {
    max-width: 450px;
    background-color: rgba(5, 14, 26, 0.922) !important;
    border-radius: 10px;
}

.logo-form {
    max-width: 40%;
    height: auto;
}

.card-header h3 {
    color: white;
    margin: 0;
}

.input-group-text {
    width: 50px;
    background-color: var(--color-primary);
    color: #fff;
    border: 0 !important;
}

input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.login_btn {
    background-color: var(--color-primary);
    color: #fff;
    width: 100%;
    border: none;
    transition: background-color 0.3s;
}

.login_btn:hover {
    color: white;
    background: var(--color-primary-hover);
}

.enlace {
    color: var(--color-primary);
    margin-left: 4px;
}

.enlace:hover {
    color: var(--color-primary-light);
    margin-left: 4px;
}

/* ============================================================
   FORM REVISION
   ============================================================ */

.card-revision {
    max-width: 450px;
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-radius: 10px;
}

.logo-form-revision {
    max-width: 20%;
    height: auto;
}

/* ============================================================
   PREGUNTAS (CREACIÓN/EDICIÓN)
   ============================================================ */

.pregunta-card {
    background-color: #ece4ff !important;
    width: 100%;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pregunta-card .opciones-container {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f5edff;
    border-radius: 0.25rem;
}

.pregunta-label {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pregunta-input {
    background-color: #f8efff;
}

.opciones-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.opciones-container input {
    flex: 1;
}

.contenido-formulario {
    flex-grow: 2;
    margin: 50px;
    padding: 25px;
    background-color: rgba(124, 58, 237, 0.08);
    border-radius: 25px;
}

/* ============================================================
   BOTONES
   ============================================================ */

.btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.btn-morado {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary-hover) !important;
    color: white !important;
}

.btn-morado:hover {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-dark) !important;
    color: white !important;
}

.btn-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-gradient-success {
    background: linear-gradient(135deg, var(--color-success), #45ce63);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #218838, #35b051);
    color: white;
    text-decoration: none;
}

.btn-gradient-danger {
    background: linear-gradient(135deg, var(--color-danger), #cd2020);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-gradient-danger:hover {
    background: linear-gradient(135deg, var(--color-danger-hover), var(--color-danger));
    color: white;
    text-decoration: none;
}

.btn-gradient-secondary {
    background: white;
    color: #555;
    border: 2px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-gradient-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Botones de acción (iconos pequeños) */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    margin: 0 2px;
    color: white;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    color: white;
}

.btn-view {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

.btn-edit {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.btn-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
}

.btn-icon-small {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
    transition: all 0.2s;
}

.btn-icon-small:hover {
    transform: scale(1.1);
    color: white;
}

/* ============================================================
   TABLA PERSONALIZADA
   ============================================================ */

.custom-table {
    width: 100% !important;
    border-collapse: collapse;
}

.custom-table thead {
    background-color: #f8f4ff;
    border-bottom: 2px solid #e9ecef;
}

.custom-table th {
    color: var(--color-text-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 1rem 0.75rem;
    letter-spacing: 0.5px;
    border: none;
    white-space: nowrap;
}

.custom-table td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    color: #555;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.9rem;
}

.custom-table tbody tr {
    transition: all 0.2s ease;
}

.custom-table tbody tr:hover {
    background-color: #f5edff;
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   DATATABLES
   ============================================================ */

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_length select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    margin: 0 0.5rem;
}

.dataTables_wrapper .dataTables_info {
    color: #6c757d;
    font-size: 0.875rem;
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none !important;
    background: transparent !important;
    color: #555 !important;
    padding: 0.5rem 0.85rem;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f5edff !important;
    color: var(--color-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%) !important;
    color: white !important;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #ccc !important;
}

/* ============================================================
   BADGES Y ESTADOS
   ============================================================ */

.badge-encuesta {
    background-color: #f8f4ff;
    color: var(--color-text-dark);
    border: 1px solid #e9ecef;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

/* ============================================================
   SIDEBAR DE PREGUNTAS (RESULTADOS)
   ============================================================ */

.question-list {
    border: none;
    padding: 0;
}

.question-item {
    border: none;
    border-radius: 12px !important;
    margin-bottom: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    color: #555;
    font-weight: 500;
    background-color: #f8f4ff;
}

.question-item:hover {
    background-color: #f5edff;
    transform: translateX(5px);
    color: var(--color-primary);
}

.question-item.active {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

.question-item.active .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white;
}

/* ============================================================
   FORMULARIO PERSONALIZADO
   ============================================================ */

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.form-section-title i {
    color: var(--color-primary);
}

.form-label-custom {
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #6c757d;
    z-index: 10;
    font-size: 0.9rem;
}

.form-control-custom {
    padding: 0.75rem 1rem 0.75rem 45px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.form-control-custom:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background-color: white;
    outline: none;
}

.form-control-custom::placeholder {
    color: #adb5bd;
}

select.form-control-custom {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    flex-wrap: wrap;
}

/* ============================================================
   ENCUESTA PÚBLICA
   ============================================================ */

.encuesta-header {
    margin-bottom: 2rem;
}

.icono-encuesta {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.icono-encuesta i {
    font-size: 2rem;
    color: white;
}

.subtitulo-encuesta {
    color: #6c757d;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.seccion-encuesta {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.seccion-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.seccion-header-preguntas {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
}

.seccion-body {
    padding: 1.5rem;
}

.label-encuesta {
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.icono-label {
    color: var(--color-primary-light);
    width: 18px;
    margin-right: 5px;
}

.input-encuesta {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.input-encuesta:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.input-encuesta::placeholder {
    color: #adb5bd;
}

.pregunta-item {
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.pregunta-item:hover {
    background-color: #f8f4ff;
}

.numero-pregunta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.pregunta-texto {
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: 1rem;
    line-height: 1.5;
    padding-top: 4px;
}

.opciones-respuesta {
    margin-left: 44px;
}

.opcion-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f4ff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.opcion-item:hover {
    border-color: var(--color-primary-light);
    background: #f5edff;
}

.opcion-item .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
}

.opcion-item .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.opcion-item .form-check-label {
    cursor: pointer;
    margin-bottom: 0;
    flex: 1;
}

.respuesta-abierta {
    margin-left: 44px;
}

.respuesta-abierta textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-enviar-encuesta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    color: white;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
    transition: all 0.3s ease;
}

.btn-enviar-encuesta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.45);
    color: white;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

.btn-enviar-encuesta:active {
    transform: translateY(-1px);
}

.texto-confidencial {
    color: #6c757d;
    font-size: 0.875rem;
}

.alert-custom {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   TÍTULOS Y UTILIDADES
   ============================================================ */

.titulo-azul {
    color: var(--color-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.titulo-morado {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.colorize {
    width: 90px;
    padding: 15px;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    background:
        linear-gradient(225deg, var(--color-primary) 25%, transparent 25%) 0px 0 / 46px 46px,
        linear-gradient(315deg, #f7f0ff 100%, transparent 25%) 0px 0 / 46px 46px;
    background-size: cover;
    color: rgb(48, 20, 88);
    text-align: center;
    padding: 0.2rem;
    transition: margin-left 0.35s ease;
}

/* ============================================================
   ANIMACIONES
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* ============================================================
   MEDIA QUERIES
   ============================================================ */

/* Desktop: sidebar y toolbar con margen */
@media (min-width: 992px) {
    .dashboard-app {
        margin-left: var(--sidebar-width);
    }

    .dashboard-compact .dashboard-app {
        margin-left: 0;
    }

    .dashboard-toolbar {
        left: var(--sidebar-width);
    }

    .dashboard-compact .dashboard-toolbar {
        left: 0;
    }
}

/* Tablet: sidebar oculto por defecto */
@media (max-width: 992px) {
    .dashboard-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        z-index: 1070;
    }

    .dashboard-nav.mobile-show {
        display: block;
    }

    .dashboard-nav header .menu-toggle {
        display: flex;
    }

    .table-responsive-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .custom-table {
        min-width: 900px;
    }
}

/* Móvil */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 1rem;
    }

    .card {
        max-width: 70%;
    }

    .logo-form {
        max-width: 35%;
    }

    .card-revision {
        max-width: 70%;
    }

    .logo-form-revision {
        max-width: 35%;
    }

    .custom-table th,
    .custom-table td {
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem;
    }

    .action-btn {
        width: 28px;
        height: 28px;
    }

    .page-header h2 {
        font-size: 1.6rem;
    }

    .header-icon {
        width: 55px;
        height: 55px;
    }

    .header-icon i {
        font-size: 1.4rem;
    }

    .header-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-gradient-primary,
    .btn-gradient-success,
    .btn-gradient-secondary {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn-gradient-success,
    .form-actions .btn-gradient-secondary {
        width: 100%;
        justify-content: center;
    }

    .encuesta-publica-container {
        padding: 1rem 0;
    }

    .icono-encuesta {
        width: 60px;
        height: 60px;
    }

    .icono-encuesta i {
        font-size: 1.5rem;
    }

    .seccion-body {
        padding: 1rem;
    }

    .opciones-respuesta,
    .respuesta-abierta {
        margin-left: 0;
        margin-top: 1rem;
    }

    .numero-pregunta {
        min-width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .btn-enviar-encuesta {
        width: 100%;
        padding: 1rem 2rem;
    }

    #main,
    footer {
        transition: margin-left 0.35s ease;
    }
}