/* Logged-in homepage header: compact product navigation with account utilities. */
.home-header--member,
html body .home-header--member {
    height: 76px !important;
    min-height: 76px !important;
    padding: 0 !important;
    border-bottom: 1px solid #e7e9ee;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .025);
}

.home-header--member .header-content {
    display: grid !important;
    grid-template-columns: minmax(252px, 280px) minmax(0, 1fr) auto auto !important;
    grid-template-rows: 1fr !important;
    width: 100% !important;
    max-width: 1480px !important;
    height: 76px !important;
    min-height: 76px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    align-items: center !important;
}

.home-header--member .header-content > .logo {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 280px !important;
    height: 44px;
    padding: 0 !important;
    gap: 10px;
    justify-self: start;
    color: #111827;
    text-decoration: none;
}

.home-header--member .logo-img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.home-header--member #site-logo:has(.logo-img) .logo-icon {
    display: none !important;
}

.home-header--member #site-name {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-header--member .header-content > .nav-tabs {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
}

.home-header--member .header-content > .nav-tabs::-webkit-scrollbar {
    display: none;
}

.home-header--member .nav-tab {
    box-sizing: border-box;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    gap: 7px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    color: #5d6472 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 560;
    letter-spacing: 0;
    text-decoration: none;
    transform: none !important;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease !important;
}

.home-header--member .nav-tab:hover {
    color: #111827 !important;
    border-color: transparent !important;
    background: #f3f4f6 !important;
    box-shadow: none !important;
    transform: none !important;
}

.home-header--member .nav-tab.active,
.home-header--member .nav-tab.active:hover {
    color: #303a66 !important;
    border-color: #dfe2ff !important;
    background: #eef0ff !important;
}

.home-header--member .nav-tab > i {
    width: 14px !important;
    min-width: 14px !important;
    margin: 0 !important;
    color: inherit !important;
    font-size: 13px;
    text-align: center;
}

.home-header--member .member-recharge-tab {
    color: #176b50 !important;
}

.home-header--member .member-recharge-tab:hover {
    color: #10543e !important;
    border-color: #cfe9df !important;
    background: #edf8f4 !important;
}

.home-header--member .member-redeem-tab:hover {
    color: #72510d !important;
    border-color: #ead9af !important;
    background: #fff9e9 !important;
}

html[lang^="en"] .home-header--member .nav-tab {
    padding-right: 6px !important;
    padding-left: 6px !important;
    gap: 5px !important;
    font-size: 12px !important;
}

html[lang^="en"] .home-header--member .member-beta-badge {
    display: none;
}

html[lang^="en"] .home-header--member .header-content > .nav-tabs {
    justify-content: flex-end !important;
}

/* When the mode switch is not available, keep the desktop header as one
 * centered, intrinsic-width group. This makes the logo/nav and nav/account
 * breathing room identical in both locales without stretching nav items. */
@media (min-width: 1435px) {
    .home-header--member .header-content.header-content--no-mode-toggle,
    .home-header--member .header-content:has(> .mode-toggle-container[style*="display: none"]) {
        grid-template-columns: max-content max-content auto !important;
        justify-content: center !important;
        column-gap: 12px !important;
    }

    .home-header--member .header-content.header-content--no-mode-toggle > .nav-tabs,
    .home-header--member .header-content:has(> .mode-toggle-container[style*="display: none"]) > .nav-tabs {
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: max-content !important;
        max-width: 100% !important;
        justify-content: flex-start !important;
    }

    .home-header--member .header-content.header-content--no-mode-toggle > .user-menu,
    .home-header--member .header-content:has(> .mode-toggle-container[style*="display: none"]) > .user-menu {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }
}

.home-header--member .mirror-site-nav-tab::after {
    content: "\2197";
    color: #8a92a3;
    font-size: 10px;
    line-height: 1;
}

.home-header--member .member-beta-badge {
    display: inline-flex;
    height: 18px;
    margin-left: 1px;
    padding: 0 5px;
    border: 1px solid #f1c66f;
    border-radius: 4px;
    align-items: center;
    color: #814609;
    background: #fff6dc;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    letter-spacing: 0;
}

