/* Profile area: left menu + right content */

.content.shell_profile {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 20px 24px 48px !important;
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    box-sizing: border-box;
    align-items: start;
}

.shell_profile_nav {
    position: sticky;
    top: calc(var(--shell_header_height, 56px) + 12px);
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 12px 16px;
    box-sizing: border-box;
}

.shell_profile_subhead {
    display: none;
}

/* User card */
.shell_profile_user {
    padding: 4px 4px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.shell_profile_user_top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.shell_profile_ring {
    --p: 0;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    flex: 0 0 58px;
    position: relative;
    background: conic-gradient(var(--main_color, #f6b007) calc(var(--p) * 1%), #2a2a2e 0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shell_profile_ring_inner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #161618;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shell_profile_avatar {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.shell_profile_avatar_fallback {
    color: #9a9ca3;
    font-size: 11px;
    font-weight: 700;
}

.shell_profile_ring_pct {
    position: absolute;
    right: -2px;
    bottom: -2px;
    min-width: 28px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #1c1c20;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shell_profile_user_meta {
    min-width: 0;
}

.shell_profile_user_name {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell_profile_user_id {
    margin-top: 2px;
    color: #8b8d95;
    font-size: 12px;
}

.shell_profile_user_balance {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: #8b8d95;
    font-size: 12px;
}

.shell_profile_user_balance strong {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.shell_profile_deposit_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 10px;
    background: var(--main_color, #f6b007);
    color: #111;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.shell_profile_deposit_btn:hover {
    text-decoration: none;
    color: #111;
    filter: brightness(1.05);
}

.shell_profile_group {
    margin-bottom: 12px;
}

.shell_profile_group_title {
    padding: 6px 12px 8px;
    color: #6f7178;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.shell_profile_menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shell_profile_menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #c5c6cc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}

.shell_profile_menu_ico {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.9;
}

.shell_profile_menu_ico svg {
    width: 18px;
    height: 18px;
    display: block;
}

.shell_profile_menu a > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.shell_profile_badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--main_color, #f6b007);
    color: #111;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shell_profile_menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.shell_profile_menu a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.shell_profile_menu a.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--main_color, #f6b007);
}

.shell_profile_menu a.is-active .shell_profile_menu_ico {
    color: var(--main_color, #f6b007);
    opacity: 1;
}

.shell_profile_logout {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #f07178;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(240, 113, 120, 0.25);
}

.shell_profile_logout:hover {
    background: rgba(240, 113, 120, 0.08);
    text-decoration: none;
}

.shell_profile_main {
    min-width: 0;
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 22px 22px 28px;
    box-sizing: border-box;
}

.shell_profile_main_wide {
    background: transparent;
    border: 0;
    padding: 0;
}

.shell_profile_main > h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.shell_profile_main_wide > h1 {
    margin-bottom: 16px;
}

.shell_profile_progress_card {
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.shell_profile_progress_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #c5c6cc;
    font-size: 13px;
    font-weight: 600;
}

.shell_profile_progress_head strong {
    color: #fff;
    font-size: 14px;
}

.shell_profile_progress_bar {
    height: 8px;
    border-radius: 8px;
    background: #2a2a2e;
    overflow: hidden;
}

.shell_profile_progress_bar > div {
    height: 100%;
    border-radius: 8px;
    background: var(--main_color, #f6b007);
}

.shell_profile_cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.shell_profile_card {
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 16px 14px;
    box-sizing: border-box;
}

.shell_profile_card_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.shell_profile_card_head h2 {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.shell_profile_card_edit {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8b8d95;
    background: #1c1c20;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.shell_profile_card_edit:hover {
    color: #fff;
    text-decoration: none;
}

.shell_profile_card_rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shell_profile_card_actions {
    margin-top: 8px;
}

.shell_profile_summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.shell_profile_summary_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #1c1c20;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.shell_profile_summary_row span {
    color: #8b8d95;
    font-size: 13px;
}

.shell_profile_summary_row strong {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.shell_profile_pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: #2a2a2e;
    color: #c5c6cc;
}

.shell_profile_pill.is-ok {
    background: rgba(61, 184, 112, 0.16);
    color: #3db870;
}

.shell_profile_pill.is-warn {
    background: rgba(246, 176, 7, 0.16);
    color: var(--main_color, #f6b007);
}

.shell_profile_pill.is-bad {
    background: rgba(240, 113, 120, 0.16);
    color: #f07178;
}

.shell_profile_pill.is-muted {
    background: #2a2a2e;
    color: #8b8d95;
}

.shell_profile_pill.is-vip {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffd700;
}

.shell_profile_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shell_profile_action_primary,
.shell_profile_action_secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
}

.shell_profile_action_primary {
    background: var(--main_color, #f6b007);
    color: #111;
}

.shell_profile_action_secondary {
    background: #1c1c20;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shell_profile_action_primary:hover,
.shell_profile_action_secondary:hover {
    text-decoration: none;
    filter: brightness(1.05);
}

.shell_profile_main .modal_content {
    padding: 0;
}

.shell_profile_block {
    max-width: none;
    width: 100%;
}

.shell_profile_block_wide {
    max-width: none;
    width: 100%;
}

.shell_profile_balances {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.shell_profile_balance_item {
    padding: 12px 14px;
    border-radius: 10px;
    background: #1c1c20;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #8b8d95;
    font-size: 13px;
}

.shell_profile_balance_item b {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 16px;
}

.shell_profile_form .modal_double_head,
.shell_profile_main .modal_double_head {
    color: #c5c6cc;
    font-size: 13px;
    font-weight: 600;
    margin: 16px 0 6px;
}

.shell_profile_form_cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shell_profile_form_cards .shell_profile_card input,
.shell_profile_form_cards .shell_profile_card select {
    margin-top: 8px;
}

.shell_profile_form_cards .shell_profile_card input:first-of-type,
.shell_profile_form_cards .shell_profile_card select:first-of-type {
    margin-top: 0;
}

.shell_profile_form input[type="text"],
.shell_profile_form input[type="email"],
.shell_profile_form input[type="tel"],
.shell_profile_form input[type="password"],
.shell_profile_form select,
.shell_profile_main #deposit_form input[type="text"],
.shell_profile_main #deposit_form select,
.shell_profile_main .summa-input,
.shell_profile_main .currency-select {
    width: 100%;
    height: 44px;
    margin-top: 8px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #1c1c20;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

.shell_profile_form button[type="submit"],
.shell_profile_main #deposit_form button[type="submit"],
.shell_profile_main #deposit_form button {
    width: 100%;
    height: 46px;
    margin-top: 16px;
    border: 0;
    border-radius: 10px;
    background: var(--main_color, #f6b007);
    color: #111;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.shell_profile_form_footer {
    margin-top: 16px;
    text-align: center;
}

.shell_profile_form_footer a {
    color: var(--main_color, #f6b007);
    font-weight: 600;
    text-decoration: none;
}

.shell_profile_main .account_id {
    color: #c5c6cc;
    margin: 10px 0 6px;
}

.shell_profile_settings_avatar {
    margin-bottom: 16px;
    text-align: center;
}

.shell_profile_main .avatar,
.shell_profile_settings_avatar .avatar {
    margin: 0 auto 8px;
}

.shell_profile_main .history_tr {
    margin-top: 8px;
}

.shell_profile_main h3 {
    color: #fff;
    font-size: 16px;
    margin: 22px 0 12px;
}

/* Combined balance + deposit control in header */
.head_line .shell_balance_deposit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 6px 0 12px;
    border-radius: 10px;
    background: #1c1c20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    box-sizing: border-box;
}

.head_line .shell_balance_deposit:hover {
    border-color: rgba(246, 176, 7, 0.45);
    text-decoration: none;
    color: #fff;
}

.head_line .shell_balance_deposit .shell_balance_amount {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.head_line .shell_balance_deposit .upd_balance {
    color: #fff;
}

.head_line .shell_balance_deposit .upd_symbol {
    color: #9a9ca3;
    font-size: 12px;
    font-weight: 600;
}

.head_line .shell_balance_deposit .shell_balance_cta {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--main_color, #f6b007);
    color: #111;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.head_line .shell_profile_btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1c1c20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #c5c6cc;
    text-decoration: none;
}

.head_line .shell_profile_btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.head_line .shell_profile_btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@media (max-width: 1000px) {
    /* Selector matches `.under_body .page > .content`, which resets padding with !important */
    .content.shell_profile,
    .under_body .page > .content.shell_profile {
        display: block !important;
        padding: 0 14px var(--shell_bottom_space, 132px) !important;
    }

    .shell_profile_nav {
        position: static;
        padding: 12px;
        margin: 14px 0;
    }

    /* Menu lives on the hub page only */
    .shell_profile_nav:not(.is-hub) {
        display: none;
    }

    /* Static, not sticky: ancestors use overflow-x hidden, which kills position: sticky */
    .shell_profile_subhead {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 -14px 14px;
        padding: 12px 14px;
        background: var(--body_bg, #0d0d0f);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-sizing: border-box;
    }

    .shell_profile_back {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #1c1c20;
        border: 1px solid rgba(255, 255, 255, 0.06);
        color: #fff;
        text-decoration: none;
    }

    .shell_profile_back svg {
        display: block;
        width: 20px;
        height: 20px;
    }

    .shell_profile_subhead_title {
        min-width: 0;
        color: #fff;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.2;
    }

    /* Section name already shown in the bar above */
    .shell_profile_subhead ~ .shell_profile_main > h1 {
        display: none;
    }

    .shell_profile_group .shell_profile_menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .shell_profile_menu a {
        min-height: 42px;
    }

    .shell_profile_menu a.is-active::before {
        display: none;
    }

    .shell_profile_menu a.is-active {
        color: #111;
        background: var(--main_color, #f6b007);
    }

    .shell_profile_menu a.is-active .shell_profile_menu_ico {
        color: #111;
    }

    .shell_profile_cards {
        grid-template-columns: 1fr;
    }

    .shell_profile_balances {
        grid-template-columns: 1fr;
    }

    .shell_profile_main {
        padding: 16px;
    }

    .head_line .shell_balance_deposit .shell_balance_cta {
        display: none;
    }
}
