
.profile-bottom-padding {
    padding-bottom: 20px;
}

.profile-aidapp-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 2px 0 18px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: #1b1e23;
}

.profile-aidapp-banner__glow {
    display: none;
}

.profile-aidapp-banner__icon {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(232, 236, 241, 0.72);
    font-size: 20px;
}

.profile-aidapp-banner__head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.profile-aidapp-banner__title {
    color: #eef1f5;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    min-width: 0;
}

.profile-aidapp-banner__text {
    position: relative;
    z-index: 1;
    color: rgba(232, 236, 241, 0.6);
    font-size: 13px;
    line-height: 1.45;
}

.profile-section-header:first-child,
.profile-section-header--first {
    margin-top: 0 !important;
}

.col-md-12.profile-section-header {
    margin-top: 18px;
}

.profile-section-header__link {
    color: #5ba3e6;
    text-decoration: none;
}

#profile .ui-hidden + .profile-api.card {
    margin-top: 18px;
}

.profile-achievements-header {
    margin-top: 24px;
}

.profile-achievements-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    text-align: left;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.profile-achievements-header:hover,
.profile-achievements-header:focus {
    color: inherit;
    outline: none;
}

.profile-achievements-header h2 {
    margin: 0;
}

.profile-achievements-chevron {
    margin-top: 10px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, color 0.2s;
}

.profile-achievements-header:hover .profile-achievements-chevron {
    color: rgba(255, 255, 255, 0.9);
}

.profile-achievements-header.is-expanded .profile-achievements-chevron {
    transform: rotate(180deg);
}

