/* Lifted verbatim from templates/base.html. Edit here, not there.
   Load position in base.html is load-bearing: see the note at the
   <link> that pulls this file in. */
/* --- base.html line 389 --- */
/* ── Notification System ── */
    .notif-container { position: relative; display: inline-flex; align-items: center; }

    /* Bell Button */
    .notif-bell-btn {
        background: none; border: none; padding: 0; cursor: pointer;
        position: relative; color: #475569; font-size: 1rem;
        display: flex; align-items: center; justify-content: center;
        width: 32px; height: 32px; border-radius: 8px;
        transition: all 0.2s cubic-bezier(.4,0,.2,1);
    }
    .notif-bell-btn:hover { background: #f1f5f9; color: #1e293b; transform: scale(1.05); }
    .nav-pill-btn { width: auto !important; padding: 0.3rem 0.65rem !important; border-radius: 999px !important; background: #f1f5f9 !important; }
    .nav-pill-btn:hover { background: #e2e8f0 !important; color: #1e293b !important; transform: none !important; }
    .nav-pill-btn.active { background: #eff6ff !important; color: #2563eb !important; }
    [data-theme="dark"] .nav-pill-btn { background: #1e293b !important; color: #cbd5e1 !important; }
    [data-theme="dark"] .nav-pill-btn:hover { background: #334155 !important; color: #f1f5f9 !important; }
    [data-theme="dark"] .nav-pill-btn.active { background: rgba(59,130,246,0.15) !important; color: #60a5fa !important; }
    .nav-review-cta { background: #059669 !important; color: #fff !important; font-weight: 600 !important; border-radius: 999px !important; width: auto !important; padding: 0.3rem 0.75rem !important; border: none !important; cursor: pointer; }
    .nav-review-cta:hover { background: #047857 !important; color: #fff !important; transform: none !important; }
    .nav-review-cta i { font-size: 0.78rem; }
    .notif-bell-btn.active { background: #eff6ff; color: #2563eb; }
    .core-features-menu-container {
        position: relative;
        display: inline-flex;
        align-items: center;
    }
    .core-features-toggle i { font-size: 0.9rem; }
    .waffle-dots {
        display: grid;
        grid-template-columns: repeat(3, 4px);
        grid-template-rows: repeat(3, 4px);
        gap: 3px;
        width: 18px;
        height: 18px;
    }
    .waffle-dots span {
        width: 4px;
        height: 4px;
        background: currentColor;
        border-radius: 50%;
        display: block;
        opacity: 0.85;
        transition: opacity 0.15s;
    }
    .core-features-toggle:hover .waffle-dots span { opacity: 1; }
    .core-features-toggle.active .waffle-dots span { opacity: 1; }
    .core-features-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: 240px;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        padding: 0.45rem;
        z-index: 9999;
    }
    .core-features-dropdown.open { display: block; }
    .core-features-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }
    .core-feature-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 0.28rem;
        padding: 0.55rem 0.5rem;
        min-height: 66px;
        border-radius: 8px;
        color: #334155;
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 700;
        transition: background 0.15s ease, color 0.15s ease;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
    }
    .core-feature-item i {
        width: 18px;
        text-align: center;
        color: #64748b;
        font-size: 0.8rem;
    }
    .core-feature-label { line-height: 1.1; }
    .core-feature-tag {
        display: inline-block;
        margin-top: 0.08rem;
        padding: 0.08rem 0.34rem;
        border-radius: 999px;
        font-size: 0.52rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        background: #e0e7ff;
        color: #3730a3;
    }
    .core-feature-item.is-insight {
        border-color: #c7d2fe;
        background: #eef2ff;
    }
    .core-feature-item:hover {
        background: #eff6ff;
        color: #1d4ed8;
        border-color: #bfdbfe;
    }
    .core-feature-item:hover i { color: #1d4ed8; }
    .core-features-title {
        font-size: 0.65rem;
        color: #94a3b8;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin: 0 0 0.35rem;
        padding: 0 0.2rem;
    }
    /* DM Message Button */
    .dm-bell-btn { color: #475569; }
    .dm-bell-btn:hover { color: #2563eb; }
    /* Desktop-only navigation buttons (Home, Explore, Dashboard) */
    .desktop-only-nav { display: none; }
    /* Nav labels: hidden on mobile, shown on desktop */
    .nav-label { display: none; }
    /* Guest profile button: circle + icon only on mobile */
    .notif-bell-btn.guest-profile-btn {
        border-radius: 50% !important;
        background: #f1f5f9 !important;
        border: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        line-height: 1 !important;
    }
    .notif-bell-btn.guest-profile-btn i {
        line-height: 1;
        display: block;
        transform: translate(1px, 1px);
    }
    [data-theme="dark"] .notif-bell-btn.guest-profile-btn {
        background: #1e293b !important;
    }
    @media (min-width: 769px) {
        .desktop-only-nav { display: flex; }
        .nav-label {
            display: inline;
            font-size: 0.72rem;
            font-weight: 500;
            margin-left: 0.25rem;
            white-space: nowrap;
        }
        /* Widen buttons on desktop to fit icon + label */
        .notif-bell-btn.desktop-only-nav,
        .notif-bell-btn.dm-bell-btn,
        .notif-container .notif-bell-btn {
            width: auto;
            padding: 0.3rem 0.6rem;
            gap: 0.2rem;
        }
        .notif-bell-btn.desktop-only-nav i,
        .notif-bell-btn.dm-bell-btn i,
        .notif-container .notif-bell-btn i {
            font-size: 0.85rem;
        }
        /* Guest profile button: pill with icon at edge + label */
        .notif-bell-btn.guest-profile-btn {
            width: auto !important;
            height: 32px !important;
            padding: 3px 14px 3px 3px !important;
            gap: 0.4rem !important;
            border-radius: 999px !important;
            border: none !important;
            background: #f1f5f9 !important;
            align-items: center !important;
            justify-content: flex-start !important;
        }
        .notif-bell-btn.guest-profile-btn:hover {
            background: #e2e8f0 !important;
        }
        .notif-bell-btn.guest-profile-btn i {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 26px !important;
            height: 26px !important;
            border-radius: 50% !important;
            background: #cbd5e1 !important;
            color: #475569 !important;
            font-size: 0.82rem !important;
            flex-shrink: 0 !important;
            line-height: 1 !important;
        }
        .notif-bell-btn.guest-profile-btn .nav-label {
            display: inline !important;
            font-size: 0.72rem;
            font-weight: 600;
            white-space: nowrap;
        }
        /* Profile button: circle/icon-only on desktop for logged-in users */
        .profile-avatar-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            padding: 0;
            gap: 0;
        }
        .profile-avatar-btn.has-photo {
            padding: 0;
            overflow: hidden;
        }
        .profile-avatar-btn img {
            width: 100%;
            height: 100%;
            flex-shrink: 0;
        }
        .profile-avatar-btn .avatar-fallback-icon {
            width: auto;
            height: auto;
            font-size: 0.85rem;
        }
    }
    /* Mobile Header Search Bar - compact inline */
    .mobile-header-search {
        display: none;
        align-items: center;
        flex: 1;
        max-width: 200px;
        min-width: 0;
        background: #f1f5f9;
        border-radius: 20px;
        padding: 0 0.5rem;
        height: 32px;
        margin: 0 0.25rem;
        transition: all 0.2s ease;
        border: 1.5px solid transparent;
    }
    .mobile-header-search:focus-within {
        background: #fff;
        border-color: #10b981;
        box-shadow: none;
    }
    .mobile-header-search-icon {
        color: #94a3b8;
        font-size: 0.7rem;
        flex-shrink: 0;
        margin-right: 0.3rem;
        transition: color 0.2s;
    }
    .mobile-header-search:focus-within .mobile-header-search-icon { color: #10b981; }
    .mobile-header-search-input {
        flex: 1;
        border: none;
        background: none;
        outline: none;
        -webkit-appearance: none;
        font-size: 16px;
        color: #1e293b;
        padding: 0;
        min-width: 0;
        height: 100%;
        border-radius: 20px;
    }
    .mobile-header-search-input::placeholder { color: #94a3b8; font-size: 0.7rem; }
    @media (max-width: 768px) {
        .mobile-header-search { display: flex; }
    }
    @media (max-width: 360px) {
        .mobile-header-search { max-width: 140px; }
        .mobile-header-search-input::placeholder { font-size: 0.65rem; }
    }

    /* Bottom Navigation - Mobile Only */
    .bottom-nav {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9990;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    }
    .bottom-nav.hidden { transform: translateY(100%); }
    @media (max-width: 768px) {
        .bottom-nav { display: flex; }
        /* Hide header DM & notifications on mobile when bottom nav handles them */
        .has-bottom-nav .dm-bell-btn,
        .has-bottom-nav #notifications-container {
            display: none !important;
        }
        /* Keep auth-buttons on the right */
        .has-bottom-nav .auth-buttons {
            flex-shrink: 0 !important;
            min-width: 0 !important;
        }
        .has-bottom-nav .logo {
            margin-right: auto !important;
        }
        /* Padding only when bottom nav is visible */
        .has-bottom-nav.bottom-nav-visible main { padding-bottom: 64px; }
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.1rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
        color: #94a3b8;
        text-decoration: none;
        background: none;
        border: none;
        cursor: pointer;
        transition: color 0.2s ease;
        position: relative;
        -webkit-tap-highlight-color: transparent;
        min-width: 48px;
    }
    .bottom-nav-item i {
        font-size: 1.15rem;
        transition: transform 0.2s ease;
    }
    .bottom-nav-item span { font-weight: 500; letter-spacing: 0.01em; }
    .bottom-nav-item.active { color: #10b981; }
    .bottom-nav-item.active i { transform: scale(1.1); }
    .bottom-nav-item:hover { color: #10b981; }
    .bottom-nav-live i{color:#ef4444;}
    .bottom-nav-live.active{color:#ef4444;}
    .bottom-nav-live.active i{color:#ef4444;}
    .bottom-nav-avatar {
        width: 22px; height: 22px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid transparent;
        transition: border-color 0.2s ease;
    }
    .bottom-nav-item.active .bottom-nav-avatar { border-color: #10b981; }
    .bottom-nav-badge {
        position: absolute;
        top: 0; right: 50%; transform: translateX(calc(50% + 10px));
        background: #ef4444; color: #fff;
        font-size: 0.55rem; font-weight: 700;
        min-width: 16px; height: 16px; line-height: 16px;
        border-radius: 10px; padding: 0 4px;
        text-align: center;
        border: 2px solid #fff;
    }

    /* Badge */
    .notif-badge {
        position: absolute; top: 1px; right: 1px;
        background: #ef4444; color: white; border-radius: 10px;
        min-width: 16px; height: 16px; padding: 0 4px;
        font-size: 0.6rem; font-weight: 700; line-height: 16px; text-align: center;
        border: 2px solid white;
        transform: scale(0); transition: transform 0.25s cubic-bezier(.68,-.55,.27,1.55);
        pointer-events: none;
    }
    .notif-badge.visible { transform: scale(1); }

    /* Overlay (mobile) */
    .notif-overlay {
        display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.4);
        z-index: 9998; opacity: 0; transition: opacity 0.25s ease;
        backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    }
    .notif-overlay.open { display: block; opacity: 1; }

    /* Dropdown Panel */
    .notif-dropdown {
        display: none; position: fixed; top: 52px; right: 16px;
        background: white; border-radius: 14px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
        width: 400px; max-width: calc(100vw - 32px);
        max-height: calc(100vh - 70px);
        z-index: 9999; overflow: hidden;
        transform: translateY(-8px) scale(0.97); opacity: 0;
        transition: transform 0.25s cubic-bezier(.4,0,.2,1), opacity 0.2s ease;
        display: flex; flex-direction: column;
    }
    .notif-dropdown:not(.open) { display: none !important; }
    .notif-dropdown.open {
        display: flex !important;
        transform: translateY(0) scale(1); opacity: 1;
    }

    /* Header */
    .notif-header {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0.875rem 1rem;
        border-bottom: 1px solid #f1f5f9;
        background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
        flex-shrink: 0;
    }
    .notif-header-left { display: flex; align-items: center; gap: 0.5rem; }
    .notif-title { font-size: 0.9375rem; font-weight: 700; color: #0f172a; margin: 0; letter-spacing: -0.01em; }
    .notif-header-count {
        font-size: 0.6875rem; font-weight: 600; color: #2563eb;
        background: #eff6ff; padding: 0.125rem 0.5rem; border-radius: 10px;
    }
    .notif-header-count:empty { display: none; }
    .notif-header-actions { display: flex; align-items: center; gap: 0.25rem; }
    .notif-mark-read-btn {
        background: none; border: none; cursor: pointer;
        color: #64748b; font-size: 0.75rem; font-weight: 500;
        padding: 0.3rem 0.5rem; border-radius: 6px;
        display: flex; align-items: center; gap: 0.3rem;
        transition: all 0.15s;
    }
    .notif-mark-read-btn:hover { background: #eff6ff; color: #2563eb; }
    .notif-mark-read-btn span { display: inline; }
    .notif-close-btn {
        background: none; border: none; cursor: pointer;
        color: #94a3b8; font-size: 0.8rem;
        width: 28px; height: 28px; border-radius: 6px;
        display: none; align-items: center; justify-content: center;
        transition: all 0.15s;
    }
    .notif-close-btn:hover { background: #fee2e2; color: #ef4444; }

    /* Notifications List */
    .notif-list {
        flex: 1; overflow-y: auto; overscroll-behavior: contain;
        scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent;
    }
    .notif-list::-webkit-scrollbar { width: 5px; }
    .notif-list::-webkit-scrollbar-track { background: transparent; }
    .notif-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

    /* Empty State */
    .notif-empty {
        padding: 2.5rem 1.5rem; text-align: center;
        display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    }
    .notif-empty-icon {
        width: 56px; height: 56px; border-radius: 50%;
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        display: flex; align-items: center; justify-content: center;
        margin-bottom: 0.25rem;
    }
    .notif-empty-icon i { font-size: 1.25rem; color: #93c5fd; }
    .notif-empty h4 { font-size: 0.875rem; font-weight: 600; color: #334155; margin: 0; }
    .notif-empty p { font-size: 0.75rem; color: #94a3b8; margin: 0; line-height: 1.5; }

    /* Loading */
    .notif-loading { padding: 2.5rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
    .notif-loading-spinner {
        width: 28px; height: 28px; border: 2.5px solid #e2e8f0;
        border-top-color: #3b82f6; border-radius: 50%;
        animation: notifSpin 0.7s linear infinite;
    }
    .notif-loading p { font-size: 0.75rem; color: #94a3b8; margin: 0; }
    @keyframes notifSpin { to { transform: rotate(360deg); } }

    /* Notification Item */
    .notif-item {
        display: flex; gap: 0.75rem; padding: 0.75rem 1rem;
        cursor: pointer; transition: all 0.2s ease;
        border-bottom: 1px solid #f8fafc; position: relative;
        animation: notifSlideIn 0.3s ease forwards; opacity: 0;
    }
    @keyframes notifSlideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
    .notif-item:last-child { border-bottom: none; }
    .notif-item:hover { background: #f8fafc; }
    .notif-item.unread { background: #fafbff; }
    .notif-item.unread:hover { background: #f0f4ff; }
    .notif-item.unread::before {
        content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
        background: #10b981;
        border-radius: 0 3px 3px 0;
    }

    /* Item Icon */
    .notif-item-icon {
        flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.8rem; transition: transform 0.15s;
    }
    .notif-item:hover .notif-item-icon { transform: scale(1.05); }

    /* Item Body */
    .notif-item-body { flex: 1; min-width: 0; }
    .notif-item-top { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.15rem; }
    .notif-item-title {
        font-size: 0.8rem; font-weight: 600; color: #1e293b;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .notif-item.read .notif-item-title { font-weight: 500; color: #475569; }
    .notif-unread-dot {
        width: 7px; height: 7px; background: #3b82f6; border-radius: 50%; flex-shrink: 0;
        animation: notifPulse 2s ease-in-out infinite;
    }
    @keyframes notifPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
    .notif-item.read .notif-unread-dot { display: none; }
    .notif-item-msg {
        font-size: 0.75rem; color: #64748b; margin: 0 0 0.3rem 0; line-height: 1.45;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .notif-action-link { color: #3b82f6; font-weight: 600; text-decoration: none; }
    .notif-action-link:hover { text-decoration: underline; }
    .notif-item-meta { display: flex; justify-content: space-between; align-items: center; }
    .notif-item-time { font-size: 0.6875rem; color: #94a3b8; display: flex; align-items: center; gap: 0.25rem; }
    .notif-item-time i { font-size: 0.6rem; }
    .notif-delete-btn {
        background: none; border: none; cursor: pointer; color: #cbd5e1;
        padding: 0.2rem; font-size: 0.65rem; border-radius: 4px;
        opacity: 0; transition: all 0.15s;
    }
    .notif-item:hover .notif-delete-btn { opacity: 1; }
    .notif-delete-btn:hover { color: #ef4444; background: #fef2f2; }

    /* Footer */
    .notif-footer {
        padding: 0.625rem 1rem; border-top: 1px solid #f1f5f9;
        text-align: center; flex-shrink: 0;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    }
    .notif-view-all {
        color: #3b82f6; font-size: 0.75rem; font-weight: 600;
        text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem;
        padding: 0.3rem 0.75rem; border-radius: 6px; transition: all 0.15s;
    }
    .notif-view-all:hover { background: #eff6ff; }
    .notif-view-all i { font-size: 0.6rem; transition: transform 0.15s; }
    .notif-view-all:hover i { transform: translateX(2px); }

    /* ── Mobile (≤640px): full-screen slide-up panel ── */
    @media (max-width: 640px) {
        .notif-dropdown {
            position: fixed; top: auto; bottom: 0; left: 0; right: 0;
            width: 100%; max-width: 100%;
            max-height: 85vh; border-radius: 18px 18px 0 0;
            transform: translateY(100%); opacity: 1;
            transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        }
        .notif-dropdown.open { transform: translateY(0); }
        .notif-close-btn { display: flex; }
        .notif-mark-read-btn span { display: none; }
        .notif-header { padding: 0.75rem 1rem; }
        .notif-header::before {
            content: ''; display: block; position: absolute; top: 8px;
            left: 50%; transform: translateX(-50%);
            width: 36px; height: 4px; border-radius: 2px; background: #e2e8f0;
        }
        .notif-header { position: relative; padding-top: 1.25rem; }
        .notif-item-icon { width: 32px; height: 32px; font-size: 0.75rem; }
        .notif-delete-btn { opacity: 1; }
    }

    /* ── Tablet (641px–1024px) ── */
    @media (min-width: 641px) and (max-width: 1024px) {
        .notif-dropdown { width: 380px; right: 8px; }
    }

    /* ── Profile Avatar Dropdown ── */
    .profile-menu-container {
        position: relative;
        display: inline-flex;
        align-items: center;
    }

    .profile-avatar-btn {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: #f0f2f5;
        color: #b0b8c4;
        border: 2px solid #e2e8f0;
        font-size: 0.75rem;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        padding: 0;
        line-height: 1;
        text-transform: uppercase;
    }

    .profile-avatar-btn.has-photo {
        background: #fff;
        padding: 0;
        overflow: hidden;
    }

    .profile-avatar-btn img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        display: block;
    }
    .avatar-fallback-icon {
        width: 100%;
        height: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .profile-avatar-btn:hover {
        border-color: #3b82f6;
        transform: scale(1.08);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    }

    .profile-avatar-btn.active {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

    .profile-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
        width: 220px;
        z-index: 9999;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .profile-dropdown.open {
        display: block;
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    .profile-dropdown-header {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        padding: 0.875rem 1rem;
        background: #f8fafc;
    }

    .profile-dropdown-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #f0f2f5;
        color: #b0b8c4;
        font-size: 0.875rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        text-transform: uppercase;
        overflow: hidden;
    }

    .profile-dropdown-avatar.has-photo {
        background: #fff;
    }

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

    .profile-dropdown-info {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .profile-dropdown-name {
        font-size: 0.8125rem;
        font-weight: 600;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profile-dropdown-type {
        font-size: 0.6875rem;
        color: #64748b;
        font-weight: 500;
    }

    .profile-dropdown-divider {
        height: 1px;
        background: #f1f5f9;
    }

    .profile-dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        padding: 0.625rem 1rem;
        color: #334155;
        text-decoration: none;
        font-size: 0.8125rem;
        font-weight: 500;
        transition: all 0.15s ease;
    }

    .profile-dropdown-item:hover {
        background: #f1f5f9;
        color: #0f172a;
    }

    .profile-dropdown-item i {
        width: 16px;
        text-align: center;
        font-size: 0.8rem;
        color: #64748b;
        flex-shrink: 0;
    }

    .profile-dropdown-item:hover i {
        color: #3b82f6;
    }

    .profile-dropdown-logout {
        color: #dc2626;
    }

    .profile-dropdown-logout i {
        color: #dc2626;
    }

    .profile-dropdown-logout:hover {
        background: #fef2f2;
        color: #b91c1c;
    }

    .profile-dropdown-logout:hover i {
        color: #b91c1c;
    }

    /* ── Header Search: Light base, Dark override ── */
    .header-search-box,
    #headerSearch .header-search-box,
    header .header-search-box,
    .header-search-dashboard-style .header-search-box {
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
    }
    .header-search-input,
    #headerSearch .header-search-input,
    header .header-search-input,
    .header-search-box input {
        background: transparent !important;
        color: #0f172a !important;
    }
    .header-search-input::placeholder,
    .header-search-box input::placeholder {
        color: #94a3b8 !important;
    }
    .header-search-btn,
    .header-search-box button {
        color: #64748b !important;
    }
    [data-theme="dark"] .header-search-box,
    [data-theme="dark"] #headerSearch .header-search-box,
    [data-theme="dark"] header .header-search-box,
    [data-theme="dark"] .header-search-dashboard-style .header-search-box {
        background: #0f172a !important;
        border-color: #1e293b !important;
    }
    [data-theme="dark"] .header-search-input,
    [data-theme="dark"] #headerSearch .header-search-input,
    [data-theme="dark"] .header-search-box input {
        color: #f1f5f9 !important;
    }
    [data-theme="dark"] .header-search-input::placeholder,
    [data-theme="dark"] .header-search-box input::placeholder {
        color: #64748b !important;
    }
    [data-theme="dark"] .header-search-btn,
    [data-theme="dark"] .header-search-box button {
        color: #94a3b8 !important;
    }

    /* ── Dark Theme Overrides for Inline Styles ── */
    [data-theme="dark"] .notif-bell-btn { color: #cbd5e1; }
    [data-theme="dark"] .notif-bell-btn:hover { background: #334155; color: #f1f5f9; }
    [data-theme="dark"] .notif-bell-btn.active { background: rgba(59,130,246,0.15); color: #60a5fa; }
    [data-theme="dark"] .notif-bell-btn.guest-profile-btn { background: #1e293b !important; color: #cbd5e1; border: none !important; }
    [data-theme="dark"] .notif-bell-btn.guest-profile-btn:hover { background: #334155 !important; color: #f1f5f9; }
    @media (min-width: 769px) {
        [data-theme="dark"] .notif-bell-btn.guest-profile-btn i { background: #334155 !important; color: #94a3b8 !important; }
    }
    [data-theme="dark"] .core-features-dropdown { background: #1e293b; border-color: #334155; }
    [data-theme="dark"] .core-features-title { color: #64748b; }
    [data-theme="dark"] .core-feature-item { color: #cbd5e1; }
    [data-theme="dark"] .core-feature-item i { color: #94a3b8; }
    [data-theme="dark"] .core-feature-item { background: #0f172a; border-color: #334155; }
    [data-theme="dark"] .core-feature-item:hover { background: #334155; color: #f1f5f9; border-color: #475569; }
    [data-theme="dark"] .core-feature-item.is-insight { background: rgba(55, 48, 163, 0.25); border-color: rgba(129, 140, 248, 0.45); }
    [data-theme="dark"] .core-feature-tag { background: rgba(129, 140, 248, 0.2); color: #c7d2fe; }
    [data-theme="dark"] .dm-bell-btn { color: #cbd5e1; }
    [data-theme="dark"] .mobile-header-search { background: #1e293b; }
    [data-theme="dark"] .mobile-header-search:focus-within { background: #1e293b; border-color: var(--primary-green); }
    [data-theme="dark"] .mobile-header-search-input { color: #f1f5f9; }
    /* ── Autocomplete dropdown dark theme (missing from style.min.css) ── */
    [data-theme="dark"] .ac-divider { background: #1e293b; }
    [data-theme="dark"] .ac-footer { border-top-color: #1e293b; background: #0d1829; }
    [data-theme="dark"] .ac-footer-btn-primary { color: #60a5fa; }
    [data-theme="dark"] .ac-footer-btn-primary:hover { background: rgba(37,99,235,0.15); border-color: rgba(37,99,235,0.3); }
    [data-theme="dark"] .ac-footer-btn-secondary { color: #94a3b8; }
    [data-theme="dark"] .ac-footer-btn-secondary:hover { background: #1e293b; border-color: #334155; color: #e2e8f0; }
    [data-theme="dark"] .ac-section-label { color: #475569; }
    [data-theme="dark"] .ac-popular-header { background: linear-gradient(135deg, #0a1f10 0%, #0d2318 100%); border-bottom-color: #14532d; }
    [data-theme="dark"] .ac-popular-header-text { color: #6ee7b7; }
    [data-theme="dark"] .ac-type-person { background: rgba(124,58,237,0.2); color: #c4b5fd; }
    [data-theme="dark"] .ac-type-post { background: rgba(37,99,235,0.2); color: #93c5fd; }
    [data-theme="dark"] .ac-meta-cat { background: #1e293b; color: #94a3b8; }
    [data-theme="dark"] .ac-empty { color: #64748b; }
    [data-theme="dark"] .ac-empty-icon { color: #1e293b; }
    [data-theme="dark"] .ac-empty-hint { color: #475569; }
    [data-theme="dark"] .ac-loading { color: #64748b; }
    [data-theme="dark"] .bottom-nav { background: #0f172a; border-top-color: #1e293b; box-shadow: 0 -2px 10px rgba(0,0,0,0.3); }
    [data-theme="dark"] .bottom-nav-item { color: #94a3b8; }
    [data-theme="dark"] .bottom-nav-badge { border-color: #0f172a; }
    [data-theme="dark"] .bottom-nav-live i{color:#f87171;}
    [data-theme="dark"] .bottom-nav-live.active{color:#f87171;}
    [data-theme="dark"] .notif-badge { border-color: #0f172a; }
    [data-theme="dark"] .notif-overlay { background: rgba(0,0,0,0.6); }
    [data-theme="dark"] .notif-dropdown { background: #1e293b; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05); }
    [data-theme="dark"] .notif-header { border-bottom-color: #334155; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
    [data-theme="dark"] .notif-title { color: #f1f5f9; }
    [data-theme="dark"] .notif-header-count { background: rgba(59,130,246,0.15); color: #60a5fa; }
    [data-theme="dark"] .notif-mark-read-btn { color: #94a3b8; }
    [data-theme="dark"] .notif-mark-read-btn:hover { background: rgba(59,130,246,0.1); color: #60a5fa; }
    [data-theme="dark"] .notif-close-btn { color: #64748b; }
    [data-theme="dark"] .notif-close-btn:hover { background: rgba(239,68,68,0.15); color: #f87171; }
    [data-theme="dark"] .notif-item { border-bottom-color: #1e293b; }
    [data-theme="dark"] .notif-item:hover { background: #334155; }
    [data-theme="dark"] .notif-item.unread { background: rgba(59,130,246,0.05); }
    [data-theme="dark"] .notif-item.unread:hover { background: rgba(59,130,246,0.1); }
    [data-theme="dark"] .notif-item-title { color: #f1f5f9; }
    [data-theme="dark"] .notif-item.read .notif-item-title { color: #94a3b8; }
    [data-theme="dark"] .notif-item-msg { color: #94a3b8; }
    [data-theme="dark"] .notif-delete-btn { color: #475569; }
    [data-theme="dark"] .notif-delete-btn:hover { color: #f87171; background: rgba(239,68,68,0.1); }
    [data-theme="dark"] .notif-footer { border-top-color: #334155; background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%); }
    [data-theme="dark"] .notif-view-all:hover { background: rgba(59,130,246,0.1); }
    [data-theme="dark"] .notif-empty h4 { color: #cbd5e1; }
    [data-theme="dark"] .notif-empty p { color: #64748b; }
    @media (max-width: 640px) {
        [data-theme="dark"] .notif-header::before { background: #475569; }
    }
    [data-theme="dark"] .profile-avatar-btn { background: #1e293b; color: #64748b; border-color: #334155; }
    [data-theme="dark"] .profile-avatar-btn.has-photo { background: #1e293b; }
    [data-theme="dark"] .profile-avatar-btn:hover { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
    [data-theme="dark"] .profile-dropdown { background: #1e293b; box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05); }
    [data-theme="dark"] .profile-dropdown-header { background: #0f172a; }
    [data-theme="dark"] .profile-dropdown-avatar { background: #334155; color: #64748b; }
    [data-theme="dark"] .profile-dropdown-avatar.has-photo { background: #1e293b; }
    [data-theme="dark"] .profile-dropdown-name { color: #f1f5f9; }
    [data-theme="dark"] .profile-dropdown-type { color: #94a3b8; }
    [data-theme="dark"] .profile-dropdown-divider { background: #334155; }
    [data-theme="dark"] .profile-dropdown-item { color: #cbd5e1; }
    [data-theme="dark"] .profile-dropdown-item:hover { background: #334155; color: #f1f5f9; }
    [data-theme="dark"] .profile-dropdown-item i { color: #94a3b8; }
    [data-theme="dark"] .profile-dropdown-item:hover i { color: #60a5fa; }
    [data-theme="dark"] .profile-dropdown-logout { color: #f87171; }
    [data-theme="dark"] .profile-dropdown-logout i { color: #f87171; }
    [data-theme="dark"] .profile-dropdown-logout:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }
    [data-theme="dark"] .profile-dropdown-logout:hover i { color: #fca5a5; }

    /* Claim Business modal dark overrides */
    [data-theme="dark"] #globalClaimOverlay > div { background: #1e293b !important; color: #f1f5f9 !important; }
    [data-theme="dark"] #globalClaimOverlay > div > div { border-color: #334155 !important; }
    [data-theme="dark"] #globalClaimOverlay h3 { color: #f1f5f9 !important; }
    [data-theme="dark"] #globalClaimOverlay p { color: #94a3b8 !important; }
    [data-theme="dark"] #globalClaimOverlay input { background: #0f172a !important; color: #f1f5f9 !important; border-color: #334155 !important; }
    [data-theme="dark"] #globalClaimOverlay input:focus { border-color: #10b981 !important; }
    [data-theme="dark"] #globalClaimOverlay a { color: #60a5fa !important; }

    /* Cookie consent: themed in the banner's own <style> block (light default + dark overrides) */
    header .auth-buttons .signup-btn, .auth-buttons .signup-btn, .signup-btn { color: #ffffff !important; }
    /* WCAG AA: logo text in dark mode */
    [data-theme="dark"] .logo, [data-theme="dark"] #mainHeader .logo { color: #cbd5e1 !important; }
    /* WCAG AA: footer social link touch targets */
    footer .footer-social a { min-width: 44px !important; min-height: 44px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
    /* WCAG AA: dark mode header background + login button contrast */
    [data-theme="dark"] #mainHeader,
    [data-theme="dark"] header { background: #0f172a !important; border-bottom-color: #1e293b !important; }
    [data-theme="dark"] #mainHeader .auth-buttons .login-btn,
    [data-theme="dark"] header .auth-buttons .login-btn,
    [data-theme="dark"] .auth-buttons .login-btn { color: #cbd5e1 !important; border-color: #475569 !important; }
    [data-theme="dark"] #mainHeader .auth-buttons .login-btn span,
    [data-theme="dark"] header .auth-buttons .login-btn span,
    [data-theme="dark"] .auth-buttons .login-btn span { color: #cbd5e1 !important; }