.home-header--member .header-content > .mode-toggle-container {
    grid-column: 3 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-self: end;
}

.home-header--member .header-content > .user-menu {
    grid-column: 4 !important;
    grid-row: 1 !important;
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    margin: 0 !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    justify-self: end;
}

.home-header--member .user-menu .user-info {
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
    margin: 0 !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    align-items: center;
}

/* No-team state: identity and credits form one account summary instead of
 * four unrelated legacy controls. Team members continue to use the workspace
 * switcher below. */
.home-header--member .user-info.personal-account-ready {
    height: 40px !important;
    gap: 0 !important;
}

.home-header--member .personal-account-summary {
    box-sizing: border-box;
    display: inline-flex;
    width: max-content;
    min-width: 0;
    height: 40px;
    border: 1px solid #e1e4e9;
    border-radius: 7px;
    align-items: stretch;
    overflow: hidden;
    background: #fff;
}

.home-header--member .personal-account-identity {
    display: inline-flex;
    min-width: 0;
    max-width: 156px;
    height: 38px;
    padding: 3px 9px 3px 5px;
    gap: 8px;
    align-items: center;
    color: #252a34;
    text-decoration: none;
    transition: background-color .18s ease;
}

.home-header--member .personal-account-identity:hover {
    background: #f6f7f8;
}

.home-header--member .personal-account-avatar {
    box-sizing: border-box;
    display: grid;
    width: 30px;
    min-width: 30px;
    height: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    place-items: center;
    overflow: hidden;
    color: #596170;
    background: #f3f4f6;
}

.home-header--member .personal-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-header--member .personal-account-copy {
    display: grid;
    min-width: 0;
    line-height: 1.15;
}

.home-header--member .personal-account-copy strong,
.home-header--member .personal-account-copy small {
    display: block;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-header--member .personal-account-copy strong {
    color: #252a34;
    font-size: 12px;
    font-weight: 680;
}

.home-header--member .personal-account-copy small {
    margin-top: 2px;
    color: #858c99;
    font-size: 9px;
}

.home-header--member .personal-account-credit-group {
    display: inline-flex;
    min-width: 0;
    height: 38px;
    border-left: 1px solid #eceef1;
    align-items: stretch;
}

.home-header--member .personal-account-credit-group .credits-display.personal-account-credit {
    width: max-content !important;
    min-width: 128px !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 9px !important;
    gap: 5px !important;
    border: 0 !important;
    border-radius: 0 !important;
    justify-content: flex-start;
    color: #3f4755 !important;
    background: transparent !important;
}

.home-header--member .personal-account-credit-group .credits-display.personal-account-credit:hover {
    background: #f6f7f8 !important;
}

.home-header--member .personal-account-credit .workspace-credit-source {
    color: #858c99;
    font-size: 9px;
    font-weight: 600;
}

.home-header--member .personal-account-credit .workspace-credit-value {
    color: #303746;
    font-size: 12px;
    font-weight: 720;
}

.home-header--member .personal-account-credit-group > .personal-account-recharge {
    box-sizing: border-box;
    display: inline-grid !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 1px solid #eceef1 !important;
    border-radius: 0 !important;
    place-items: center;
    color: #176b50 !important;
    background: #f7faf9 !important;
    font-size: 10px !important;
    text-decoration: none;
}

.home-header--member .personal-account-credit-group > .personal-account-recharge:hover {
    color: #10543e !important;
    background: #edf8f4 !important;
}

.home-header--member .personal-account-identity:focus-visible,
.home-header--member .personal-account-credit:focus-visible,
.home-header--member .personal-account-recharge:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #6366f1;
    outline-offset: -2px;
}

.home-header--member .avatar-display,
.home-header--member .user-avatar,
.home-header--member .default-user-avatar {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
}

