
    /* ===== HOUSBE toast =====
       One look for every pop-up message on the site (client mock-up, 2026-11-18):
       a dark, softly glowing pill with a thin green outline, a ringed tick and
       bold white text. Roughly 260 call sites share this one element and only set
       its text and an inline background (green #2b783d for success, one of a few
       reds for a problem), so the inline colour is read here as the STATE and the
       background itself is always the dark navy. Success is the default; the red
       family below flips it to the error treatment with a ringed "!". */
    .toastContainer {
        display: none;
        z-index: 999999;
    }

    #toast {
        --hb-toast-line: #2fbf7a;
        --hb-toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none'%3E%3Ccircle cx='14' cy='14' r='12' stroke='%232fbf7a' stroke-width='2'/%3E%3Cpath d='M8.6 14.4l3.9 3.9 7-7.6' stroke='%232fbf7a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        position: fixed;
        left: 50%;
        bottom: 100px;
        right: auto;
        transform: translateX(-50%);
        box-sizing: border-box;
        width: max-content;
        min-width: 220px;
        max-width: min(92vw, 520px);
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 26px 14px 18px;
        background: linear-gradient(180deg, rgba(10, 24, 42, .97) 0%, rgba(5, 14, 28, .97) 100%) !important;
        color: #f3f7fc !important;
        border: 1.5px solid var(--hb-toast-line);
        border-radius: 999px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .25),
                    0 0 22px color-mix(in srgb, var(--hb-toast-line) 30%, transparent);
        font-size: 15px;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: .01em;
        text-align: left;
        transition: opacity 0.3s ease-in-out;
        z-index: 9999;
        pointer-events: none;
    }
    #toast::before {
        content: "";
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
        background: var(--hb-toast-icon) center / contain no-repeat;
    }
    /* Error state: any of the reds the call sites use. The browser reports an
       inline hex colour as rgb(), so both spellings are listed. */
    #toast[style*="eb4949" i], #toast[style*="rgb(235, 73, 73)"],
    #toast[style*="d9534f" i], #toast[style*="rgb(217, 83, 79)"],
    #toast[style*="8a2b2b" i], #toast[style*="rgb(138, 43, 43)"],
    #toast[style*="c7362f" i], #toast[style*="rgb(199, 54, 47)"],
    #toast[style*="c0392b" i], #toast[style*="rgb(192, 57, 43)"] {
        --hb-toast-line: #ff6b6b;
        --hb-toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none'%3E%3Ccircle cx='14' cy='14' r='12' stroke='%23ff6b6b' stroke-width='2'/%3E%3Cpath d='M14 8.2v7.2' stroke='%23ff6b6b' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='14' cy='19.4' r='1.5' fill='%23ff6b6b'/%3E%3C/svg%3E");
    }
    /* A message long enough to wrap is not a pill any more. */
    @media (max-width: 640px) {
        #toast { bottom: 96px; padding: 13px 20px 13px 15px; font-size: 14px; border-radius: 28px; }
    }

    .svg__logoFooter {
        width: 7dvw;
        height: 7dvw;
    }

    @media(max-width:640px) {

        .offcanvas .svg__logo {
            width: 20dvw !important;
            height: 25dvw !important;
        }
    }

    /* property box in chat */
    .property-box {
        position: relative;
        width: 100%;
    }



    #searchResults2 {
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        max-height: 250px;
        overflow-y: auto;
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        display: none;
        z-index: 1000;
    }

    #searchResults3 {
        position: relative;
        left: 0;
        width: 100%;
        max-height: 250px;
        overflow-y: auto;
        background: rgba(20, 20, 20, 0.98);
        /* Deep dark background */
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        display: none;
        z-index: 1000;
        color: #fff;
    }

    #searchResults4 {
        position: relative;
        left: 0;
        width: 100%;
        max-height: 250px;
        overflow-y: auto;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        display: none;
        z-index: 1000;
        color: #fff;
    }

    /* Apply same style to main search results if not already targeted */
    #searchResults,
    #searchResults2 {
        background: rgba(20, 20, 20, 0.98) !important;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: #fff !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }

    /* result item */
    .result-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        cursor: pointer;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s;
        color: #fff !important;
        /* Ensure text is white */
    }

    /* Remove border from last item */
    .result-item:last-child {
        border-bottom: none;
    }

    .result-item img {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 50%;
        /* Circle avatars look better */
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .result-item:hover {
        background: rgba(255, 255, 255, 0.1);
        /* Light glass hover */
    }

    /* Fix text colors inside result items if they have specific elements */
    .result-item h5,
    .result-item small,
    .result-item span {
        color: #fff !important;
    }

    /* DROPDOWN ITEM STYLING (User Search Results) */
    .dropdown-item {
        display: flex;
        /* Align items same as result-item */
        align-items: center;
        padding: 10px 15px;
        cursor: pointer;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: #ffffff !important;
        /* Force white text */
        background: transparent !important;
        transition: background 0.2s;
        text-decoration: none !important;
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }

    /* Specific overrides for text inside dropdowns */
    .dropdown-item span,
    .dropdown-item .text-white {
        color: #ffffff !important;
    }

    .dropdown-item small,
    .dropdown-item .user-role-text {
        color: rgba(255, 255, 255, 0.8) !important;
        /* Slightly dimmed white/grey */
        font-weight: 400;
    }

    .dropdown-item img {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.2);
        margin-right: 10px;
        /* spacing */
    }

    /* thin scrollbar */
    #searchResults::-webkit-scrollbar,
    #searchResults2::-webkit-scrollbar,
    #searchResults3::-webkit-scrollbar,
    #searchResults4::-webkit-scrollbar {
        width: 6px;
    }

    #searchResults::-webkit-scrollbar-thumb,
    #searchResults2::-webkit-scrollbar-thumb,
    #searchResults3::-webkit-scrollbar-thumb,
    #searchResults4::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
    }

    #searchResults::-webkit-scrollbar-track,
    #searchResults2::-webkit-scrollbar-track,
    #searchResults3::-webkit-scrollbar-track,
    #searchResults4::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
    }


    .bgGlow {
        background: #1C86FF;
        height: 60vw;
        width: 60vw;
        position: absolute;
        z-index: 0;
        border-radius: 50%;
        filter: blur(120px);
        opacity: 0.3;
        top: -10%;
        left: 30%;
        pointer-events: none;
    }

    .bgGlow2 {
        background: #1C86FF;
        height: 50vw;
        width: 50vw;
        position: absolute;
        z-index: 0;
        border-radius: 50%;
        filter: blur(100px);
        opacity: 0.3;
        bottom: -10%;
        left: -10%;
        pointer-events: none;
    }

    .bgGlow3 {
        background: #FF4D00;
        height: 60vw;
        width: 60vw;
        position: absolute;
        z-index: 0;
        border-radius: 50%;
        filter: blur(120px);
        opacity: 0.4;
        top: 20%;
        right: -5%;
        pointer-events: none;
    }

    #sendButton,
    #groupSendButton {
        background: linear-gradient(93deg, #1C86FF 0%, #0070f3 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 4px 15px rgba(28, 134, 255, 0.4);
        font-weight: 600;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    #sendButton:hover,
    #groupSendButton:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(28, 134, 255, 0.6);
    }

    /* Sidebar & Chat Area - Dark Theme */
    .chat-interface .sidebar {
        position: relative;
        z-index: 10;
        background: #0f1523 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }

    .chat-interface .chat-area {
        position: relative;
        z-index: 10;
        background: #121826 !important;
    }

    .chat-messages,
    .placeholder {
        background: #121826 !important;
    }

    /* PREMIUM GLASS BUTTONS (Tabs, Roles, Properties) */
    .top-div-area,
    .recentProperty,
    .savedProperty,
    .cvb a {
        background: rgba(255, 255, 255, 0.08) !important;
        /* Translucent white/glass base */
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        /* Crisp thin border */
        border-radius: 12px !important;
        /* Softer, modern corners */
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        /* Smooth Apple-like easing */
        text-transform: none !important;
        /* Remove harsh uppercase if present, usually looks more premium mixed case or capitalized */
        font-weight: 500 !important;
        letter-spacing: 0.3px;
        cursor: pointer;
    }

    /* Hover States - Soft Satin Glow */
    .top-div-area:hover,
    .top-div-area.highlight,
    .recentProperty:hover,
    .savedProperty:hover,
    .cvb a:hover,
    .cvb a.active {
        background: rgba(255, 255, 255, 0.15) !important;
        /* Slightly lighter on hover */
        border-color: rgba(255, 255, 255, 0.4) !important;
        /* Highlight border */
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 255, 255, 0.1);
        /* Soft glow */
        transform: translateY(-1px);
        color: #fff !important;
    }

    /* SpecificTweaks */
    .recentProperty,
    .savedProperty {
        font-size: 14.5px !important;
        padding: 10px 15px !important;
    }

    .top-div-area p {
        color: #ffffff !important;
        font-weight: 600;
        font-size: 15.5px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }


    /* --- REDESIGN: GALAXY & GLASSMORPHIC THEME (Match Screenshot) --- */

    .chat-interface {
        background: #121826 !important; /* Base off the dark screenshot theme */
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 24px;
        box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6);
        color: #e2e8f0; /* Default lighter text */
    }

    /* Windowed (card) mode */
    .chat-interface.windowed {
        position: fixed !important;
        bottom: 100px !important;
        right: 30px !important;
        width: 420px !important;
        height: 600px !important;
        max-height: 80vh !important;
        border-radius: 24px !important;
        z-index: 9995 !important;
        top: auto !important;
        left: auto !important;
    }

    /* Fullscreen mode (Desktop Only) */
    @media (min-width: 769px) {
        .chat-interface.fullscreen {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100% !important;
            height: 100% !important;
            max-height: 100% !important;
            border-radius: 0 !important;
            z-index: 9999 !important;
            display: flex !important;
            flex-direction: row !important;
        }

        /* Fullscreen: always show both sidebar and chat-area side by side */
        .chat-interface.fullscreen .sidebar {
            display: flex !important;
            width: 340px !important;
            min-width: 280px !important;
            max-width: 380px !important;
            flex-shrink: 0 !important;
        }

        .chat-interface.fullscreen .chat-area {
            display: flex !important;
            flex: 1 1 0% !important;
        }

        .chat-interface.fullscreen .sidebar-toggle-btn {
            display: none !important;
        }
    }

    /* Mobile + tablet (≤1024px): the Deal Room always opens FULLSCREEN —
       the 420px "windowed" card is desktop-only. Matches the JS, which
       already treats ≤1024 as the mobile flow. The #chatInterface (id)
       selectors give this block higher specificity than every class-based
       .chat-interface.windowed sizing rule in this file and chat-ui.css,
       so nothing can re-shrink it back into a floating window.
       The (pointer: coarse) branch also catches phones/tablets that report
       a desktop-sized viewport (e.g. "Request desktop site"). */
    @media (max-width: 1024px), (pointer: coarse) {
        #chatInterface.windowed,
        #chatInterface.fullscreen,
        .chat-interface.windowed,
        .chat-interface.fullscreen {
            position: fixed !important;
            inset: 0 !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: 100% !important;
            /* dvh = the actually-visible viewport; prevents the iOS Safari
               bottom gap where the page behind bleeds through */
            height: 100dvh !important;
            max-width: 100% !important;
            max-height: 100% !important;
            max-height: 100dvh !important;
            min-height: 100% !important;
            min-height: 100dvh !important;
            /* …but dvh is still the wrong ruler twice over: it ignores the
               on-screen keyboard entirely, and it only catches up AFTER the URL
               bar finishes animating. Both leave this overlay taller than what
               is actually on screen, which is how a strip of the page behind
               ends up showing under the composer and why the composer drifts as
               you scroll or focus it. --dr-vv-h / --dr-vv-top are the visual
               viewport's live height and offset, written frame-by-frame by the
               Deal Room viewport module at the end of this file, so the overlay
               is always exactly the visible rectangle. The dvh ladder above
               stays as the fallback for browsers with no visualViewport. */
            height: var(--dr-vv-h, 100dvh) !important;
            max-height: var(--dr-vv-h, 100dvh) !important;
            min-height: var(--dr-vv-h, 100dvh) !important;
            top: var(--dr-vv-top, 0px) !important;
            bottom: auto !important;   /* top + height decide the box, not inset */
            right: 0 !important;
            margin: 0 !important;
            border-radius: 0 !important;
            z-index: 9999 !important;
        }

        .btn-toggle-size {
            display: none !important;
        }
    }

    .chat-interface.fullscreen .show-desktop-fullscreen { display: flex !important; }
    .chat-interface.fullscreen .hide-desktop-fullscreen { display: none !important; }
    .chat-interface.windowed .show-desktop-fullscreen { display: none !important; }
    .chat-interface.windowed .hide-desktop-fullscreen { display: flex !important; }
    
    @media (max-width: 768px) {
        .show-desktop-fullscreen { display: none !important; }
        .hide-desktop-fullscreen { display: flex !important; }
    }

    /* Hide the close (X) button on mobile — the "Go Back" button handles exit there.
       Overrides the .chat-interface.fullscreen rule that otherwise force-shows it. */
    @media (max-width: 768px) {
        #btnCloseDealRoomGlobal { display: none !important; }
    }

    .chat-interface .sidebar {
        background: #0f1523 !important;
        scroll-behavior: smooth;
        /* Sidebar header must NOT scroll — flex column so header is sticky at top */
        display: flex;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Sidebar content area scrolls, header stays fixed */
    .sidebar-section {
        flex: 1 1 0% !important;
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        min-height: 0 !important;
        /* Firefox */
        scrollbar-width: thin !important;
        scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.05) !important;
    }

    /* Sidebar header — always visible, never scrolls away */
    .sidebar-header {
        flex-shrink: 0 !important;
        padding: 12px 16px !important;
    }

    /* Sidebar toggle btn (chat icon in sidebar header) */
    .sidebar-toggle-btn {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 10px !important;
        color: #fff !important;
        width: 34px !important;
        height: 34px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 16px !important;
        transition: all 0.2s ease !important;
        overflow: hidden !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .sidebar-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.18) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
    }

    /* Sidebar scrollbar — Chrome / Safari / Edge (on the content section, not the full sidebar) */
    .sidebar-section::-webkit-scrollbar {
        width: 5px !important;
        display: block !important;
    }

    .sidebar-section::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 10px !important;
    }

    .sidebar-section::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.35) !important;
        border-radius: 10px !important;
    }

    .sidebar-section::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.6) !important;
    }

    /* Hide scrollbar in windowed mode */
    .chat-interface.windowed .sidebar-section {
        scrollbar-width: none !important;
    }

    .chat-interface.windowed .sidebar-section::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }

    /* Tabs Styling */
    .top-bar {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        gap: 10px !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
    }

    .top-div-area {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 50px !important;
        padding: 10px 25px !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .top-div-area.highlight {
        background: rgba(59, 130, 246, 0.15) !important;
        border-color: rgba(59, 130, 246, 0.5) !important;
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    }

    .top-div-area.highlight::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 20%;
        right: 20%;
        height: 2px;
        background: #3b82f6;
        box-shadow: 0 0 10px #3b82f6;
    }

    /* Search Bar */

    .search-icon {
        position: absolute;
        left: 18px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.4);
        font-size: 16px;
        pointer-events: none;
        z-index: 5;
    }


    #searchAgents,
    #propertySearch {
        height: 50px !important;
        padding-left: 55px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
        border-radius: 50px !important;
        backdrop-filter: blur(10px);
    }



    /* Metadata Line */

    .separator-line {
        height: 2px;
        flex: 1;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    }

    .info-icon {
        color: rgba(255, 255, 255, 0.4);
        font-size: 15.5px;
    }

    /* Role Pills */
    .role-pill {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 3px;
        border-radius: 50px;
        font-size: 13.5px;
        font-weight: 600;
        text-decoration: none !important;
        color: #fff !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }





    .role-pill:hover {
        transform: scale(1.02);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    /* Active Deals Section */
    .section-title {
        font-size: 16px;
        color: #fff;
        font-weight: 600;
        opacity: 0.9;
    }


    .deal-image img {
        width: 80px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
    }

    .property-title {
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        margin: 0;
    }

    .deal-time,
    .deal-subtime {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.4);
    }

    .deal-stats {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 8px 0;
    }

    .price {
        font-size: 15.5px;
        font-weight: 500;
        color: #fff;
        margin-right: 5px;
    }

    .badge {
        font-size: 12px;
        padding: 3px 10px;
        border-radius: 50px;
        text-transform: capitalize;
    }

    .badge-buyer {
        background: rgba(30, 144, 255, 0.2);
        color: #87cefa;
    }

    .badge-agent {
        background: rgba(138, 43, 226, 0.2);
        color: #da70d6;
    }

    .badge-owner {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }

    .deal-status {
        font-size: 14.5px;
        color: rgba(255, 255, 255, 0.7);
        margin: 0;
        line-height: 1.4;
    }

    /* Empty State */
    .empty-title {
        color: #fff;
        font-weight: 600;
    }


    /* ── Animated Gradient Pill Buttons (Recent / Saved Properties) ── */
    .property-quick-actions {
        position: relative;
        display: flex;
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* ── Group Box (Groups Tab) Premium Styling ── */
    .group-box {
        background: linear-gradient(90deg, #aa47f3 0%, #766bf7 50%, #46d1df 100%) !important;
        border: 2px solid #ffffff !important;
        border-radius: 60px;
        padding: 14px 20px;
        margin: 0 12px 12px 12px;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        box-shadow: 0 4px 15px rgba(100, 50, 255, 0.2) !important;
        overflow: hidden;
    }

    .group-box:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(100, 50, 255, 0.35) !important;
    }

    /* Shimmer sweep animation */
    .group-box::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg,
                transparent,
                rgba(255, 255, 255, 0.06),
                transparent);
        transition: left 0.6s ease;
        pointer-events: none;
    }

    .group-box:hover::before {
        left: 100%;
    }

    .group-box::after {
        display: none;
    }

    .group-box .agent-name {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 2px;
        color: #fff !important;
    }

    .group-box .agent-text {
        font-size: 14.5px;
        color: #fff !important;
        font-weight: 600;
        margin-bottom: 2px;
    }

    .group-box .agent-text b {
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        font-size: 14px;
        color: #fff !important;
    }

    .group-box .agent-email {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.85) !important;
        font-weight: 500;
    }

    .group-box:last-child::after {
        display: none;
    }

    /* Same for .group-card (Agent view) */
    .group-card {
        background: rgba(0, 0, 0, 0.35);
        border: 2px solid rgba(109, 172, 235, 0.6);
        border-radius: 12px;
        padding: 20px;
        margin: 0 12px 16px 12px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }


    .group-card:hover {
        background: rgba(109, 172, 235, 0.08);
        border-color: rgba(109, 172, 235, 0.3);
        transform: translateY(-2px);
    }

    .group-card::after {
        content: "";
        position: absolute;
        bottom: -8px;
        left: 10%;
        right: 10%;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    }

    /* ── Highlighted Placeholder Text for Search Inputs ── */
    #propertySearch::placeholder,
    #searchAgents::placeholder {
        color: rgba(255, 255, 255, 0.85) !important;
        font-weight: 500 !important;
        letter-spacing: 0.3px !important;
        opacity: 1 !important;
    }


    .action-btn {
        position: relative;
        background: linear-gradient(90deg, #aa47f3 0%, #766bf7 50%, #46d1df 100%) !important;
        border: 2px solid #ffffff !important;
        color: #fff !important;
        padding: 12px 24px 12px 14px !important;
        border-radius: 60px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        display: flex;
        align-items: center;
        gap: 16px;
        transition: all 0.4s cubic-bezier(.25, .8, .25, 1);
        overflow: hidden;
        cursor: pointer;
        width: 100%;
        box-shadow: 0 4px 15px rgba(100, 50, 255, 0.2) !important;
    }

    /* Shimmer sweep animation */
    .action-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg,
                transparent,
                rgba(255, 255, 255, 0.06),
                transparent);
        transition: left 0.6s ease;
        pointer-events: none;
    }

    .action-btn:hover::before {
        left: 100%;
    }

    /* Icon container pill */
    .action-btn .btn-icon-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 16px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.4);
        box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
        position: relative;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* Top-right shine dot mimicking the design */
    .action-btn .btn-icon-wrap::after {
        content: '';
        position: absolute;
        top: 6px;
        right: 6px;
        width: 4px;
        height: 4px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 0 4px #fff;
    }

    .action-btn .btn-icon-wrap i {
        font-size: 20px !important;
        color: #fff;
    }

    .action-btn .btn-label {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .action-btn .btn-label .label-main {
        font-size: 16px;
        font-weight: 800;
        letter-spacing: 0.5px;
    }


    /* Hover glow border + lift */
    .action-btn:hover {
        transform: translateY(-3px) scale(1.015);
        box-shadow: 0 8px 25px rgba(100, 50, 255, 0.4) !important;
    }

    .action-btn:hover .btn-icon-wrap {
        transform: scale(1.1) rotate(-4deg);
    }

    /* Active / pressed */
    .action-btn:active {
        transform: translateY(0) scale(0.98);
    }

    /* Pulse entrance animation */
    @keyframes btnPulseIn {
        0% {
            opacity: 0;
            transform: translateY(12px) scale(0.95);
        }

        60% {
            opacity: 1;
            transform: translateY(-2px) scale(1.02);
        }

        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .action-btn {
        animation: btnPulseIn 0.5s ease forwards;
    }

    .btn-saved {
        animation-delay: 0.1s;
    }

    /* ACTIVE DEALS CARD SYSTEM */
    #connected-agents>div,
    #connected-agents .agent-item,
    #connected-agents a {
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        /* Very subtle border */
        border-radius: 16px;
        padding: 12px 16px;
        margin-bottom: 10px;
        transition: all 0.3s ease;
        text-decoration: none !important;
        color: #fff;
    }

    #connected-agents>div:hover,
    #connected-agents .agent-item:hover,
    #connected-agents a:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(59, 130, 246, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    #connected-agents img.agent-avatar {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        /* Soft square/squircle */
        object-fit: cover;
        margin-right: 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    #connected-agents .agent-info {
        flex: 1;
    }

    #connected-agents h4,
    #connected-agents .agent-name {
        font-size: 16px;
        font-weight: 600;
        margin: 0 0 2px 0;
        color: #fff;
    }

    #connected-agents p,
    #connected-agents .agent-status {
        font-size: 14px;
        margin: 0;
        color: rgba(255, 255, 255, 0.5);
    }

    /* Badge positioning if present */
    #connected-agents .badge {
        margin-left: auto;
        font-size: 13px;
        padding: 4px 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 20px;
    }

    .btn-start-deal {
        background: rgba(16, 185, 129, 0.1) !important;
        border-color: rgba(16, 185, 129, 0.3) !important;
    }

    /* Footer Input Area */
    .chat-footer-redesign {
        background: #0f1523 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 10px !important;
        padding-bottom: 8px !important;
        flex-shrink: 0 !important;
    }

    .chat-ui-header,
    .sidebar-header {
        background: #0f1523 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Compact footer rows */
    .footer-meta-row {
        margin-top: 6px !important;
    }

    .footer-bottom-branding {
        margin-top: 6px !important;
        padding-bottom: 6px !important;
    }

    .plus-btn {
        display: none !important;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.6);
        font-size: 24px;
        cursor: pointer;
    }

    .attach-input {
        width: 100%;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 50px !important;
        padding: 12px 25px !important;
        color: #fff !important;
        font-size: 16px !important;
    }

    .send-btn-redesign {
        background: rgba(59, 130, 246, 0.2) !important;
        border: 1px solid rgba(59, 130, 246, 0.4) !important;
        color: #fff !important;
        padding: 8px 25px !important;
        border-radius: 50px !important;
        font-weight: 600 !important;
        font-size: 15.5px !important;
    }

    .add-participant,
    .participant-count {
        color: rgba(255, 255, 255, 0.5);
        font-size: 14.5px;
        font-weight: 500;
    }

    .housbe-pill {
        display: inline-block;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 8px 30px;
        border-radius: 50px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 15.5px;
        font-weight: 500;
        backdrop-filter: blur(5px);
    }

    @keyframes gradient-shimmer {
        0% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0% 50%;
        }
    }

    @keyframes sparkle-pulse {

        0%,
        100% {
            opacity: 0.5;
            transform: scale(0.8) rotate(0deg);
        }

        50% {
            opacity: 1;
            transform: scale(1.2) rotate(15deg);
        }
    }

    .btn-recent,
    .btn-saved {
        background: linear-gradient(90deg, #b34ddb, #4b7bff, #2ccde0, #b34ddb) !important;
        background-size: 300% 100% !important;
        animation: gradient-shimmer 4s ease infinite !important;
        border: 2px solid #fff !important;
        color: #fff !important;
        flex: 1;
        justify-content: center !important;
        height: 52px !important;
        display: flex !important;
        flex-direction: row !important;
        border-radius: 50px !important;
        align-items: center !important;
        gap: 12px !important;
        position: relative;
        overflow: hidden !important;
        box-shadow: 0 4px 15px rgba(75, 123, 255, 0.4) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        font-weight: 600 !important;
        font-size: 15.5px !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .btn-recent:hover,
    .btn-saved:hover {
        transform: translateY(-3px) scale(1.02) !important;
        box-shadow: 0 8px 25px rgba(75, 123, 255, 0.6) !important;
    }

    .btn-recent:active,
    .btn-saved:active {
        transform: translateY(0) scale(0.97) !important;
        box-shadow: 0 4px 15px rgba(75, 123, 255, 0.4) !important;
    }

    /* Icon Squircle Wrapper Styling */
    .btn-recent i.fa-solid,
    .btn-saved i.fa-solid {
        background: rgba(255, 255, 255, 0.25) !important;
        backdrop-filter: blur(5px);
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        /* Squircle shape */
        font-size: 15.5px !important;
        color: #fff !important;
        margin: 0 !important;
        transition: all 0.3s ease !important;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    }

    .btn-recent:hover i.fa-solid,
    .btn-saved:hover i.fa-solid {
        background: rgba(255, 255, 255, 0.35) !important;
        transform: scale(1.1) !important;
    }

    /* Little Sparkle Star */
    .btn-recent::after,
    .btn-saved::after {
        content: '\2726' !important;
        /* Sparkle hex */
        position: absolute !important;
        bottom: 4px !important;
        right: 14px !important;
        font-size: 14px !important;
        color: #fff !important;
        opacity: 0.9 !important;
        animation: sparkle-pulse 2s infinite ease-in-out !important;
        display: block !important;
        background: none !important;
        border: none !important;
        width: auto !important;
        height: 64px !important;
        visibility: visible !important;
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    }

    /* Input Fields Glow */
    .attach-input:focus {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.4) !important;
        border-color: rgba(59, 130, 246, 0.6) !important;
        outline: none !important;
    }

    /* Chat Border - Clean Dark Theme */
    .chat-interface {
        box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    /* Action Buttons (Roles) Glow — handled by main .action-btn styles */

    .glass-search-results {
        background: #0d1526 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 14px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7) !important;
        margin-top: 10px !important;
        overflow: hidden;
        z-index: 9999 !important;
    }

    /* Search people — results open UPWARD above the input */
    .people-search-container {
        position: relative !important;
    }

    .people-search-container #searchResults {
        position: fixed !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        max-height: 220px !important;
        overflow-y: auto !important;
        width: 280px !important;
        z-index: 99999 !important;
    }

    .glass-search-results .dropdown-item {
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 12px 20px !important;
        transition: all 0.2s ease;
    }

    .glass-search-results .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.05) !important;
        color: #fff !important;
    }

    .custom-btn.sent-btn {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 0.9) 100%) !important;
        border: none !important;
        color: #fff !important;
        padding: 16px 25px !important;
        border-radius: 40px !important;
        margin: 0 15px 25px 15px !important;
        width: calc(100% - 30px) !important;
        font-weight: 600 !important;
        font-size: 17px !important;
        letter-spacing: 0.5px;
        box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .custom-btn.sent-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 25px rgba(124, 58, 237, 0.3);
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(79, 70, 229, 0.4) 100%) !important;
    }

    /* Mobile Cleanup */
    @media (max-width: 768px) {
        .role-pill span {
            display: none;
        }

        .role-pill i {
            font-size: 18px;
            margin: 0;
        }

        .plus-btn {
            display: none;
        }

        /* Mobile Chat View Toggling */
        .chat-interface .sidebar {
            display: flex !important;
            width: 100% !important;
            height: 100% !important;
        }

        .chat-interface .chat-area {
            display: none !important;
            width: 100% !important;
        }

        /* When chat is open, hide sidebar and show chat */
        .chat-interface.mobile-chat-open .sidebar {
            display: none !important;
        }

        .chat-interface.mobile-chat-open .chat-area {
            display: flex !important;
            flex-direction: column !important;
            height: 100% !important;
            min-height: 0 !important;
            overflow: hidden !important;
        }
    }

    /* FIX: Force Hide Legacy Forms to prevent them appearing on User Select */
    #messageForm,
    #groupMessageForm {
        display: none !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        z-index: -9999 !important;
    }

    /* FIX: Proper Flex Layout for Chat */
    .chat-area {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        align-self: stretch !important;
    }

    /* Chat Messages — scrollable flex child that fills all remaining height */
    .chat-messages,
    #chatMessages {
        flex: 1 1 0% !important;
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        min-height: 0 !important;
        padding: 10px 16px 20px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 10px 10px 0 0;
        width: 100% !important;
        /* Firefox */
        scrollbar-width: thin !important;
        scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.05) !important;
    }

    /* Chat messages scrollbar — Chrome / Safari / Edge */
    .chat-messages::-webkit-scrollbar,
    #chatMessages::-webkit-scrollbar {
        width: 5px !important;
        display: block !important;
    }

    .chat-messages::-webkit-scrollbar-track,
    #chatMessages::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 10px !important;
    }

    .chat-messages::-webkit-scrollbar-thumb,
    #chatMessages::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.35) !important;
        border-radius: 10px !important;
    }

    .chat-messages::-webkit-scrollbar-thumb:hover,
    #chatMessages::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.6) !important;
    }

    .chat-header {
        flex-shrink: 0 !important;
    }

    .chat-footer-redesign {
        flex-shrink: 0 !important;
    }


    /* housbe popup review */
    .popup-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.75);
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .popup-box {
        background: linear-gradient(180deg, #050510 0%, #100520 100%) !important;
        border: 2px solid #fcd34d !important;
        box-shadow: 0 0 30px rgba(252, 211, 77, 0.6), inset 0 0 20px rgba(252, 211, 77, 0.3) !important;
        border-radius: 24px !important;
        color: #fff !important;
        position: relative;
        width: 100%;
        max-width: 600px;
        height: auto;
        /* or auto/max-height */
        max-height: 95vh;
        padding: 0 !important;
        overflow: hidden !important;
        display: flex;
        flex-direction: column;
    }

    .popup-scroll-wrapper {
        flex: 1;
        overflow-y: auto;
        padding: 30px;
        position: relative;
        z-index: 2;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .popup-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    .popup-box form {
        /* Form is now just a block inside the wrapper */
        position: relative;
        z-index: 2;
    }

    .popup-box .close-popup {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 25px;
        cursor: pointer;
        color: #fff;
        z-index: 10;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transition: all 0.2s;
    }

    .popup-box .close-popup:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .popup-box h2 {
        position: relative;
        z-index: 2;
        font-weight: 700;
        margin-bottom: 20px;
    }

    .popup-box label {
        position: relative;
        z-index: 2;
    }

    .popup-box input,
    .popup-box textarea,
    .popup-box select {
        width: 100%;
        padding: 12px;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        color: #FFF !important;
        position: relative;
        z-index: 2;
        margin-bottom: 15px;
        border-radius: 8px;
        outline: none;
        transition: all 0.3s;
        /* Ensure select arrow is visible/styled if needed, or stick to default */
    }

    /* Style for options to ensure they are readable (dark background) */
    .popup-box select option {
        background-color: #050510 !important;
        color: #fff !important;
        padding: 10px;
    }

    .popup-box input:focus,
    .popup-box textarea:focus,
    .popup-box select:focus {
        border-color: #fcd34d !important;
        box-shadow: 0 0 10px rgba(252, 211, 77, 0.3);
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .popup-box button {
        padding: 12px 30px;
        background: linear-gradient(90deg, #ea580c 0%, #f97316 100%) !important;
        color: #fff;
        border: none;
        cursor: pointer;
        border-radius: 50px !important;
        font-weight: 700;
        width: 100%;
        font-size: 16px;
        position: relative;
        z-index: 2;
        box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4);
        transition: all 0.3s;
    }

    .popup-box button:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(234, 88, 12, 0.6);
    }


    /* Space Particles CSS */
    .space-particles {
        position: absolute;
        inset: -50%;
        width: 200%;
        height: 200%;
        pointer-events: none;
        z-index: 0;
        background: transparent;
        animation: galaxy-spin 100s linear infinite;
    }

    .space-particles::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 2px;
        height: 2px;
        border-radius: 50%;
        box-shadow:
            -400px -300px 2px white, 300px 400px 3px #00f0ff, -200px 100px 2px white, 150px -250px 3px #ff00ff,
            400px -100px 2px white, -350px 200px 3px #ffd700, 100px 300px 2px white, -500px -400px 3px #00f0ff,
            250px 50px 2px white, -150px -150px 3px #ff00ff, 500px 200px 2px white, -300px 350px 2px white,
            50px -400px 3px #ffd700, 350px -300px 2px white, -450px 50px 3px #00f0ff, 200px 450px 2px white,
            -100px -200px 2px white, 450px 150px 3px #ff00ff, -250px -50px 2px white, 300px -350px 2px white,
            -400px 400px 3px #ffd700, 150px 100px 2px white, -200px -450px 3px #00f0ff, 400px 300px 2px white,
            /* More dense field */
            10px 10px 1px white, -20px 40px 1px white, 50px -30px 1px white, -60px -80px 1px white,
            120px 40px 1px white, -150px 80px 1px white, 200px -120px 1px white, -240px -40px 1px white,
            300px 220px 1px white, -350px -180px 1px white, 400px 60px 1px white, -420px 300px 1px white,
            15px -200px 1px white, -85px 250px 1px white, 130px -350px 1px white, -280px 150px 1px white;
        opacity: 0.9;
    }

    .space-particles::after {
        content: '';
        position: absolute;
        inset: 0;
        background-image:
            radial-gradient(circle at 50% 50%, rgba(20, 100, 255, 0.1), transparent 60%),
            radial-gradient(circle at 20% 30%, rgba(255, 0, 255, 0.15), transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.15), transparent 50%),
            /* Bright glowing stars */
            radial-gradient(3px 3px at 100px 100px, #fff, transparent),
            radial-gradient(4px 4px at 300px 400px, #a5f3fc, transparent),
            /* Cyan Star */
            radial-gradient(3px 3px at 500px 200px, #fbcfe8, transparent),
            /* Pink Star */
            radial-gradient(4px 4px at 200px 500px, #fde047, transparent);
        /* Gold Star */
        background-size: 100% 100%, 100% 100%, 100% 100%, 300px 300px, 400px 400px, 350px 350px, 500px 500px;
        animation: galaxy-spin 150s linear infinite reverse;
        mix-blend-mode: screen;
    }

    @keyframes galaxy-spin {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    /* housbe popup review */
    /* Toggle Button visibility logic */
    @media (min-width: 769px) {
        /* In windowed mode (where sidebar is absolute over chat-area) */
        .chat-interface.windowed:not(.sidebar-hidden) .chat-main-header {
            display: none; /* Hide the chat header completely when sidebar is visible */
        }
        
        /* When sidebar is hidden, hide the sidebar header */
        .chat-interface.sidebar-hidden .sidebar-main-header {
            display: none !important;
        }

        /* Default handling for the toggle buttons themselves */
        .chat-interface:not(.sidebar-hidden) .chat-main-header .sidebar-toggle-btn {
            display: none !important;
        }
    }
    
    /* Ensure the dynamic title logic works (hiding default when agent is selected) */
    #click-header:not(:empty) + .chat-default-title {
        display: none !important;
    }
    #click-header:empty + .chat-default-title {
        display: block !important;
    }

    /* Hide the chat header and footer when no deal room is selected */
    .chat-area:has(#click-header:empty) .chat-main-header,
    .chat-area:has(#click-header:empty) .chat-footer-redesign {
        display: none !important;
    }
    /* Chat Login Prompt Overlay */
    .chat-prompt-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(7, 7, 7, 0.85);
        backdrop-filter: blur(8px);
        justify-content: center;
        align-items: center;
        z-index: 9999999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .chat-prompt-overlay.active {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 99999999 !important;
    }

    .chat-prompt-card {
        background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 40%), linear-gradient(145deg, #1c1811 0%, #0c0c0c 100%) !important;
        border: 1px solid rgba(212,176,106,0.25) !important;
        border-radius: 32px !important;
        padding: 45px 30px 35px 30px !important;
        position: relative;
        text-align: center;
        max-width: 420px;
        width: 90%;
        box-sizing: border-box;
        /* never taller than the viewport — scroll inside instead of running off-screen */
        max-height: 90vh;
        overflow-y: auto;
        color: #F4F1EA;
        box-shadow: inset 1px 1px 2px rgba(255,255,255,0.15), 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 176, 106, 0.05) !important;
        transform: scale(0.95);
        transition: transform 0.3s ease;
        backdrop-filter: blur(20px);
        scrollbar-width: thin;
    }
    .chat-prompt-card::-webkit-scrollbar { width: 6px; }
    .chat-prompt-card::-webkit-scrollbar-thumb { background: rgba(212,176,106,0.3); border-radius: 3px; }

    .chat-prompt-overlay.active .chat-prompt-card {
        transform: scale(1);
    }

    .chat-prompt-close {
        position: absolute;
        top: 18px;
        right: 18px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(235, 216, 176, 0.3);
        color: #ebd8b0;
        font-size: 26px;
        font-weight: 300;
        cursor: pointer;
        opacity: 0.9;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        line-height: 1;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .chat-prompt-close:hover {
        opacity: 1;
        background: rgba(235, 216, 176, 0.22);
        border-color: rgba(235, 216, 176, 0.7);
        color: #ffffff;
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 4px 14px rgba(235, 216, 176, 0.35);
    }

    .chat-icon-container {
        margin-bottom: 25px;
        display: flex;
        justify-content: center;
        position: relative;
    }

    .chat-icon-glow {
        position: relative;
        z-index: 1;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        border: 1px solid rgba(212,176,106,0.4);
        display: flex;
        justify-content: center;
        align-items: center;
        background: radial-gradient(circle, rgba(212, 176, 106, 0.15) 0%, transparent 65%);
        box-shadow: 0 0 20px rgba(212, 176, 106, 0.1), inset 0 0 20px rgba(212, 176, 106, 0.1);
    }
    
    .chat-icon-glow svg {
        width: 70% !important;
        height: 70% !important;
    }

    .dr-prompt-welcome {
        font-size: 16px !important;
        font-weight: 500 !important;
        color: #94A3B8 !important;
        margin-bottom: 4px !important;
        text-transform: none !important;
        letter-spacing: 0.5px !important;
    }

    .dr-prompt-title {
        font-size: 28px !important;
        font-weight: 600 !important;
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        letter-spacing: 0.5px !important;
    }

    .text-gradient-gold {
        color: #D4B06A;
    }

    .text-light {
        color: #F4F1EA;
    }

    .dr-prompt-desc {
        font-size: 15.5px !important;
        color: #94A3B8 !important;
        margin-bottom: 24px !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }

    .dr-prompt-role-alert {
        background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 50%), #070707 !important;
        border: 1px solid rgba(212, 176, 106, 0.15) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-left: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 16px !important;
        padding: 16px 20px !important;
        display: flex !important;
        align-items: center !important;
        gap: 16px !important;
        margin-bottom: 28px !important;
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .dr-alert-icon {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dr-alert-text {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .dr-alert-title {
        color: #F4F1EA !important;
        font-weight: 600 !important;
        font-size: 15.5px !important;
    }

    .dr-alert-subtitle {
        color: #94A3B8 !important;
        font-size: 14px !important;
        font-weight: 400 !important;
    }

    .chat-prompt-btn {
        background: radial-gradient(ellipse at 15% 10%, rgba(255, 255, 255, 0.15) 0%, transparent 60%), linear-gradient(180deg, #1c1811 0%, #070707 100%) !important;
        border: 1px solid rgba(212, 176, 106, 0.4) !important;
        border-radius: 30px !important;
        padding: 14px 0 !important;
        width: 100% !important;
        color: #E2C58B !important;
        font-weight: 500 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        box-shadow: 0 4px 15px rgba(212, 176, 106, 0.1), inset 1px 1px 2px rgba(255, 255, 255, 0.2) !important;
        transition: transform 0.2s, box-shadow 0.2s, background 0.2s !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .chat-prompt-btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(212, 176, 106, 0.2), inset 1px 1px 2px rgba(255, 255, 255, 0.3) !important;
        background: radial-gradient(ellipse at 15% 10%, rgba(255, 255, 255, 0.2) 0%, transparent 60%), linear-gradient(180deg, #2a2318 0%, #111111 100%) !important;
    }

    @media (max-width: 640px) {
        .chat-prompt-card {
            padding: 35px 20px 25px 20px !important;
            width: 92% !important;
            border-radius: 20px !important;
        }

        .dr-prompt-welcome {
            font-size: 18px !important;
        }

        .dr-prompt-title {
            font-size: 22px !important;
            white-space: normal !important;
            margin-bottom: 15px !important;
        }

        .dr-prompt-desc {
            font-size: 14.5px !important;
            margin-bottom: 20px !important;
        }

        .dr-prompt-role-alert {
            padding: 12px 16px !important;
            gap: 12px !important;
            margin-bottom: 24px !important;
        }

        .dr-alert-title {
            font-size: 14.5px !important;
        }

        .dr-alert-subtitle {
            font-size: 14px !important;
        }

        .chat-prompt-btn {
            padding: 12px 0 !important;
            font-size: 16px !important;
        }
    }
