﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 0.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

/* Asegura que los contenedores siempre sean de ancho completo */
nav .nav-item {
    display: block !important;
    width: 100% !important;
}

    /* Ajusta solo el contenido del enlace */
    nav .nav-item .nav-link {
        display: inline-flex !important;
        align-items: center !important;
        white-space: nowrap !important;
        text-align: left !important;
        width: 100% !important;
    }


#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ========================================
   SPINNER STYLES
======================================== */

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

    /* Efecto sutil de fondo */
    .spinner-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, 0.03) 0%, transparent 50%), radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
        animation: gentleFloat 8s ease-in-out infinite;
    }

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.modern-spinner {
    width: 70px;
    height: 70px;
    position: relative;
    margin-bottom: 2rem;
}

    /* Spinner principal simplificado */
    .modern-spinner::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border: 3px solid #e2e8f0;
        border-top: 3px solid #6366f1;
        border-radius: 50%;
        animation: smoothSpin 1.2s ease-in-out infinite;
        box-shadow: 0 2px 10px rgba(99, 102, 241, 0.1);
    }

    /* Anillo interior más sutil */
    .modern-spinner::after {
        content: '';
        position: absolute;
        top: 12px;
        left: 12px;
        width: calc(100% - 24px);
        height: calc(100% - 24px);
        border: 2px solid #f1f5f9;
        border-bottom: 2px solid #94a3b8;
        border-radius: 50%;
        animation: smoothSpin 2s ease-in-out infinite reverse;
    }

/* Centro con diseño minimalista */
.modern-spinner {
    background: radial-gradient(circle, #ffffff 0%, #f8fafc 100%);
    border-radius: 50%;
    animation: gentlePulse 3s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08), inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.loading-text {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: #475569;
    font-weight: 500;
    letter-spacing: 0.3px;
    animation: textFade 2.5s ease-in-out infinite alternate;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

    /* Texto con puntos animados más suaves */
    .loading-text::after {
        content: '';
        animation: gentleDots 2s steps(4, end) infinite;
    }

/* Animaciones más suaves y lentas */
@keyframes smoothSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08), inset 0 1px 3px rgba(255, 255, 255, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 25px rgba(99, 102, 241, 0.12), inset 0 1px 3px rgba(255, 255, 255, 0.4);
    }
}

@keyframes textFade {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
    }
}

@keyframes gentleDots {
    0%, 25% {
        content: '';
    }

    50% {
        content: '.';
    }

    75% {
        content: '..';
    }

    100% {
        content: '...';
    }
}

/* Versión responsiva para móviles */
@media (max-width: 768px) {
    .modern-spinner {
        width: 60px;
        height: 60px;
    }

    .loading-text {
        font-size: 1.1rem;
        margin-top: 1rem;
    }
}

/* Animación de entrada muy suave */
@keyframes gentleFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner-container {
    animation: gentleFadeIn 0.8s ease-out;
}

    /* Tema oscuro más elegante y calmado */
    .spinner-container.dark-theme {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }

.dark-theme .modern-spinner::before {
    border: 3px solid #334155;
    border-top: 3px solid #6366f1;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.dark-theme .modern-spinner::after {
    border: 2px solid #1e293b;
    border-bottom: 2px solid #64748b;
}

.dark-theme .modern-spinner {
    background: radial-gradient(circle, #334155 0%, #1e293b 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15), inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

.dark-theme .loading-text {
    color: #cbd5e1;
}

/* Para usuarios que prefieren reducir el movimiento */
@media (prefers-reduced-motion: reduce) {
    .modern-spinner::before,
    .modern-spinner::after {
        animation-duration: 3s;
    }

    .modern-spinner {
        animation: none;
    }

    .spinner-container::before {
        animation: none;
    }

    .loading-text {
        animation: none;
        opacity: 0.9;
    }

        .loading-text::after {
            content: '...';
            animation: none;
        }
}

/* ========================================
   LOGIN FORM STYLES  
======================================== */

/* Estilos para el formulario de login moderno - Blazor WASM */
.login-container {
    max-width: 420px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

    /* Efecto sutil de fondo */
    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    }

.login-header {
    text-align: center;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    font-family: inherit;
    box-sizing: border-box;
}

    .form-input:focus {
        outline: none;
        border-color: #10b981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        background-color: #fefefe;
    }

    .form-input::placeholder {
        color: #9ca3af;
    }

.btn-login {
    width: 100%;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Animación de entrada */
.login-card {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Seccion de recuperación */
.recovery-links {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
}

.link-recovery {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

    .link-recovery:hover {
        color: #1d4ed8;
        text-decoration: underline;
    }

.divider {
    margin: 0 0.5rem;
    color: #aaa;
}


/* Responsive */
@media (max-width: 480px) {
    .login-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.5rem;
    }
}

/* Estados de carga */
.btn-login.loading {
    position: relative;
    color: transparent;
}

    .btn-login.loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid transparent;
        border-top: 2px solid #ffffff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

/* ========================================
   Responder Encuesta  STYLES  
======================================== */

/* Estilos para el formulario de encuesta moderno - Blazor WASM */

/* Contenedor principal */
.survey-container {
    max-width: 800px;
    margin: 0.3rem auto;
    padding: 0 1rem;
}

.survey-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
}

    /* Barra superior decorativa */
    .survey-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, #10b981 0%, #059669 50%, #047857 100%);
    }

.survey-body {
    padding: 1.5rem;
}

/* Header de la encuesta */
.survey-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}

.survey-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.survey-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Estados de carga */
.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-text {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

/* Sección de validación de cédula */
.cedula-section {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 480px; /* 🔹 Limita el ancho máximo */
    margin-left: auto;
    margin-right: auto; /* 🔹 Centra horizontalmente */
    display: flex;
    flex-direction: column;
    align-items: center; /* 🔹 Centra todo el contenido */
}

.cedula-label {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center; /* 🔹 Centra el texto de la etiqueta */
}

.cedula-input {
    width: 100%;
    max-width: 360px; /* 🔹 Evita que se estire demasiado */
    padding: 0.9rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 1.25rem;
    text-align: center; /* 🔹 Centra el texto en el input */
}

.cedula-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background-color: #fefefe;
}

.cedula-input:disabled {
    background-color: #f9fafb;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Botón de validación */
.btn-validate {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* 🔹 Centra el contenido del botón */
    gap: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    max-width: 220px; /* 🔹 Tamaño más razonable en PC */
}

.btn-validate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-validate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Estados de validación */
.validation-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.validation-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* 🔹 Responsive para móviles de la sección de validación*/
@media (max-width: 480px) {
    .cedula-section {
        padding: 1.5rem;
    }

    .cedula-input {
        max-width: 100%;
        font-size: 1rem;
    }

    .btn-validate {
        width: 100%;
        max-width: none;
    }
}


/* Información de la encuesta */
.survey-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1rem;
}

.survey-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 0.5rem;
}

.survey-info-description {
    color: #075985;
    margin: 0;
    line-height: 1.6;
}

