/* ============================================
   SMART HEADER 3.0 — Neural Navigation
   Jewel Edition Dark Glass Header
   ============================================ */

/* === Variables === */
:root {
    --header-bg: rgba(2, 6, 23, 0.88);
    --header-blur: blur(30px) saturate(180%);
    --header-border: rgba(0, 212, 255, 0.12);
    --header-height: 64px;
    --nav-height: 48px;
    --header-total: 112px;
    --hdr-text: #e2e8f0;
    --hdr-text-muted: #94a3b8;
    --hdr-accent: #00d4ff;
    --hdr-purple: #a855f7;
    --hdr-gold: #fbbf24;
    --hdr-green: #10b981;
    --hdr-red: #ef4444;
    --hdr-pink: #ec4899;
    --hdr-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Base Header — Hard Reset (overrides main.css & design-system.css) === */
#smartHeader,
#smartHeader * {
    box-sizing: border-box;
}

/* Kill ANY external styles that apply white bg / shadow to <header> */
#smartHeader {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--hdr-transition);
}

body {
    padding-top: var(--header-total) !important;
}

/* === Toolbar (Top Bar) === */
.header-toolbar {
    background: var(--header-bg) !important;
    backdrop-filter: var(--header-blur) !important;
    -webkit-backdrop-filter: var(--header-blur) !important;
    border-bottom: 1px solid var(--header-border) !important;
    padding: 0 !important;
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: var(--hdr-transition);
    position: relative;
}

.toolbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    height: 100%;
}

/* === Toolbar Sections === */
.toolbar-start,
.toolbar-end {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* === Tool Buttons === */
.tool-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--hdr-text-muted);
    cursor: pointer;
    transition: var(--hdr-transition);
    position: relative;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tool-btn:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.15);
    color: var(--hdr-accent);
    transform: translateY(-1px);
}

.tool-btn i {
    font-size: 1rem;
}

/* === Auth Buttons === */
.auth-btn {
    text-decoration: none;
    cursor: pointer;
    transition: var(--hdr-transition);
    white-space: nowrap;
}

.auth-btn-login {
    height: 40px;
    padding: 0 1.25rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--hdr-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-btn-login:hover {
    border-color: var(--hdr-accent);
    color: var(--hdr-accent);
    background: rgba(0, 212, 255, 0.06);
    transform: translateY(-1px);
}

.auth-btn-register {
    height: 40px;
    padding: 0 1.5rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--hdr-accent), var(--hdr-purple));
    border: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.25);
}

.auth-btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 28px rgba(0, 212, 255, 0.45);
}

/* Mobile Menu Toggle - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--hdr-text-muted);
    cursor: pointer;
    transition: var(--hdr-transition);
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    border-color: rgba(0, 212, 255, 0.15);
    color: var(--hdr-accent);
    background: rgba(0, 212, 255, 0.06);
}

/* Notification Badge */
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(2, 6, 23, 0.9);
    animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    }
}

/* === Center Logo === */
.center-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    transition: var(--hdr-transition);
    z-index: 10;
}

.center-logo:hover {
    transform: translate(-50%, -50%) scale(1.03);
}

.logo-diamond {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--hdr-accent), var(--hdr-purple), var(--hdr-gold));
    background-size: 200% 200%;
    animation: logoShimmer 4s ease-in-out infinite;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.15rem;
    box-shadow:
        0 0 20px rgba(0, 212, 255, 0.2),
        0 4px 15px rgba(168, 85, 247, 0.15);
    transition: var(--hdr-transition);
}

@keyframes logoShimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.center-logo:hover .logo-diamond {
    transform: rotate(5deg) scale(1.08);
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.35),
        0 6px 25px rgba(168, 85, 247, 0.25);
}

.logo-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-name {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--hdr-accent), var(--hdr-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--hdr-text-muted);
    font-weight: 500;
}

/* === User Avatar === */
.user-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hdr-accent), var(--hdr-purple));
    border: 2px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--hdr-transition);
    text-decoration: none;
}

.user-avatar-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
}

/* === User Mega Dropdown === */
.user-dropdown-wrapper {
    position: relative;
}

.user-dropdown-menu {
    position: fixed;
    top: 76px;  /* will be overridden by JS */
    right: 12px; /* will be overridden by JS */
    left: auto;
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.97) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border-radius: 18px !important;
    border: 1px solid rgba(0, 212, 255, 0.12) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 212, 255, 0.07) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    padding: 0.5rem !important;
}

html[dir="rtl"] .user-dropdown-menu {
    right: auto;
    left: 12px;
}

