/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* ========================================
   MainLayout - Tema Profesional
   ======================================== */

.app-container[b-qu1bfjnx6d] {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-secondary);
}

/* Header */
.app-header[b-qu1bfjnx6d] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 64px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--border-color), 0 2px 8px rgba(0,0,0,0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Línia de color a la part superior de la capçalera */
.app-header[b-qu1bfjnx6d]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #3b82f6 50%, #06b6d4 100%);
}

.header-left[b-qu1bfjnx6d] {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right[b-qu1bfjnx6d] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-brand[b-qu1bfjnx6d] {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.sidebar-toggle[b-qu1bfjnx6d] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: var(--border-radius);
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover[b-qu1bfjnx6d] {
    background: var(--primary-bg);
    border-color: var(--primary-light);
    color: var(--primary-color);
    transform: scale(1.05);
}

.sidebar-toggle i[b-qu1bfjnx6d] {
    font-size: 1.2rem;
}

/* Separador vertical a la capçalera */
.header-divider[b-qu1bfjnx6d] {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 0.25rem;
}

/* Header User */
.header-user[b-qu1bfjnx6d] {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.user-name[b-qu1bfjnx6d] {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--secondary-dark);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Avatar amb gradient i borde */
.user-avatar[b-qu1bfjnx6d] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #dbeafe 100%);
    color: var(--primary-color);
    border: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.25s ease;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
}

.user-avatar:hover[b-qu1bfjnx6d] {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: scale(1.08);
}

.user-avatar i[b-qu1bfjnx6d] {
    font-size: 1.1rem;
}

/* Indicador d'usuari autenticat */
.user-avatar-wrapper[b-qu1bfjnx6d] {
    position: relative;
}

.user-avatar-wrapper[b-qu1bfjnx6d]::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    border: 2px solid white;
}

/* Page Content */
.page-content[b-qu1bfjnx6d] {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

@media (max-width: 767.98px) {
    .app-header[b-qu1bfjnx6d] {
        padding: 0 1rem;
    }
    
    .page-content[b-qu1bfjnx6d] {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .page-content[b-qu1bfjnx6d] {
        padding: 0.75rem;
    }
    
    .app-header[b-qu1bfjnx6d] {
        height: 56px;
    }
}

/* Error UI */
#blazor-error-ui[b-qu1bfjnx6d] {
    color-scheme: light only;
    background: var(--warning-bg);
    bottom: 0;
    box-shadow: var(--shadow-lg);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 3px solid var(--warning-color);
}

#blazor-error-ui .dismiss[b-qu1bfjnx6d] {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* ========================================
   NavMenu - Tema Profesional Millorat
   ======================================== */

.sidebar-container[b-espvjdicsm] {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
}

/* Header / Logo */
.sidebar-header[b-espvjdicsm] {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.logo-container[b-espvjdicsm] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon[b-espvjdicsm] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.logo-icon i[b-espvjdicsm] {
    font-size: 1.1rem;
    color: white;
}

.logo-text[b-espvjdicsm] {
    font-size: 1.0625rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* Navigation */
.sidebar-nav[b-espvjdicsm] {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section[b-espvjdicsm] {
    display: flex;
    flex-direction: column;
    padding: 0 0.75rem;
    margin-bottom: 0.25rem;
}

.nav-section-title[b-espvjdicsm] {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.3);
    padding: 0.875rem 0.75rem 0.35rem;
    margin-bottom: 0.1rem;
}

.nav-section-bottom[b-espvjdicsm] {
    margin-top: auto;
    padding-top: 0.5rem;
}

.nav-divider[b-espvjdicsm] {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 0.25rem 0.75rem 0.75rem;
}

/* Nav Item */
.nav-item[b-espvjdicsm],
.nav-item:link[b-espvjdicsm],
.nav-item:visited[b-espvjdicsm],
a.nav-item[b-espvjdicsm],
a.nav-item:link[b-espvjdicsm],
a.nav-item:visited[b-espvjdicsm] {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.15rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    transition: all 0.18s ease;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    position: relative;
}

/* Hover */
.nav-item:hover[b-espvjdicsm],
.nav-item:focus[b-espvjdicsm],
a.nav-item:hover[b-espvjdicsm],
a.nav-item:focus[b-espvjdicsm] {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff !important;
    text-decoration: none !important;
    padding-left: 1rem;
}

/* Actiu */
.nav-item.active[b-espvjdicsm],
a.nav-item.active[b-espvjdicsm],
a.nav-item.active:link[b-espvjdicsm],
a.nav-item.active:visited[b-espvjdicsm] {
    background: rgba(59, 130, 246, 0.18);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

/* Barra esquerra actiu */
.nav-item.active[b-espvjdicsm]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    border-radius: 0 3px 3px 0;
}

/* Icones */
.nav-item i[b-espvjdicsm] {
    font-size: 1rem;
    width: 20px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.55) !important;
    margin-right: 0.75rem;
    transition: color 0.18s ease;
}

.nav-item:hover i[b-espvjdicsm],
a.nav-item:hover i[b-espvjdicsm] {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-item.active i[b-espvjdicsm] {
    color: #60a5fa !important;
}

/* Text */
.nav-item span[b-espvjdicsm] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit !important;
    transition: opacity 0.2s ease;
}

/* Tooltip al colapsar sidebar */
#app-sidebar.collapsed .nav-item[b-espvjdicsm] {
    justify-content: center;
    padding: 0.625rem;
}

#app-sidebar.collapsed .nav-item i[b-espvjdicsm] {
    margin-right: 0;
}

#app-sidebar.collapsed .nav-item:hover[b-espvjdicsm]::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}

#app-sidebar.collapsed .nav-item:hover[b-espvjdicsm]::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1e293b;
    z-index: 9999;
    pointer-events: none;
}

/* Excloure la barra actiu del tooltip arrow */
#app-sidebar.collapsed .nav-item.active[b-espvjdicsm]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    border-radius: 0 3px 3px 0;
    border: none;
}

/* Badge de notificacions */
.nav-badge[b-espvjdicsm] {
    margin-left: auto;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    line-height: 1.4;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
    animation: pulse-badge-b-espvjdicsm 2s infinite;
}

@keyframes pulse-badge-b-espvjdicsm {
    0%, 100% { box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.8); }
}

/* Ocultar badge al colapsar */
#app-sidebar.collapsed .nav-badge[b-espvjdicsm] {
    display: none;
}

/* Títol de la secció: ocultar al colapsar */
#app-sidebar.collapsed .nav-section-title[b-espvjdicsm] {
    display: none;
}

/* Logo: ocultar text al colapsar */
#app-sidebar.collapsed .logo-container[b-espvjdicsm] {
    justify-content: center;
}

/* Divisor */
#app-sidebar.collapsed .nav-divider[b-espvjdicsm] {
    margin: 0.25rem 0.5rem 0.75rem;
}

.nav-item-button[b-espvjdicsm] {
    font-family: inherit;
}

/* Form inside nav */
.nav-section form[b-espvjdicsm] {
    margin: 0;
}

/* Scrollbar */
.sidebar-nav[b-espvjdicsm]::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav[b-espvjdicsm]::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav[b-espvjdicsm]::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.sidebar-nav[b-espvjdicsm]::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar-header[b-espvjdicsm] {
        padding: 1rem;
    }

    .nav-section[b-espvjdicsm] {
        padding: 0 0.5rem;
    }
}