/* Sección de preguntas */
.question-section {
    background-color: #ffffff;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease-in-out;
}

    .question-section:hover {
        border-color: #e2e8f0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

.question-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    display: block;
}

/* Opciones de radio */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.radio-option {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    min-width: 140px;
    text-align: center;
}

    .radio-option:hover {
        border-color: #cbd5e1;
        background-color: #f1f5f9;
    }

    .radio-option input[type="radio"] {
        margin-right: 0.5rem;
        transform: scale(1.2);
    }

        .radio-option input[type="radio"]:checked + label,
        .radio-option:has(input[type="radio"]:checked) {
            background-color: #dcfce7;
            border-color: #10b981;
            color: #065f46;
            font-weight: 600;
        }

/* Opciones de checkbox */
/* ===== CHECKBOX PERSONALIZADO ===== */
.checkbox-lote {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2563eb; /* Azul moderno */
    transition: transform 0.15s ease, opacity 0.25s ease;
}

    .checkbox-lote:hover:not(:disabled) {
        transform: scale(1.15);
    }

    /* Deshabilitado (ya programado) */
    .checkbox-lote:disabled {
        cursor: not-allowed;
        opacity: 0.6;
        accent-color: #10B981 !important; /* Verde de éxito */
    }

    /* ===== TOOLTIP ELEGANTE ===== */
    .checkbox-lote[title] {
        position: relative;
    }

        .checkbox-lote[title]:hover::after {
            content: attr(title);
            position: absolute;
            left: 28px;
            top: 0;
            background: #1f2937;
            color: white;
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            z-index: 999;
            opacity: 0;
            animation: tooltipFade 0.25s forwards;
        }


@keyframes tooltipFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* Pequeña flecha del tooltip */
.checkbox-lote[title]:hover::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent #1f2937 transparent transparent;
    z-index: 998;
}


.checkbox-group {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-option {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .checkbox-option:hover {
        border-color: #cbd5e1;
        background-color: #f1f5f9;
    }

    .checkbox-option input[type="checkbox"] {
        transform: scale(1.3);
        margin: 0;
    }

        .checkbox-option input[type="checkbox"]:checked + label,
        .checkbox-option:has(input[type="checkbox"]:checked) {
            background-color: #dbeafe;
            border-color: #3b82f6;
            color: #1e40af;
            font-weight: 600;
        }

/* Área de texto */
.textarea-field {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    box-sizing: border-box;
}

    .textarea-field:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        background-color: #fefefe;
    }

    .textarea-field::placeholder {
        color: #9ca3af;
    }

/* Botón de envío */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

    .btn-submit:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    }

    .btn-submit:active {
        transform: translateY(-1px);
    }

/* Mensajes de error */
.error-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #dc2626;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Animaciones */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.survey-card {
    animation: fadeIn 0.6s ease-out;
}

