#panel .upper {
    padding: 12px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    background: #262626;
    border-bottom: 1px solid #1f1f1f;
    transition: background .18s ease, border-color .18s ease;
}

#panel .upper .wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px;
    position: relative;
}

.lafd-account-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    order: 1;
    z-index: 3000;
}

.lafd-account-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 2px 9px 2px 2px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background .25s ease, border-color .25s ease;
}

.lafd-account-trigger:hover,
.lafd-account-container.open .lafd-account-trigger,
#lafd-account-toggle:checked ~ .lafd-account-trigger {
    background: rgba(168,0,0,.22);
    border-color: rgba(224,32,32,.4);
}

.lafd-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.12);
    flex: 0 0 28px;
}

.lafd-welcome-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    line-height: 1.1;
}

.lafd-username {
    font-size: 12px;
    font-weight: bold;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.lafd-usergroup {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #ff8a8a;
    line-height: 1;
    white-space: nowrap;
}

.lafd-account-trigger .lafd-chevron {
    display: inline-flex;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}

.lafd-account-container.open .lafd-account-trigger .lafd-chevron,
#lafd-account-toggle:checked ~ .lafd-account-trigger .lafd-chevron {
    transform: rotate(180deg);
}

.lafd-panels-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    order: 2;
    margin-left: 8px;
    z-index: 3000;
}

.lafd-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 11px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.lafd-more-btn:hover,
.lafd-panels-container.open .lafd-more-btn,
.lafd-more-toggle-input:checked ~ .lafd-more-btn {
    background: rgba(168,0,0,.22);
    border-color: rgba(224,32,32,.4);
    color: #ff6b6b;
}

.lafd-more-btn .lafd-chevron {
    display: inline-flex;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}

.lafd-panels-container.open .lafd-more-btn .lafd-chevron,
.lafd-more-toggle-input:checked ~ .lafd-more-btn .lafd-chevron {
    transform: rotate(180deg);
}

.lafd-more-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e02020;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.lafd-more-badge[hidden] {
    display: none;
}

.lafd-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    min-width: 205px;
    padding: 6px;
    background: #262626;
    border: 1px solid #2b2b2b;
    border-radius: 7px;
    box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(.98);
    transform-origin: top left;
    pointer-events: none;
    transition:
        opacity .38s cubic-bezier(.4,0,.2,1),
        transform .38s cubic-bezier(.4,0,.2,1),
        visibility .38s;
    z-index: 100001;
}

.lafd-panels-container.open .lafd-more-menu,
.lafd-more-toggle-input:checked ~ .lafd-more-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.lafd-more-menu a,
.lafd-more-menu ul.lafd-icon-list li a {
    opacity: 0;
    transform: translateY(3px);
    transition:
        background .2s ease,
        color .2s ease,
        padding .25s cubic-bezier(.4,0,.2,1),
        opacity .4s ease,
        transform .4s cubic-bezier(.4,0,.2,1);
}

.lafd-panels-container.open .lafd-more-menu a,
.lafd-more-toggle-input:checked ~ .lafd-more-menu a,
.lafd-panels-container.open .lafd-more-menu ul.lafd-icon-list li a,
.lafd-more-toggle-input:checked ~ .lafd-more-menu ul.lafd-icon-list li a {
    opacity: 1;
    transform: translateY(0);
}

.lafd-more-menu ul.lafd-icon-list li:nth-child(1) a {
    transition-delay: .05s;
}

.lafd-more-menu ul.lafd-icon-list li:nth-child(2) a {
    transition-delay: .1s;
}

.lafd-more-menu ul.lafd-icon-list li:nth-child(3) a {
    transition-delay: .15s;
}

.lafd-more-menu ul.lafd-icon-list li:nth-child(4) a {
    transition-delay: .2s;
}

.lafd-more-menu ul.lafd-icon-list li:nth-child(5) a {
    transition-delay: .25s;
}

.lafd-more-menu > a.lafd-icon-logout {
    transition-delay: .22s;
}

.lafd-more-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 32px;
    padding: 0 9px;
    border-radius: 5px;
    text-decoration: none !important;
    color: inherit;
    font-size: 11px;
    font-weight: 500;
    box-sizing: border-box;
    white-space: nowrap;
}