.user-dropdown-wrapper:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* User Info Card */
.user-dropdown-menu .user-info-card {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(168, 85, 247, 0.08));
    border-radius: 14px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info-card .user-info-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hdr-accent), var(--hdr-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1rem;
    border: 2px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

.user-info-card .user-info-text {
    flex: 1;
    min-width: 0;
}

.user-info-card .user-info-name {
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info-card .user-info-role {
    font-size: 0.72rem;
    color: var(--hdr-accent);
    font-weight: 600;
    margin-top: 0.15rem;
}

.user-info-card .user-info-balance {
    font-size: 0.68rem;
    color: var(--hdr-text-muted);
    margin-top: 0.2rem;
}

/* Dropdown Links */
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--hdr-text) !important;
    text-decoration: none !important;
    border-radius: 10px;
    transition: var(--hdr-transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.dropdown-link:hover {
    background: rgba(0, 212, 255, 0.08) !important;
    color: var(--hdr-accent) !important;
}

.dropdown-link i {
    width: 20px;
    text-align: center;
    color: var(--hdr-text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.dropdown-link:hover i {
    color: var(--hdr-accent);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06) !important;
    margin: 0.35rem 0;
}

/* === Navigation Bar === */
.header-nav {
    background: rgba(2, 6, 23, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: none !important;
    padding: 0 !important;
    height: var(--nav-height);
    display: flex !important;
    justify-content: center;
    align-items: center;
    transition: height 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, max-height 0.35s ease;
    overflow: hidden;
}

.nav-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 100%;
}

/* Nav Pills */
.nav-pill {
    padding: 0.45rem 1rem;
    border-radius: 10px;
    color: var(--hdr-text-muted) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--hdr-transition);
    position: relative;
    overflow: visible;
    white-space: nowrap;
    border: 1px solid transparent;
    background: transparent !important;
}

.nav-pill::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--hdr-accent);
    border-radius: 2px;
    transition: width 0.3s ease;
    opacity: 0;
    z-index: 1;
}

.nav-pill:hover {
    color: var(--hdr-text) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.06);
    transform: none !important;
    box-shadow: none !important;
}

.nav-pill:hover::before {
    width: 60%;
    opacity: 1;
}

.nav-pill.active {
    color: var(--hdr-accent) !important;
    background: rgba(0, 212, 255, 0.08) !important;
    border-color: rgba(0, 212, 255, 0.15) !important;
    transform: none !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.08) !important;
}

.nav-pill.active::before {
    width: 80%;
    opacity: 1;
    background: var(--hdr-accent);
}

/* Hot/Featured pill override */
.nav-pill.nav-hot {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(239, 68, 68, 0.15)) !important;
    border-color: rgba(249, 115, 22, 0.25) !important;
    color: #fb923c !important;
}

.nav-pill.nav-hot:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(239, 68, 68, 0.25)) !important;
    color: #fdba74 !important;
}

.nav-pill i {
    font-size: 0.85rem;
}

/* === Scrolled State === */
#smartHeader.scrolled .header-toolbar {
    background: rgba(2, 6, 23, 0.98) !important;
    box-shadow: none !important;
    border-bottom: 1px solid #10BCE8 !important;
    height: 56px;
}

#smartHeader.scrolled .header-nav {
    height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* === Command Palette Overlay === */
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cmd-palette-overlay.active {
    display: flex;
    animation: cmdFadeIn 0.25s forwards;
}

@keyframes cmdFadeIn {
    to {
        opacity: 1;
    }
}

