/* Меню профиля */
.profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 25000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.profile-overlay.active {
    display: flex;
}

.profile-card {
    position: relative;
    width: min(360px, 100%);
    padding: 28px 24px 22px;
    border-radius: 22px;
    background: #151517;
    border: 1px solid rgba(255, 215, 0, 0.16);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
    color: #fff;
    text-align: center;
}

.profile-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.profile-close:hover {
    background: rgba(255, 75, 75, 0.85);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    margin: 4px auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: #111;
    border: 3px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}

.profile-name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.profile-role {
    margin: 5px 0 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

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

.profile-action {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-action:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
}

.profile-action.danger {
    color: #ff8a8a;
}

.profile-action.danger:hover {
    background: rgba(255, 75, 75, 0.1);
    border-color: rgba(255, 75, 75, 0.35);
}

@media (max-width: 480px) {
    .profile-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .profile-card {
        border-radius: 20px 20px 0 0;
        padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    }
}

.profile-password {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0;
}

.profile-password[hidden] {
    display: none !important;
}

.profile-password input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1d1d21;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.profile-password input:focus {
    border-color: #ffd700;
}

.profile-save-password {
    padding: 11px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #111;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.profile-password-status {
    min-height: 16px;
    font-size: 12px;
    text-align: center;
}

.profile-password-status.success { color: #6ee7a8; }
.profile-password-status.error { color: #ff6b6b; }
