/* Variables para la paleta de colores */
:root {
    /* Color primario personalizable */
    --primary-color: #a69867;
    
    /* Colores principales */
    /* Colores principales - Base #a69867 */
    --color-primary: #7d724d;
    /* Más oscuro */
    --color-secondary: #a69867;
    /* Base solicitada */
    --color-accent: #c4b888;
    /* Más claro */

    /* Versiones con transparencia */
    --color-primary-light: rgba(125, 114, 77, 0.1);
    --color-secondary-light: rgba(166, 152, 103, 0.1);
    --color-accent-light: rgba(196, 184, 136, 0.1);

    /* Degradado del header basado en color primario */
    --header-gradient: linear-gradient(135deg, #7d724d 0%, #a69867 50%, #c4b888 100%);

    /* Colores base de la UI */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-100: #f8f9fa;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-400: #ced4da;
    --color-gray-500: #adb5bd;
    --color-gray-600: #6c757d;
    --color-gray-700: #495057;
    --color-gray-800: #343a40;
    --color-gray-900: #212529;

    /* Colores de texto */
    --color-text-dark: #333;
    --color-text-body: #495057;
    --color-text-muted: #6c757d;

    /* Tamaños de fuente */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;

    /* Espaciados */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Breakpoints */
    --breakpoint-sm: 480px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
}

/* ===== TRANSICIONES PARA CARGA DE CONFIGURACIÓN ===== */
#logoHeaderImg,
#logoFooterImg {
    transition: opacity 0.3s ease-in-out;
}

/* ===== ESTILOS DE ADAPTACIÓN DE IMÁGENES ===== */
#logoHeaderImg {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    display: block;
}

/* Header más compacto en móviles */
@media (max-width: 768px) {
    #logoHeaderImg {
        max-height: 80px;
    }
}

@media (max-width: 480px) {
    #logoHeaderImg {
        max-height: 70px;
    }
}

#logoFooterImg {
    max-width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    display: block;
}

/* ===== FIN TRANSICIONES ===== */

/* ===== DEBUG: BORDES DE COLORES PARA VISUALIZAR CONTENEDORES ===== */
/* ELIMINAR ESTA SECCIÓN CUANDO TERMINES DE DEBUGGEAR */
/*.container {
    border: 3px solid red !important;
}

.header {
    border: 3px solid blue !important;
}

.content {
    border: 3px solid green !important;
}

.footer {
    border: 3px solid orange !important;
}

.logo-container {
    border: 3px solid purple !important;
}

.top-logo {
    border: 3px solid cyan !important;
}

.content-wrapper {
    border: 3px solid yellow !important;
}*/

/* ===== FIN DEBUG ===== */

/* Reset y estilos base optimizados */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-white);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    line-height: 1.6;
    color: var(--color-text-dark, #333);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    /* Optimizaciones de rendimiento */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Optimizaciones para móviles */
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Mejoras específicas para móviles */
/* Contenedor principal - RESPONSIVE en ancho horizontal */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: none;
    /* Sin restricción de ancho máximo - se adapta a cualquier pantalla */
    position: relative;
    flex: 1;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: var(--breakpoint-md)) {

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        background: var(--color-white);
        font-size: var(--font-size-md);
        width: 100%;
    }
}

/* Soporte para pantallas de alta resolución */
/* Container y Footer ahora son 100% responsive - sin restricciones de ancho */
/* Ambos se adaptan completamente al ancho de la pantalla */

@media (max-width: var(--breakpoint-md)) {
    .container {
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        padding-bottom: 70px;
        /* Espacio para el footer */
    }
}

@media (max-width: 480px) {

    html,
    body {
        width: 100%;
        height: 100%;
        overflow-x: hidden;
    }

    .container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        height: 100%;
        min-height: 100dvh;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
}

/* Cabecera con degradado del color primario */
.header {
    background: var(--header-gradient);
    color: var(--color-white);
    padding: 0;
    margin: 0;
    position: relative;
    border-radius: 0;
    height: 30vh;
    /* Altura reducida para desktop - más espacio al contenido */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    /* Evita que el header se contraiga */
    min-height: 200px;
    /* Altura mínima garantizada para desktop */
}

/* Tablets - iPad Pro y similares (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        height: 35vh;
        /* Altura equilibrada para tablets */
        min-height: 220px;
        padding: 0;
        /* Padding inferior para más respiración */
        flex-shrink: 0;
    }
}

/* Pantallas 4:3 específicas (1024 x 768) - Optimización especial */
@media (min-width: 1024px) and (max-width: 1024px) and (min-height: 768px) and (max-height: 768px) {
    .header {
        height: 35vh !important;
        /* Aumentado para pantallas 4:3 */
        min-height: 220px !important;
        padding: 0 !important;
        /* Padding superior agregado */
    }

    .header-image {
        max-height: 55% !important;
        /* Optimizado para 4:3 - SIN CAMBIOS */
        max-width: 70% !important;
    }

    .content {
        padding: 15px 20px 0 20px !important;
        /* Sin padding inferior - más espacio */
    }

    .content-wrapper {
        padding: 0 !important;
        /* Sin padding extra */
    }
}

/* Pantallas 1280 x 720 - Optimización específica */
@media (min-width: 1280px) and (max-width: 1280px) and (min-height: 720px) and (max-height: 720px) {
    .header {
        height: 35vh !important;
        /* Altura optimizada para 1280x720 */
        min-height: 220px !important;
        padding: 0 !important;
        /* Mayor padding superior e inferior */
    }

    .header-image {
        max-height: 50% !important;
        /* Logo optimizado para 1280x720 */
        max-width: 65% !important;
    }

    .content {
        padding: 20px 30px 0 30px !important;
        /* Padding equilibrado */
    }
}

@media (min-width: 1280px) and (max-width: 1280px) and (min-height: 800px) and (max-height: 800px) {
    .header {
        height: 35vh !important;
        /* Altura optimizada para 1280x800 */
        min-height: 220px !important;
        padding: 0 !important;
        /* Mayor padding superior e inferior */
    }

    .header-image {
        max-height: 50% !important;
        /* Logo optimizado para 1280x800 */
        max-width: 65% !important;
    }

    .content {
        padding: 20px 30px 0 30px !important;
        /* Padding equilibrado */
    }
}