.home-header--member .username-display {
    max-width: 82px;
    overflow: hidden;
    color: #374151;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-header--member .workspace-trigger,
.home-header--member .user-menu .workspace-trigger {
    box-sizing: border-box;
    width: 148px !important;
    min-width: 0 !important;
    max-width: 148px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 4px 7px !important;
    border-radius: 7px;
}

html[lang^="en"] .home-header--member .workspace-trigger,
html[lang^="en"] .home-header--member .user-menu .workspace-trigger {
    width: 148px !important;
    max-width: 148px !important;
}

.home-header--member .workspace-trigger:hover,
.home-header--member .workspace-trigger[aria-expanded="true"] {
    border-color: #e8d7a7;
    background: #fffaf0;
    box-shadow: none;
}

.home-header--member .workspace-trigger-avatar {
    width: 28px;
    height: 28px;
}

.home-header--member .workspace-trigger-copy strong {
    font-size: 12px;
}

.home-header--member .workspace-trigger-copy small {
    margin-top: 2px;
    font-size: 9px;
}

.home-header--member .credits-display,
.home-header--member .credits-display.workspace-credit-pill {
    box-sizing: border-box;
    display: inline-flex !important;
    width: max-content !important;
    min-width: 138px !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    gap: 5px !important;
    border: 1px solid #dfe3ff;
    border-radius: 7px !important;
    justify-content: center;
    color: #343e71 !important;
    background: #f0f2ff !important;
    box-shadow: none !important;
    font-size: 12px !important;
    text-decoration: none;
    transform: none !important;
}

.home-header--member .credits-display:hover,
.home-header--member .credits-display.workspace-credit-pill:hover {
    border-color: #cbd0ff;
    background: #e8ebff !important;
    box-shadow: none !important;
    transform: none !important;
}

.home-header--member .credits-display i.fa-coins {
    color: #b7791f !important;
    text-shadow: none !important;
}

.home-header--member .workspace-credit-source {
    display: inline !important;
    flex: 0 0 auto;
    color: #747da6;
    font-size: 9px;
}

.home-header--member .workspace-credit-value {
    flex: 0 0 auto;
    max-width: none;
    overflow: visible;
    color: #303a66;
    text-overflow: clip;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.home-header--member .credits-display .fa-plus {
    color: #5965a6;
    font-size: 9px;
}

.home-header--member .user-menu .user-actions {
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    margin: 0 !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    align-items: center;
}

/* Legacy section templates render these as standalone header buttons. The
 * switcher moves the useful actions into the account menu; hide any stale
 * copy that remains during a rolling template refresh. */
.home-header--member .user-actions > .recharge-history-btn,
.home-header--member .user-actions > .admin-btn,
.home-header--member .user-actions > .logout-btn {
    display: none !important;
}

.home-header--member #notificationContainer,
.home-header--member #notificationBtn,
.home-header--member .notification-btn-wrapper,
.home-header--member .notification-btn-wrapper .notification-btn,
.home-header--member .notification-compact-link {
    box-sizing: border-box;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
}

.home-header--member #notificationBtn,
.home-header--member .notification-btn-wrapper .notification-btn,
.home-header--member .notification-compact-link {
    display: inline-grid;
    padding: 0 !important;
    border: 1px solid #e1e4e9;
    border-radius: 7px !important;
    place-items: center;
    color: #596170;
    background: #fff !important;
    box-shadow: none;
    text-decoration: none;
}

.home-header--member #notificationBtn:hover,
.home-header--member .notification-btn-wrapper .notification-btn:hover,
.home-header--member .notification-compact-link:hover {
    color: #111827;
    border-color: #d1d5db;
    background: #f6f7f8 !important;
}

.home-header--member .user-actions > .profile-dropdown,
.home-header--member .user-actions > .profile-dropdown:hover {
    position: relative;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: visible !important;
}

.home-header--member .user-actions .profile-btn {
    box-sizing: border-box;
    display: inline-flex;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border: 1px solid #e1e4e9 !important;
    border-radius: 7px !important;
    align-items: center;
    justify-content: center;
    color: #343a46 !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 600;
    transform: none !important;
}

/* A rolling worker may briefly serve the previous profile-menu markup. Keep
 * its text label from expanding the compact account control while the small
 * compatibility cleanup in workspace-switcher.js removes secondary links. */
.home-header--member .user-actions .profile-btn > span,
.home-header--member .user-actions .profile-btn .dropdown-arrow {
    display: none !important;
}

.home-header--member .user-actions .profile-btn:hover,
.home-header--member .profile-dropdown.active .profile-btn {
    color: #111827 !important;
    border-color: #d1d5db !important;
    background: #f6f7f8 !important;
    box-shadow: none !important;
    transform: none !important;
}

.home-header--member .profile-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.home-header--member .profile-dropdown .dropdown-menu {
    top: calc(100% + 8px);
    right: 0;
    width: 228px;
    max-height: min(520px, calc(100vh - 100px));
    margin-top: 0;
    padding: 7px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #e2e5ea;
    border-radius: 8px;
    background: rgba(255, 255, 255, .99);
    box-shadow: 0 18px 44px rgba(20, 27, 45, .16);
}

.home-header--member .profile-dropdown .dropdown-item {
    box-sizing: border-box;
    min-height: 38px;
    padding: 0 10px;
    gap: 10px;
    border: 0;
    border-radius: 5px;
    color: #394150;
    font-size: 13px;
}

.home-header--member .member-menu-account {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 52px;
    padding: 4px 9px 8px;
    gap: 9px;
    align-items: center;
}

.home-header--member .member-menu-avatar {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    object-fit: cover;
}

.home-header--member .member-menu-avatar--default {
    display: grid;
    place-items: center;
    color: #5b6474;
    background: #eef0f3;
}

.home-header--member .member-menu-account-copy {
    min-width: 0;
}

.home-header--member .member-menu-account-copy strong,
.home-header--member .member-menu-account-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-header--member .member-menu-account-copy strong {
    color: #202633;
    font-size: 13px;
}

.home-header--member .member-menu-account-copy small {
    margin-top: 3px;
    color: #7b8493;
    font-size: 10px;
}

.home-header--member .profile-dropdown .dropdown-item:hover {
    color: #111827;
    background: #f3f4f6;
}

.home-header--member .profile-dropdown .dropdown-item > i {
    width: 16px;
    color: #737c8d;
    text-align: center;
}

.home-header--member .profile-dropdown .dropdown-divider {
    height: 1px;
    margin: 6px 4px;
    background: #eceef1;
}

.home-header--member .profile-dropdown .member-logout-item {
    color: #b42318;
}

.home-header--member .profile-dropdown .member-logout-item > i {
    color: #c64a40;
}

.home-header--member .nav-tab:focus-visible,
.home-header--member .profile-btn:focus-visible,
.home-header--member #notificationBtn:focus-visible,
.home-header--member .workspace-trigger:focus-visible,
.home-header--member .credits-display:focus-visible,
.home-header--member .logo:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* The English labels and the canvas beta marker need a little more room than
 * the Chinese labels. Keep the account cluster intact and move the nav to its
 * own row before it becomes horizontally clipped on desktop. */
@media (max-width: 1434px) {
    .home-header--member,
    html body .home-header--member {
        height: 120px !important;
        min-height: 120px !important;
    }

    .home-header--member .header-content {
        grid-template-columns: minmax(170px, 1fr) auto auto !important;
        grid-template-rows: 58px 48px !important;
        height: 120px !important;
        min-height: 120px !important;
        padding: 7px 20px !important;
        column-gap: 12px !important;
        row-gap: 0 !important;
    }

    .home-header--member .header-content > .logo {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    .home-header--member .header-content > .mode-toggle-container {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    .home-header--member .header-content > .user-menu {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }

    .home-header--member .header-content.workspace-header-ready > .user-menu.workspace-user-menu-ready {
        display: flex !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 44px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .home-header--member .header-content > .nav-tabs {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        padding-right: 2px !important;
        justify-content: center !important;
    }

    html[lang^="en"] .home-header--member .header-content > .nav-tabs {
        justify-content: center !important;
    }
}

@media (max-width: 760px) {
    .home-header--member,
    html body .home-header--member {
        height: 120px !important;
        min-height: 120px !important;
    }

    .home-header--member .header-content {
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-rows: 58px 48px !important;
        height: 120px !important;
        min-height: 120px !important;
        padding: 7px 12px !important;
        column-gap: 8px !important;
    }

    .home-header--member .header-content > .logo {
        grid-column: 1 !important;
        grid-row: 1 !important;
        max-width: 154px !important;
    }

    .home-header--member #site-name {
        max-width: 108px;
        font-size: 14px;
    }

    .home-header--member .header-content > .mode-toggle-container {
        display: none !important;
    }

    .home-header--member .header-content > .user-menu {
        grid-column: 2 !important;
        grid-row: 1 !important;
        gap: 5px !important;
    }

    .home-header--member .header-content > .nav-tabs {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        justify-content: flex-start !important;
    }

    html[lang^="en"] .home-header--member .header-content > .nav-tabs {
        justify-content: flex-start !important;
    }

    .home-header--member .nav-tab {
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }

    .home-header--member .user-menu .user-info {
        gap: 5px !important;
    }

    .home-header--member .workspace-trigger,
    .home-header--member .avatar-display,
    .home-header--member .username-display {
        display: none !important;
    }

    .home-header--member .personal-account-summary {
        width: 128px;
        min-width: 128px;
        max-width: 128px;
        height: 38px;
        border: 0;
        border-radius: 7px;
        overflow: visible;
        background: transparent;
    }

    .home-header--member .personal-account-identity,
    .home-header--member .personal-account-credit-group > .personal-account-recharge {
        display: none !important;
    }

    .home-header--member .personal-account-credit-group {
        width: 128px;
        min-width: 128px;
        height: 38px;
        border: 1px solid #dfe3ff;
        border-radius: 7px;
        overflow: hidden;
        background: #f0f2ff;
    }

    .home-header--member .personal-account-credit-group .credits-display.personal-account-credit {
        width: 128px !important;
        min-width: 128px !important;
        max-width: 128px !important;
        padding: 0 7px !important;
        justify-content: center;
        background: #f0f2ff !important;
    }

    .home-header--member .personal-account-credit .workspace-credit-source {
        display: none;
    }

    .home-header--member .credits-display,
    .home-header--member .credits-display.workspace-credit-pill {
        width: 128px !important;
        min-width: 128px !important;
        max-width: 128px !important;
        padding: 0 7px !important;
    }

    .home-header--member .workspace-credit-source {
        display: none !important;
    }

    .home-header--member .credits-display .fa-plus {
        display: none;
    }

    .home-header--member #notificationContainer,
    .home-header--member #notificationBtn {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    .home-header--member .user-actions > .profile-dropdown,
    .home-header--member .user-actions > .profile-dropdown:hover,
    .home-header--member .user-actions .profile-btn {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 0 !important;
    }

    .home-header--member .user-actions .profile-btn > span,
    .home-header--member .user-actions .profile-btn .dropdown-arrow {
        display: none !important;
    }

    .home-header--member .profile-dropdown .dropdown-menu {
        position: fixed;
        top: 62px;
        right: 10px;
        width: min(236px, calc(100vw - 20px));
        max-height: calc(100vh - 74px);
    }
}

@media (max-width: 400px) {
    .home-header--member .header-content {
        padding-right: 9px !important;
        padding-left: 9px !important;
    }

    .home-header--member #site-name {
        max-width: 84px;
    }

    .home-header--member .credits-display,
    .home-header--member .credits-display.workspace-credit-pill {
        width: 128px !important;
        min-width: 128px !important;
        max-width: 128px !important;
    }
}

/* Homepage notification center */
.home-header--member #notificationContainer {
    position: relative !important;
    display: inline-flex !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    align-items: center !important;
    flex: 0 0 38px !important;
}

.home-header--member #notificationBtn {
    position: relative;
    display: inline-grid !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    place-items: center;
    border: 1px solid #e0e3e8 !important;
    border-radius: 7px !important;
    color: #4c5565 !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease !important;
}

.home-header--member #notificationBtn:hover,
.home-header--member #notificationBtn[aria-expanded="true"] {
    color: #20283a !important;
    border-color: #cbd1db !important;
    background: #f5f6f8 !important;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .07) !important;
}