.cmd-palette {
    width: 90%;
    max-width: 580px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 20px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 212, 255, 0.08);
    overflow: hidden;
    animation: cmdSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cmdSlideIn {
    from {
        transform: translateY(-20px) scale(0.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.cmd-palette-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cmd-palette-header i {
    color: var(--hdr-accent);
    font-size: 1.1rem;
}

.cmd-palette-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
}

.cmd-palette-input::placeholder {
    color: var(--hdr-text-muted);
}

.cmd-palette-kbd {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    color: var(--hdr-text-muted);
    font-weight: 700;
}

.cmd-palette-body {
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cmd-palette-body::-webkit-scrollbar {
    width: 4px;
}

.cmd-palette-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.cmd-group-label {
    padding: 0.5rem 0.75rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hdr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--hdr-text);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.cmd-item:hover,
.cmd-item.focused {
    background: rgba(0, 212, 255, 0.08);
}

.cmd-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.cmd-item-icon.ci-cyan {
    background: linear-gradient(135deg, #00d4ff, #0891b2);
}

.cmd-item-icon.ci-purple {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.cmd-item-icon.ci-gold {
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

.cmd-item-icon.ci-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.cmd-item-icon.ci-pink {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.cmd-item-icon.ci-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.cmd-item-icon.ci-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.cmd-item-text {
    flex: 1;
}

.cmd-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hdr-text);
}

.cmd-item-desc {
    font-size: 0.7rem;
    color: var(--hdr-text-muted);
    margin-top: 0.1rem;
}

.cmd-palette-footer {
    padding: 0.65rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--hdr-text-muted);
}

.cmd-palette-footer kbd {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.15rem 0.35rem;
    font-size: 0.65rem;
    color: var(--hdr-text-muted);
    margin: 0 0.15rem;
}

/* === Notifications Dropdown Override === */
.notifications-dropdown-menu {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(0, 212, 255, 0.12) !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* === Mobile Menu === */
@media (max-width: 1024px) {
    :root {
        --header-total: 64px;
    }

    .header-nav {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .logo-brand {
        display: none;
    }

    .center-logo {
        position: static;
        transform: none;
    }

    .center-logo:hover {
        transform: scale(1.03);
    }

    .toolbar-container {
        justify-content: space-between;
    }

    .toolbar-start,
    .toolbar-end {
        flex: 1;
    }

    .toolbar-end {
        justify-content: flex-end;
    }

    /* Hamburger: push to absolute far right on mobile */
    .mobile-menu-toggle {
        margin-right: 0 !important;
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .toolbar-container {
        padding: 0 1rem;
    }

    .logo-diamond {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        border-radius: 11px;
    }

    .tool-btn {
        height: 36px;
        padding: 0 0.75rem;
        font-size: 0.85rem;
        gap: 0.35rem;
    }

    .auth-btn-login,
    .auth-btn-register {
        width: 36px;
        height: 36px;
        padding: 0;
        font-size: 0.75rem;
        gap: 0;
    }
}

/* === Mobile Auth Block (inside side menu) === */
.mobile-auth-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    margin-bottom: 1rem;
}

.mobile-auth-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--hdr-accent), var(--hdr-purple));
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
    transition: var(--hdr-transition);
}

.mobile-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.45);
    color: white;
}

.mobile-auth-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--hdr-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--hdr-transition);
}

.mobile-auth-secondary:hover {
    border-color: var(--hdr-accent);
    color: var(--hdr-accent);
    background: rgba(0, 212, 255, 0.06);
}

/* === Mobile Menu Dark === */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(30px);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 212, 255, 0.1);
}

.mobile-menu-overlay.active .mobile-menu-content {
    left: 0;
}

.mobile-menu-header {
    padding: 1.25rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 85, 247, 0.05));
}

.mobile-menu-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
}

.close-mobile-menu {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    color: var(--hdr-text-muted);
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: var(--hdr-transition);
}

.close-mobile-menu:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--hdr-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.mobile-menu-links {
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    color: var(--hdr-text) !important;
    text-decoration: none !important;
    border-radius: 12px;
    margin-bottom: 0.2rem;
    transition: var(--hdr-transition);
    font-weight: 600;
    font-size: 0.88rem;
}

.mobile-link:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--hdr-accent) !important;
}

.mobile-link i {
    width: 22px;
    text-align: center;
    color: var(--hdr-text-muted);
    font-size: 1rem;
}

.mobile-link:hover i {
    color: var(--hdr-accent);
}

.mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.5rem 0;
}

/* Search hint in toolbar */
.search-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--hdr-text-muted);
    cursor: pointer;
    transition: var(--hdr-transition);
    font-size: 0.82rem;
    font-weight: 500;
}

.search-hint:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.15);
    color: var(--hdr-accent);
}

.search-hint i {
    font-size: 0.9rem;
}

.search-hint span {
    font-size: 0.78rem;
}

.search-hint .search-kbd {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    margin-right: 0.25rem;
}

@media (max-width: 768px) {

    .search-hint span,
    .search-hint .search-kbd {
        display: none;
    }
}

/* ============================================
   HEADER INTELLIGENCE — 6 Genius Features
   ============================================ */

/* === 1. Role Ambient Glow === */
.smart-header[data-role="admin"] .header-toolbar {
    border-bottom-color: rgba(168, 85, 247, 0.35) !important;
    box-shadow: 0 2px 20px rgba(168, 85, 247, 0.1);
}

.smart-header[data-role="talent"] .header-toolbar {
    border-bottom-color: rgba(0, 212, 255, 0.35) !important;
    box-shadow: 0 2px 20px rgba(0, 212, 255, 0.1);
}