.lafd-more-menu a:hover {
    background: rgba(168,0,0,.20);
    color: #ff6b6b;
    padding-left: 12px;
}

.lafd-more-menu a svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    opacity: .72;
    transition: opacity .2s ease, transform .3s cubic-bezier(.4,0,.2,1);
}

.lafd-more-menu a:hover svg {
    opacity: 1;
    transform: scale(1.08);
}

.lafd-more-menu a img {
    display: none !important;
}

.lafd-more-divider {
    height: 1px;
    margin: 5px 4px;
    background: rgba(255,255,255,.08);
}

.lafd-pms-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.lafd-pms-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.lafd-pms-count {
    flex: 0 0 auto;
    padding: 3px 6px;
    border-radius: 9px;
    background: rgba(224,32,32,.18);
    color: #ff8a8a;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s ease, transform .3s cubic-bezier(.4,0,.2,1);
}

.lafd-more-menu a:hover .lafd-pms-count {
    background: rgba(224,32,32,.3);
    transform: scale(1.05);
}

#panel .upper .wrapper > form {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    order: 3;
    margin-left: auto;
}

#panel .upper fieldset#search {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    height: 36px;
    margin: 0;
    padding: 3px 3px 3px 10px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.10);
    box-sizing: border-box;
    float: none;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

#panel .upper fieldset#search::before {
    content: '';
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: .5;
    transition: opacity .18s ease, transform .18s ease;
}

#panel .upper fieldset#search:focus-within::before {
    opacity: .9;
    transform: scale(1.05);
}

#panel .upper fieldset#search input.textbox {
    width: 130px;
    max-width: 220px;
    margin: 0;
    padding: 7px 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    transition: width .18s ease;
}

#panel .upper fieldset#search input.textbox::placeholder {
    color: rgba(255,255,255,.4);
    transition: color .18s ease;
}

#panel .upper fieldset#search input.textbox:focus::placeholder {
    color: rgba(255,255,255,.25);
}

#panel .upper fieldset#search input.button {
    margin: 0;
    border: 0;
    border-radius: 14px;
    padding: 6px 14px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    line-height: 1;
    align-self: stretch;
    text-transform: uppercase;
    letter-spacing: .4px;
    flex: 0 0 auto;
    background: #a80000;
    color: #fff;
    transition: background .15s ease, transform .1s ease;
}

#panel .upper fieldset#search input.button:hover {
    background: #e02020;
}

#panel .upper fieldset#search input.button:active {
    transform: scale(.96);
}

#panel .upper fieldset#search input[type="hidden"] {
    display: none;
}

#panel .upper fieldset#search:hover {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.07);
}

#panel .upper fieldset#search:focus-within {
    background: rgba(255,255,255,.09);
    border-color: #e02020;
    box-shadow: 0 0 0 3px rgba(224,32,32,.18);
}

#panel .upper fieldset#search:focus-within input.textbox {
    width: 160px;
}

#panel .upper .wrapper > .welcome {
    order: 1;
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    #panel .upper .wrapper {
        gap: 6px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #panel .upper fieldset#search input.textbox {
        width: 95px;
    }

    #panel .upper fieldset#search:focus-within input.textbox {
        width: 120px;
    }
}

@media (max-width: 640px) {
    #panel .upper {
        padding: 8px 0;
    }

    #panel .upper .wrapper {
        justify-content: center;
    }

    .lafd-account-container {
        order: 1;
    }

    .lafd-panels-container {
        order: 2;
        margin-left: 0;
    }

    #panel .upper .wrapper > form {
        order: 3;
        flex: 1 1 180px;
        max-width: 100%;
        min-width: 150px;
        width: auto;
        margin-left: 6px;
    }

    #panel .upper fieldset#search {
        width: 100%;
        border-radius: 18px;
    }

    #panel .upper fieldset#search input.textbox {
        width: auto;
        flex: 1 1 auto;
        min-width: 40px;
    }

    #panel .upper fieldset#search:focus-within input.textbox {
        width: auto;
    }

    .lafd-more-menu {
        left: 0;
        right: auto;
        min-width: 210px;
        max-width: calc(100vw - 16px);
    }
}