.home-header--member #notificationBtn i {
    font-size: 14px !important;
    transform-origin: 50% 8%;
}

.home-header--member #notificationBtn[aria-expanded="true"] i {
    color: #303a66;
}

.home-header--member #notificationBadge {
    position: absolute !important;
    top: -6px !important;
    right: -7px !important;
    z-index: 2;
    display: none !important;
    box-sizing: border-box;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff;
    border-radius: 9px !important;
    color: #fff !important;
    background: #dc3f4f !important;
    box-shadow: 0 2px 5px rgba(185, 28, 44, .25);
    font-size: 9px !important;
    font-weight: 750 !important;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.home-header--member #notificationBadge.show {
    display: inline-flex !important;
}

.home-header--member #notificationPanel {
    position: absolute;
    top: calc(100% + 12px);
    right: -44px;
    z-index: 1100;
    display: flex;
    visibility: hidden;
    width: min(420px, calc(100vw - 32px));
    max-height: min(660px, calc(100vh - 98px));
    margin: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dfe3e9;
    border-radius: 8px;
    color: #1f2937;
    background: #fff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .16), 0 4px 14px rgba(15, 23, 42, .08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(.985);
    transform-origin: calc(100% - 60px) top;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.home-header--member #notificationPanel.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.home-header--member #notificationPanel::before {
    position: absolute;
    top: -6px;
    right: 58px;
    width: 10px;
    height: 10px;
    border-top: 1px solid #dfe3e9;
    border-left: 1px solid #dfe3e9;
    background: #fff;
    content: '';
    transform: rotate(45deg);
}

