.htr-account-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 12, 0.62);
    backdrop-filter: blur(4px);
    z-index: 22200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.htr-account-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(400px, 100vw);
    background: #111318;
    border-left: 1px solid #232833;
    z-index: 22210;
    display: flex;
    flex-direction: column;
    transform: translateX(110%);
    transition: transform 0.28s ease;
    box-shadow: -18px 0 50px rgba(0, 0, 0, 0.4);
}

body.htr-account-open {
    overflow: hidden;
}

body.htr-account-open .htr-account-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.htr-account-open .htr-account-drawer {
    transform: translateX(0);
}

.htr-acc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    flex-shrink: 0;
}

.htr-acc-head-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.htr-acc-head-title i {
    color: #3b82f6;
}

.htr-acc-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #c5cad3;
    font-size: 22px;
    cursor: pointer;
}

.htr-acc-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.htr-acc-body {
    flex: 1;
    overflow: auto;
    padding: 0 16px 20px;
}

.htr-acc-card {
    background: linear-gradient(160deg, #2f7bff 0%, #2563eb 48%, #3b4fd6 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
    color: #fff;
}

.htr-acc-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.htr-acc-user img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.18);
}

.htr-acc-user strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.htr-acc-balances {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.htr-acc-bal {
    background: rgba(8, 14, 28, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 10px 10px 9px;
}

.htr-acc-bal span {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 4px;
}

.htr-acc-bal b,
.htr-acc-bal em {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 800;
    font-style: normal;
}

.htr-acc-eye {
    border: 0;
    background: transparent;
    color: #86efac;
    padding: 0;
    cursor: pointer;
    font-size: 12px;
}

.htr-acc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.htr-acc-topup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: #17306d;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.htr-acc-topup:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.08);
}

.htr-acc-topup span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.htr-acc-group {
    margin-bottom: 16px;
}

.htr-acc-label {
    color: #8b93a3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 4px 8px;
}

.htr-acc-list {
    background: #171a20;
    border: 1px solid #232833;
    border-radius: 14px;
    overflow: hidden;
}

.htr-acc-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 12px;
    color: #f3f4f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #232833;
}

.htr-acc-list a:last-child {
    border-bottom: 0;
}

.htr-acc-list a:hover {
    background: #1c2028;
    color: #fff;
    text-decoration: none;
}

.htr-acc-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.htr-acc-ico.blue { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }
.htr-acc-ico.sky { background: rgba(14, 165, 233, 0.16); color: #38bdf8; }
.htr-acc-ico.violet { background: rgba(139, 92, 246, 0.16); color: #a78bfa; }
.htr-acc-ico.rose { background: rgba(244, 63, 94, 0.16); color: #fb7185; }
.htr-acc-ico.green { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.htr-acc-ico.orange { background: rgba(249, 115, 22, 0.16); color: #fb923c; }
.htr-acc-ico.cyan { background: rgba(6, 182, 212, 0.16); color: #22d3ee; }

.htr-acc-list .fa-chevron-right {
    margin-left: auto;
    color: #6b7280;
    font-size: 11px;
}

.htr-acc-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(127, 29, 29, 0.28);
    color: #f87171;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.htr-acc-logout:hover {
    color: #fecaca;
    text-decoration: none;
    background: rgba(153, 27, 27, 0.4);
}

.frontend-header .user-dropdown {
    cursor: pointer;
}

.frontend-header .user-dropdown .dropdown-menu {
    display: none !important;
}

button.bottom-menu-item {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 768px) {
    .htr-account-drawer {
        width: 100vw;
        border-left: 0;
    }

    .htr-acc-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}