.lafd-more-menu ul.lafd-icon-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lafd-more-menu ul.lafd-icon-list li {
    margin: 0;
    padding: 0;
}

.lafd-more-menu ul.lafd-icon-list li a img {
    display: none !important;
}

.lafd-more-menu a,
.lafd-more-menu ul.lafd-icon-list li a {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 32px;
    padding: 0 9px;
    border-radius: 5px;
    text-decoration: none !important;
    color: inherit;
    font-size: 11px;
    font-weight: 500;
    box-sizing: border-box;
    white-space: nowrap;
}

.lafd-more-menu a:hover,
.lafd-more-menu ul.lafd-icon-list li a:hover {
    background: rgba(168,0,0,.20);
    color: #ff6b6b;
    padding-left: 12px;
}

.lafd-more-menu a::before,
.lafd-more-menu ul.lafd-icon-list li a::before {
    content: '';
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: .72;
    filter: invert(1);
    transition: opacity .2s ease, transform .3s cubic-bezier(.4,0,.2,1);
}

.lafd-more-menu a:hover::before,
.lafd-more-menu ul.lafd-icon-list li a:hover::before {
    opacity: 1;
    transform: scale(1.1);
}

.lafd-more-menu ul.lafd-icon-list li a[href*="usercp.php"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}

.lafd-more-menu ul.lafd-icon-list li a[href*="modcp.php"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l8 3v6c0 5-3.5 8.5-8 11-4.5-2.5-8-6-8-11V5l8-3z'/%3E%3C/svg%3E");
}

.lafd-more-menu ul.lafd-icon-list li a[href*="admin"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4v5c0 5-3.5 8-8 9-4.5-1-8-4-8-9V7l8-4z'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
}

.lafd-more-menu ul.lafd-icon-list li a[href*="buddypopup"]::before,
.lafd-more-menu a#buddylink::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3C/svg%3E");
}

.lafd-more-menu ul.lafd-icon-list li a[href*="private.php"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

.lafd-more-menu ul.lafd-icon-list li a[href*="search.php"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
}

.lafd-more-menu ul.lafd-icon-list li a[href*="action=profile"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}

.lafd-more-menu ul.lafd-icon-list li a[href*="alerts.php"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
}

.lafd-account-container > li.myalerts,
.lafd-account-container > .myalerts {
    position: static !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lafd-account-container a[href*="alerts.php"],
.lafd-account-container a[href*="alerts.php"]:hover {
    position: absolute !important;
    top: -7px !important;
    right: -7px !important;
    left: auto !important;
    z-index: 3001;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    min-width: 16px;
    height: 16px;
    margin: 0 !important;
    padding: 0 6px !important;
    border-radius: 9px;
    background: rgba(255,255,255,.10) !important;
    color: #fff !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;
    box-shadow: 0 0 0 2px #262626;
}

.lafd-account-container a.myalerts::before {
    content: '';
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: .85;
}

.lafd-account-container a.myalerts::after {
    content: "0";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 10px;
    color: #fff;
    font-size: 10px !important;
    font-weight: bold;
    line-height: 10px;
    position: relative;
    top: -0.5px;
}

.lafd-account-container a.myalerts.js-ready::after {
    display: none;
}

.lafd-account-container a.myalerts.has-alerts {
    background: #a80000 !important;
    animation: lafd-badge-pop .3s cubic-bezier(.34,1.56,.64,1);
}

.lafd-account-container a[href*="alerts.php"] .myalerts_count,
.lafd-account-container a[href*="alerts.php"] .myalerts_count * {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: bold !important;
    line-height: 10px !important;
    letter-spacing: 0 !important;
    vertical-align: top !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    top: -0.5px;
}

@keyframes lafd-badge-pop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.lafd-more-menu a.lafd-icon-logout::before {
    display: none;
}

.lafd-more-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

li.alerts.alerts--new::marker,
li.alerts::marker,
.lafd-account-container li::marker {
    content: '' !important;
    display: none !important;
}

li.alerts.alerts--new,
li.alerts {
    list-style: none !important;
    list-style-type: none !important;
}