.home-header--member .notification-panel-heading {
    display: flex;
    min-height: 76px;
    padding: 17px 18px 14px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #eceef2;
    background: #fff;
}

.home-header--member .notification-panel-titlegroup {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.home-header--member .notification-panel-mark {
    display: inline-grid;
    width: 38px;
    min-width: 38px;
    height: 38px;
    border: 1px solid #dde1ee;
    border-radius: 7px;
    place-items: center;
    color: #35406f;
    background: #f4f5fb;
}

.home-header--member .notification-panel-mark i {
    font-size: 14px;
}

.home-header--member .notification-panel-titlegroup h2 {
    margin: 0;
    color: #182033;
    font-size: 15px;
    font-weight: 720;
    line-height: 1.35;
    letter-spacing: 0;
}

.home-header--member .notification-panel-titlegroup p {
    margin: 3px 0 0;
    overflow: hidden;
    color: #7a8291;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-header--member .notification-panel-close {
    display: inline-grid;
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    place-items: center;
    color: #8a919e;
    background: transparent;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.home-header--member .notification-panel-close:hover {
    color: #273044;
    background: #f1f3f5;
}

.home-header--member .notification-panel-toolbar {
    display: flex;
    min-height: 54px;
    padding: 10px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eceef2;
    background: #fafbfc;
}

.home-header--member .notification-filter {
    display: inline-flex;
    height: 32px;
    padding: 3px;
    gap: 2px;
    border: 1px solid #e2e5ea;
    border-radius: 6px;
    background: #f0f2f4;
}

.home-header--member .notification-filter-btn {
    display: inline-flex;
    height: 24px;
    padding: 0 9px;
    align-items: center;
    gap: 5px;
    border: 0;
    border-radius: 4px;
    color: #727a89;
    background: transparent;
    font-size: 11px;
    font-weight: 620;
    line-height: 1;
    cursor: pointer;
}

.home-header--member .notification-filter-btn.is-active {
    color: #273044;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
}

.home-header--member #notificationUnreadCount {
    display: inline-grid;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    place-items: center;
    color: #7f2631;
    background: #fbe4e7;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
}

.home-header--member .mark-all-read-btn {
    display: inline-flex;
    height: 30px;
    padding: 0 7px;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 5px;
    color: #5b6473;
    background: transparent;
    font-size: 11px;
    font-weight: 620;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.home-header--member .mark-all-read-btn:hover {
    color: #263154;
    background: #e9ebf4;
}

.home-header--member .mark-all-read-btn:disabled {
    color: #aeb4bd;
    cursor: default;
    opacity: .72;
}

.home-header--member .mark-all-read-btn:disabled:hover {
    background: transparent;
}

.home-header--member .mark-all-read-btn i {
    font-size: 11px;
}

.home-header--member .notification-panel-content {
    min-height: 170px;
    max-height: 448px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    scrollbar-color: #cfd4dc transparent;
    scrollbar-width: thin;
}

.home-header--member .notification-panel-content::-webkit-scrollbar {
    width: 6px;
}

.home-header--member .notification-panel-content::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: #cfd4dc;
}

.home-header--member .notification-item {
    position: relative;
    display: grid;
    min-height: 118px;
    padding: 15px 17px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    border-radius: 0;
    color: #1f2937;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: background-color .16s ease;
}

.home-header--member .notification-item:last-child {
    border-bottom: 0;
}

.home-header--member .notification-item:hover,
.home-header--member .notification-item:focus-visible {
    background: #f8f9fa;
}

.home-header--member .notification-item.unread {
    background: #f7f8fc;
}

.home-header--member .notification-item.unread::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: #4b568a;
    content: '';
}