@media (min-width: 1366px) and (max-width: 1366px) and (min-height: 768px) and (max-height: 768px) {
    .header {
        height: 35vh !important;
        /* Altura optimizada para 1366x768 */
        min-height: 220px !important;
        padding: 0 !important;
        /* Mayor padding superior e inferior */
    }

    .header-image {
        max-height: 50% !important;
        /* Logo optimizado para 1366x768 */
        max-width: 65% !important;
    }

    .content {
        padding: 20px 30px 0 30px !important;
        /* Padding equilibrado */
    }
}

/* Optimizaciones para móviles y tablets pequeñas */
@media (max-width: 768px) {
    .header {
        height: 25vh;
        padding: 0;
        /* Padding inferior para más respiración */
        flex-shrink: 0;
        min-height: 120px;
    }
}

@media (max-width: var(--breakpoint-sm)) {
    .header {
        height: 35vh;
        min-height: 200px;
        flex-shrink: 0;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 360px) {
    .header {
        height: 22vh;
        min-height: 100px;
        flex-shrink: 0;
    }
}

/* Orientación horizontal - OPTIMIZADO con prioridad alta */
@media (orientation: landscape) and (max-height: 600px) {
    .header {
        height: 35vh !important;
        /* Aumentado para que el logo se vea completo */
        min-height: 140px !important;
        padding: 0 !important;
        flex-shrink: 0;
    }

    .header-image {
        max-height: 70% !important;
        /* Logo más grande para verse completo en landscape */
        max-width: 75% !important;
    }

    .container {
        min-height: 100vh !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .content-wrapper {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .content {
        flex: 1 !important;
        padding: 10px 15px 15px 15px !important;
        /* Padding reducido para más espacio */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: none !important;
    }

    .footer {
        position: relative !important;
        flex-shrink: 0 !important;
        padding: 8px !important;
        /* Footer más compacto */
    }

    .logo-image {
        height: 35px !important;
        /* Logo del footer más pequeño */
    }

    /* Elementos del formulario más compactos en landscape */
    .content-title {
        font-size: 1.3rem !important;
        margin-bottom: 10px !important;
    }

    .dni-input,
    .form-input {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }

    .btn {
        min-height: 38px !important;
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    .form-group {
        margin-bottom: 10px !important;
    }

    .dni-section {
        padding: 10px !important;
    }
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 0;
    margin: 0;
}

.star-emoji {
    font-size: 4rem;
    margin: 0;
    animation: float 3s ease-in-out infinite;
}

.header-image {
    max-height: 40%;
    /* Reducido para caber en header de 25vh */
    max-width: 60%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Responsive para emoji */
@media (max-width: 2560px) {
    .star-emoji {
        font-size: 7rem;
    }

    .header-image {
        max-height: 40%;
        /* Ajustado para pantallas muy grandes */
        max-width: 60%;
    }
}

@media (max-width: 1920px) {
    .star-emoji {
        font-size: 6rem;
    }

    .header-image {
        max-height: 40%;
        /* Ajustado para Full HD */
        max-width: 60%;
    }
}

@media (max-width: 1440px) {
    .star-emoji {
        font-size: 5rem;
    }

    .header-image {
        max-height: 45%;
        /* Ajustado para laptops grandes */
        max-width: 65%;
    }
}

@media (max-width: 1280px) {
    .star-emoji {
        font-size: 4.5rem;
    }

    .header-image {
        max-height: 45%;
        /* Ajustado para laptops medianas */
        max-width: 65%;
    }
}

@media (max-width: 1024px) {
    .star-emoji {
        font-size: 4rem;
    }

    .header-image {
        max-height: 60%;
        /* Aumentado para tablets - header de 35vh */
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .star-emoji {
        font-size: 3.5rem;
    }

    .header-image {
        max-height: 90% !important;
        /* Aumentado para móviles - más vistoso - FORZADO */
        max-width: 95% !important;
    }
}

@media (max-width: 480px) {
    .star-emoji {
        font-size: 3rem;
    }

    .header-image {
        max-height: 95% !important;
        /* Aumentado para móviles pequeños - más vistoso - FORZADO */
        max-width: 98% !important;
    }
}

@media (max-width: 360px) {
    .star-emoji {
        font-size: 2.5rem;
    }

    .header-image {
        max-height: 45%;
        max-width: 65%;
    }
}

/* Orientación horizontal */
@media (orientation: landscape) and (max-height: 600px) {
    .star-emoji {
        font-size: 2.5rem;
    }

    .header-image {
        max-height: 70%;
        max-width: 60%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Decoración de onda */
.wave-decoration {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.wave-decoration::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

@media (max-width: 768px) {
    .header {
        height: 35vh;
        padding: 0;
    }

    .star-emoji {
        font-size: 3rem;
    }

    .header-image {
        max-height: 55%;
        max-width: 75%;
    }
}

/* Botón de tema reposicionado */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Responsive para botón de tema */
@media (max-width: 2560px) {
    .theme-toggle {
        top: 24px;
        right: 24px;
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
}

@media (max-width: 1920px) {
    .theme-toggle {
        top: 22px;
        right: 22px;
        width: 46px;
        height: 46px;
        font-size: 1.25rem;
    }
}

@media (max-width: 1440px) {
    .theme-toggle {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

@media (max-width: 1024px) {
    .theme-toggle {
        top: 18px;
        right: 18px;
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Touch devices */
@media (hover: none) {
    .theme-toggle:hover {
        transform: none;
    }

    .theme-toggle:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.4);
    }
}

/* Área de contenido */
.content {
    flex: 1;
    padding: 40px 60px 0 60px;
    /* Mayor padding para desktop */
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    /* Previene overflow */
    max-width: 100%;
}

/* Corrección para el área de contenido */
@media (max-width: 768px) {
    .content {
        padding: 20px 15px 0 15px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 15px 12px 0 12px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 360px) {
    .content {
        padding: 12px 10px 0 10px;
        width: 100%;
    }
}

.content-title {
    font-family: 'Kanit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive para título */
@media (max-width: 2560px) {
    .content {
        padding: 30px 25px 0 25px;
    }

    .content-title {
        font-size: 2.4rem;
        margin-bottom: 24px;
    }
}

@media (max-width: 1920px) {
    .content-title {
        font-size: 2.2rem;
        margin-bottom: 22px;
    }
}

@media (max-width: 1440px) {
    .content-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 1280px) {
    .content-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 1024px) {
    .content-title {
        font-size: 1.9rem;
        margin-bottom: 18px;
    }
}

@media (max-width: 768px) {
    .content-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .content-title {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
}

@media (max-width: 360px) {
    .content-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px 15px 0 15px;
    }

    .content-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
}

/* Logo móvil en la parte superior (cuando hay colaborador seleccionado) */
.top-logo {
    background: #ffffff;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

/* Responsive para logo superior */
@media (max-width: 2560px) {
    .top-logo {
        padding: 24px;
    }
}

@media (max-width: 1920px) {
    .top-logo {
        padding: 22px;
    }
}

@media (max-width: 1440px) {
    .top-logo {
        padding: 20px;
    }
}

@media (max-width: 1280px) {
    .top-logo {
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    .top-logo {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .top-logo {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .top-logo {
        padding: 12px;
    }
}

@media (max-width: 360px) {
    .top-logo {
        padding: 10px;
    }
}

/* Footer con logo - siempre al final de la página - 100% RESPONSIVE */
.footer {
    background: var(--color-black);
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-top: auto;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: none;
    /* Sin restricción de ancho - 100% responsive */
    z-index: 10;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Responsive para footer */
@media (max-width: 2560px) {
    .footer {
        padding: 24px;
        display: flex !important;
        visibility: visible !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: auto;
    }
}

@media (max-width: 1920px) {
    .footer {
        padding: 22px;
    }
}

@media (max-width: 1440px) {
    .footer {
        padding: 20px;
    }
}

@media (max-width: 1280px) {
    .footer {
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    .footer {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 10px;
        display: flex !important;
        visibility: visible !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: auto;
    }
}

@media (max-width: 360px) {
    .footer {
        padding: 10px;
    }
}

/* Media query para evitar desbordamiento horizontal */
@media screen and (max-width: var(--breakpoint-sm)) {
    * {
        max-width: 100%;
    }

    .footer {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px;
    }

    .content {
        padding-bottom: 80px;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Responsive para logo */
@media (max-width: 2560px) {
    .logo-container {
        gap: 12px;
    }
}

@media (max-width: 1920px) {
    .logo-container {
        gap: 11px;
    }
}

@media (max-width: 1440px) {
    .logo-container {
        gap: 10px;
    }
}

@media (max-width: 1280px) {
    .logo-container {
        gap: 9px;
    }
}

@media (max-width: 1024px) {
    .logo-container {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .logo-container {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .logo-container {
        gap: 6px;
    }
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--color-accent);
}

.logo-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Responsive para logo imagen */
/* Desactivamos alturas fijas para permitir que el ancho determine el tamaño */
@media (max-width: 480px) {
    .logo-image {
        width: 100%;
        max-height: none;
    }
}

@media (max-width: 360px) {
    .logo-image {
        width: 100%;
    }
}

.logo-text {
    text-align: left;
}

.logo-title {
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.5px;
}

.logo-subtitle {
    font-family: 'Kanit', sans-serif;
    font-size: 0.7rem;
    color: #6B7280;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Responsive para texto del logo */
@media (max-width: 2560px) {
    .logo-title {
        font-size: 1rem;
    }

    .logo-subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 1920px) {
    .logo-title {
        font-size: 0.95rem;
    }

    .logo-subtitle {
        font-size: 0.78rem;
    }
}

@media (max-width: 1440px) {
    .logo-title {
        font-size: 0.92rem;
    }

    .logo-subtitle {
        font-size: 0.77rem;
    }
}

@media (max-width: 1280px) {
    .logo-title {
        font-size: 0.91rem;
    }

    .logo-subtitle {
        font-size: 0.76rem;
    }
}

@media (max-width: 1024px) {
    .logo-title {
        font-size: 0.9rem;
    }

    .logo-subtitle {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .logo-title {
        font-size: 0.85rem;
    }

    .logo-subtitle {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .logo-title {
        font-size: 0.8rem;
    }

    .logo-subtitle {
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .logo-title {
        font-size: 0.75rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }
}

/* Estilos del buscador - Mobile First */
.search-section {
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    /* Previene overflow */
}

.search-input-container {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    /* Previene overflow */
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    color: #495057;
    font-family: 'Kanit', sans-serif;
    font-weight: 400;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    max-width: 100%;
    min-width: 0;
    /* Previene overflow */
}

/* Corrección responsive para móviles */
@media (max-width: 768px) {
    .search-section {
        width: 100%;
        box-sizing: border-box;
    }

    .search-input-container {
        width: 100%;
        box-sizing: border-box;
    }

    .search-input {
        width: 100%;
        padding: 14px 18px;
        border-radius: 20px;
        font-size: 16px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 12px 16px;
        border-radius: 18px;
        font-size: 16px;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .search-input {
        padding: 14px 18px;
        border-radius: 20px;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
    }
}

.search-input:focus {
    outline: none;
    border-color: #161337;
    background: white;
    box-shadow: 0 0 0 3px rgba(22, 19, 55, 0.1);
}

@media (max-width: 768px) {
    .search-input:focus {
        border-color: #161337;
        box-shadow: 0 0 0 2px rgba(22, 19, 55, 0.1);
    }
}

.search-input::placeholder {
    color: #9CA3AF;
    font-size: 0.95rem;
    text-align: center;
}

.search-hint {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    font-size: 0.75em;
    color: #666;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 8px 8px;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid #e0e0e0;
    border-top: none;
}

.search-input-container.active .search-hint {
    display: block;
}

.search-results {
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    display: none;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .search-results {
        border-radius: 8px;
        max-height: 250px;
        border: 1px solid #dee2e6;
    }
}

/* Estilos para resaltar coincidencias - Mobile optimized */
.search-result-item mark {
    background-color: var(--color-accent);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .search-result-item mark {
        background-color: var(--color-secondary);
        padding: 1px 3px;
        border-radius: 3px;
    }
}

.search-result-item {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Kanit', sans-serif;
}

@media (max-width: 768px) {
    .search-result-item {
        padding: 14px;
        border-bottom: 1px solid #e9ecef;
    }
}

.search-result-item:hover,
.search-result-item:active {
    background-color: #f8f9fa;
    transform: translateX(4px);
}

@media (max-width: 768px) {

    .search-result-item:hover,
    .search-result-item:active {
        background-color: #f1f3f4;
        transform: none;
    }
}

.search-result-item:hover mark,
.search-result-item:active mark {
    background-color: #1e7e34;
}

@media (max-width: 768px) {

    .search-result-item:hover mark,
    .search-result-item:active mark {
        background-color: #17a2b8;
    }
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 0.95em;
}

@media (max-width: 768px) {
    .result-name {
        font-size: 0.9em;
        margin-bottom: 3px;
    }
}

/* Ocultar legajo en resultados de búsqueda para ahorrar espacio */
.result-legajo {
    display: none !important;
}

.result-legajo {
    color: #666;
    font-size: 0.85em;
}

@media (max-width: 768px) {
    .result-legajo {
        font-size: 0.8em;
        color: #6c757d;
    }
}

/* Estilos del colaborador seleccionado - Mobile */
.selected-section {
    margin-bottom: 25px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    display: none;
    border: none;
    box-shadow: none;
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .selected-section {
        margin-bottom: 20px;
        border-radius: 0;
        border: none;
        box-shadow: none;
        min-height: auto;
    }
}

/* Tarjeta compacta del colaborador */
.selected-card {
    background: #5a6b7a;
    border-radius: 12px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 20px 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 80px;
}

@media (max-width: 768px) {
    .selected-card {
        padding: 16px 20px;
        gap: 12px;
        border-radius: 10px;
        margin: 0 15px 15px 15px;
        min-height: 70px;
    }
}

.selected-emoji {
    font-size: 2rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .selected-emoji {
        font-size: 1.8rem;
    }
}

.selected-details {
    flex: 1;
    min-width: 0;
}

.selected-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    font-family: 'Kanit', sans-serif;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .selected-name {
        font-size: 1rem;
        margin-bottom: 1px;
    }
}

.selected-legajo {
    color: #b8c5d1;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Kanit', sans-serif;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .selected-legajo {
        font-size: 0.85rem;
    }
}

.selected-section[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fuerza la visualización cuando está activa */
.selected-section.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Específico para GitHub Pages */
.selected-section[data-visible="true"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    min-height: 300px !important;
}

@media (max-width: 768px) {
    .selected-section[data-visible="true"] {
        min-height: 250px !important;
    }
}

/* Fallback para cualquier elemento con selectedSection */
#selectedSection {
    transition: all 0.3s ease;
}

#selectedSection.active,
#selectedSection[data-visible="true"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Formulario responsive */
.form-group {
    margin-bottom: 20px;
    padding: 0 20px;
}

/* Remover padding del form-group que contiene el checkbox */
.form-group:has(.checkbox-container-modern) {
    padding: 0;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-group {
        margin-bottom: 15px;
        padding: 0 15px;
    }

    .form-group:has(.checkbox-container-modern) {
        padding: 0;
        margin-bottom: 0;
    }
}

.form-actions {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 10px;
    flex-direction: column;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

@media (max-width: 768px) {
    .form-actions {
        padding: 15px;
        border-radius: 0 0 8px 8px;
        background: #ffffff;
        border-top: 1px solid #dee2e6;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    color: var(--color-white);
    border: none;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(201, 189, 130, 0.3);
    padding: 10px 20px;
    min-height: 46px;
}

@media (max-width: 768px) {
    .btn-primary {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
        border-radius: 18px;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 8px 16px;
        min-height: 42px;
        box-shadow: 0 3px 10px rgba(201, 189, 130, 0.4);
    }
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px /rgba(201, 189, 130, 0.5);
}

@media (max-width: 768px) {
    .btn-primary:hover {
        background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(201, 189, 130, 0.4);
    }
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: var(--color-white);
    border: none;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    transition: all 0.3s ease;
    padding: 10px 20px;
    min-height: 46px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.5);
    transform: translateY(-2px);
}

.btn-secondary:active {
    background: #495057;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.5);
}

/* Estilo específico para el botón volver */
/* Estilo específico para el botón volver - FORZADO */
.btn.btn-back {
    background: #6c757d !important;
    /* Color gris plano FORZADO */
    background-image: none !important;
    /* Anula cualquier gradiente */
    color: white !important;
    border: none !important;
    border-color: #6c757d !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.btn.btn-back:hover {
    background: #5a6268 !important;
    background-image: none !important;
    border-color: #5a6268 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-2px);
}

.btn.btn-back:active {
    background: #495057 !important;
    background-image: none !important;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

@media (max-width: 768px) {
    .btn-secondary:hover {
        background: #5a6268;
        transform: none;
        box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    }
}

#registrationForm {
    padding-top: 20px;
}

@media (max-width: 768px) {
    #registrationForm {
        padding-top: 15px;
    }
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: var(--font-size-sm);
    font-family: 'Kanit', sans-serif;
}

@media (max-width: 768px) {
    .form-label {
        font-size: calc(var(--font-size-sm) * 0.9);
        margin-bottom: calc(var(--space-sm) * 0.75);
        color: var(--color-text-dark);
    }
}

.form-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
    font-weight: 400;
}

@media (max-width: 768px) {
    .form-input {
        padding: var(--space-sm);
        border-radius: 8px;
        border: 1px solid var(--color-gray-300);
        font-size: var(--font-size-md);
    }
}

.form-input:focus {
    outline: none;
    border-color: #161337;
    background: white;
    box-shadow: 0 0 0 3px rgba(22, 19, 55, 0.1);
}

@media (max-width: 768px) {
    .form-input:focus {
        border-color: var(--color-secondary);
        box-shadow: 0 0 0 2px rgba(18, 35, 212, 0.1);
    }
}

.form-input[type="number"] {
    text-align: center;
    font-weight: 600;
}

/* Helper text para formularios */
.form-help {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: calc(var(--space-xs) * 0.8);
    margin-left: 2px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .form-help {
        font-size: 0.8rem;
    }
}

/* Checkbox moderno más grande */
.checkbox-container-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 20px 20px 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checkbox-container-modern:hover {
    background: #e9ecef;
}

.checkbox-modern {
    width: 32px;
    height: 32px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex-shrink: 0;
    min-width: 32px;
    min-height: 32px;
}

.checkbox-modern:checked {
    background: #007bff;
    border-color: #007bff;
}

.checkbox-modern:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-label-modern {
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #495057;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

/* Responsive para checkbox moderno */
@media (max-width: 2560px) {
    .checkbox-container-modern {
        padding: 26px;
        margin: 0 30px 30px 30px;
        gap: 20px;
        border-radius: 16px;
    }

    .checkbox-modern {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .checkbox-modern:checked::after {
        font-size: 24px;
    }

    .checkbox-label-modern {
        font-size: 18px;
    }
}

@media (max-width: 1920px) {
    .checkbox-container-modern {
        padding: 24px;
        margin: 0 26px 26px 26px;
        gap: 18px;
        border-radius: 15px;
    }

    .checkbox-modern {
        width: 35px;
        height: 35px;
        min-width: 35px;
        min-height: 35px;
    }

    .checkbox-modern:checked::after {
        font-size: 23px;
    }

    .checkbox-label-modern {
        font-size: 17.5px;
    }
}

@media (max-width: 1600px) {
    .checkbox-container-modern {
        padding: 22px;
        margin: 0 24px 24px 24px;
        gap: 17px;
        border-radius: 14px;
    }

    .checkbox-modern {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .checkbox-modern:checked::after {
        font-size: 22px;
    }

    .checkbox-label-modern {
        font-size: 17px;
    }
}

@media (max-width: 1440px) {
    .checkbox-container-modern {
        padding: 21px;
        margin: 0 22px 22px 22px;
        gap: 16px;
        border-radius: 13px;
    }

    .checkbox-modern {
        width: 33px;
        height: 33px;
        min-width: 33px;
        min-height: 33px;
    }

    .checkbox-modern:checked::after {
        font-size: 21px;
    }

    .checkbox-label-modern {
        font-size: 16.5px;
    }
}

@media (max-width: 1280px) {
    .checkbox-container-modern {
        padding: 20px;
        margin: 0 20px 20px 20px;
        gap: 15px;
        border-radius: 12px;
    }

    .checkbox-modern {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    .checkbox-modern:checked::after {
        font-size: 20px;
    }

    .checkbox-label-modern {
        font-size: 16px;
    }
}

@media (max-width: 1024px) {
    .checkbox-container-modern {
        padding: 19px;
        margin: 0 18px 18px 18px;
        gap: 14px;
        border-radius: 11px;
    }

    .checkbox-modern {
        width: 31px;
        height: 31px;
        min-width: 31px;
        min-height: 31px;
    }

    .checkbox-modern:checked::after {
        font-size: 19px;
    }

    .checkbox-label-modern {
        font-size: 15.5px;
    }
}

@media (max-width: 768px) {
    .checkbox-container-modern {
        padding: 18px;
        margin: 0 15px 15px 15px;
        gap: 13px;
        border-radius: 10px;
    }

    .checkbox-modern {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }

    .checkbox-modern:checked::after {
        font-size: 18px;
    }

    .checkbox-label-modern {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .checkbox-container-modern {
        padding: 16px;
        gap: 12px;
        margin: 0 12px 12px 12px;
    }

    .checkbox-modern {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }

    .checkbox-modern:checked::after {
        font-size: 16px;
    }

    .checkbox-label-modern {
        font-size: 14px;
    }
}

/* Estilos base para botones */
.btn {
    color: var(--color-white);
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 48px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-bottom: var(--space-md);
}

/* Responsive para botones */
@media (max-width: var(--breakpoint-md)) {
    .btn {
        padding: var(--space-sm) var(--space-md);
        border-radius: 18px;
        font-size: var(--font-size-sm);
        min-height: 44px;
    }
}

@media (max-width: var(--breakpoint-sm)) {
    .btn {
        padding: calc(var(--space-xs) + 2px) var(--space-sm);
        font-size: var(--font-size-xs);
        min-height: 40px;
        border-radius: 16px;
    }
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .btn:hover {
        transform: none;
    }
}

/* ===== ESTILOS PARA TARJETAS DE CARGA Y CONFIRMACIÓN ===== */

/* Tarjeta de carga de envío */
.submission-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-in-out;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-content h2 {
    font-family: 'Kanit', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.loading-content p {
    font-family: 'Kanit', sans-serif;
    font-size: 1.1rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* Mejoras adicionales para el modal de carga */
.loading-content h2 {
    transition: all 0.3s ease;
}

.loading-content p {
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* Animación de pulso para el spinner */
.loading-spinner {
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px solid rgba(0, 172, 153, 0.2);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* Estados del modal */
.loading-content.verifying h2 {
    color: var(--color-accent);
}

.loading-content.processing h2 {
    color: #0891b2;
}

.loading-content.error h2 {
    color: #dc2626;
}

/* Tarjeta de confirmación de éxito */
.success-confirmation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-in-out;
}

/* Pantalla final de éxito - ocupa toda la pantalla */
.success-final-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease-in-out;
    padding: 20px;
}

.success-content {
    background: white;
    padding: 45px 35px;
    border-radius: 24px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: slideInUp 0.4s ease-out;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.success-icon {
    margin-bottom: 25px;
}

.checkmark-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    border-radius: 50%;
    animation: bounceIn 0.6s ease-out;
    box-shadow: 0 8px 25px rgba(201, 189, 130, 0.4);
    position: relative;
}

.checkmark {
    color: white;
    font-size: 50px;
    font-weight: bold;
    line-height: 1;
}

.success-content h2 {
    font-family: 'Kanit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.success-details {
    margin-bottom: 30px;
}

.success-details p {
    font-family: 'Kanit', sans-serif;
    font-size: 1.05rem;
    color: #4b5563;
    margin: 10px 0;
    line-height: 1.6;
}

.success-details p strong {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 8px;
}

.success-time {
    font-size: 0.9rem !important;
    color: #9CA3AF !important;
    margin-top: 15px !important;
    font-style: italic;
}

.success-actions {
    margin-top: 30px;
}

.success-actions {
    margin-top: 30px;
}

.btn-success-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 15px 40px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: 'Kanit', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    min-width: 150px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.btn-success-primary:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 50%, var(--color-primary) 100%) !important;
    transform: translateY(-2px) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3) !important;
}

.btn-success-secondary {
    background: #4b5563 !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 15px 40px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: 'Kanit', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    min-width: 150px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

.btn-success-secondary:hover {
    background: #374151 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3) !important;
}

.success-actions .btn {
    min-width: 150px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* Tarjeta de confirmación de error */
.error-confirmation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-in-out;
}

.error-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: shake 0.5s ease-in-out;
}

.error-content h2 {
    font-family: 'Kanit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #DC2626;
    margin-bottom: 25px;
}

.error-details {
    margin-bottom: 30px;
}

.error-details p {
    font-family: 'Kanit', sans-serif;
    font-size: 1.1rem;
    color: #374151;
    margin: 8px 0;
}

.error-time {
    font-size: 0.9rem !important;
    color: #9CA3AF !important;
    margin-top: 15px !important;
    font-style: italic;
}

.error-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== ESTILOS PARA SISTEMA DE DNI ===== */

/* Sección de DNI */
.dni-section {
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.dni-input-container {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.dni-label {
    font-family: 'Kanit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin-bottom: 10px;
}

.dni-input {
    width: 100%;
    max-width: 300px;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #495057;
    font-family: 'Kanit', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
    letter-spacing: 1px;
}

.dni-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.dni-input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
    letter-spacing: normal;
}

/* Helper text específico para DNI */
.dni-input-container .form-help {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 5px;
    line-height: 1.4;
    max-width: 300px;
}

@media (max-width: 768px) {
    .dni-input-container .form-help {
        font-size: 0.8rem;
        margin-top: -8px;
    }
}

.dni-message {
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Kanit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.dni-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.dni-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.dni-message.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.dni-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Sección de registro */
.registration-section {
    margin-bottom: 25px;
    display: none;
    width: 100%;
    box-sizing: border-box;
}

/* Formulario de datos personales */
.personal-data-form {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 0 20px 20px 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-title {
    font-family: 'Kanit', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin-bottom: 20px;
}

.personal-data-form .form-group {
    margin-bottom: 20px;
    padding: 0;
}

.personal-data-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
    font-family: 'Kanit', sans-serif;
}

.personal-data-form .form-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
    font-weight: 400;
}

.personal-data-form .form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* Estilos específicos para input de fecha */
.personal-data-form .form-input[type="date"] {
    position: relative;
    background: #ffffff;
    cursor: pointer;
}

.personal-data-form .form-input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.personal-data-form .form-input[type="date"]:focus::-webkit-calendar-picker-indicator {
    background: rgba(0, 172, 153, 0.1);
    border-radius: 4px;
}

/* Responsive para campos de fecha */
@media (max-width: 768px) {
    .personal-data-form .form-input[type="date"] {
        font-size: 16px;
        /* Evita zoom en iOS */
    }
}

/* Participante existente */
.existing-participant {
    margin: 0 20px 20px 20px;
}

.participant-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    border-radius: 16px;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(201, 189, 130, 0.3);
    min-height: 100px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.participant-emoji {
    font-size: 4rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.participant-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.participant-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    font-family: 'Kanit', sans-serif;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.participant-dni {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Kanit', sans-serif;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}

/* Responsive para DNI */
@media (max-width: 2560px) {
    .dni-input-container {
        gap: 24px;
    }

    .dni-label {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }

    .dni-input {
        max-width: 380px;
        padding: 24px 28px;
        font-size: 22px;
        border-radius: 34px;
    }

    .dni-message {
        padding: 20px 28px;
        font-size: 1.15rem;
        margin-top: 18px;
    }

    .personal-data-form {
        padding: 32px;
        margin: 0 28px 28px 28px;
        border-radius: 16px;
    }

    .form-title {
        font-size: 1.55rem;
        margin-bottom: 28px;
    }

    .personal-data-form .form-input {
        padding: 20px;
        border-radius: 14px;
        font-size: 22px;
    }

    .existing-participant {
        margin: 0 28px 28px 28px;
    }

    .participant-card {
        padding: 38px 32px;
        gap: 24px;
        border-radius: 19px;
        min-height: 104px;
    }

    .participant-emoji {
        font-size: 5.2rem;
        width: 105px;
        height: 105px;
    }

    .participant-name {
        font-size: 1.5rem;
    }

    .participant-dni {
        font-size: 1.15rem;
    }
}

@media (max-width: 1920px) {
    .dni-input-container {
        gap: 22px;
    }

    .dni-label {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    .dni-input {
        max-width: 360px;
        padding: 22px 26px;
        font-size: 21px;
        border-radius: 32px;
    }

    .dni-message {
        padding: 18px 26px;
        font-size: 1.1rem;
        margin-top: 16px;
    }

    .personal-data-form {
        padding: 30px;
        margin: 0 26px 26px 26px;
        border-radius: 15px;
    }

    .form-title {
        font-size: 1.5rem;
        margin-bottom: 26px;
    }

    .personal-data-form .form-input {
        padding: 18px;
        border-radius: 13px;
        font-size: 21px;
    }

    .existing-participant {
        margin: 0 26px 26px 26px;
    }

    .participant-card {
        padding: 36px 30px;
        gap: 22px;
        border-radius: 18px;
        min-height: 102px;
    }

    .participant-emoji {
        font-size: 5rem;
        width: 100px;
        height: 100px;
    }

    .participant-name {
        font-size: 1.45rem;
    }

    .participant-dni {
        font-size: 1.1rem;
    }
}

@media (max-width: 1680px) {
    .dni-input-container {
        gap: 20px;
    }

    .dni-label {
        font-size: 1.2rem;
        margin-bottom: 14px;
    }

    .dni-input {
        max-width: 340px;
        padding: 20px 24px;
        font-size: 20px;
        border-radius: 30px;
    }

    .dni-message {
        padding: 16px 24px;
        font-size: 1.05rem;
        margin-top: 14px;
    }

    .personal-data-form {
        padding: 28px;
        margin: 0 24px 24px 24px;
        border-radius: 14px;
    }

    .form-title {
        font-size: 1.45rem;
        margin-bottom: 24px;
    }

    .personal-data-form .form-input {
        padding: 16px;
        border-radius: 12px;
        font-size: 20px;
    }

    .existing-participant {
        margin: 0 24px 24px 24px;
    }

    .participant-card {
        padding: 34px 28px;
        gap: 20px;
        border-radius: 17px;
        min-height: 100px;
    }

    .participant-emoji {
        font-size: 4.7rem;
        width: 95px;
        height: 95px;
    }

    .participant-name {
        font-size: 1.4rem;
    }

    .participant-dni {
        font-size: 1.05rem;
    }
}

@media (max-width: 1440px) {
    .dni-input-container {
        gap: 18px;
    }

    .dni-label {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .dni-input {
        max-width: 320px;
        padding: 18px 22px;
        font-size: 19px;
        border-radius: 28px;
    }

    .dni-message {
        padding: 14px 22px;
        font-size: 1rem;
        margin-top: 12px;
    }

    .personal-data-form {
        padding: 26px;
        margin: 0 22px 22px 22px;
        border-radius: 13px;
    }

    .form-title {
        font-size: 1.4rem;
        margin-bottom: 22px;
    }

    .personal-data-form .form-input {
        padding: 15px;
        border-radius: 11px;
        font-size: 19px;
    }

    .existing-participant {
        margin: 0 22px 22px 22px;
    }

    .participant-card {
        padding: 32px 26px;
        gap: 18px;
        border-radius: 16px;
        min-height: 98px;
    }

    .participant-emoji {
        font-size: 4.5rem;
        width: 90px;
        height: 90px;
    }

    .participant-name {
        font-size: 1.35rem;
    }

    .participant-dni {
        font-size: 1rem;
    }
}

@media (max-width: 1200px) {
    .dni-input-container {
        gap: 16px;
    }

    .dni-label {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .dni-input {
        max-width: 300px;
        padding: 16px 20px;
        font-size: 18px;
        border-radius: 25px;
    }

    .dni-message {
        padding: 12px 20px;
        font-size: 0.95rem;
        margin-top: 10px;
    }

    .personal-data-form {
        padding: 24px;
        margin: 0 20px 20px 20px;
        border-radius: 12px;
    }

    .form-title {
        font-size: 1.35rem;
        margin-bottom: 20px;
    }

    .personal-data-form .form-input {
        padding: 14px;
        border-radius: 10px;
        font-size: 18px;
    }

    .existing-participant {
        margin: 0 20px 20px 20px;
    }

    .participant-card {
        padding: 30px 24px;
        gap: 16px;
        border-radius: 15px;
        min-height: 95px;
    }

    .participant-emoji {
        font-size: 4.2rem;
        width: 85px;
        height: 85px;
    }

    .participant-name {
        font-size: 1.3rem;
    }

    .participant-dni {
        font-size: 0.95rem;
    }
}

@media (max-width: 1024px) {
    .dni-input-container {
        gap: 14px;
    }

    .dni-label {
        font-size: 1.05rem;
        margin-bottom: 9px;
    }

    .dni-input {
        max-width: 290px;
        padding: 15px 19px;
        font-size: 17px;
        border-radius: 22px;
    }

    .dni-message {
        padding: 11px 18px;
        font-size: 0.95rem;
        margin-top: 9px;
    }

    .personal-data-form {
        padding: 22px;
        margin: 0 18px 18px 18px;
        border-radius: 11px;
    }

    .form-title {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }

    .personal-data-form .form-input {
        padding: 13px;
        border-radius: 9px;
        font-size: 17px;
    }

    .existing-participant {
        margin: 0 18px 18px 18px;
    }

    .participant-card {
        padding: 28px 22px;
        gap: 14px;
        border-radius: 15px;
        min-height: 90px;
    }

    .participant-emoji {
        font-size: 3.8rem;
        width: 80px;
        height: 80px;
    }

    .participant-name {
        font-size: 1.2rem;
    }

    .participant-dni {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .dni-input-container {
        gap: 12px;
    }

    .dni-label {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .dni-input {
        max-width: 280px;
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 20px;
    }

    .dni-message {
        padding: 10px 16px;
        font-size: 0.9rem;
        margin-top: 8px;
    }

    .personal-data-form {
        padding: 20px;
        margin: 0 15px 15px 15px;
        border-radius: 10px;
    }

    .form-title {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    .personal-data-form .form-input {
        padding: 12px;
        border-radius: 8px;
        font-size: 16px;
    }

    .existing-participant {
        margin: 0 15px 15px 15px;
    }

    .participant-card {
        padding: 25px 20px;
        gap: 12px;
        border-radius: 14px;
        min-height: 85px;
    }

    .participant-emoji {
        font-size: 3.5rem;
        width: 75px;
        height: 75px;
    }

    .participant-name {
        font-size: 1rem;
    }

    .participant-dni {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .dni-input {
        max-width: 250px;
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 18px;
    }

    .personal-data-form {
        padding: 16px;
        margin: 0 12px 12px 12px;
    }

    .form-title {
        font-size: 1.1rem;
    }

    .participant-card {
        padding: 20px 18px;
        gap: 10px;
    }

    .participant-emoji {
        font-size: 3rem;
        width: 65px;
        height: 65px;
        margin-bottom: 5px;
    }

    .participant-name {
        font-size: 1.15rem;
    }

    .participant-dni {
        font-size: 0.9rem;
        padding: 3px 10px;
    }
}

/* Botón de verificar DNI */
#checkDniBtn,
#submitBtn,
#backBtn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-top: 15px;
    box-shadow: 0 4px 12px var(--color-primary-light);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 50px;
}

#checkDniBtn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

#checkDniBtn:hover {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--color-primary-light);
}

#checkDniBtn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    #checkDniBtn {
        padding: 12px 24px;
        font-size: 15px;
        min-height: 46px;
        border-radius: 20px;
    }

    #checkDniBtn:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 172, 153, 0.3);
    }
}

@media (max-width: 480px) {
    #checkDniBtn {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 42px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.4;
    }

    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}

/* Responsive para móviles */
@media (max-width: 1280px) {

    .loading-content,
    .success-content,
    .error-content {
        padding: 40px 30px;
        margin: 30px;
        width: calc(100% - 60px);
    }

    .loading-content h2,
    .success-content h2,
    .error-content h2 {
        font-size: 2rem;
    }

    .loading-content p,
    .success-details p,
    .error-details p {
        font-size: 1.2rem;
    }

    .success-icon,
    .error-icon {
        font-size: 4rem;
    }

    .loading-spinner {
        width: 70px;
        height: 70px;
        border-width: 7px;
    }
}

@media (max-width: 1024px) {

    .loading-content,
    .success-content,
    .error-content {
        padding: 35px 25px;
        margin: 25px;
        width: calc(100% - 50px);
    }

    .loading-content h2,
    .success-content h2,
    .error-content h2 {
        font-size: 1.8rem;
    }

    .loading-content p,
    .success-details p,
    .error-details p {
        font-size: 1.1rem;
    }

    .success-icon,
    .error-icon {
        font-size: 3.5rem;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 6px;
    }
}

@media (max-width: 768px) {

    .loading-content,
    .success-content,
    .error-content {
        padding: 30px 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }

    .loading-content h2,
    .success-content h2,
    .error-content h2 {
        font-size: 1.6rem;
    }

    .loading-content p,
    .success-details p,
    .error-details p {
        font-size: 1rem;
    }

    .success-icon,
    .error-icon {
        font-size: 3rem;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 5px;
    }

    .error-actions {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {

    .loading-content,
    .success-content,
    .error-content {
        padding: 25px 15px;
        margin: 15px;
        width: calc(100% - 30px);
    }

    .loading-content h2,
    .success-content h2,
    .error-content h2 {
        font-size: 1.4rem;
    }

    .success-icon,
    .error-icon {
        font-size: 2.5rem;
    }
}

/* Responsive para tablets, laptops y PCs */
@media (min-width: 1024px) {

    .loading-content,
    .success-content,
    .error-content {

        max-width: 500px;
    }
}

@media (min-width: 1200px) {

    .loading-content,
    .success-content,
    .error-content {
        max-width: 550px;
    }
}

@media (min-width: 1366px) {

    .loading-content,
    .success-content,
    .error-content {
        max-width: 600px;
    }
}

@media (min-width: 1440px) {

    .loading-content,
    .success-content,
    .error-content {
        max-width: 650px;
    }
}

@media (min-width: 1920px) {

    .loading-content,
    .success-content,
    .error-content {
        max-width: 700px;
    }
}

@media (min-width: 2560px) {

    .loading-content,
    .success-content,
    .error-content {
        max-width: 800px;
    }
}

/* ===== ESTILOS PARA SISTEMA DE PANTALLAS MÚLTIPLES ===== */

/* Contenedor de pantallas */
.screen {
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.screen.hidden {
    display: none !important;
}

/* Ocultar header en pantallas que no sean la inicial */
/* Wrapper de contenido - ocupa el espacio disponible */
.content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.content-wrapper:has(#registrationScreen:not([style*="display: none"])) .header,
.content-wrapper:has(#alreadyRegisteredScreen:not([style*="display: none"])) .header {
    display: none;
}

/* Si el navegador no soporta :has(), usar clases auxiliares */
body.hide-header .header {
    display: none !important;
}

body.hide-header .content-wrapper {
    padding-top: 20px;
    margin-top: 0;
}

body.hide-header .content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Transición suave para ocultar/mostrar header */
.header {
    transition: all 0.3s ease-in-out;
}

body.hide-header .header {
    opacity: 0;
    transform: translateY(-100%);
}

/* Pantalla 1: Verificación DNI */
.dni-section {
    text-align: center;
    padding: 30px 20px;
}

.content-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.4;
}

.dni-input-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Pantalla 2: Formulario de registro */
.registration-header {
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    color: white;
    border-radius: 15px;
    margin-top: 20px;
}

/* Ajustes cuando no hay header */
body.hide-header .registration-header {
    margin-top: 0;
}

body.hide-header .dni-section {
    padding-top: 40px;
}

body.hide-header .already-registered {
    padding-top: 40px;
}

.registration-header .content-title {
    color: white;
    margin-bottom: 10px;
}

/* Estilos del título */
.registration-header .content-title {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.dni-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.registration-header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.registration-header-top .content-title {
    margin-bottom: 0;
}

.registration-header-top .dni-display {
    padding: 8px 15px;
    font-size: 1rem;
}

/* Pantalla 3: Ya registrado */
.already-registered {
    text-align: center;
    padding: 30px 20px;
}

.already-registered .participant-card {
    margin-bottom: 30px;
}

.already-registered h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Navegación entre pantallas */
.form-actions {
    display: flex;
    gap: 6px;
    /* Espacio reducido entre botones */
    margin-top: 20px;
    flex-wrap: wrap;
    margin-bottom: 100px;
    /* Espacio para evitar superposición con el footer */
    justify-content: center;
    align-items: center;
    text-align: center;
}

.form-actions .btn {
    flex: 1 1 45%;
    /* Hace que ambos botones se expandan por igual */
    min-width: 140px;
    max-width: 200px;
    width: 45%;
    margin: 5px;
}

/* Animaciones de transición */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.screen.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

.screen.slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}

@media (max-width: 768px) {
    .dni-section {
        padding: 20px 15px;
    }

    .registration-header {
        margin: 0 -10px 20px -10px;
        border-radius: 10px;
    }

    .form-actions {
        flex-direction: column;
        /* Apilar verticalmente en móviles */
        gap: 10px;
        margin-bottom: 140px;
        /* Más espacio en móviles para el footer */
        padding-bottom: 20px;
        justify-content: center;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
        min-width: auto;
        max-width: none;
        font-size: 0.95rem;
        padding: 12px 20px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .dni-input-container {
        padding: 0 10px;
    }

    .registration-header {
        padding: 12px;
        margin: 0 -5px 12px -5px;
        border-radius: 8px;
    }

    .registration-header .content-title {
        font-size: 1.3rem;
    }

    .dni-display {
        font-size: 1rem;
        padding: 8px 15px;
    }
}

/* 
 * Optimizaciones realizadas:
 * 1. Sistema de variables CSS para colores, espaciados y tipografía
 * 2. Gradientes actualizados con la nueva paleta (#161337, #1223d4, #930cbc)
 * 3. Media queries estandarizados usando variables (--breakpoint-sm, --breakpoint-md)
 * 4. Botones y formularios con estilos consistentes
 * 5. Colores de texto y fondos unificados
 * 6. Mejoras de rendimiento para móviles
 */