/* HEADER & NAVIGATION */
.dashboard-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 10001;
    width: 100%;

    @media (max-width: 768px) {
        display: none !important;
    }

    .container {
        align-items: center;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        width: 100%;
        height: 85px;
    }

    .header-logo {
        align-items: center;
        display: flex;
        font-size: 1.7em;
        font-weight: 700;
        gap: 0.4rem;
        text-decoration: none;
        transition: var(--transition);
        white-space: nowrap;

        &:hover {
            transform: translateY(-1px);
        }

        .brand-text {
            font-size: 2.3rem;
        }
    }
}

/* NOTIFICATIONS SYSTEM */
.notification-badge,
.messenger-unread-badge {
    align-items: center;
    background: var(--accent);
    border: 2px solid var(--bg-dark);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(225, 254, 19, 0.4);
    color: var(--bg-dark);
    display: flex;
    font-size: 0.7rem;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    position: absolute;

    &:empty {
        display: none !important;
    }

    &.pulse {
        animation: badge-pulse 2s infinite;
    }
}

.notification-wrapper {
    display: inline-block;
    position: relative;

    .notification-badge,
    .messenger-unread-badge {
        right: -5px;
        top: -5px;
    }

    .notification-flyout {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        background: #1e1e2d;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
        opacity: 0;
        overflow: hidden;
        padding: 0 !important;
        position: absolute;
        right: 0;
        top: calc(100% + 15px);
        transform: translateY(-10px);
        transition: var(--transition);
        visibility: hidden;
        width: 420px;
        z-index: 1100;

        &.active {
            opacity: 1;
            transform: translateY(0);
            visibility: visible;
        }

        @media (max-width: 768px) {
            position: fixed;
            top: 85px;
            left: 1rem;
            right: 1rem;
            width: auto;
            transform: translateY(-20px);
        }

        .flyout-header {
            background: rgba(255, 255, 255, 0.02);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 0.95rem;
            font-weight: 700;
            padding: 1rem 1.2rem;
        }

        .flyout-body {
            max-height: 350px;
            overflow-y: auto;
        }

        .flyout-item {
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            cursor: pointer;
            display: flex;
            gap: 1rem;
            padding: 1rem 1.2rem;
            transition: var(--transition);

            &:last-child {
                border-bottom: none;
            }

            &:hover {
                background: rgba(255, 255, 255, 0.05);
            }

            .flyout-emoji {
                font-size: 1.5rem;
            }

            .flyout-info {
                flex: 1;
            }

            .flyout-name {
                color: #fff;
                font-size: 0.9rem;
                font-weight: 600;
                margin-bottom: 2px;
            }

            .flyout-hint {
                color: var(--text-secondary);
                font-size: 0.75rem;
            }
        }
    }

    #notification-bell-btn:hover .bell-icon {
        color: var(--accent);
        transform: rotate(15deg);
    }
}

.bell-icon {
    transition: var(--transition);
}

@keyframes badge-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(225, 254, 19, 0.7);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(225, 254, 19, 0);
        transform: scale(1.1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(225, 254, 19, 0);
        transform: scale(1);
    }
}

/* GREETING & MOBILE VIEW */
.dashboard-greeting {
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;

    @media (max-width: 768px) {
        margin-top: 1rem;
        width: 100%;
        overflow: hidden;
    }

    .show-mobile-flex {
        display: flex !important;
    }

    .header-icons {
        display: flex;
        gap: 0.5rem;
        justify-content: flex-end;
    }

    .header-logo {
        @media (max-width: 768px) {
            margin-left: 24px;
            font-size: 2.1rem;
            margin-bottom: 0 !important;

            span {
                text-align: left;
                margin: 0;
                font-size: 40px;
            }
        }
    }

    .logged-in .header-logo {
        @media (max-width: 768px) {
            margin-left: 20px;
        }
    }

    .greeting-user-name {
        display: inline;
    }

    .greeting-user-email {
        @media (max-width: 768px) {
            word-break: break-all;
        }
    }
}

/* PILL SWITCHER & TABS */
.pill-switcher-container {
    position: relative;
    width: 100%;
}

.pill-switcher-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(16, 18, 27, 0.9));
    pointer-events: none;
    z-index: 2;
    border-radius: 0 12px 12px 0;
}

.ios-pill-switcher {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding: 10px 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;

    &::-webkit-scrollbar {
        display: none !important;
    }

    .ios-pill-btn {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        background: #222538 !important;
        border: none !important;
        border-radius: 50px !important;
        padding: 12px 24px !important;
        color: #FFFFFF !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        border: 1px solid #334155 !important;

        svg {
            opacity: 0.8 !important;
            color: inherit !important;
        }

        &.active {
            background: var(--accent) !important;
            color: #14182c !important;
        }

        &.color-danger {
            color: #f87171 !important;
            border-color: rgba(239, 68, 68, 0.3) !important;
        }
    }
}

/* BUTTONS */
.circle-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background-color: var(--accent) !important;
    color: #14182c !important;
    border: none !important;
    cursor: pointer !important;
    position: relative;
    z-index: 999;
    pointer-events: auto !important;

    &:active {
        transform: scale(0.9) !important;
    }

    svg {
        width: 24px;
        height: 24px;
    }
}

/* LOGO EMOJI ENGINE (IF USED) */
.logo-emoji-container {
    align-items: center;
    display: inline-flex;
    height: 1.4em;
    overflow: hidden;
    position: relative;
    top: -3px;
    vertical-align: middle;
    width: 1.4em;

    .logo-emoji {
        display: inline-block;
        left: 0;
        position: absolute;
        text-align: center;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        width: 100%;

        &.slide-out {
            transform: translateX(-150%);
        }

        &.slide-in {
            transform: translateX(150%);
        }

        &.active {
            transform: translateX(0);
        }
    }
}