.smart-header[data-role="business"] .header-toolbar {
    border-bottom-color: rgba(251, 191, 36, 0.35) !important;
    box-shadow: 0 2px 20px rgba(251, 191, 36, 0.1);
}

.smart-header[data-role="client"] .header-toolbar {
    border-bottom-color: rgba(16, 185, 129, 0.35) !important;
    box-shadow: 0 2px 20px rgba(16, 185, 129, 0.1);
}

.smart-header[data-role="studio_owner"] .header-toolbar {
    border-bottom-color: rgba(236, 72, 153, 0.35) !important;
    box-shadow: 0 2px 20px rgba(236, 72, 153, 0.1);
}

/* === SCROLLED OVERRIDE — overrides ALL role-based styles === */
#smartHeader.scrolled .header-toolbar,
#smartHeader.scrolled[data-role="admin"] .header-toolbar,
#smartHeader.scrolled[data-role="talent"] .header-toolbar,
#smartHeader.scrolled[data-role="business"] .header-toolbar,
#smartHeader.scrolled[data-role="client"] .header-toolbar,
#smartHeader.scrolled[data-role="studio_owner"] .header-toolbar {
    background: rgba(2, 6, 23, 0.98) !important;
    box-shadow: none !important;
    border-bottom: 1px solid #10BCE8 !important;
    border-bottom-color: #10BCE8 !important;
    height: 56px;
}

/* Ambient glow animation on nav bar */
.smart-header[data-role="admin"] .header-nav {
    border-bottom-color: rgba(168, 85, 247, 0.15) !important;
}

.smart-header[data-role="talent"] .header-nav {
    border-bottom-color: rgba(0, 212, 255, 0.15) !important;
}

.smart-header[data-role="business"] .header-nav {
    border-bottom-color: rgba(251, 191, 36, 0.15) !important;
}

.smart-header[data-role="client"] .header-nav {
    border-bottom-color: rgba(16, 185, 129, 0.15) !important;
}

/* === 2. Profile Completion Ring === */
.avatar-ring-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.avatar-ring-wrapper .user-avatar-btn {
    width: 34px;
    height: 34px;
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 0.8rem;
    border: none;
    box-shadow: none;
}

.avatar-ring-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    transform: rotate(-90deg);
}

.avatar-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 2.5;
}

.avatar-ring-progress {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease, stroke 0.3s ease;
}

.avatar-ring-progress.ring-green {
    stroke: var(--hdr-green);
}

.avatar-ring-progress.ring-orange {
    stroke: #f59e0b;
}

.avatar-ring-progress.ring-red {
    stroke: var(--hdr-red);
}

.avatar-ring-wrapper:hover .avatar-ring-progress {
    filter: drop-shadow(0 0 4px currentColor);
}

/* Profile completion tooltip */
.profile-completion-tip {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.avatar-ring-wrapper:hover .profile-completion-tip {
    opacity: 1;
    visibility: visible;
}

/* === 3. Wallet Balance in Dropdown === */
.user-info-balance {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

.user-info-balance i {
    font-size: 0.65rem;
}

.balance-positive {
    color: var(--hdr-green) !important;
}

.balance-zero {
    color: var(--hdr-text-muted) !important;
}

/* === 4. Smart Nav Badges === */
.nav-badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid rgba(2, 6, 23, 0.9);
    animation: navDotPulse 2.5s infinite ease-in-out;
}

.nav-badge-dot.dot-cyan {
    background: var(--hdr-accent);
}

.nav-badge-dot.dot-orange {
    background: #f97316;
}

.nav-badge-dot.dot-green {
    background: var(--hdr-green);
}

.nav-badge-dot.dot-red {
    background: var(--hdr-red);
}

@keyframes navDotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* === 5. Live Activity Pulse === */
.activity-pulse {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--hdr-green);
    white-space: nowrap;
}

.activity-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hdr-green);
    animation: liveDot 1.5s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes liveDot {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
    }

    50% {
        opacity: 0.5;
        box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
    }
}

@media (max-width: 768px) {
    .activity-pulse span {
        display: none;
    }

    .activity-pulse {
        padding: 0.25rem 0.4rem;
        min-width: 0;
    }
}

/* === 6. Command Palette Instant Answer === */
.cmd-instant-answer {
    margin: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.cmd-instant-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--hdr-green), #059669);
}

.cmd-instant-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.cmd-instant-label {
    font-size: 0.72rem;
    color: var(--hdr-text-muted);
    font-weight: 500;
}