.home-header--member .notification-item.unread:hover,
.home-header--member .notification-item.unread:focus-visible {
    background: #f1f3f9;
}

.home-header--member .notification-item-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    border: 1px solid #dce4ed;
    border-radius: 7px;
    place-items: center;
    color: #346486;
    background: #edf5fa;
}

.home-header--member .notification-item-icon i {
    font-size: 12px;
}

.home-header--member .notification-item-icon.notification-type-success {
    border-color: #cee8dc;
    color: #277255;
    background: #edf8f3;
}

.home-header--member .notification-item-icon.notification-type-warning {
    border-color: #eadfbd;
    color: #8a641c;
    background: #fbf7e9;
}

.home-header--member .notification-item-icon.notification-type-error {
    border-color: #edd1d5;
    color: #a33d49;
    background: #fbf0f2;
}

.home-header--member .notification-item-main {
    min-width: 0;
}

.home-header--member .notification-item-meta {
    display: flex;
    min-height: 17px;
    margin-bottom: 4px;
    align-items: center;
    gap: 7px;
}

.home-header--member .notification-type-label {
    color: #687282;
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
}

.home-header--member .notification-item .pinned-icon {
    color: #a9771f;
    font-size: 9px;
    transform: rotate(12deg);
}

.home-header--member .notification-item-time {
    margin-left: auto;
    color: #9aa1ac;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}

.home-header--member .notification-item-title {
    display: block;
    margin: 0 0 4px;
    overflow: hidden;
    color: #20283a;
    font-size: 13px;
    font-weight: 680;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-header--member .notification-item-content {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #697282;
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-header--member .notification-item.is-expanded .notification-item-content {
    display: block;
    overflow: visible;
}

.home-header--member .notification-item-content p,
.home-header--member .notification-item-content ul,
.home-header--member .notification-item-content ol {
    margin: 0 0 5px;
}

.home-header--member .notification-item-content p:last-child,
.home-header--member .notification-item-content ul:last-child,
.home-header--member .notification-item-content ol:last-child {
    margin-bottom: 0;
}

.home-header--member .notification-item-content ul,
.home-header--member .notification-item-content ol {
    padding-left: 17px;
}

.home-header--member .notification-item-content a {
    color: #3f5d8f;
    font-weight: 600;
    text-underline-offset: 2px;
}

.home-header--member .notification-item-content a:hover {
    color: #273d68;
}

.home-header--member .notification-item-footer {
    display: flex;
    height: 18px;
    margin-top: 6px;
    align-items: center;
    justify-content: space-between;
    color: #9aa1ad;
}

.home-header--member .notification-read-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 600;
}

.home-header--member .notification-item.unread .notification-read-state {
    color: #4a5688;
}

.home-header--member .notification-read-state i {
    font-size: 6px;
}

.home-header--member .notification-item-chevron {
    font-size: 9px;
    transition: transform .16s ease;
}

.home-header--member .notification-item.is-expanded .notification-item-chevron {
    transform: rotate(180deg);
}

.home-header--member .notification-loading,
.home-header--member .notification-empty {
    display: flex;
    min-height: 190px;
    padding: 30px 24px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8a929f;
    text-align: center;
}

.home-header--member .notification-loading {
    flex-direction: row;
    font-size: 12px;
}

.home-header--member .notification-loading i {
    color: #59658f;
}

.home-header--member .notification-empty-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    margin-bottom: 3px;
    border: 1px solid #e0e4e9;
    border-radius: 50%;
    place-items: center;
    color: #5d688f;
    background: #f5f6f9;
}

.home-header--member .notification-empty-icon i {
    margin: 0;
    font-size: 16px;
}

.home-header--member .notification-empty strong {
    color: #3d4656;
    font-size: 12px;
    font-weight: 650;
}

.home-header--member .notification-empty > span:last-child {
    font-size: 10px;
}

.home-header--member .notification-error .notification-empty-icon {
    color: #a33d49;
    background: #fbf0f2;
}

.home-header--member .notification-panel-footer {
    display: flex;
    min-height: 34px;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-top: 1px solid #eceef2;
    color: #a0a6b0;
    background: #fafbfc;
    font-size: 9px;
}

.home-header--member .notification-panel-footer i {
    font-size: 9px;
}

[data-theme="dark"] .home-header--member #notificationBtn {
    color: #c5cad4 !important;
    border-color: #3b4350 !important;
    background: #252b35 !important;
}