.profile-achievements-wrap {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.profile-achievements-inner {
    position: relative;
    max-height: 135px;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}

.profile-achievements-wrap.is-expanded .profile-achievements-inner {
    max-height: none;
}

.profile-achievements-wrap.is-expanded .profile-achievements-veil {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.profile-achievements-veil {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 135px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 48px;
    background: linear-gradient(to bottom, transparent 0%, rgba(18, 20, 23, 0.55) 40%, rgba(18, 20, 23, 0.97) 100%);
    cursor: pointer;
    z-index: 2;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.profile-achievements-veil::after {
    content: 'Кликните, чтобы раскрыть';
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.profile-achievements-wrap.veil-text-hidden .profile-achievements-veil::after {
    opacity: 0;
    visibility: hidden;
}

.profile-achievements--locked {
    position: relative;
}

.profile-achievements--locked .profile-achievements-inner {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.profile-achievements--locked .profile-achievements-veil {
    display: none;
}

.profile-achievements-coming-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.profile-achievements-coming-overlay i {
    font-size: 24px;
    opacity: 0.7;
}

.profile-achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.profile-achievement-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 8px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 16px;
    background: #1a1d22;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s;
}

.profile-achievement-tile:active {
    transform: scale(0.96);
}

.profile-achievement-tile:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.12);
}

.profile-achievement-tile[data-status="done"] {
    background: linear-gradient(165deg, #1e2620 0%, #1a1d22 100%);
    border-color: rgba(67, 181, 129, 0.3);
}

.profile-achievement-tile[data-status="done"]::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #43b581;
    border-radius: 50%;
}

.profile-achievement-tile[data-status="done"]:hover {
    border-color: rgba(67, 181, 129, 0.5);
    box-shadow: 0 8px 24px rgba(67, 181, 129, 0.2);
}

.profile-achievement-tile[data-status="pending"] {
    opacity: 0.92;
}

.profile-achievement-tile[data-status="pending"]:hover {
    opacity: 1;
}

.profile-achievement-tile__ring {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-achievement-tile[data-status="done"] .profile-achievement-tile__ring {
    background: linear-gradient(145deg, #43b581 0%, #2d8f5f 100%);
    box-shadow: 0 2px 12px rgba(67, 181, 129, 0.4);
}

.profile-achievement-tile[data-status="pending"] .profile-achievement-tile__ring {
    background: #2a2e35;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.profile-achievement-tile__ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.profile-achievement-tile__ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2.5;
}

.profile-achievement-tile__ring .ring-fill {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease, stroke 0.2s;
}

.profile-achievement-tile[data-status="done"] .ring-bg,
.profile-achievement-tile[data-status="done"] .ring-fill {
    stroke: transparent;
}

.profile-achievement-tile[data-status="pending"] .ring-fill {
    stroke: #f0b429;
}

.profile-achievement-tile__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.profile-achievement-tile[data-status="done"] .profile-achievement-tile__icon {
    filter: brightness(1.1);
}

.profile-achievement-tile__name {
    position: relative;
    z-index: 1;
    font-size: 10px;
    font-weight: 600;
    color: #e8ecf1;
    text-align: center;
    line-height: 1.25;
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-achievement-tile[data-status="pending"] .profile-achievement-tile__name {
    color: #9ca3af;
}

@media (max-width: 400px) {
    .profile-achievements-grid {
        gap: 8px;
    }
    .profile-achievement-tile {
        padding: 12px 6px;
    }
    .profile-achievement-tile__ring {
        width: 40px;
        height: 40px;
    }
    .profile-achievement-tile__icon {
        font-size: 18px;
    }
}

.profile-achievement-panel {
    padding: 24px 20px 32px;
    text-align: center;
}

.profile-achievement-panel__icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
}

.profile-achievement-panel__title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px;
}

.profile-achievement-panel__desc {
    font-size: 14px;
    color: #9aa0aa;
    margin: 0 0 16px;
    line-height: 1.5;
}

.profile-achievement-panel__progress {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.profile-achievement-panel__progress--done {
    color: #43b581;
}

.profile-achievement-panel__progress--pending {
    color: #f0b429;
}

.profile-achievement-panel__close {
    width: 100%;
}

.profile-api.card {
    padding: 16px !important;
    background: #1b1e23;
    border: 1px solid rgba(255, 255, 255, 0.055);
}

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

.profile-api__intro-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(232, 236, 241, 0.66);
    font-size: 18px;
}

.profile-api__title {
    color: #eef2f7;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.profile-api__desc {
    margin-bottom: 14px;
    color: rgba(232, 236, 241, 0.58);
    font-size: 12.5px;
    line-height: 1.45;
}

.profile-api__placeholder {
    color: rgba(255, 255, 255, 0.5);
}

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

.profile-api__key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.profile-api__key-row:last-of-type {
    border-bottom: 0;
}

.profile-api__value {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
    color: #d6dbe3;
    font-family: ui-monospace, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-api__copy-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.profile-api__copy-btn:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
}

.profile-api__copy-btn i {
    font-size: 14px;
}

.profile-api__actions {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-api__ghost-btn {
    width: 100%;
    border: 0;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(232, 236, 241, 0.76);
    border-radius: 24px;
    height: 44px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s, border-color 0.2s, color 0.2s;
}

.profile-api__ghost-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.065);
    color: #eef6ff;
}

.profile-auth-card {

    padding: 15px 16px !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.055) !important;
    background: #1b1e23;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.3s ease, background 0.2s;
}
.profile-auth-card:active  { background: #20242a; }
.profile-auth-card:focus   { outline: none; }

.profile-auth-card.is-bound {
    border-color: rgba(255, 255, 255, 0.07) !important;
    background: #1b1e23;
}

.profile-auth-card__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.profile-auth-card__left span:last-child {
    font-size: 13px;
    font-weight: 500;
    color: rgba(232, 236, 241, 0.68);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
    flex: 1;
    min-width: 0;
}

.profile-auth-card.is-bound .profile-auth-card__left span:last-child {
    color: #43b581;
}

.profile-auth-card__left i {
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
    color: rgba(232, 236, 241, 0.52);
    transition: color 0.3s;
}

.profile-auth-card.is-bound .profile-auth-card__left i {
    color: #43b581;
}

.profile-auth-card__chevron {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    margin-left: 8px;
}

.auth-panel {
    padding: 24px 20px 28px;
    display: flex;
    flex-direction: column;
}

.auth-panel__title {
    font-size: 20px;
    font-weight: 600;
    color: #dcdde0;
    margin-bottom: 20px;
    text-align: center;
}

.auth-panel__tabs {
    margin-bottom: 16px;
}

.auth-panel .toggle-content__item {
    padding-top: 4px;
}

.auth-panel__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-panel__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-panel__label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-panel__input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #e8ecf1;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.auth-panel__input:focus    { border-color: rgba(99,149,249,0.6); }
.auth-panel__input::placeholder { color: rgba(255,255,255,0.22); }

.auth-panel__pass-wrap { position: relative; }
.auth-panel__pass-wrap .auth-panel__input { padding-right: 46px; }

.auth-panel__eye {
    position: absolute;
    right: 0; top: 0;
    height: 44px; width: 44px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer; padding: 0;
    transition: color 0.2s;
}
.auth-panel__eye:hover { color: rgba(255,255,255,0.75); }

.auth-panel__error {
    font-size: 13px;
    color: #f04747;
    padding: 8px 12px;
    background: rgba(240,71,71,0.1);
    border: 1px solid rgba(240,71,71,0.2);
    border-radius: 10px;
    line-height: 1.4;
}

.auth-panel__submit { margin-top: 6px; }

.auth-panel__current {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    padding: 0 2px 2px;
}
.auth-panel__current strong { color: rgba(255,255,255,0.85); }

.auth-panel--success {
    align-items: center;
    text-align: center;
    padding-top: 24px;
}
.auth-panel__success-title {
    font-size: 22px;
    font-weight: 600;
    color: #dcdde0;
    margin-bottom: 8px;
}
.auth-panel__success-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

.profile-web-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(220, 80, 80, 0.07);
    border: 1px solid rgba(220, 80, 80, 0.25);
    border-radius: 12px;
    color: #e07070;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
}
.profile-web-logout-btn:hover {
    background: rgba(220, 80, 80, 0.13);
    border-color: rgba(220, 80, 80, 0.4);
}
.profile-web-logout-btn i {
    font-size: 16px;
    flex-shrink: 0;
}

.profile-acc-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.profile-acc-group__hint {
    padding: 2px 2px 4px;
    color: rgba(232, 236, 241, 0.58);
    font-size: 12.5px;
    line-height: 1.45;
}
.profile-acc-group__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-acc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    background: #1b1e23;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.055);
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.profile-acc-card:hover {
    background: #20242a;
    border-color: rgba(255,255,255,0.08);
}
.profile-acc-card:active {
    background: #22262d;
}
.profile-acc-card.is-current {
    border-color: rgba(255,255,255,0.07);
    background: #1b1e23;
    cursor: default;
}
.profile-acc-card__avatar {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
    color: rgba(232, 236, 241, 0.58);
    font-size: 18px;
}
.profile-acc-card.is-current .profile-acc-card__avatar {
    background: #40a7e333;
    color: #409ee3;
}
.profile-acc-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.profile-acc-card__name {
    font-size: 14px;
    font-weight: 600;
    color: #e1e4ea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-acc-card__sub {
    font-size: 12px;
    color: rgba(232, 236, 241, 0.46);
}
.profile-acc-card__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.profile-acc-card__badge {
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 20px;
    background: rgba(255,255,255,0.055);
    color: rgba(232, 236, 241, 0.68);
    font-weight: 600;
}
.profile-acc-card__badge--switch {
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.profile-acc-card__badge--switch:hover {
    background: rgba(255,255,255,0.085);
    color: #eef1f5;
}
.profile-acc-card__badge--current {
    background: rgba(67, 181, 129, 0.11);
    color: #52d193;
}
.profile-acc-card__remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: rgba(232, 236, 241, 0.38);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s;
}
.profile-acc-card__remove:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(232, 236, 241, 0.72);
}
.profile-acc-group__add-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 12px;
    background: #1b1e23;
    border: 0;
    border-radius: 14px;
    color: rgba(232, 236, 241, 0.82);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.profile-acc-group__add-btn:hover {
    background: #20242a;
    color: #fff;
}
.profile-acc-group__add-btn:active {
    background: #22262d;
}
.profile-acc-group__add-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.055);
    color: rgba(232, 236, 241, 0.66);
}
.profile-acc-group__add-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.profile-acc-group__add-text strong {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}
.profile-acc-group__add-text small {
    color: rgba(232, 236, 241, 0.48);
    font-size: 12px;
    line-height: 1.25;
}
.profile-acc-group__empty {
    text-align: center;
    padding: 16px 12px;
    color: rgba(232, 236, 241, 0.42);
    font-size: 13px;
    border: 0;
    background: #1b1e23;
    border-radius: 14px;
}
