﻿html, body {
    max-width: 100%;
    overflow-x: hidden;
}
.menu-admin .user-card {
    gap: 35px;
}
.floating-user-nav.menu-admin.expanded .user-card {
    gap: 25px;
}

/*CONTENEDOR FLOTANTE*/
.floating-user-nav {
    position: absolute;
    top: 30px;
    left: 55px;
    z-index: 1050;
}

/*CARD - ESTADO COLAPSADO (por defecto)*/
.user-card {
    width: 150px;
    height: auto;
    background: var(--color-bg-card);
    border-radius: 25px;
    box-shadow: var(--shadow-navbar);
    /*padding: 25px 15px;*/
    padding: 40px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /*gap: 60px;*/
    gap: 70px;
    overflow: hidden;
}

/* CARD - ESTADO EXPANDIDO */
.floating-user-nav.expanded .user-card {
    width: 370px;
    /* padding: 25px 30px; */
    padding: 20px 20px;
    align-items: stretch;
    /* gap: 50px; */
    gap: 55px;
}

/*HEADER USUARIO*/
.user-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    transition: gap 0.3s ease;
}

/* HEADER EXPANDIDO */
.floating-user-nav.expanded .user-header {
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

/*AVATAR*/
.avatar {
    width: 80px;
    height: 80px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: width 0.3s ease, height 0.3s ease;
}



/* AVATAR EXPANDIDO */
.floating-user-nav.expanded .avatar {
    width: 85px;
    height: 85px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.avatar:hover img {
    transform: scale(1.05);
}

.floating-user-nav.expanded .avatar:hover {
    transform: translateY(-2px);
}


/*USER INFO - OCULTO POR DEFECTO*/
.user-info {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

/* USER INFO EXPANDIDO */
.floating-user-nav.expanded .user-info {
    opacity: 1;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-info h6 {
    margin: 0;
    font-weight: var(--font-weight-black);
    font-size: 1.3rem;
    color: var(--color-primary);
    line-height: 1.3;
    word-wrap: break-word;
    letter-spacing: 0.5px;
}

.user-info span {
    font-size: 1rem;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
}

/*SECCIONES*/
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/*SECTION TITLE*/
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column; /* CAMBIO: vertical por defecto (colapsado) */
    gap: 8px; /* CAMBIO: gap reducido para modo colapsado */
    color: var(--color-text-primary);
    font-weight: var(--font-weight-black);
    font-size: var(--font-size-subtite);
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
    padding: 8px;
    text-decoration: none;
}

/* SECTION TITLE CUANDO ESTÁ ACTIVA/CURRENT */
/*.nav-section.current-section .section-title {
    background: rgba(var(--color-primary-rgb, 0, 123, 255), 0.1);
}*/

.nav-section.active .section-title span,
.nav-section.active .section-title {
    color: var(--color-primary);
    text-decoration:none;
}

/* Efecto adicional para el icono cuando está activa */
.nav-section.active .section-title img {
    filter: brightness(0) saturate(100%) invert(37%) sepia(93%) saturate(4151%) hue-rotate(201deg) brightness(97%) contrast(101%);
}

/* SECTION TITLE EXPANDIDO */
.floating-user-nav.expanded .section-title {
    justify-content: flex-start;
    flex-direction: row;
    gap: 15px;
    text-decoration: none;
}

.section-title:hover {
    transform: translateY(-2px);
}

.floating-user-nav.expanded .section-title span:hover {
    color: var(--color-primary);
}

.section-title img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    pointer-events: none;
}

.floating-user-nav.expanded .section-title img {
    margin-left: 10px;
}

/*SECTION TEXT - VISIBLE EN MODO COLAPSADO*/
.section-text {
    opacity: 1;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
    /*    max-width: 90px; */
    white-space: normal;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* SECTION TEXT EXPANDIDO */
.floating-user-nav.expanded .section-text {
    opacity: 1;
    font-size: 1rem; 
    text-align: left;
    max-width: none;
    white-space: nowrap;
}

/*LINKS - OCULTOS POR DEFECTO*/
.nav-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: none;
    flex-direction: column;
}

/* LINKS VISIBLES SOLO SI ESTÁ EXPANDIDO Y LA SECCIÓN ACTIVA */
/* Desktop */
.floating-user-nav.expanded .nav-section.active .nav-links,
.floating-user-nav.tablet-active.expanded .nav-section.active .nav-links {
    display: flex;
}



.nav-links li {
    margin: 0;
}

.nav-links a {
    font-size: 1rem;
    color: var(--color-text-placeholder);
    text-decoration: none;
    display: block;
    padding: 6px 0;
    padding-left: 10px;
    transition: color 0.2s;
    font-weight: var(--font-weight-medium);
}

.nav-links a:hover {
    color: var(--color-text-primary);
}

/* Links activos */
.nav-links a.active {
    color: var(--color-text-primary);
    font-weight: 600;
    border-left: 3px solid var(--color-primary);
    padding-left: 13px;
}

/*BOTONES DE ACCIÓN*/
.nav-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* BOTONES EN HORIZONTAL CUANDO ESTÁ EXPANDIDO */
.floating-user-nav.expanded .nav-actions {
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: transform 0.3s ease;
    flex: 1;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn img {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.regresar img {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.floating-user-nav.expanded .regresar img {
    width: 50px;
    height: 50px;
}

.floating-user-nav.expanded .action-btn img {
    width: 40px;
    height: 40px;
}

.action-btn:hover img {
    transform: scale(1.1);
}

.action-btn span {
    font-size: 0.9rem;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
    opacity: 1;
    height: auto;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    transition: opacity 0.3s ease, font-size 0.3s ease;
}

.floating-user-nav.expanded .action-btn span {
    opacity: 1;
    height: auto;
    font-size: 0.85rem;
    white-space: nowrap;
    max-width: none;
}




.tablet-menu-toggle {
    margin-left: 15px;
    margin-top: 15px;
    z-index: 4000;
    width: 55px;
    height: 40px;
    border-radius: 15%;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    display: none;
}

.disabled-link a {
    pointer-events: none;
    color: var(--color-text-placeholder);
    font-weight: var(--font-weight-medium);
    cursor: not-allowed;
    opacity: 0.6;
    text-decoration: none;
}