[data-theme="dark"] .home-header--member #notificationBadge {
    border-color: #252b35;
}

[data-theme="dark"] .home-header--member #notificationPanel {
    color: #e5e7eb;
    border-color: #3b4350;
    background: #222832;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
}

[data-theme="dark"] .home-header--member #notificationPanel::before,
[data-theme="dark"] .home-header--member .notification-panel-heading {
    border-color: #3b4350;
    background: #222832;
}

[data-theme="dark"] .home-header--member .notification-panel-titlegroup h2,
[data-theme="dark"] .home-header--member .notification-item-title {
    color: #f2f4f7;
}

[data-theme="dark"] .home-header--member .notification-panel-mark,
[data-theme="dark"] .home-header--member .notification-empty-icon {
    border-color: #414957;
    color: #c7ccef;
    background: #303744;
}

[data-theme="dark"] .home-header--member .notification-panel-toolbar,
[data-theme="dark"] .home-header--member .notification-panel-footer {
    border-color: #3b4350;
    background: #282e38;
}

[data-theme="dark"] .home-header--member .notification-filter {
    border-color: #444c59;
    background: #1d232b;
}

[data-theme="dark"] .home-header--member .notification-filter-btn.is-active {
    color: #eef0f4;
    background: #3a424f;
}

[data-theme="dark"] .home-header--member .notification-panel-content,
[data-theme="dark"] .home-header--member .notification-item {
    border-color: #383f4b;
    background: #222832;
}

