
    :root {
        --ha-maroon: #850D10;
        --ha-maroon-dark: #630A0C;
        --ha-gold: #FFB900;
        --ha-gold-soft: #FFF4D6;
        --ha-border: #F0E2C0;
        --ha-shadow: 0 4px 14px rgba(133, 13, 16, .12);
    }

    /* Main Wrapper */
    .force-custom-account {
        position: relative !important;
        display: inline-block !important;
        font-family: 'Poppins', sans-serif !important;
        box-sizing: border-box !important;
    }
    .force-custom-account *,
    .force-custom-account *::before,
    .force-custom-account *::after { box-sizing: border-box !important; }

    /* Icon Circle Button */
    .force-custom-account .account-icon-link {
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        background: #ffffff !important;
        border: 1px solid var(--ha-border) !important;
        color: var(--ha-maroon) !important;
        text-decoration: none !important;
        transition: box-shadow .3s ease, border-color .3s ease !important;
    }

    /* Hover: white background + light shadow + 1px solid border */
    .force-custom-account .account-icon-link:hover,
    .force-custom-account .account-icon-link:focus-visible,
    .force-custom-account.is-open .account-icon-link {
        background: #ffffff !important;
        border: 1px solid var(--ha-gold) !important;
        box-shadow: var(--ha-shadow) !important;
    }

    /* Icon SVG */
    .force-custom-account .account-icon {
        width: 28px !important;
        height: 28px !important;
        stroke: var(--ha-maroon) !important;
    }

    /* Avatar */
    .force-custom-account .user-avatar-wrapper {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 2px solid var(--ha-gold) !important;
    }
    .force-custom-account .user-avatar-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
        display: block !important;
    }

    /* Green Active Status Indicator Dot (kept green on purpose: universal "online" colour) */
    .force-custom-account .online-status-dot {
        position: absolute !important;
        bottom: 2px !important;
        right: 2px !important;
        width: 12px !important;
        height: 12px !important;
        background-color: #22c55e !important;
        border: 2px solid #ffffff !important;
        border-radius: 50% !important;
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4) !important;
        z-index: 2 !important;
    }

    /* Dropdown Base */
    .force-custom-account .account-dropdown {
        position: absolute !important;
        top: 58px !important;
        right: 0 !important;
        width: 240px !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 90px) !important;
        max-height: calc(100dvh - 90px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        background: #ffffff !important;
        border-radius: 14px !important;
        border: 1px solid var(--ha-border) !important;
        border-top: 3px solid var(--ha-gold) !important;
        padding: 10px 0 !important;
        box-shadow: 0 15px 40px rgba(133, 13, 16, .18) !important;
        z-index: 999999 !important;
        display: none !important;
    }

    .force-custom-account.is-open .account-dropdown {
        display: block !important;
        animation: accountDropdownOpen .25s ease !important;
    }

    /* Invisible bridge so hover isn't lost between icon and dropdown */
    .force-custom-account .account-dropdown::after {
        content: '' !important;
        position: absolute !important;
        top: -20px !important;
        left: 0 !important;
        right: 0 !important;
        height: 20px !important;
    }

    @keyframes accountDropdownOpen {
        from { opacity: 0; transform: translateY(10px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Hover opens dropdown on real mouse devices only */
    @media (hover: hover) and (min-width: 769px) {
        .force-custom-account:hover .account-dropdown {
            display: block !important;
            animation: accountDropdownOpen .25s ease !important;
        }
    }

    /* Dropdown Arrow Pointer */
    .force-custom-account .account-dropdown:before {
        content: '' !important;
        position: absolute !important;
        top: -10px !important;
        right: 17px !important;
        width: 16px !important;
        height: 16px !important;
        background: var(--ha-gold) !important;
        transform: rotate(45deg) !important;
        border-radius: 2px 0 0 0 !important;
    }

    /* Logged-in Header Info */
    .force-custom-account .account-header-info {
        padding: 8px 18px 12px 18px !important;
        border-bottom: 1px solid var(--ha-border) !important;
        margin-bottom: 6px !important;
    }
    .force-custom-account .user-display-name {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: var(--ha-maroon) !important;
        font-family: 'Montserrat', sans-serif !important;
        word-break: break-word !important;
    }
    .force-custom-account .user-email-text {
        font-size: 11px !important;
        color: #777777 !important;
        word-break: break-all !important;
    }

    /* Menu Items */
    .force-custom-account .account-menu-list {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 8px !important;
    }
    .force-custom-account .account-menu-list li {
        margin: 0 0 2px 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }
    .force-custom-account .account-menu-list a {
        display: block !important;
        padding: 9px 12px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #333333 !important;
        text-decoration: none !important;
        background: #ffffff !important;
        border: 1px solid transparent !important;
        border-radius: 8px !important;
        font-family: 'Poppins', sans-serif !important;
        transition: box-shadow .25s ease, border-color .25s ease, color .25s ease !important;
    }

    /* Hover: white background + light shadow + 1px solid border */
    .force-custom-account .account-menu-list a:hover,
    .force-custom-account .account-menu-list a:focus-visible {
        background: #ffffff !important;
        color: var(--ha-maroon) !important;
        border: 1px solid var(--ha-gold) !important;
        box-shadow: var(--ha-shadow) !important;
    }

    /* Login / Register accents */
    .force-custom-account .account-menu-list a.login-btn-link {
        color: var(--ha-maroon) !important;
        font-weight: 600 !important;
    }

    /* Logout link highlight */
    .force-custom-account .account-menu-list a.customer-logout,
    .force-custom-account .account-menu-list a.logout-link {
        color: var(--ha-maroon) !important;
        font-weight: 600 !important;
        border-top: 1px solid var(--ha-border) !important;
        margin-top: 6px !important;
    }
    .force-custom-account .account-menu-list a.customer-logout:hover,
    .force-custom-account .account-menu-list a.logout-link:hover {
        background: #ffffff !important;
        color: var(--ha-maroon-dark) !important;
        border: 1px solid var(--ha-maroon) !important;
        box-shadow: var(--ha-shadow) !important;
    }

    /* ---------- Responsive ---------- */
    @media (max-width: 1024px) {
        .force-custom-account .account-dropdown { width: 230px !important; }
    }

    /* Tablets & phones: dropdown opens on tap */
    @media (max-width: 768px) {
        .force-custom-account .account-icon-link { width: 44px !important; height: 44px !important; }
        .force-custom-account .account-icon { width: 24px !important; height: 24px !important; }
        .force-custom-account .user-avatar-wrapper,
        .force-custom-account .user-avatar-img { width: 28px !important; height: 28px !important; }
        .force-custom-account .account-dropdown { top: 52px !important; }
        .force-custom-account .account-menu-list a { padding: 11px 12px !important; font-size: 14px !important; } /* larger tap targets */
    }

    /* Phones: full-width panel pinned under the header (top set by JS) */
    @media (max-width: 480px) {
        .force-custom-account { position: static !important; }
        .force-custom-account .account-icon-link { position: relative !important; }
        .force-custom-account .account-dropdown {
            position: fixed !important;
            left: 12px !important;
            right: 12px !important;
            top: 64px !important;
            width: auto !important;
            max-width: none !important;
        }
        .force-custom-account .account-dropdown:before { display: none !important; }
    }

    @media (max-width: 360px) {
        .force-custom-account .account-dropdown { left: 8px !important; right: 8px !important; }
        .force-custom-account .account-header-info { padding: 6px 14px 10px 14px !important; }
    }

    @media (max-height: 500px) {
        .force-custom-account .account-dropdown { max-height: calc(100vh - 70px) !important; }
    }

    @media (min-width: 1600px) {
        .force-custom-account .account-dropdown { width: 260px !important; }
    }
    