/* Centralized Topbar Styles - Force High Specificity */

/* Top bar container - Critical styles with maximum specificity */
html body .top,
html body div .top {
    position: fixed !important; 
    left: 20px !important; 
    right: 20px !important; 
    top: 20px !important; 
    height: 64px !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: space-between !important; 
    padding: 0 24px 0 0px !important; 
    z-index: 1050 !important;
    background: #000 !important; 
    color: #fff !important; 
    border: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.45) !important;
    border-radius: 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Logo styles */
.top .logo {
    height: 64px !important;
    padding: 4px 5px !important;
    background: rgb(255 255 255) !important;
    border-radius: 4px 0px 0px 4px !important;
    display: block !important;
    text-decoration: none !important;
}

.top .logo img {
    height: 55px !important;
    width: auto !important;
    display: block !important;
}

/* Spacer for flex layout */
.top .spacer {
    flex: 1 !important;
}

/* User section */
.top .user {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    color: #cdd0da !important;
}

/* Profile dropdown */
.profile-dropdown {
    position: relative !important;
    display: inline-block !important;
}

.profile-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #00ccff, #0099cc) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

.user-greeting {
    color: #fff;
    font-weight: 600;
    margin-right: 12px;
    font-size: 0.95rem;
}

.glass-login-btn {
    transition: all 0.3s ease !important;
}

.glass-login-btn:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08)) !important;
    border-color: rgba(0,204,255,0.4) !important;
}

/* Adjust main content for fixed top bar - disabled */
/* body:not([style*="padding-top"]) {
    padding-top: 100px !important;
} */

/* Ensure topbar appears above all content */
.top {
    z-index: 1050 !important;
}

/* Topbar with tabs variation */
.topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 20px !important;
    background: #000 !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.45) !important;
    z-index: 1050 !important;
}

.topbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    background: transparent;
    height: auto;
    padding: 0;
    border-radius: 0;
}

.logo-dot {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #00ccff;
    display: grid;
    place-items: center;
    color: #03140c;
    font-weight: 900;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-left: 8px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: #0e131f;
    opacity: .9;
    cursor: pointer;
}

.tab.active {
    background: linear-gradient(180deg,#141b2c,#101625);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(21,26,40,0.9);
    border: 1px solid rgba(255,255,255,.08);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
}

.primary {
    background: #00ccff;
    color: #07140f;
    font-weight: 800;
    border: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .top {
        left: 10px;
        right: 10px;
        flex-wrap: wrap;
        height: auto;
        min-height: 64px;
        padding: 10px 15px;
    }
    
    .topbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .tabs {
        margin-left: 0;
        width: 100%;
    }
    
    .user-greeting {
        display: none;
    }
}