.question-section {
    animation: fadeIn 0.4s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .survey-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .survey-body {
        padding: 1.5rem;
    }

    .survey-title {
        font-size: 1.5rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        min-width: auto;
        text-align: left;
    }

    .question-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .survey-title {
        font-size: 1.25rem;
    }

    .question-label {
        font-size: 1.1rem;
    }

    .btn-submit {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* =================================
   ESTILOS MODERNOS PARA FORMULARIOS DE CREACION
   ================================= */

/* Títulos dentro de formularios de creación */
.form-container-create h3 {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Formulario principal */
.form-container-create form {
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .form-container-create form:hover {
        transform: translateY(-2px);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    /* Efecto de cristal decorativo */
    .form-container-create form::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    }

/* Etiquetas modernas */
.form-container-create label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

/* Grupo para inputs con efectos flotantes */
.form-container-create .input-group {
    position: relative;
    margin-bottom: 24px;
}

/* Inputs y select con diseño glassmorphism */
.form-container-create input[type="text"],
.form-container-create input[type="email"],
.form-container-create input[type="password"],
.form-container-create input[type="date"],
.form-container-create select,
.form-container-create textarea {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

    /* Estados de focus con gradientes animados */
    .form-container-create input:focus,
    .form-container-create select:focus,
    .form-container-create textarea:focus {
        border: 2px solid transparent;
        background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #667eea, #764ba2) border-box;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25), 0 4px 10px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    /* Placeholder moderno */
    .form-container-create input::placeholder,
    .form-container-create textarea::placeholder {
        color: #9ca3af;
        font-weight: 400;
        opacity: 0.8;
    }

    /* Inputs inválidos con animación */
    .form-container-create input.invalid,
    .form-container-create textarea.invalid {
        border: 2px solid transparent;
        background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #ef4444, #dc2626) border-box;
        animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    }

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }

    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Botón para mostrar/ocultar clave mejorado */
.form-container-create .toggle-button {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #6b7280;
}

    .form-container-create .toggle-button:hover {
        background: linear-gradient(135deg, #e5e7eb, #d1d5db);
        color: #374151;
        transform: translateY(-50%) scale(1.1);
    }

/* Botón submit con efectos modernos */
.form-container-create button[type="submit"] {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 12px;
}

    /* Efecto de brillo en el botón */
    .form-container-create button[type="submit"]::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .form-container-create button[type="submit"]:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

        .form-container-create button[type="submit"]:hover::before {
            left: 100%;
        }

    .form-container-create button[type="submit"]:active {
        transform: translateY(-1px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
    }

/* Mensajes de error modernos */
.form-container-create .error-message {
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    margin-top: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInError 0.3s ease-out;
}

    .form-container-create .error-message::before {
        content: '⚠️';
        font-size: 16px;
    }

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Textarea con altura dinámica */
.form-container-create textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* Select personalizado */
.form-container-create select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 50px;
}

/* Efectos de carga para el formulario */
.form-container-create.loading {
    opacity: 0.7;
    pointer-events: none;
}

    .form-container-create.loading button[type="submit"] {
        background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
        cursor: not-allowed;
    }

/* Responsive design mejorado */
@media (max-width: 480px) {
    .form-container-create form {
        padding: 24px;
        margin: 16px;
        max-width: none;
    }

    .form-container-create h3 {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .form-container-create input,
    .form-container-create select,
    .form-container-create textarea {
        padding: 14px 16px;
        font-size: 16px; /* Previene zoom en iOS */
    }

    .form-container-create button[type="submit"] {
        padding: 16px;
        font-size: 15px;
    }
}

/* Animación de entrada para el formulario completo */
.form-container-create {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================
   ESTILOS PARA EL MAINLAYOUT
   ================================= */
/* Layout principal */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Sidebar - mantiene tamaños originales */
.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Contenido principal */
main {
    flex: 1;
}

/* Barra superior - mantiene px-4 original */
.top-row {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

    /* Enlaces de la barra superior */
    .top-row a {
        color: #4a5568;
        text-decoration: none;
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

        .top-row a:hover {
            color: #2d3748;
            background: rgba(74, 85, 104, 0.1);
            transform: translateY(-1px);
        }

        /* Efecto especial para el botón de salir */
        .top-row a[href="javascript:void(0)"] {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-weight: 600;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

            .top-row a[href="javascript:void(0)"]:hover {
                background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
                box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
                color: white;
                transform: translateY(-2px);
            }

/* Contenido principal - mantiene px-4 original */
.content {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    margin: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Fondo decorativo sutil */
.page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Transiciones suaves */
.top-row a, .sidebar, .content {
    transition: all 0.3s ease;
}

/* =================================
   ESTILOS PARA FORMULARIO DE EDICION Y CREACION
   ================================= */

/* Contenedor principal del formulario */
.form-container-edit {
    max-width: 750px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    animation: fadeInUpModern 0.6s ease-out;
}

/* Barra superior decorativa con gradiente AZUL */
.form-container-edit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #1e3a8a 100%);
}

/* Header del formulario */
.form-edit-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1rem 2.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.form-edit-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* formulario sin el icono del lapiz de editar */
.form-edit-title-sl {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* Icono de lápiz para edición */
.form-edit-title::before {
    font-size: 1.5rem;
}

.form-edit-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Cuerpo del formulario */
.form-edit-body {
    padding: 1.5rem;
}


.form-group-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Etiquetas mejoradas */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: #374151;
    font-size: 0.95rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: color 0.2s ease;
}

/* Campos requeridos con asterisco */
label.required::after {
    content: " *";
    color: #ef4444;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Inputs y textarea con diseño moderno */
.form-control-edit {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

/* Estados de focus con gradiente del sistema */
.form-control-edit:focus {
    border-color: #3b82f6;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 
                0 8px 20px rgba(59, 130, 246, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Hover effect */
.form-control-edit:hover:not(:focus) {
    border-color: #cbd5e1;
    background: #f9fafb;
}

/* Placeholder styling */
.form-control-edit::placeholder {
    color: #9ca3af;
    font-weight: 400;
    opacity: 0.8;
}

/* Textarea específico */
textarea.form-control-edit {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Ayuda de campo */
.form-help {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
}

.form-help::before {
    content: 'ℹ️';
    font-size: 0.875rem;
    margin-top: 1px;
}

/* Sección de campos con diseño especial */
.form-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 1.75rem;
    margin: 2rem 0;
}

/* Elimina margen superior de la primera sección */
.form-edit-body .form-section:first-child {
    margin-top: 0;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0c4a6e;
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

/* Línea decorativa azul bajo el título de sección */
.form-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 2px;
}

/* Botones del formulario */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.btn-primary-edit {
    flex: 1;
    min-width: 180px;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo en botón primario */
.btn-primary-edit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary-edit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-primary-edit:hover::before {
    left: 100%;
}

.btn-primary-edit:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Botón secundario */
.btn-secondary-edit {
    flex: 1;
    min-width: 140px;
    padding: 1rem 1.75rem;
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary-edit:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary-edit:active {
    transform: translateY(-1px);
}

/* Iconos en botones */
.btn-icon {
    font-size: 1.1rem;
}

/* Mensajes de validación mejorados */
.validation-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.625rem;
    padding: 0.875rem 1rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    animation: slideInError 0.3s ease-out;
}

.validation-message::before {
    content: "⚠️";
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Resumen de validación */
.validation-errors {
    background-color: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.validation-errors ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #dc2626;
}

.validation-errors li {
    margin: 0.375rem 0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Campos inválidos con animación */
.form-control-edit.invalid,
.form-control-edit:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    background: linear-gradient(white, white) padding-box, 
                linear-gradient(135deg, #ef4444, #dc2626) border-box;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Campo condicional con borde azul */
.conditional-field {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent);
    border-radius: 0 12px 12px 0;
    margin-left: 0.5rem;
    animation: slideIn 0.4s ease-out;
}

/* Animaciones */
@keyframes fadeInUpModern {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Focus dentro del grupo */
.form-group:focus-within label {
    color: #3b82f6;
    transform: translateY(-1px);
    transition: all 0.2s ease-in-out;
}

/* Estados de loading para botones */
.btn-primary-edit.loading,
.btn-secondary-edit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-primary-edit.loading::after,
.btn-secondary-edit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-primary-edit.loading::after {
    border-top-color: #ffffff;
}

.btn-secondary-edit.loading::after {
    border-top-color: #475569;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container-edit {
        margin: 1rem;
        max-width: 100%;
    }

    .form-edit-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .form-edit-title {
        font-size: 1.5rem;
    }

    .form-edit-body {
        padding: 1.5rem;
    }

    .form-group-inline {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .button-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-primary-edit,
    .btn-secondary-edit {
        width: 100%;
        min-width: auto;
    }

    .form-section {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .conditional-field {
        margin-left: 0;
        padding-left: 1rem;
    }
}

@media (max-width: 480px) {
    .form-edit-header {
        padding: 1.25rem 1rem 0.875rem;
    }

    .form-edit-title {
        font-size: 1.375rem;
    }

    .form-edit-title::before {
        font-size: 1.25rem;
    }

    .form-edit-subtitle {
        font-size: 0.875rem;
    }

    .form-edit-body {
        padding: 1.25rem;
    }

    .form-control-edit {
        padding: 0.75rem 0.875rem;
        font-size: 1rem; /* Previene zoom en iOS */
    }

    .btn-primary-edit,
    .btn-secondary-edit {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Accesibilidad mejorada */
@media (prefers-reduced-motion: reduce) {
    .form-container-edit,
    .form-control-edit,
    .btn-primary-edit,
    .btn-secondary-edit,
    .validation-message,
    .conditional-field {
        animation: none;
        transition: none;
    }
}


/* =================================
   ESTILOS PARA ADMINISTRAR Y LISTAR ELEMENTOS
   ================================= */

.container-administrar {
    max-width: 1200px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

    /* Barra superior decorativa */
    .container-administrar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #1e3a8a 100%);
    }

/* Header del contenedor de administración */
.admin-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 2.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .admin-title::before {
        content: '📊';
        font-size: 1.5rem;
    }

/* Botón de nueva acción */
.btn-nueva-accion {
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

    .btn-nueva-accion:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }

    .btn-nueva-accion:active {
        transform: translateY(0);
    }

    .btn-nueva-accion::before {
        content: '➕';
        font-size: 1rem;
    }

/* Contenido principal */
.admin-content {
    padding: 2.5rem;
}

/* Estados de carga y vacío */
.estado-carga {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

    .estado-carga::before {
        content: '⏳';
        font-size: 3rem;
        opacity: 0.7;
        animation: pulse 2s infinite;
    }

.estado-vacio {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

    .estado-vacio::before {
        content: '📭';
        font-size: 4rem;
        opacity: 0.6;
    }

.estado-vacio-mensaje {
    font-size: 1.2rem;
    font-weight: 500;
    color: #475569;
}

.estado-vacio-submensaje {
    font-size: 0.95rem;
    color: #64748b;
    max-width: 400px;
    line-height: 1.5;
}

/* Tabla de administración mejorada */
.tabla-administrar {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

    .tabla-administrar thead {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    }

    .tabla-administrar th {
        padding: 1.25rem 1.5rem;
        text-align: left;
        font-weight: 600;
        color: #374151;
        font-size: 0.95rem;
        letter-spacing: 0.025em;
        border-bottom: 2px solid #e2e8f0;
        position: relative;
    }

        .tabla-administrar th::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .tabla-administrar th:hover::after {
            opacity: 1;
        }

    .tabla-administrar tbody tr {
        transition: all 0.2s ease-in-out;
        border-bottom: 1px solid #f1f5f9;
    }

        .tabla-administrar tbody tr:hover {
            background-color: #f8fafc;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

        .tabla-administrar tbody tr:last-child {
            border-bottom: none;
        }

    .tabla-administrar td {
        padding: 1.25rem 1.5rem;
        color: #374151;
        font-size: 0.95rem;
        line-height: 1.4;
        vertical-align: middle;
    }

.tabla-administrar th,
.tabla-administrar td {
    padding: 1rem 0.75rem; /* Reducir padding horizontal */
    font-size: 0.9rem; /* Reducir ligeramente el tamaño de fuente */
}

/* Establecer anchos máximos para ciertas columnas */
.tabla-administrar th:nth-child(2), /* Descripción */
.tabla-administrar td:nth-child(2) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Contenedor de acciones en tabla */
.celda-contador {
    text-align: center;
    font-weight: 600;
    color: #333;
}
.btn-accion.btn-eliminar {
    background-color: #dc3545;
    color: white;
}
.btn-accion.btn-eliminar:hover {
    background-color: #bb2d3b;
}

/* Contenedor de acciones en tabla */
.acciones-tabla {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

/* Botones de acción en tabla */
.btn-accion {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

/* Botón Ver / Administrar */
.btn-ver {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

    .btn-ver:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
        background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    }

    .btn-ver::before {
        content: '👁️';
        font-size: 1rem;
        line-height: 1;
    }

/* Botón Editar */
.btn-editar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

    .btn-editar:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    }

    .btn-editar::before {
        content: '✏️';
        font-size: 1rem;
        line-height: 1;
    }

/* Botón Eliminar */
.btn-eliminar {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    min-width: 100px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-eliminar:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    }

    .btn-eliminar::before {
        content: '🗑️';
        font-size: 1rem;
        line-height: 1;
        width: 1.5rem; 
        text-align: center;
        display: inline-block;
    }

/* Botón Copiar URL */
.btn-url {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

    .btn-url:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }

    .btn-url::before {
        content: '🔗';
        font-size: 1rem;
        line-height: 1;
    }


/* Estados de las filas */
.fila-activa {
    border-left: 4px solid #10b981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent);
}

.fila-inactiva {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.fila-vencida {
    border-left: 4px solid #ef4444;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
    opacity: 0.8;
}

/* Badges de estado */
.badge-estado {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-activo {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactivo {
    background: #fef3c7;
    color: #92400e;
}

.badge-vencido {
    background: #fee2e2;
    color: #991b1b;
}


/* Estilo moderno tipo switch deslizante (optimizado) */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

    /* Esconde el input, pero sigue siendo clickeable */
    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

/* Slider base */
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 22px;
    transition: background-color 0.3s ease;
}

    /* Círculo interno */
    .slider::before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 2px;
        bottom: 2px;
        background-color: #fff;
        border-radius: 50%;
        transition: transform 0.3s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

/* Estado activado */
input:checked + .slider {
    background-color: #10b981; /* verde */
}

    input:checked + .slider::before {
        transform: translateX(20px);
    }

/* Efecto al hacer clic */
.slider:active::before {
    width: 20px;
}

/* Animación de revertir estado desde JS */
.switch input[type="checkbox"] {
    transition: all 0.25s ease;
}

    .switch input[type="checkbox"].revert {
        transform: scale(1.05);
    }


/* Información adicional en celdas */
.celda-principal {
    font-weight: 600;
    color: #1f2937;
}

.celda-secundaria {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.celda-fecha {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    color: #374151;
}

.celda-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}


/* Paginación */
.paginacion-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.info-paginacion {
    color: #64748b;
    font-size: 0.875rem;
}

.controles-paginacion {
    display: flex;
    gap: 0.5rem;
}

.btn-paginacion {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

    .btn-paginacion:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

    .btn-paginacion.activo {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

/* Filtros y búsqueda */
.filtros-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filtro-busqueda {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

    .filtro-busqueda:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .filtro-busqueda::placeholder {
        color: #9ca3af;
    }

.filtro-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

    .filtro-select:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* Animaciones */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsividad */
@media (max-width: 768px) {
    .container-administrar {
        margin: 1rem;
        border-radius: 16px;
    }

    .admin-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .admin-title {
        font-size: 1.5rem;
        justify-content: center;
    }

    .admin-content {
        padding: 1.5rem;
    }

    .tabla-administrar {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

        .tabla-administrar th,
        .tabla-administrar td {
            padding: 0.875rem 1rem;
            font-size: 0.875rem;
        }

    .acciones-tabla {
        flex-direction: column;
        gap: 0.5rem;
        min-width: 120px;
    }

    .btn-accion {
        width: 100%;
        min-width: auto;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .filtros-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filtro-busqueda {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 1rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .estado-carga,
    .estado-vacio {
        padding: 2rem 1rem;
    }
}

/* =================================
   ESTILOS PARA IMPORTAR ALUMNOS
   ================================= */

/* Contenedor principal */
.contenedor-administrar {
    max-width: 1400px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    animation: fadeInUpModern 0.6s ease-out;
}

/* Barra superior decorativa */
.contenedor-administrar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #10b981 0%, #059669 50%, #047857 100%);
}

/* Header mejorado con diseño más compacto */
.header-administrar-moderno {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.titulo-administrar-moderno {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.titulo-administrar-moderno::before {
    content: '📥';
    font-size: 1.5rem;
}

.header-administrar-moderno > p {
    color: #059669;
    font-size: 0.95rem;
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.header-administrar-moderno > p a {
    color: #047857;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

.header-administrar-moderno > p a:hover {
    color: #065f46;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Contenido principal con límite de ancho */
.contenido-administrar-moderno {
    padding: 0.5rem 2rem; 
}

/* Contenedores de formulario con ancho controlado */
.contenido-administrar-moderno > .form-container-edit {
    max-width: 100%;
    margin: 1rem 0;  /* Reducido de 1.5rem */
    box-sizing: border-box;
}

/* Ajustes específicos para evitar desbordamiento */
.form-container-edit {
    overflow: hidden;
}

.form-edit-body {
    overflow: hidden;
    padding-top: 0; 
}

.form-edit-header {
    margin-bottom: 1rem;  /* Reduce espacio entre título y botones */
}

/* BADGES MEJORADOS */
.badge-moderno {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .badge-moderno strong {
        text-transform: none !important;
    }


.badge-activo-moderno {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.badge-inactivo-moderno {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* GRUPOS DE BOTONES MODERNOS - CENTRADOS Y COMPACTOS */
.grupo-botones-moderno {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Botón primario */
.boton-primario-moderno {
    padding: 0.65rem 1.25rem;  /* Reducido aún más */
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;  /* Ligeramente más pequeño */
    font-size: 0.9rem;  /* Texto más pequeño */
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;  /* Gap más pequeño */
    white-space: nowrap;
    text-decoration: none;
    width: auto;
    min-width: auto;
    max-width: fit-content;  /* IMPORTANTE: Se ajusta al contenido */
}

.boton-primario-moderno:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.boton-primario-moderno:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Botón secundario mejorado*/
.boton-secundario-moderno {
    padding: 0.65rem 1.25rem;  /* Reducido */
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 10px;  /* Ligeramente más pequeño */
    font-size: 0.9rem;  /* Texto más pequeño */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;  /* Gap más pequeño */
    white-space: nowrap;
    width: auto;
    min-width: auto;
    max-width: fit-content;  /* Se ajusta al contenido */
}

.boton-secundario-moderno:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-eliminar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* MENSAJES MEJORADOS */
.mensaje-error-moderno {
    color: #dc2626;
    font-size: 0.875rem;
    margin: 0.5rem 0;
    padding: 0.875rem 1rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.mensaje-error-moderno::before {
    content: "⚠️";
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mensaje-exito-moderno {
    color: #059669;
    font-size: 0.875rem;
    margin: 0.5rem 0;
    padding: 0.875rem 1rem;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.mensaje-exito-moderno p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.mensaje-exito-moderno::before {
    content: "✅";
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* BOTONES DE ACCIÓN MEJORADOS - CLASES NUEVAS */
.acciones-modernas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center; /* Centrado */
    align-items: center;
}

.boton-accion-moderno {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: auto; /* Sin ancho mínimo forzado */
    width: auto; /* Ancho automático */
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

/* BADGES DE ESTADO MODERNOS - CLASES NUEVAS */
.badge-moderno {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-activo-moderno {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactivo-moderno {
    background: #fef3c7;
    color: #92400e;
}

.badge-vencido-moderno {
    background: #fee2e2;
    color: #991b1b;
}

/* FILTROS Y BÚSQUEDA - CLASES NUEVAS */
.filtros-modernos {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.busqueda-moderna {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

    .busqueda-moderna:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .busqueda-moderna::placeholder {
        color: #9ca3af;
    }

.select-moderno {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

    .select-moderno:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* FORMULARIO DE EDICIÓN MODERNO - CLASES NUEVAS */
.formulario-edicion-moderno {
    max-width: 500px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    animation: fadeInUpModern 0.6s ease-out;
}

    /* Barra superior decorativa */
    .formulario-edicion-moderno::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #1e3a8a 100%);
    }

.header-edicion-moderno {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 2.5rem 1.5rem;
    text-align: center;
    position: relative;
}

.titulo-edicion-moderno {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.subtitulo-edicion-moderno {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.cuerpo-edicion-moderno {
    padding: 2.5rem;
}

/* CAMPOS DE FORMULARIO MODERNOS - CLASES NUEVAS */
.grupo-campo-moderno {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.etiqueta-moderna {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 0.25rem;
}

.campo-moderno {
    padding: 0.875rem 1rem;
    height: auto;
    min-height: 48px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background-color: #ffffff;
    color: #374151;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
}

    .campo-moderno:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        background-color: #fefefe;
        transform: translateY(-1px);
    }

    .campo-moderno:hover:not(:focus) {
        border-color: #cbd5e1;
        background-color: #f9fafb;
    }

.boton-primario-moderno {
    flex: 1;
    min-width: 140px;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-decoration: none;
}

    .boton-primario-moderno:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
        color: white;
        text-decoration: none;
    }

.boton-secundario-moderno {
    flex: 1;
    min-width: 140px;
    padding: 0.875rem 1.5rem;
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-decoration: none;
}

    .boton-secundario-moderno:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
        color: #334155;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        text-decoration: none;
    }

/* MENSAJES MODERNOS */
.mensaje-error-moderno {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .mensaje-error-moderno::before {
        content: "⚠️";
        font-size: 1rem;
    }

.mensaje-exito-moderno {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .mensaje-exito-moderno::before {
        content: "✅";
        font-size: 1rem;
    }

/* ANIMACIONES NUEVAS */

@keyframes pulseModern {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* RESPONSIVIDAD */
@media (max-width: 768px) {
    .contenedor-administrar-moderno {
        margin: 1rem;
        border-radius: 16px;
    }

    .header-administrar-moderno {
        padding: 1.5rem;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .titulo-administrar-moderno {
        font-size: 1.5rem;
        justify-content: center;
    }

    .contenido-administrar-moderno {
        padding: 1.5rem;
    }

    .acciones-modernas {
        flex-direction: column;
        gap: 0.5rem;
        min-width: 120px;
    }

    .boton-accion-moderno {
        width: 100%;
        min-width: auto;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .filtros-modernos {
        flex-direction: column;
        align-items: stretch;
    }

    .busqueda-moderna {
        min-width: auto;
    }

    .formulario-edicion-moderno {
        margin: 1rem;
        max-width: 100%;
    }

    .header-edicion-moderno {
        padding: 1.5rem 1.5rem 1rem;
    }

    .cuerpo-edicion-moderno {
        padding: 1.5rem;
    }

    .titulo-edicion-moderno {
        font-size: 1.5rem;
    }

    .grupo-botones-moderno {
        flex-direction: column;
        gap: 0.75rem;
    }

    .boton-primario-moderno,
    .boton-secundario-moderno {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header-administrar-moderno {
        padding: 1rem;
    }

    .contenido-administrar-moderno {
        padding: 1rem;
    }

    .carga-administrar,
    .vacio-administrar {
        padding: 2rem 1rem;
    }
}

.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.celda-principal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icono-archivo {
    font-size: 1.2em;
}

.badge-tipo {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-pdf {
    background-color: #ff4444;
    color: white;
}

.badge-xlsx, .badge-xls {
    background-color: #10b981;
    color: white;
}

.badge-docx, .badge-doc {
    background-color: #3b82f6;
    color: white;
}

.badge-pptx, .badge-ppt {
    background-color: #f59e0b;
    color: white;
}

.badge-txt, .badge-csv {
    background-color: #6b7280;
    color: white;
}

.badge-zip, .badge-rar {
    background-color: #8b5cf6;
    color: white;
}

.celda-hash {
    font-family: monospace;
    font-size: 0.85em;
    color: #6b7280;
}

.btn-descargar {
    background-color: #10b981;
    color: white;
}

    .btn-descargar:hover {
        background-color: #059669;
    }


.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

/* =================================
   ESTILOS PARA VISTA PREVIA DE ALUMNOS
   ================================= */

.contenedor-vista-previa {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15), 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    animation: fadeInUpModern 0.6s ease-out;
    margin: 1rem 0;
}

    .contenedor-vista-previa::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, #10b981 0%, #059669 50%, #047857 100%);
    }

.header-vista-previa {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 1.5rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.titulo-vista-previa {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.subtitulo-vista-previa {
    font-size: 0.95rem;
    color: #059669;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-weight: 600;
}

.cuerpo-vista-previa {
    padding: 1.5rem;
    overflow: hidden; 
    max-width: 100%; 
    box-sizing: border-box; 
}

.tabla-responsive-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    margin: 0 0 1.5rem 0;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    max-width: 100%; 
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Tabla específica para vista previa */
.tabla-vista-previa {
    width: 100%;
    min-width: 1000px; 
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
}

    .tabla-vista-previa thead {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    }

    .tabla-vista-previa th {
        padding: 1rem 0.75rem;
        text-align: left;
        font-weight: 600;
        color: #374151;
        font-size: 0.875rem;
        letter-spacing: 0.025em;
        border-bottom: 2px solid #e2e8f0;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .tabla-vista-previa tbody tr {
        transition: all 0.2s ease-in-out;
        border-bottom: 1px solid #f1f5f9;
    }

        .tabla-vista-previa tbody tr:hover {
            background-color: #f8fafc;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }

    .tabla-vista-previa td {
        padding: 1rem 0.75rem;
        color: #374151;
        vertical-align: middle;
        border-bottom: 1px solid #f1f5f9;
    }

/* Anchos específicos por columna */
.col-cedula {
    width: 110px;
    min-width: 110px;
}

.col-nombre {
    width: 200px;
    min-width: 180px;
}

.col-correo {
    width: 220px;
    min-width: 200px;
}

.col-estado {
    width: 90px;
    min-width: 90px;
    text-align: center;
}

.col-fecha {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.col-programa {
    width: 180px;
    min-width: 160px;
}

.col-observaciones {
    width: 150px;
    min-width: 120px;
}

/* Estilos específicos para celdas */
.celda-cedula {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
}

.celda-nombre .nombre-contenido,
.celda-correo .correo-contenido,
.celda-programa .programa-contenido,
.celda-observaciones .observaciones-contenido {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.celda-nombre .nombre-contenido {
    font-weight: 600;
    color: #1f2937;
    max-width: 180px;
}

.celda-correo .correo-contenido {
    color: #3b82f6;
    max-width: 200px;
    font-size: 0.85rem;
}

.celda-programa .programa-contenido {
    color: #6b7280;
    font-weight: 500;
    max-width: 160px;
}

.celda-observaciones .observaciones-contenido {
    color: #6b7280;
    font-style: italic;
    max-width: 120px;
}

.celda-fecha-vista {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #374151;
    text-align: center;
}

.celda-estado {
    text-align: center;
}

/* Badges específicos para vista previa */
.badge-estado-vista {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    white-space: nowrap;
}

.badge-activo-vista {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactivo-vista {
    background: #fef3c7;
    color: #92400e;
}

/* Fila de alumno */
.fila-alumno {
    border-left: 4px solid transparent;
    transition: all 0.2s ease-in-out;
}

    .fila-alumno:hover {
        border-left-color: #3b82f6;
        background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent);
    }

/* Spinner inline para botón */
.loading-spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Tooltip para celdas truncadas */
.celda-nombre .nombre-contenido:hover,
.celda-correo .correo-contenido:hover,
.celda-programa .programa-contenido:hover,
.celda-observaciones .observaciones-contenido:hover {
    position: relative;
    z-index: 1000;
}

/* Responsividad mejorada para la vista previa */
@media (max-width: 1200px) {
    .tabla-vista-previa {
        min-width: 900px;
        font-size: 0.8rem;
    }

        .tabla-vista-previa th,
        .tabla-vista-previa td {
            padding: 0.75rem 0.5rem;
        }

    .col-nombre {
        width: 160px;
        min-width: 140px;
    }

    .col-correo {
        width: 180px;
        min-width: 160px;
    }

    .col-programa {
        width: 140px;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .contenedor-vista-previa {
        margin: 1rem -1rem;
        border-radius: 12px;
    }

    .cuerpo-vista-previa {
        padding: 1rem;
    }

    .tabla-responsive-wrapper {
        margin: 0 -1rem 1rem -1rem;
        padding: 0 1rem;
    }

    .tabla-vista-previa {
        min-width: 800px;
        font-size: 0.75rem;
    }

        .tabla-vista-previa th,
        .tabla-vista-previa td {
            padding: 0.5rem 0.375rem;
        }

    .col-cedula {
        width: 90px;
        min-width: 90px;
    }

    .col-nombre {
        width: 140px;
        min-width: 120px;
    }

    .col-correo {
        width: 160px;
        min-width: 140px;
    }

    .col-programa {
        width: 120px;
        min-width: 100px;
    }

    .col-observaciones {
        width: 100px;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .header-vista-previa {
        padding: 1rem 1.5rem 0.75rem;
    }

    .titulo-vista-previa {
        font-size: 1.25rem;
    }

    .tabla-vista-previa {
        min-width: 700px;
        font-size: 0.7rem;
    }

    .celda-nombre .nombre-contenido {
        max-width: 100px;
    }

    .celda-correo .correo-contenido {
        max-width: 120px;
    }

    .celda-programa .programa-contenido {
        max-width: 80px;
    }

    .celda-observaciones .observaciones-contenido {
        max-width: 60px;
    }
}

/* Loading section improvements */
.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.progress-stats {
    font-size: 0.9rem;
    color: #6b7280;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* =================================
   ESTILOS PARA OPCIONES DE CREACION DE ALUMNOS
   ================================= */

.opcion-carga-moderno {
        background-color: #f5f5f5;
        padding: 30px 20px;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        text-align: center;
        transition: all 0.3s ease;
        width: 250px;
    }

    .opcion-carga-moderno:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.2);
        background-color: #e0f7fa;
    }

    .titulo-opcion {
        margin-top: 15px;
        font-size: 18px;
        font-weight: 600;
        color: #333;
    }

    .subtitulo-opcion {
        margin-top: 10px;
        font-size: 14px;
        color: #666;
    }

    /* Responsivo */
    @media (max-width: 768px) {
        .opciones-carga {
            flex-direction: column;
            gap: 30px;
        }
    }


    /* =================================
   ESTILOS PARA DESCARGA DE DATOS DE LAS ENCUESTAS
   ================================= */

    /* Grid de encuestas */
    .encuestas-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
        margin-top: 1rem;
    }

    /* Card de encuesta */
    .encuesta-card {
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        border: 1px solid #e2e8f0;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        animation: fadeInUp 0.4s ease-out;
    }

        .encuesta-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        }

    /* Barra superior decorativa */
    .encuesta-card-barra {
        height: 5px;
        background: linear-gradient(90deg, #10b981 0%, #059669 50%, #047857 100%);
    }

    /* Contenido de la card */
    .encuesta-card-contenido {
        padding: 1.75rem;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Header de la encuesta */
    .encuesta-header {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
    }

    .encuesta-icono {
        font-size: 2.5rem;
        line-height: 1;
        flex-shrink: 0;
    }

    .encuesta-titulo {
        font-size: 1.25rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0;
        line-height: 1.3;
        letter-spacing: -0.025em;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    /* Descripción */
.encuesta-descripcion {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

    /* Información de la encuesta */
    .encuesta-info {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border-radius: 12px;
        border: 1px solid #e2e8f0;
    }

    .info-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .info-icono {
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .info-contenido {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        flex: 1;
    }

    .info-label {
        font-size: 0.75rem;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .info-valor {
        font-size: 0.95rem;
        font-weight: 600;
        color: #1e293b;
        font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    }

    /* Info destacada (respuestas) */
    .info-destacada {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        padding: 0.75rem;
        border-radius: 8px;
        border: 1px solid #6ee7b7;
        margin-top: 0.25rem;
    }

    .info-valor-destacado {
        font-size: 1.5rem;
        font-weight: 700;
        color: #065f46;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    /* Botón de descarga */
    .boton-descarga-encuesta {
        width: 100%;
        padding: 0.875rem 1.5rem;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        position: relative;
        overflow: hidden;
    }

        .boton-descarga-encuesta::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }

        .boton-descarga-encuesta:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
        }

            .boton-descarga-encuesta:hover:not(:disabled)::before {
                left: 100%;
            }

        .boton-descarga-encuesta:active {
            transform: translateY(0);
        }

        .boton-descarga-encuesta:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

    /* Animación de entrada */
    @keyframes fadeInUp {
        from

    {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

    }

    /* Responsive */
    @media (max-width: 768px) {
        .encuestas-grid

    {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .encuesta-card-contenido {
        padding: 1.5rem;
    }

    .encuesta-titulo {
        font-size: 1.1rem;
    }

    .encuesta-info {
        padding: 0.875rem;
    }

    }

    @media (max-width: 480px) {
        .encuesta-card-contenido

    {
        padding: 1.25rem;
        gap: 1rem;
    }

    .encuesta-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .encuesta-icono {
        font-size: 2rem;
    }

    .encuesta-titulo {
        font-size: 1rem;
    }

    .boton-descarga-encuesta {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    }

/* =================================
   ESTILOS PARA EL HOME
================================= */

/* ===== CONTENEDOR PRINCIPAL ===== */
.home-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 0.6s ease-out;
}

/* ===== HEADER DE BIENVENIDA ===== */
.welcome-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.user-avatar {
    font-size: 4.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.welcome-text h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-email {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    opacity: 0.95;
}

.institution-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.625rem 1.25rem;
    border-radius: 30px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Decoración del header */
.welcome-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.circle-1 {
    width: 250px;
    height: 250px;
    top: -100px;
    right: -50px;
}

.circle-2 {
    width: 180px;
    height: 180px;
    top: 60px;
    right: 120px;
}

.circle-3 {
    width: 120px;
    height: 120px;
    bottom: -40px;
    right: 80px;
}

/* ===== SECCIONES ===== */
.metrics-section,
.quick-access-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== GRID DE MÉTRICAS ===== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transition: height 0.3s ease;
}

.metric-card-green::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.metric-card-blue::before {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

.metric-card-red::before {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.metric-card-purple::before {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

.metric-card-orange::before {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.metric-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.metric-card:hover::before {
    height: 8px;
}

.metric-icon {
    font-size: 3.5rem;
    line-height: 1;
    opacity: 0.9;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metric-label {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.metric-sublabel {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* ===== ACCESOS RÁPIDOS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.quick-action-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-action-green::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.quick-action-blue::before {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

.quick-action-purple::before {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

.quick-action-orange::before {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.quick-action-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.quick-action-btn:hover::before {
    transform: scaleX(1);
}

.action-icon {
    font-size: 3rem;
    line-height: 1;
}

.action-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

/* ===== SECCIÓN DE INFORMACIÓN ===== */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.info-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.info-card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.title-icon {
    font-size: 1.5rem;
}

/* Actividad */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.activity-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.95rem;
}

.activity-content small {
    color: #64748b;
    font-size: 0.875rem;
}

.empty-activity {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

/* Sistema */
.system-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.system-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.system-label {
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
}

.system-value {
    color: #1e293b;
    font-weight: 600;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.system-status.online {
    color: #10b981;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .home-container {
        padding: 1rem;
    }

    .welcome-header {
        padding: 2rem 1.5rem;
    }

    .welcome-content {
        flex-direction: column;
        text-align: center;
    }

    .welcome-text h1 {
        font-size: 1.75rem;
    }

    .user-avatar {
        font-size: 3.5rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .welcome-text h1 {
        font-size: 1.5rem;
    }

    .metric-card {
        flex-direction: column;
        text-align: center;
    }

    .metric-icon {
        font-size: 3rem;
    }

    .metric-value {
        font-size: 2rem;
    }
}


/* =================================
   SECCIÓN DE REPORTES ADMINISTRADOR
================================= */

.seccion-reportes {
    margin-bottom: 2.5rem;
}

.titulo-seccion {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #f1f5f9;
}

/* ===== GRID DE MÉTRICAS (Reutilizado del Home) ===== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

    .metric-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        transition: height 0.3s ease;
    }

.metric-card-green::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.metric-card-blue::before {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

.metric-card-purple::before {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

.metric-card-orange::before {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.metric-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

    .metric-card:hover::before {
        height: 8px;
    }

.metric-icon {
    font-size: 3.5rem;
    line-height: 1;
    opacity: 0.9;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    word-break: break-word;
}

.metric-label {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.metric-sublabel {
    font-size: 0.875rem;
    color: #94a3b8;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ===== NAVEGACIÓN DE REPORTES ===== */
.reportes-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.reporte-nav-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

    .reporte-nav-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #10b981 0%, #059669 100%);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .reporte-nav-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        border-color: #cbd5e1;
    }

        .reporte-nav-btn:hover::before,
        .reporte-nav-btn.activo::before {
            transform: scaleX(1);
        }

    .reporte-nav-btn.activo {
        border-color: #10b981;
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    }

.nav-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.nav-text {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

/* ===== LOADING ===== */
.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Contenedor principal de los filtros */
.filtros-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem 1.5rem;
    align-items: end;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

    /* Form groups dentro del filtro */
    .filtros-bar .form-group {
        display: flex;
        flex-direction: column;
    }

    .filtros-bar label {
        font-weight: 600;
        color: #374151;
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .filtros-bar .form-control,
    .filtros-bar select,
    .filtros-bar input[type="date"] {
        border: 2px solid #e2e8f0;
        border-radius: 10px;
        padding: 0.65rem 0.9rem;
        font-size: 0.95rem;
        background-color: #ffffff;
        transition: all 0.25s ease-in-out;
    }

        .filtros-bar .form-control:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
        }

    /* Botones de acción en filtros */
    .filtros-bar .btn {
        padding: 0.7rem 1.25rem;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.95rem;
        margin-top: 0.4rem;
        transition: transform 0.15s ease;
    }

/* === Botón "Limpiar Filtros" === */
.btn-limpiar-filtros {
    background-color: #e2e8f0; /* Gris claro neutro */
    color: #1e293b; /* Gris oscuro (texto legible) */
    border: 1px solid #cbd5e1; /* Borde gris medio */
    border-radius: 10px;
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

    .btn-limpiar-filtros:hover {
        background-color: #cbd5e1; /* Gris medio (hover más visible) */
        color: #0f172a; /* Texto más oscuro */
        border-color: #94a3b8; /* Borde más definido */
        transform: translateY(-1px);
    }

    .btn-limpiar-filtros:focus,
    .btn-limpiar-filtros:active {
        background-color: #cbd5e1; /* Mantiene coherencia visual */
        color: #0f172a;
        border-color: #64748b;
        box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.25); /* Anillo sutil */
        outline: none !important;
        transform: none;
    }



/* DISTRIBUCIÓN DE GRÁFICOS */

.graficos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Cada tarjeta de gráfico */
.grafico-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

    .grafico-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }

    .grafico-card h5 {
        font-size: 1.05rem;
        font-weight: 600;
        color: #1e293b;
        margin-bottom: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .grafico-card canvas {
        width: 100%;
        height: auto;
        max-height: 260px;
    }

/* ===== Ajuste de texto dinámico en métricas ===== */
.metric-value,
.metric-label,
.metric-sublabel {
    white-space: nowrap; /* evita salto de línea */
    overflow: hidden; /* oculta el texto que se salga */
    text-overflow: ellipsis; /* agrega "..." si se corta */
}

/* Escala automática de fuente si el texto es largo */
.metric-label {
    display: block;
    font-size: clamp(0.75rem, 1vw, 1rem); /* ajusta entre 0.75 y 1 rem según ancho */
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
    text-align: left;
}

.metric-value {
    display: block;
    font-size: clamp(1.2rem, 2vw, 2.5rem); /* escala el valor sin romper diseño */
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.metric-sublabel {
    display: block;
    font-size: clamp(0.7rem, 0.8vw, 0.9rem);
    color: #94a3b8;
}

/* Mantiene consistencia visual si hay textos largos (centrado) */
.metric-content {
    width: 100%;
    min-width: 0; /* para que text-overflow funcione en flex */
}

    .metric-content:hover .metric-label,
    .metric-content:hover .metric-value,
    .metric-content:hover .metric-sublabel {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }


/* === Sección Actividad Usuarios === */
.seccion-actividad {
    margin-top: 1.5rem;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

    .seccion-actividad:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.metric-card .metric-icon {
    font-size: 2rem;
}

.metric-card .metric-label {
    font-weight: 600;
    color: #333;
}



/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .reportes-nav {
        grid-template-columns: 1fr;
    }

    .metric-card {
        flex-direction: column;
        text-align: center;
    }

    .metric-icon {
        font-size: 3rem;
    }

    .metric-value {
        font-size: 2rem;
    }
}


/* =================================
   SECCIÓN DE RECUPERACIÓN
================================= */

.recovery-container {
    background: #f5f6fa;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0rem;
    width: 100%;
    height: auto;
}

.recovery-card {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.recovery-title {
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.recovery-subtitle {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.recovery-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recovery-step {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-recovery, .btn-recovery-outline, .btn-back {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-recovery {
    background: #3b82f6;
    color: white;
    border: none;
}

.btn-recovery-outline {
    border: 2px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
}

.btn-back {
    background: transparent;
    color: #64748b;
    border: none;
    text-decoration: underline;
}

.contenedor-btn-programar {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}


/* === PERFIL DE USUARIO === */
.perfil-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.perfil-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.perfil-nombre {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.perfil-correo {
    color: #4b5563;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.perfil-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
}

    .perfil-info-grid label {
        display: block;
        font-weight: 600;
        color: #374151;
        font-size: 0.95rem;
    }

    .perfil-info-grid span {
        color: #1f2937;
        font-size: 1rem;
    }

.badge-activo {
    background-color: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.badge-egresado {
    background-color: #3b82f6; 
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.badge-inactivo {
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

/* === Campos solo lectura === */
.form-control-edit[readonly],
.form-control-edit:disabled {
    background-color: #f3f4f6; 
    color: #6b7280; 
    border: 1px solid #d1d5db; 
    cursor: not-allowed; 
}

    .form-control-edit[readonly]:focus {
        outline: none;
        box-shadow: none;
        border-color: #d1d5db;
    }

/* === Distribución de columnas === */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* === Input inline (campo + botón de ojo al lado) === */
.input-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .input-inline .form-control-edit {
        flex: 1;
    }

/* === Botón de ojo alineado === */
.toggle-button {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .toggle-button:hover {
        background-color: #e5e7eb;
    }

/* =================================
   RESPUESTAS DE ENCUESTAS
================================= */

/* Contenedor general de preguntas */
.preguntas-listado {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

/* Tarjeta de cada pregunta */
.pregunta-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Header de la tarjeta */
.pregunta-card-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pregunta-titulo-contenedor {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pregunta-numero {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pregunta-texto {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

/* Badges de tipo / obligatoria / respuestas */
.pregunta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.badge-pregunta {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

    .badge-pregunta.tipo {
        background: #eef2ff;
        color: #4338ca;
        border-color: #c7d2fe;
    }

    .badge-pregunta.obligatoria {
        background: #fee2e2;
        color: #b91c1c;
        border-color: #fecaca;
    }

    .badge-pregunta.opcional {
        background: #ecfdf5;
        color: #047857;
        border-color: #bbf7d0;
    }

    .badge-pregunta.respuestas {
        background: #eff6ff;
        color: #1d4ed8;
        border-color: #bfdbfe;
    }

/* Cuerpo de la tarjeta */
.pregunta-card-body {
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Contenedor del gráfico */
.pregunta-grafico-contenedor {
    width: 100%;
    max-width: 620px;
    margin: 0.4rem auto 0.2rem auto;
}

/* Tabla de opciones */
.pregunta-opciones-detalle {
    margin-top: 0.5rem;
    overflow-x: auto;
}

.tabla-opciones-pregunta {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

    .tabla-opciones-pregunta thead {
        background: #f9fafb;
    }

    .tabla-opciones-pregunta th,
    .tabla-opciones-pregunta td {
        padding: 0.45rem 0.6rem;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
    }

    .tabla-opciones-pregunta th {
        font-weight: 600;
        color: #4b5563;
    }

/* Respuestas abiertas */
.respuestas-abiertas-contenedor {
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.respuestas-abiertas-titulo {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.respuestas-abiertas-lista {
    max-height: 260px;
    overflow-y: auto;
    padding-left: 1.1rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    font-size: 0.9rem;
    color: #111827;
}

    .respuestas-abiertas-lista li {
        list-style-type: disc;
    }

.respuestas-abiertas-nota {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.1rem;
    font-style: italic;
}

/* Estados vacíos dentro de la tarjeta */
.estado-vacio-respuestas {
    font-size: 0.9rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px dashed #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .pregunta-card {
        padding: 0.9rem 1rem;
    }

    .pregunta-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pregunta-badges {
        justify-content: flex-start;
    }

    .pregunta-grafico-contenedor {
        max-width: 100%;
    }
}
