/* ===============================
   PREMIUM SIDEBAR (Glassmorphism)
================================= */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
}

.mobile-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

.logo-mobile .logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
}

.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 0 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
}

.sidebar .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.sidebar .logo-img {
    width: 38px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(123, 39, 225, 0.4));
}

.sidebar .logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sidebar-nav li a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav li a:hover {
    background: rgba(123, 39, 225, 0.05);
    color: var(--text-main);
}

.sidebar-nav li a.active {
    background: rgba(123, 39, 225, 0.1);
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 4px 0 0 -1px var(--primary);
}

.sidebar-nav li a.active i {
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-toggle button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(123, 39, 225, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.theme-toggle button:hover {
    background: rgba(123, 39, 225, 0.1);
    color: var(--text-main);
    border-color: var(--primary);
}

.theme-toggle button i {
    font-size: 1.1rem;
    color: #fbbf24;
}

.sidebar-footer .btn-sair {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #ef4444;
    text-decoration: none;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    font-weight: 600;
    transition: all 0.3s ease;
}

.sidebar-footer .btn-sair:hover {
    background: rgba(239, 68, 68, 0.15);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* RESPONSIVIDADE */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        align-items: center;
    }
    
    .sidebar .logo-text,
    .sidebar-nav span,
    .sidebar-nav li a span {
        display: none;
    }
    
    .sidebar-header {
        padding: 0 0 24px;
        justify-content: center;
    }

    /* Em mobile, precisamos esconder os textos dos links se não couberem?
       Na verdade, em 992px (tablet) o sidebar fica só ícones. 
    */
    .sidebar-nav li a {
        padding: 14px;
        justify-content: center;
    }
    
    .sidebar-nav li a i {
        margin: 0;
    }
    
    /* Mostrar texto no hover se for Desktop, mas no tablet é melhor apenas ícones? 
       Vamos simplificar pra 992px+. Abaixo disso, o layout precisa de um MARGIN-LEFT diferente.
    */
}

@media (max-width: 768px) {
    .mobile-top-bar {
        display: flex;
    }
    .mobile-close-btn {
        display: block;
    }
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }
    .sidebar .logo-text, .sidebar-nav span {
        display: block !important;
    }
}