[data-theme="dark"] .home-header--member .notification-item:hover,
[data-theme="dark"] .home-header--member .notification-item:focus-visible,
[data-theme="dark"] .home-header--member .notification-item.unread {
    background: #2a303c;
}

[data-theme="dark"] .home-header--member .notification-item-content,
[data-theme="dark"] .home-header--member .notification-panel-titlegroup p {
    color: #aeb5c1;
}

[data-theme="dark"] .home-header--member .notification-empty strong {
    color: #dfe3e9;
}

@media (max-width: 760px) {
    .home-header--member #notificationContainer {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        flex-basis: 36px !important;
    }

    .home-header--member #notificationBtn {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
    }

    .home-header--member #notificationPanel {
        position: fixed !important;
        top: 70px !important;
        right: 10px !important;
        bottom: auto !important;
        left: 10px !important;
        width: auto !important;
        max-height: calc(100dvh - 82px) !important;
        transform-origin: top right;
    }

    .home-header--member #notificationPanel::before {
        display: none;
    }

    .home-header--member .notification-panel-content {
        max-height: calc(100dvh - 236px);
    }
}

@media (max-width: 400px) {
    .home-header--member .notification-panel-heading {
        padding-right: 14px;
        padding-left: 14px;
    }

    .home-header--member .notification-panel-toolbar {
        padding-right: 10px;
        padding-left: 10px;
    }

    .home-header--member .notification-item {
        padding-right: 14px;
        padding-left: 14px;
    }

    .home-header--member .mark-all-read-btn span {
        display: none;
    }

    .home-header--member .mark-all-read-btn {
        width: 30px;
        padding: 0;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-header--member #notificationPanel,
    .home-header--member #notificationBtn,
    .home-header--member .notification-item-chevron {
        transition: none !important;
    }
}
