/* layoutencuestador.css */
/* Header Responsive para Sistema de Encuestas del Partido Renovación Popular */

/* Reset y fuentes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    overflow-x: hidden;
}

/* ENCABEZADO PRINCIPAL */
.encabezado {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.encabezado-izquierda {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.encabezado-derecha {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* LOGO Y MARCA */
.logo-marca {
    display: flex;
    align-items: center;
}

.logo-partido {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 6px;
}

/* INFORMACIÓN DEL PROCESO ELECTORAL */
.cabecera-pagina {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.titulo-pagina {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.subtitulo-pagina {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.2;
}

/* MENÚ DE USUARIO */
.menu-usuario {
    position: relative;
}

.boton-usuario {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.boton-usuario:hover {
    background: #f1f5f9;
}

.avatar-usuario {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.boton-usuario:hover .avatar-usuario {
    border-color: #3b82f6;
}

.info-usuario {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.nombre-usuario {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.rol-usuario {
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
}

.flecha-desplegable {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.boton-usuario[aria-expanded="true"] .flecha-desplegable {
    transform: rotate(180deg);
}

/* DROPDOWN DE USUARIO */
.desplegable-usuario {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 180px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    padding: 8px;
}

.desplegable-usuario.mostrar {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Flecha del dropdown */
.desplegable-usuario::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    border: 8px solid transparent;
    border-bottom-color: #e2e8f0;
}

.desplegable-usuario::after {
    content: '';
    position: absolute;
    top: -7px;
    right: 24px;
    border: 8px solid transparent;
    border-bottom-color: white;
}

/* Items del dropdown */
.item-desplegable {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.item-desplegable:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.item-desplegable.salir {
    color: #ef4444;
}

.item-desplegable.salir:hover {
    background: #fef2f2;
    color: #dc2626;
}

.item-desplegable i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.divisor-desplegable {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

/* CONTENIDO PRINCIPAL */
.contenido-principal {
    margin-top: 70px;
    padding: 24px;
    min-height: calc(100vh - 70px);
}

/* RESPONSIVE DESIGN */

/* Tablets y laptops pequeñas */
@media (max-width: 1024px) {
    .titulo-pagina {
        font-size: 16px;
    }

    .subtitulo-pagina {
        font-size: 13px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .encabezado {
        padding: 0 16px;
    }

    .encabezado-izquierda {
        gap: 8px;
    }

    .logo-partido {
        height: 32px;
        max-width: 100px;
    }

    .titulo-pagina {
        font-size: 14px;
    }

    .subtitulo-pagina {
        font-size: 12px;
    }

    .info-usuario {
        display: none;
    }

    .desplegable-usuario {
        width: 180px;
        right: -20px;
    }

    .desplegable-usuario::before,
    .desplegable-usuario::after {
        right: 32px;
    }

    .contenido-principal {
        padding: 16px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .encabezado-izquierda {
        gap: 6px;
    }

    .logo-partido {
        height: 28px;
        max-width: 80px;
    }

    .titulo-pagina {
        font-size: 12px;
    }

    .subtitulo-pagina {
        font-size: 11px;
    }

    .encabezado-derecha {
        gap: 8px;
    }

    .boton-usuario {
        padding: 6px;
    }

    .avatar-usuario {
        width: 32px;
        height: 32px;
    }
}
